David Laight David.Laight@ACULAB.COM writes:
From: Rishabh Bhatnagar
Sent: 23 June 2023 22:34 From: "Paulo Alcantara (SUSE)" pc@cjr.nz
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.
Yep. It's got fixed up later by
8d7672235533 ("cifs: don't cargo-cult strndup()")