Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp274475rdh; Mon, 18 Dec 2023 20:29:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/FNbDTmLIUPdpeuAVypWRoZNkBS01F/wttswlbRnELBwXuSc92igMNjPVOAZ9dpVtxisq X-Received: by 2002:a05:600c:2802:b0:40b:5e21:dd3c with SMTP id m2-20020a05600c280200b0040b5e21dd3cmr10581418wmb.106.1702960199842; Mon, 18 Dec 2023 20:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702960199; cv=none; d=google.com; s=arc-20160816; b=MSWHohuNIp6wIzXM3eII6J7ZG5D1PCgf7uhUwIx35Yt7BPOpFkYLVMe7ft+Prc+Tf5 Pl6R1aDMfA6s8bJC/gTYMk5jP83OxpyYwJC6aXOwZe35o6eAYk8hAOrYwKWU9VhScztB eARQFwH/yzadjhSmcC7lCSvck/pKREyfUDkwblZYpd5ATQuRWJdkq8RlhJ5Q55zFogV5 gB464x/lytQFq8Zw7trVkyn1hrpx5iI7PWbDyKXlvappqIQp69d5fTjR6SxCWUVR5IHM Hx+zkcKtEypfqpoM+yqmxfvIq3Tj5AHgtJHoc4vpJ59ZztqOrC5CDQ3z3XylK9qHBhms elhw== 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=eJpAyNawpMEOL2Dmg2TTPQ1FCNE1PS1wVJfJY5izCXk=; fh=bO7QqOZggiuZIv2kiYKYk6++3Sxs5btaWVIXOG50Ggw=; b=LLO0YDYc5zVWkHqE9Dry15/V4KiYI7tGXYQDL4gLU8IfqbR6KKPSnrhHEDscEggtYr j3bsawgD7s9CCkY3Nf/eJmpbJULJue2P77pZQm6/IK5WurYAYP6xr7BXEKLSC4y4DAKc iaqJA2c1Kt1FVHM1RwcnqtapvzcdSaExz8bv/0p+qiOntle6LJEyiRC0xb7rd0nOeFgh kwBBPxV2orPQ2g2OhpzYD2fBL2T0ecZkMiY1PLmIjoQItDM7pPl7glvs49xlF9gYebLs qA9k7Ca0M72EjyI6TPs4xt1Qjd7Ukc8z0hbSzCC2C+x4ljtrhc/lK0GPjG8N0Ls78IRh o+YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4681-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kj28-20020a170907765c00b00a234906ee24si1838839ejc.501.2023.12.18.20.29.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 20:29:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4681-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 839B51F24145 for ; Tue, 19 Dec 2023 04:29:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA10A11728; Tue, 19 Dec 2023 04:29:53 +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 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