P.B.Cheblakov wrote:
> Hi!
> 
> I have a some problem and need a help!
> We experiment with pulse device which is controlled via CAN.
> We use sja1000-based CAN-controller and BUG_ON take place periodically. 
> I suppose that the pulse device generates breakthrough and sja1000 
> receives can-frame with can_dlc greater than 8. And it causes a BUG_ON 
> in can_rcv function (af_can.c):
> BUG_ON(skb->len != sizeof(struct can_frame) || cf->can_dlc > 8);

Hi Pavel,

we already changed the BUG_ON() to WARN_ONCE() in Linux Mainline:

http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=1758c0947605211ef953cc91d6bbdf847a21b822

You may apply the patch to your Kernel also.


> 
> At the same moment there is no testing can_dlc for values > 8 in 
> sja1000_rx (sja1000.c)
> 
> Could you suggest something?

A can_dlc > 8 is always a bug and should never happen.

I'll fix that in the sja1000 driver.

Thanks for the hint!

Oliver

_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to