]> git.baikalelectronics.ru Git - kernel.git/commit
can: j1939: j1939_sk_queue_activate_next_locked(): replace WARN_ON_ONCE with netdev_w...
authorFedor Pchelkin <pchelkin@ispras.ru>
Fri, 29 Jul 2022 14:36:55 +0000 (17:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:39 +0000 (11:18 +0200)
commit1fadd36cf2789138a0d39ae2454853ff343d2b0e
tree80115e360ff68152b8693963b1e8d3bc89706c1f
parentccf6fc51e0f562ddd25bd12c5e29803910ac31dd
can: j1939: j1939_sk_queue_activate_next_locked(): replace WARN_ON_ONCE with netdev_warn_once()

commit dbd1aca7394a8fa2b279caca162ff261a9f1ede4 upstream.

We should warn user-space that it is doing something wrong when trying
to activate sessions with identical parameters but WARN_ON_ONCE macro
can not be used here as it serves a different purpose.

So it would be good to replace it with netdev_warn_once() message.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 877b9bba3266 ("can: add support of SAE J1939 protocol")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/all/20220729143655.1108297-1-pchelkin@ispras.ru
[mkl: fix indention]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/j1939/socket.c