[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A80040D.3030009@hartkopp.net>
Date: Mon, 10 Aug 2009 13:27:09 +0200
From: Oliver Hartkopp <oliver@...tkopp.net>
To: David Miller <davem@...emloft.net>
CC: Urs Thuermann <urs@...ogud.escape.de>,
Luotao Fu <l.fu@...gutronix.de>,
Michael Olbrich <m.olbrich@...gutronix.de>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: [PATCH net-2.6] can: Use WARN_ONCE() instead of BUG_ON() for sanity
check in receive path
To ensure a proper handling of CAN frames transported in skbuffs some checks
need to be performed at receive time.
As stated by Michael Olbrich and Luotao Fu BUG_ON() might be to restrictive.
This is right as we can just drop the non conform skbuff and the Kernel can
continue working.
This patch replaces the BUG_ON() with a WARN_ONCE() so that the system remains
healthy but we made the problem visible (once).
Additionally it changes the return values to the common NET_RX_xxx constants.
Signed-off-by: Oliver Hartkopp <oliver@...tkopp.net>
Signed-off-by: Urs Thuermann <urs@...ogud.escape.de>
CC: Michael Olbrich <m.olbrich@...gutronix.de>
CC: Luotao Fu <l.fu@...gutronix.de>
---
View attachment "af_can_convert_bug_to_warn.patch" of type "text/x-patch" (1051 bytes)
Powered by blists - more mailing lists