# 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 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2020/05/180220
- Thread: https://ratatoskr.run/linux-next/2020/05/180101/t.md

```text
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.

```
