From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E04F36CE19 for ; Mon, 29 Jun 2026 12:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782737458; cv=none; b=K2JTNHGjzShXAySTaJpS+Ovvz1anz7WpZd2CjbLmeWtUvA8P0sqiQoQy2NayYVxH2yVS0q67QavgnU7fnSJVZIiIOP8TMirc5rQFITAZcf72CnPtgBaqlFKAHSV2/NcPsQ0fglKqaMMnQbE9XpVfncDZzOYx30J2OX4v7EvurUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782737458; c=relaxed/simple; bh=eKCAJejQGVq0ah9/+ckksugznvHcXRJ8rdieMVtT6ws=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G8O/jqVe0UzuV/HK96/xBRPu3svHK4dJUiYgZWvZ8m3lPLLB/LHBKO8klcbi14iZLuu87zvNIM71aKu3qP4TXjiISemkNL4GNWvUbEx5pa/RvrCrCi+xqz5E0ECy4tbOo0HTYxP9XCkVe7R/jblwIrFgV8xdVb65Lg654sZyr/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 7F63B68CFE; Mon, 29 Jun 2026 14:50:54 +0200 (CEST) Date: Mon, 29 Jun 2026 14:50:54 +0200 From: Christoph Hellwig To: Nilay Shroff Cc: Christoph Hellwig , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, kbusch@kernel.org, sagi@grimberg.me, axboe@fb.com, bvanassche@acm.org, elver@google.com, gjoyce@linux.ibm.com Subject: Re: [PATCHv2 14/17] nvme: fix Clang context analysis warning in rdma.c Message-ID: <20260629125054.GC23695@lst.de> References: <20260614131541.2017845-1-nilay@linux.ibm.com> <20260614131541.2017845-15-nilay@linux.ibm.com> <20260626064916.GC11106@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Jun 26, 2026 at 09:01:20PM +0530, Nilay Shroff wrote: >> Does switching to list_empty_careful fix this? If not, does >> list_empty_careful need annotations to make this work? >> > > I tried using list_empty_careful() but clang still throws the > same warning. And yes it needs same annotation to suppress > the warning. Sounds like we should have annotations (or just use of data_race) in list_empty_careful, as it is designed to be used without holding the relevant lock used for modifications?