* [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception
@ 2012-11-26 21:24 Oliver Hartkopp
2012-11-26 21:37 ` Marc Kleine-Budde
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2012-11-26 21:24 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can@vger.kernel.org, Andre Naujoks
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.
Reported-by: Andre Naujoks <nautsch2@googlemail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
---
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 6f74758..969b7cd 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception
2012-11-26 21:24 [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception Oliver Hartkopp
@ 2012-11-26 21:37 ` Marc Kleine-Budde
2012-11-26 21:39 ` Oliver Hartkopp
0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-11-26 21:37 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: linux-can@vger.kernel.org, Andre Naujoks
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
On 11/26/2012 10:24 PM, Oliver Hartkopp wrote:
> 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.
>
> Reported-by: Andre Naujoks <nautsch2@googlemail.com>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tnx, I'll send a pull request to David, let's hope the best :)
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception
2012-11-26 21:37 ` Marc Kleine-Budde
@ 2012-11-26 21:39 ` Oliver Hartkopp
2012-11-26 21:42 ` Marc Kleine-Budde
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2012-11-26 21:39 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can@vger.kernel.org, Andre Naujoks
On 26.11.2012 22:37, Marc Kleine-Budde wrote:
> On 11/26/2012 10:24 PM, Oliver Hartkopp wrote:
>> 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.
>>
>> Reported-by: Andre Naujoks <nautsch2@googlemail.com>
>> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception
2012-11-26 21:39 ` Oliver Hartkopp
@ 2012-11-26 21:42 ` Marc Kleine-Budde
0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2012-11-26 21:42 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: linux-can@vger.kernel.org, Andre Naujoks
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
On 11/26/2012 10:39 PM, Oliver Hartkopp wrote:
> On 26.11.2012 22:37, Marc Kleine-Budde wrote:
>
>> On 11/26/2012 10:24 PM, Oliver Hartkopp wrote:
>>> 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.
>>>
>>> Reported-by: Andre Naujoks <nautsch2@googlemail.com>
>>> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>>
>> 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
--
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-26 21:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 21:24 [PATCH] can-bcm: initialize ifindex for timeouts without previous frame reception Oliver Hartkopp
2012-11-26 21:37 ` Marc Kleine-Budde
2012-11-26 21:39 ` Oliver Hartkopp
2012-11-26 21:42 ` Marc Kleine-Budde
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.