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.