Re: [Socketcan-users] [PATCH] CAN: make checking in can_rcv lessrestrictive

From: Luotao Fu
Date: Thu Aug 06 2009 - 17:02:39 EST


Hi Oliver (again ;-)),

On Thu, Aug 06, 2009 at 10:17:40PM +0200, Luotao Fu wrote:
> Hi Oliver,
>
> On Thu, Aug 06, 2009 at 06:48:23PM +0200, Oliver Hartkopp wrote:
> >
....
> > When this BUG() triggers, someone provided a definitely broken *CAN* network
> > driver, and this needsfp to be fixed on that level.
>
> In our case a sender (a FPGA) generates correct can frames carrying
> wrong dlc length. This way the can driver on our side runs into the bug
> though the driver itself is allright. The opposite needed to be fixed,
> not our side. Though we do suffer a system crash only because the
> sender sends trash into the can network. This is imo quite bad.
>

/me answering myself
had a closer look again. Seemed you are right. The can driver should
have get the can_dlc right prior to passing the message a level higher.

cheers
Fu
--
Pengutronix e.K. | Dipl.-Ing. Luotao Fu |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: Digital signature