Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp274492rdh; Mon, 18 Dec 2023 20:30:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/iCbR2xoAUcuggLXVLxHDSpBqm8beWjK+bRBYVvUYItT4m9WEVEGP2L+/3TdymF8EHQbo X-Received: by 2002:a05:6808:2199:b0:3b9:efeb:e5d4 with SMTP id be25-20020a056808219900b003b9efebe5d4mr23269764oib.27.1702960204496; Mon, 18 Dec 2023 20:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702960204; cv=none; d=google.com; s=arc-20160816; b=cKzikTrtYbc+Lk5+UG20d+Q8t6zcaUVygF7T2vIml2uybMORN2w6NMNxopY4L9rNkc Ajt506a5RhAK2MCng5GnfW1PufmkR4wC2yBp5a/1LF7qVTqGM5ixF3V0WszTiELg4AW1 TmhYcZp5enJCcXEvHaKWtRplA3l5iz3VHcpAjNpkOnl8aYecMFKSM93E5SXkdIfnHuSs U0MQX2ZZHtsRN20OqZVMmVBeNlUSLpftl+LwCR/espkJa9BQpnKXMXyOgHpFxwMhcijv lJj3gs7LkQRefKXDmW+WKFz+cWRTMV3PEG9coAIN2UhOqxg54UwjhE4+t2JM9uL4a7aI L2lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=a3/WRsw9XzlOlYbCHFeAYuzqExGHoRv9EucddWZ4SnQ=; fh=bO7QqOZggiuZIv2kiYKYk6++3Sxs5btaWVIXOG50Ggw=; b=WHEX2JVMROLJRVDJsSgj+gfXmRmcUE0avuRbdKMnn/isTTyNrXbLyUYIuVXIS7oyd4 BeswVEFSnYTDJdrE14gVKi9PG9nyo1KsOyjwAxqg3twDiJETjkgaH0NLwnFGZ2e+N0Ho yWOsEDdIws7qHfsCuG+j48x/eLOasF5wkB7rKsB/jhQM8juKO8z1yrdrHFEpTb04bdmT ygUKQVGgfX3inXzhDndk1HmoBAeLood7FU8d6u5USp5naIC5+5Tyhsue8AtoTe4FUyzq 6I4m0c0ndnJ4CkekmjCnxzs5tr5tphOaTh087KSVd5PbTTLRkS4LSDCgmkkc75hQu5ng QlPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4680-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c37-20020a630d25000000b005a0788d4a50si18506321pgl.376.2023.12.18.20.30.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 20:30:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4680-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4680-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4FE9A284E47 for ; Tue, 19 Dec 2023 04:29:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83328BE79; Tue, 19 Dec 2023 04:29:27 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 BDB06BE56 for ; Tue, 19 Dec 2023 04:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (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 25DD168AFE; Tue, 19 Dec 2023 05:29:22 +0100 (CET) Date: Tue, 19 Dec 2023 05:29:21 +0100 From: Christoph Hellwig To: Daniel Wagner Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Keith Busch , James Smart , Hannes Reinecke Subject: Re: [PATCH v3 03/16] nvmet-trace: avoid dereferencing pointer too early Message-ID: <20231219042921.GD30580@lst.de> References: <20231218153105.12717-1-dwagner@suse.de> <20231218153105.12717-4-dwagner@suse.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: <20231218153105.12717-4-dwagner@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Dec 18, 2023 at 04:30:51PM +0100, Daniel Wagner wrote: > #ifndef TRACE_HEADER_MULTI_READ > -static inline struct nvmet_ctrl *nvmet_req_to_ctrl(struct nvmet_req *req) > +static inline u16 nvmet_req_to_ctrl_id(struct nvmet_req *req) > { > - return req->sq->ctrl; > + /* > + * The queue and controller pointer are not valid until an association > + * has been established. s/pointer/pointers/ ? Otherwise looks good: Reviewed-by: Christoph Hellwig