summaryrefslogtreecommitdiff
path: root/drivers/char/drm/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAleksa Sarai <aleksa@amutable.com>2026-04-01 01:46:21 +1100
committerChristian Brauner <brauner@kernel.org>2026-04-07 12:32:22 +0200
commit97b67e64affb0e709eeecc50f6a9222fc20bd14b (patch)
tree1de5b0c9bfb5b3c83721595b091d881540d893f9 /drivers/char/drm/git@git.tavy.me:linux.git
parent4639f1cfba03e77e4fa2062cf904de63021fb746 (diff)
dcache: permit dynamic_dname()s up to NAME_MAX
dynamic_dname() has had an implicit limit of 64 characters since it was introduced in commit c23fbb6bcb3e ("VFS: delay the dentry name generation on sockets and pipes"), however it seems that this was a fairly arbitrary number (suspiciously it was double the previously hardcoded buffer size). NAME_MAX seems like a more reasonable and consistent limit for d_name lengths. While we're at it, we can also remove the unnecessary stack-allocated array and just memmove() the formatted string to the end of the buffer. It should also be noted that at least one driver (in particular, liveupdate's usage of anon_inode for session files) already exceeded this limit without noticing that readlink(/proc/self/fd/$n) always returns -ENAMETOOLONG, so this fixes those drivers as well. Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support") Fixes: c23fbb6bcb3e ("VFS: delay the dentry name generation on sockets and pipes") Signed-off-by: Aleksa Sarai <aleksa@amutable.com> Link: https://patch.msgid.link/20260401-dynamic-dname-name_max-v1-1-8ca20ab2642e@amutable.com Tested-by: Luca Boccassi <luca.boccassi@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'drivers/char/drm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions