-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wolfgang Grandegger wrote:
> Wolfgang Grandegger wrote:
>> This patch makes the private functions alloc_can_skb() and
>> alloc_can_err_skb() of the at91_can driver public and adapts all
>> drivers to use these. While making the patch I realized, that
>> the skb's are *not* setup consistently. The skb's are now setup
>> as shown:
>>
>>      skb->protocol = __constant_htons(ETH_P_CAN);
>>      skb->pkt_type = PACKET_BROADCAST;
>>      skb->ip_summed = CHECKSUM_UNNECESSARY;
>>      *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
>>      memset(*cf, 0, sizeof(struct can_frame));
>>
>> The frame is zero'ed out to avoid uninitialized data to be passed
>> to user space.
>>
>> Some drivers or library code used "htons(ETH_P_CAN)" or did not set
>> "pkt_type" or "ip_summed" or did not zero the fame.
>>
>> Signed-off-by: Wolfgang Grandegger <[email protected]>
> 
> Applied. Going to prepare a kernel patch a.s.a.p.

Acked-by: Marc Kleine-Budde <[email protected]>

Marc

- --
Pengutronix e.K.                         | Marc Kleine-Budde           |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924     |
Vertretung West/Dortmund                 | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686         | http://www.pengutronix.de   |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrNkekACgkQjTAFq1RaXHPWrgCgkL3dbKl1P2bzKxM8+yDr4Pnw
HOgAoI8SQLPqGhGFOluqkKL+cj8YnjBz
=tE/c
-----END PGP SIGNATURE-----
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to