Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-18 Thread Marc Gonzalez
NB: it is preferable to avoid top-posting here. On 17/04/2019 18:58, Jitendra Sharma wrote: > Kernel version: 4.14.83 NB2: 4.14.83 is obsolete, as it stands 2255 patches behind the tip of linux-4.14.y (though only 4 patches in fs/proc). NB3: 4.14 is 108499(!!) patches behind v5.1-rc5 (latest

Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-17 Thread Alexey Dobriyan
> Test case: Not some specific test case. Write 2 programs: one forks, clones, and execs randomly (but not going out of control), another does open("/proc"), getdents in a loop. Don't use shell scripts or readdir as they only bring overhead. Run getdents in a loop and several forkers, see what

Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-17 Thread Jitendra Sharma
Thanks Marc and Kees for replying. Answer to your queries: Kernel version: 4.14.83 Test case: Not some specific test case. Issue reproduced while doing monkey testing for very long hours. Thanks, Jitendra On 4/17/2019 5:41 PM, Marc Gonzalez wrote: On 15/04/2019 14:58, Jitendra Sharma wrote:

Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-17 Thread Marc Gonzalez
On 15/04/2019 14:58, Jitendra Sharma wrote: > We are observing one kernel crash in next_tgid function through > getdents64 path. Call stack is as shown below: It might help if you specify the exact kernel version you are discussing, as in which tag or commit hash you are running. Also, what

Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-17 Thread Oleg Nesterov
On 04/16, Kees Cook wrote: > > Do you have any hints on how to reproduce this? I assume something is > missing proper locking or RCU handling, or we simply have an unbalanced put_task_struct() anywhere else ... > but I don't see anything > obvious in the surrounding code yet... I too do not see

Re: fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-16 Thread Kees Cook
On Mon, Apr 15, 2019 at 7:58 AM Jitendra Sharma wrote: > > Hi Kees Cook/Luis, > > We are observing one kernel crash in next_tgid function through > getdents64 path. Call stack is as shown below: > > -000|has_group_leader_pid(inline) > -000|next_tgid( > | [X20] ns = 0xFF87CABB1AC0, > |

fs/proc: Crash observed in next_tgid (fs/proc/base.c)

2019-04-15 Thread Jitendra Sharma
Hi Kees Cook/Luis, We are observing one kernel crash in next_tgid function through getdents64 path. Call stack is as shown below: -000|has_group_leader_pid(inline) -000|next_tgid( | [X20] ns = 0xFF87CABB1AC0, | [locdesc] iter = ( | [locdesc] tgid = 424, | [locdesc] task = ?)) | [X21] p =