Commit 81f16c9
statmount: Fix the null-ptr-deref in do_statmount()
If the mount is internal, it's mnt_ns will be MNT_NS_INTERNAL, which is
defined as ERR_PTR(-EINVAL). So, in the do_statmount(), need to check ns
of mount by IS_ERR() and return.
Fixes: 0e50322 ("statmount: accept fd as a parameter")
Reported-by: [email protected]
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Qing Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Bhavik Sachdev <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>1 parent 9eed043 commit 81f16c9
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5678 | 5678 | | |
5679 | 5679 | | |
5680 | 5680 | | |
| 5681 | + | |
| 5682 | + | |
5681 | 5683 | | |
5682 | 5684 | | |
5683 | 5685 | | |
| |||
0 commit comments