Re: [PATCH v2] binfmt_misc: Fix possible deadlock in bm_register_write

2021-03-03 Thread Lior Ribak
> Looks good to me. > > I assume this is an ancient bug and that a backport to -stable trees > (with a cc:stable) is warranted? Yep, it exists since the "persistent opened binary handler" commit 948b701a607f123df92ed29084413e5dd8cda2ed was introduced in version 4.8, and yes i think the patch ca

Re: [PATCH v2] binfmt_misc: Fix possible deadlock in bm_register_write

2021-03-03 Thread Andrew Morton
On Sun, 28 Feb 2021 14:44:14 -0800 Lior Ribak wrote: > There is a deadlock in bm_register_write: > First, in the beggining of the function, a lock is taken on the > binfmt_misc root inode with inode_lock(d_inode(root)) > Then, if the user used the MISC_FMT_OPEN_FILE flag, the function will > call

Re: [PATCH v2] binfmt_misc: Fix possible deadlock in bm_register_write

2021-03-01 Thread Helge Deller
On 2/28/21 11:44 PM, Lior Ribak wrote: There is a deadlock in bm_register_write: First, in the beggining of the function, a lock is taken on the binfmt_misc root inode with inode_lock(d_inode(root)) Then, if the user used the MISC_FMT_OPEN_FILE flag, the function will call open_exec on the user-p

[PATCH v2] binfmt_misc: Fix possible deadlock in bm_register_write

2021-02-28 Thread Lior Ribak
There is a deadlock in bm_register_write: First, in the beggining of the function, a lock is taken on the binfmt_misc root inode with inode_lock(d_inode(root)) Then, if the user used the MISC_FMT_OPEN_FILE flag, the function will call open_exec on the user-provided interpreter. open_exec will call