Revert "exec: Ensure mm->user_ns contains the execed files" 09/201909/1 accepted/tizen/unified/20190322.075500 submit/tizen/20190321.041604
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 21 Mar 2019 01:22:37 +0000 (10:22 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 21 Mar 2019 01:22:41 +0000 (10:22 +0900)
commitbbfdec4e6db8c7d95cb5a370f393ad872bbd608a
tree5fb8daa3fb8111f76d398d0d5a527e90434971f1
parent0ab5ab24d342df74ee6c05254c7524ef18632073
Revert "exec: Ensure mm->user_ns contains the execed files"

This reverts commit 92c624bbcc160397fcd6127cdbece1f0f20a2b97.

It was backported for fixing smack deny issue for user process
exec from kthread, but this series causes unexpected NULL pointer
deference as like following so rervert:

  Unable to handle kernel NULL pointer dereference at virtual address 000002e8
  pgd = ffffffc0127b6000
  [000002e8] *pgd=00000000527b7003, *pud=00000000527b7003, *pmd=0800000049c67003, *pte=0000000000000000
  ------------[ cut here ]------------
  Kernel BUG at ffffffc00018b4e4 [verbose debug info unavailable]
  Internal error: Oops - BUG: 96000007 [#1] PREEMPT SMP
  [...]
  PC is at would_dump+0x3c/0x9c
  LR is at would_dump+0x28/0x9c
  [...]
  Call trace:
  [<ffffffc00018b4e4>] would_dump+0x3c/0x9c
  [<ffffffc00018cd44>] do_execve_common.isra.15+0x4c8/0x568
  [<ffffffc00018d038>] compat_SyS_execve+0x28/0x3c
  Code: b940daa0 32000000 b900daa0 f9404aa0 (f9417416)
  ---[ end trace ddbe8141f552b6aa ]---

Change-Id: Ic520eb2a9936ff55e8551ef2af90b9986a3f1aba
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
fs/exec.c
include/linux/capability.h
kernel/capability.c