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 06B0011702 for ; Tue, 19 Dec 2023 04:29:51 +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 BA5FB68AFE; Tue, 19 Dec 2023 05:29:48 +0100 (CET) Date: Tue, 19 Dec 2023 05:29:48 +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 04/16] nvmet-trace: null terminate device name string correctly Message-ID: <20231219042948.GE30580@lst.de> References: <20231218153105.12717-1-dwagner@suse.de> <20231218153105.12717-5-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-5-dwagner@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Dec 18, 2023 at 04:30:52PM +0100, Daniel Wagner wrote: > strlen returns the string length excluding the null byte ('\0'), thus we > cut the last chars from the device name. While at it, switch snprintf to > ensure we always have properly terminated string. Looks good: Reviewed-by: Christoph Hellwig