Re: [PATCH RESEND] autofs: replace manual symlink buffer allocation in autofs_dir_symlink

From: Thorsten Blum

Date: Sun Feb 22 2026 - 16:22:32 EST


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 <thorsten.blum@xxxxxxxxx>
>> ---
>> fs/autofs/root.c | 8 +++-----
>> 1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> [...]
>
> Looks fine to me.
>
> Acked by: Ian Kent <raven@xxxxxxxxxx>

Your tag is missing a hyphen and tools like b4 don't recognize it like
this. Correct would be:

Acked-by: Ian Kent <raven@xxxxxxxxxx>

> Christian, is there anything else I need to do for this?

Thanks,
Thorsten