Thread (4 messages) 4 messages, 4 authors, 2018-12-30

Re: WARNING in batadv_is_on_batman_iface

From: Dmitry Vyukov <dvyukov@google.com>
Date: 2018-12-30 11:09:06
Also in: batman, lkml

On Sun, Dec 30, 2018 at 12:00 PM Sven Eckelmann [off-list ref] wrote:
On Sunday, 30 December 2018 11.41.03 CET syzbot wrote:
[...]
quoted
HEAD commit:    d8924c0d76aa Merge tag 'devprop-4.21-rc1' of git://git.ker..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=122a373f400000
kernel config:  https://syzkaller.appspot.com/x/.config?x=91a256823ef17263
dashboard link: https://syzkaller.appspot.com/bug?extid=c764de0fcfadca9a8595
compiler:       gcc (GCC) 8.0.1 20180413 (experimental)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=16fd1d67400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+c764de0fcfadca9a8595@syzkaller.appspotmail.com
What is the bug here? The kernel module showed a warning because the parent
device cannot be found in the same netns using __dev_get_by_index.

The test system was just configured to panic on warnings. So are we now
expected to show warnings or what is the expected behavior?

This behavior was added with commit b7eddd0b3950 ("batman-adv: prevent using
any virtual device created on batman-adv as hard-interface") - 3d48811b27f5 in
the out-of-tree module.
Hi Sven,

The problem is that kernel code uses WARNING when it should not.
For WARN guidelines please see this:
https://elixir.bootlin.com/linux/v4.20/source/include/asm-generic/bug.h#L81
and this (search for WARN_ON_ONCE):
https://lwn.net/Articles/769365/

Kind regards,
        Sven

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7eddd0b3950ea9dc863f1cbfa30d172dbf772f4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help