net/can: trying to register non-static key in can_rx_register

3 messages, 2 authors, 2017-06-08 · open the first message on its own page

net/can: trying to register non-static key in can_rx_register

From: Andrey Konovalov <hidden>
Date: 2017-06-08 15:16:26

Hi,

I've got the following error report while fuzzing the kernel with syzkaller.

On commit b29794ec95c6856b316c2295904208bf11ffddd9 (4.12-rc4+).

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 2 PID: 17404 Comm: syz-executor1 Not tainted 4.12.0-rc4+ #15
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x292/0x395 lib/dump_stack.c:52
 register_lock_class+0x717/0x1aa0 kernel/locking/lockdep.c:755
 __lock_acquire+0x269/0x3690 kernel/locking/lockdep.c:3255
 ? 0xffffffffa0000000
 lock_acquire+0x22d/0x560 kernel/locking/lockdep.c:3855
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151
 spin_lock include/linux/spinlock.h:299 [inline]
 can_rx_register+0x4f3/0x700 net/can/af_can.c:483
 raw_enable_filters+0xd7/0x1e0 net/can/raw.c:192
 raw_enable_allfilters+0x8a/0x1e0 net/can/raw.c:258
 raw_bind+0x244/0x830 net/can/raw.c:435
 SYSC_bind+0x20e/0x4c0 net/socket.c:1422
 SyS_bind+0x29/0x30 net/socket.c:1408
 entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x446389
RSP: 002b:00007fa1efda2c08 EFLAGS: 00000292 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 0000000000000220 RCX: 0000000000446389
RDX: 0000000000000060 RSI: 0000000020001fa0 RDI: 0000000000000017
RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000017
R13: 0000000000003770 R14: 00000000006e4830 R15: 0000000000c13000

Re: net/can: trying to register non-static key in can_rx_register

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2017-06-08 15:21:09

On 06/08/2017 05:16 PM, Andrey Konovalov wrote:
Hi,

I've got the following error report while fuzzing the kernel with syzkaller.

On commit b29794ec95c6856b316c2295904208bf11ffddd9 (4.12-rc4+).

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
I've posted a patch for this problem earlier today:
https://marc.info/?l=linux-can&m=149691617012069&w=2

I'll send a pull request to David soon.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Re: net/can: trying to register non-static key in can_rx_register

From: Andrey Konovalov <hidden>
Date: 2017-06-08 15:21:52

On Thu, Jun 8, 2017 at 5:20 PM, Marc Kleine-Budde [off-list ref] wrote:
On 06/08/2017 05:16 PM, Andrey Konovalov wrote:
quoted
Hi,

I've got the following error report while fuzzing the kernel with syzkaller.

On commit b29794ec95c6856b316c2295904208bf11ffddd9 (4.12-rc4+).

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
I've posted a patch for this problem earlier today:
https://marc.info/?l=linux-can&m=149691617012069&w=2

I'll send a pull request to David soon.
Great, thanks!
regards,
Marc

--
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help