From patchwork Mon Dec 10 17:00:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3.5.y.z, extended, stable] Patch "can: bcm: initialize ifindex for timeouts without previous" has been added to staging queue From: Herton Ronaldo Krzesinski X-Patchwork-Id: 204981 Message-Id: <1355158843-16069-1-git-send-email-herton.krzesinski@canonical.com> To: Oliver Hartkopp Cc: kernel-team@lists.ubuntu.com, Marc Kleine-Budde , Andre Naujoks Date: Mon, 10 Dec 2012 15:00:43 -0200 This is a note to let you know that I have just added a patch titled can: bcm: initialize ifindex for timeouts without previous to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ >From f59ceb2961da31ff7efa2add9b73c6f05e65fa1e Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Mon, 26 Nov 2012 22:24:23 +0100 Subject: [PATCH] can: bcm: initialize ifindex for timeouts without previous frame reception commit 81b401100c01d2357031e874689f89bd788d13cd upstream. 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 Signed-off-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde Signed-off-by: Herton Ronaldo Krzesinski --- net/can/bcm.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.7.9.5 diff --git a/net/can/bcm.c b/net/can/bcm.c index 151b773..3910c1f 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;