Re: [syzbot] KASAN: null-ptr-deref Read in __free_pages

From: syzbot
Date: Sun Mar 20 2022 - 19:38:17 EST


Hello,

syzbot tried to test the proposed patch but the build/boot failed:

kernel/watch_queue.c:365:13: error: invalid storage class for function '__put_watch_queue'
kernel/watch_queue.c:390:15: error: non-static declaration of 'put_watch_queue' follows static declaration
kernel/watch_queue.c:392:13: error: invalid storage class for function 'free_watch'
kernel/watch_queue.c:401:13: error: invalid storage class for function '__put_watch'
kernel/watch_queue.c:411:13: error: invalid storage class for function 'put_watch'
kernel/watch_queue.c:473:15: error: non-static declaration of 'add_watch_to_object' follows static declaration
kernel/watch_queue.c:554:15: error: non-static declaration of 'remove_watch_from_object' follows static declaration
kernel/watch_queue.c:644:15: error: non-static declaration of 'get_watch_queue' follows static declaration
kernel/watch_queue.c:664:1: error: expected declaration or statement at end of input
kernel/watch_queue.c:664: error: control reaches end of non-void function [-Werror=return-type]


Tested on:

commit: f443e374 Linux 5.17
git tree: upstream
dashboard link: https://syzkaller.appspot.com/bug?extid=d55757faa9b80590767b
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=129f0625700000