Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp930962rdb; Wed, 6 Dec 2023 04:17:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHP0CLiUWpHzRyAeXQEyaYu5+O9BD0KZ9FMKlXGzgaA9PPB+sbkxJszc+UqyeOtIsTDXnYW X-Received: by 2002:a17:90b:224c:b0:286:ec45:d395 with SMTP id hk12-20020a17090b224c00b00286ec45d395mr565157pjb.17.1701865070470; Wed, 06 Dec 2023 04:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701865070; cv=none; d=google.com; s=arc-20160816; b=DLVr7bYuO4UJl3zhqoT/Q0kM4JV4vYIeGAcTp5bT7kFzwQYJOy8XdyNtrggsr8BCxH wiwH3yjE8bWuYcaJQhzLyNkHR8Yod74lw27Z6CNuc7dicyojMLNSKZpkbHkhQgRYYVnE 66sTikgFrAdp30T2o7M4NFZmtr2z5cKLyVG8WzLzqqZRyLm+Sy3QnKfoCaq24w7UQXDE ScVFc5KhdOVjTv1SbYaRbOua5QjPhw1TMnKvK99r/SOlpqd28fsw2hxxolvb8yLoOPlk YpIPe6oWYPhloTMctTDOlQp8kvFGx9FBltoRoNhekq1Lke/xFx3LeaQ6LE3e0ZEkgnro JPLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eB959rdqwj3McpopDWbd2KITPsbXVjh5QYy/Nwyj7gY=; fh=IM3McWsM9WPthTZ9Z7peQVvYux4QqEk9HMDjS1JrRmU=; b=NChBYS//lcTGN7Qlwqlmcb1h1qh2Dy+HF14wRThRBZqJQV1WbFMiuN47Y2oeqgjcgM H5/49QN6sxJz+MpATEmT3LsHFGKb525u8OasRo7EwpHAOvTYgJPZDrOeBcelGJ+iPVT5 2C+qjgG9ya4y4BTkMs6XnspYv7BMNzBY2rRn/AZ50I0fBfWVoB8zoE8YmlYL6d+F2YrI 4c+XOBd+Sft3wntuDRgLYFgtrp6yNbgFriHskD3rhIzezduTi+J7xC8YAEju+6ZYxyt6 7sVOFrG5T9KsotztEbbkvTacitBhn3YCqZZ6Zy8YgjzMaykeABVkQX+4/f8zKg5/prFI vutg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LDNy3lDA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a11-20020a17090ad80b00b0028686137ba6si6381473pjv.90.2023.12.06.04.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:17:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LDNy3lDA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C9F8E802A700; Wed, 6 Dec 2023 04:17:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377993AbjLFMRh (ORCPT + 99 others); Wed, 6 Dec 2023 07:17:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377846AbjLFMRg (ORCPT ); Wed, 6 Dec 2023 07:17:36 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45E419A for ; Wed, 6 Dec 2023 04:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701865061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eB959rdqwj3McpopDWbd2KITPsbXVjh5QYy/Nwyj7gY=; b=LDNy3lDAHufF7P/X1ceFVZHDVENsTsJorh751Y3eJ4noh/SvPFgGhyPLj7hcB2enuOKChh 3GNQiHevgnCrHUcdkerBmhcyX69vI/Po5z/li3tG4ooPkF/bh8ht6GqgEZj7QTsuGy2Ubj oXz6EbFriVdCXwaYgB7V7NQxMF1s6rg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-oRHB5hP9Ot2hTUPZpvAgvg-1; Wed, 06 Dec 2023 07:17:38 -0500 X-MC-Unique: oRHB5hP9Ot2hTUPZpvAgvg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8CCD685CBA5; Wed, 6 Dec 2023 12:17:37 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.39.193.237]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4998D111E3EE; Wed, 6 Dec 2023 12:17:34 +0000 (UTC) From: Jose Ignacio Tornos Martinez To: stern@rowland.harvard.edu Cc: davem@davemloft.net, edumazet@google.com, greg@kroah.com, jtornosm@redhat.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, oneukum@suse.com, pabeni@redhat.com, stable@vger.kernel.org Subject: Re: [PATCH v4] net: usb: ax88179_178a: avoid failed operations when device is disconnected Date: Wed, 6 Dec 2023 13:17:32 +0100 Message-ID: <20231206121732.7154-1-jtornosm@redhat.com> In-Reply-To: <624ad05b-0b90-4d1c-b06b-7a75473401c3@rowland.harvard.edu> References: <624ad05b-0b90-4d1c-b06b-7a75473401c3@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 04:17:48 -0800 (PST) Hello Alan, > The __ax88179_read_cmd() and __ax88179_write_cmd() routines are > asynchronous with respect to ax88179_disconnect(), right? Or at least, > they are if they run as a result of the user closing the network > interface. Otherwise there wouldn't be any memory ordering issues. Yes, I think so, they could be asynchronous regarding ax88179_disconnect. > But the memory barriers you added are not the proper solution. What you > need here is _synchronization_, not _ordering_. As it is, the memory > barriers you have added don't do anything; they shouldn't be in the > patch. Ok, thank you for the helpful clarification, let me check it better, I understood it in a wrong way. > If you would like a more in-depth explanation, let me know. Thank you for your help, I will try first, I really appreciate this. Best regards José Ignacio