lkml.org 
[lkml]   [2024]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [kernfs?] possible deadlock in kernfs_fop_llseek
Date
On Wed, 03 Apr 2024 11:23:26 -0700
> syzbot found the following issue on:
>
> HEAD commit: fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15c38139180000

Test Al's idea.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e

--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -639,6 +639,8 @@ static int kernfs_fop_open(struct inode
*/
if (has_mmap)
mutex_init(&of->mutex);
+ else if (file->f_mode & FMODE_WRITE)
+ mutex_init(&of->mutex);
else
mutex_init(&of->mutex);

--
\
 
 \ /
  Last update: 2024-05-27 16:27    [W:3.902 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site