[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZhli2FWXwP1XSRG@kbusch-mbp>
Date: Fri, 5 Jan 2024 13:24:43 -0700
From: Keith Busch <kbusch@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>, Arnd Bergmann <arnd@...db.de>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] nvmet: re-fix tracing strncpy() warning
On Wed, Jan 03, 2024 at 04:56:55PM +0100, Arnd Bergmann wrote:
> @@ -53,8 +53,7 @@ static inline void __assign_req_name(char *name, struct nvmet_req *req)
> return;
> }
>
> - strncpy(name, req->ns->device_path,
> - min_t(size_t, DISK_NAME_LEN, strlen(req->ns->device_path)));
> + strscpy_pad(name, req->ns->device_path, DISK_NAME_LEN);
> }
I like this one, however Daniel has a different fix for this already
staged in nvme-6.8:
https://git.infradead.org/nvme.git/commitdiff/8f6c0eec5fad13785fd53a5b3b5f8b97b722a2a3
Powered by blists - more mailing lists