RE: [PATCH 5.4 2/5] cifs: Get rid of kstrdup_const()'d paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rishabh Bhatnagar
> Sent: 23 June 2023 22:34
> From: "Paulo Alcantara (SUSE)" <pc@xxxxxx>
> 
> commit 199c6bdfb04b71d88a7765e08285885fbca60df4 upstream.
> 
> The DFS cache API is mostly used with heap allocated strings.
> 
...
> -	ce->path = kstrdup_const(path, GFP_KERNEL);
> +	ce->path = kstrndup(path, strlen(path), GFP_KERNEL);

That is entirely brain-dead.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux