]> git.baikalelectronics.ru Git - kernel.git/commit
sysctl: fix duplicate path separator in printed entries
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 20 Jan 2022 02:08:06 +0000 (18:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jan 2022 06:52:52 +0000 (08:52 +0200)
commitd54f2d4ed3ee1e650283d67d1f55b715229ac6c7
tree98a157e8d9e8471ba38f009a9add92e64c23620c
parentffd374e24aa7270becd0c4c023eb04da9246b461
sysctl: fix duplicate path separator in printed entries

sysctl_print_dir() always terminates the printed path name with a slash,
so printing a slash before the file part causes a duplicate like in

    sysctl duplicate entry: /kernel//perf_user_access

Fix this by dropping the extra slash.

Link: https://lkml.kernel.org/r/e3054d605dc56f83971e4b6d2f5fa63a978720ad.1641551872.git.geert+renesas@glider.be
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Iurii Zaikin <yzaikin@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/proc_sysctl.c