Re: [PATCH RESEND] autofs: replace manual symlink buffer allocation in autofs_dir_symlink
Thorsten Blum <[email protected]> Sun, 22 Feb 2026 22:22:01 +0100
| Newsgroups | org.kernel.vger.autofs,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 27. Jan 2026, at 03:14, Ian Kent wrote: > On 27/1/26 09:36, Thorsten Blum wrote: >> The symlink name was previously duplicated using an explicit kmalloc() >> followed by strcpy(), which is deprecated [1]. Replace this open-coded >> string duplication with kstrdup(), which allocates and copies the >> symlink name with a single helper function. >> >> Remove the local variable 'size' and set 'i_size' directly using >> strlen(cp), which is equivalent to the previous value of 'size'. >> >> This simplifies the code, uses common string-handling helpers, and >> removes the deprecated use of strcpy(). >> >> Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] >> Signed-off-by: Thorsten Blum <[email protected]> >> --- >> fs/autofs/root.c | 8 +++----- >> 1 file changed, 3 insertions(+), 5 deletions(-) >> >> [...] > > Looks fine to me. > > Acked by: Ian Kent <[email protected]> Your tag is missing a hyphen and tools like b4 don't recognize it like this. Correct would be: Acked-by: Ian Kent <[email protected]> > Christian, is there anything else I need to do for this? Thanks, Thorsten