can: dump stack on protocol bugs
The rework of the kernel hlist implementation "hlist: drop the node parameter
from iterators" (b67bfe0d42
) created some
fallout in the form of non matching comments and obsolete code.
Additionally to the cleanup this patch adds a WARN() statement to catch the
caller of the wrong filter removal request.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
1bc277f792
Коммит
c9bbb75f1d
|
@ -546,16 +546,13 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for bugs in CAN protocol implementations:
|
* Check for bugs in CAN protocol implementations using af_can.c:
|
||||||
* If no matching list item was found, the list cursor variable next
|
* 'r' will be NULL if no matching list item was found for removal.
|
||||||
* will be NULL, while r will point to the last item of the list.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!r) {
|
if (!r) {
|
||||||
pr_err("BUG: receive list entry not found for "
|
WARN(1, "BUG: receive list entry not found for dev %s, "
|
||||||
"dev %s, id %03X, mask %03X\n",
|
"id %03X, mask %03X\n", DNAME(dev), can_id, mask);
|
||||||
DNAME(dev), can_id, mask);
|
|
||||||
r = NULL;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче