From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=BAYES_50, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9758C433E9 for ; Tue, 2 Feb 2021 16:58:31 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C6EA64F84 for ; Tue, 2 Feb 2021 16:58:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C6EA64F84 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CA15A100F227C; Tue, 2 Feb 2021 08:58:30 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.135.220.15; helo=mx2.suse.de; envelope-from=rpalethorpe@suse.de; receiver= Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C8339100F225D for ; Tue, 2 Feb 2021 08:58:27 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3F28FAF1B; Tue, 2 Feb 2021 16:58:26 +0000 (UTC) References: <20200615074723.12163-1-rpalethorpe@suse.com> User-agent: mu4e 1.4.15; emacs 27.1 From: Richard Palethorpe To: Dan Williams Subject: Re: [PATCH v2] nvdimm: Avoid race between probe and reading device attributes In-reply-to: Date: Tue, 02 Feb 2021 16:58:25 +0000 Message-ID: <87im7acspa.fsf@suse.de> MIME-Version: 1.0 Message-ID-Hash: FTCP46G6277JBA2YXG3FPCCCGTRHNTEV X-Message-ID-Hash: FTCP46G6277JBA2YXG3FPCCCGTRHNTEV X-MailFrom: rpalethorpe@suse.de X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: linux-nvdimm , Linux Kernel Mailing List , Coly Li X-Mailman-Version: 3.1.1 Precedence: list Reply-To: rpalethorpe@suse.de List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello Dan, Dan Williams writes: > > I see why this works, but I think the bug is in > available_slots_show(). It is a bug for a sysfs attribute to reference > driver-data without synchronizing against bind. So it should be > possible for probe set that pointer whenever it wants. In other words > this fix (forgive the whitespace damage from pasting). Ah, that makes sense! I see the new patch and all is good AFAICT. -- Thank you, Richard. _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40AA8C433E0 for ; Tue, 2 Feb 2021 17:02:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0536064F88 for ; Tue, 2 Feb 2021 17:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237045AbhBBRCI (ORCPT ); Tue, 2 Feb 2021 12:02:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:46686 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237069AbhBBQ7H (ORCPT ); Tue, 2 Feb 2021 11:59:07 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3F28FAF1B; Tue, 2 Feb 2021 16:58:26 +0000 (UTC) References: <20200615074723.12163-1-rpalethorpe@suse.com> User-agent: mu4e 1.4.15; emacs 27.1 From: Richard Palethorpe To: Dan Williams Cc: linux-nvdimm , Vishal Verma , Dave Jiang , Ira Weiny , Linux Kernel Mailing List , Coly Li Subject: Re: [PATCH v2] nvdimm: Avoid race between probe and reading device attributes Reply-To: rpalethorpe@suse.de In-reply-to: Date: Tue, 02 Feb 2021 16:58:25 +0000 Message-ID: <87im7acspa.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Dan, Dan Williams writes: > > I see why this works, but I think the bug is in > available_slots_show(). It is a bug for a sysfs attribute to reference > driver-data without synchronizing against bind. So it should be > possible for probe set that pointer whenever it wants. In other words > this fix (forgive the whitespace damage from pasting). Ah, that makes sense! I see the new patch and all is good AFAICT. -- Thank you, Richard.