Re: [PATCH] Revert "can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/19/18 7:39 PM, Manfred Schlaegl wrote:
> This reverts commit 7da11ba5c5066dadc2e96835a6233d56d7b7764a.
> 
> After introduction of this change we encountered following new error
> message on various i.MX plattforms (flexcan)
> flexcan 53fc8000.can can0: __can_get_echo_skb: BUG! Trying to echo non
> existing skb: can_priv::echo_skb[0]

Doh! I should have tested more extensive. Sorry.

> The introduction of the message was a mistake because
> priv->echo_skb[idx] = NULL is a perfectly valid in following case:
> If CAN_RAW_LOOPBACK is disabled (setsockopt) in applications, the
> pkt_type of the tx skb's given to can_put_echo_skb is set to
> PACKET_LOOPBACK. In this case can_put_echo_skb will not set
> priv->echo_skb[idx]. It is therefore kept NULL.
> 
> (As additional argument for revert: The order of check and usage of idx
> was changed. idx is used to access an array element before checking it's
> boundaries)
> 
> Signed-off-by: Manfred Schlaegl <manfred.schlaegl@xxxxxxxxxxxxx>

Applied to linux-can.

Tnx,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux