can-bcm: initialize ifindex for timeouts without previous frame reception
Subsystems (2)
Oliver Hartkopp
maintainerPATCH 1/1 can-bcm: initialize ifindex for timeouts without previous frame reception
Set in the rx_ifindex to pass the correct interface index in the case of a message timeout detection. Usually the rx_ifindex value is set at receive time. But when no CAN frame has been received the RX_TIMEOUT notification did not contain a valid value.
---
net/can/bcm.c +3 -0
@@ -1084,6 +1084,9 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, op->sk = sk; op->ifindex = ifindex; +/* ifindex for timeout events w/o previous frame reception */ + op->rx_ifindex = ifindex; +/* initialize uninitialized (kzalloc) structure */ hrtimer_init (&op->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); op->timer.function = bcm_rx_timeout_handler;
Marc Kleine-Budde
maintainerQuoted 7 lines · Oliver Hartkopp
Set in the
rx_ifindexto pass the correct interface index in the case of a message timeout detection. Usually therx_ifindexvalue is set at receive time. But when no CAN frame has been received theRX_TIMEOUTnotification did not contain a valid value.Reported-by Andre Naujoks <[email protected]>Signed-off-by Oliver Hartkopp <[email protected]>
Tnx, I'll send a pull request to David, let's hope the best :)
Marc
Signature · 4 lines
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 |
Oliver Hartkopp
maintainerQuoted 10 lines · Marc Kleine-Budde
Quoted 7 lines · Oliver Hartkopp
Set in the
rx_ifindexto pass the correct interface index in the case of a message timeout detection. Usually therx_ifindexvalue is set at receive time. But when no CAN frame has been received theRX_TIMEOUTnotification did not contain a valid value.Reported-by Andre Naujoks <[email protected]>Signed-off-by Oliver Hartkopp <[email protected]>Tnx, I'll send a pull request to David, let's hope the best :)
It probably helps to tag this patch as a candidate for stable also.
BR,
Oliver
Marc Kleine-Budde
maintainerQuoted 8 lines · Oliver Hartkopp
Quoted 6 lines · Marc Kleine-Budde
Quoted 5 lines · Oliver Hartkopp
Set in the
rx_ifindexto pass the correct interface index in the case of a message timeout detection. Usually therx_ifindexvalue is set at receive time. But when no CAN frame has been received theRX_TIMEOUTnotification did not contain a valid value.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Reported-by Andre Naujoks <[email protected]>Signed-off-by Oliver Hartkopp <[email protected]>Tnx, I'll send a pull request to David, let's hope the best :)
It probably helps to tag this patch as a candidate for stable also.
Tnx, already did :)
https://gitorious.org/linux-can/linux-can/commits/fixes-for-3.7
Marc
Signature · 4 lines
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 |