Re: [PATCH v3] proc: proc_pid_ns takes super_block as an argument

From
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date
2020-05-18 15:37:37
Also in
linux-fsdevel, linux-next, lkml
Reply to
Alexey Gladkov, 2020-05-18
I would shorten like below:

syzbot found that

  touch /proc/testfile

causes NULL pointer dereference at tomoyo_get_local_path()
because inode of the dentry is NULL.

Before c59f415a7cb6, Tomoyo received pid_ns from proc's s_fs_info
directly. Since proc_pid_ns() can only work with inode, using it in
the tomoyo_get_local_path() was wrong.

To avoid creating more functions for getting proc_ns, change the
argument type of the proc_pid_ns() function. Then, Tomoyo can use
the existing super_block to get pid_ns.
Thread (7 messages) 7 messages, 3 authors, last reply 2020-05-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help