* pull-request: can 2015-06-21
@ 2015-06-21 17:04 Marc Kleine-Budde
2015-06-21 17:04 ` [PATCH] can: fix loss of CAN frames in raw_rcv Marc Kleine-Budde
2015-06-23 13:43 ` pull-request: can 2015-06-21 David Miller
0 siblings, 2 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2015-06-21 17:04 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-can, kernel
Hello David,
this is a, probably too late, pull request for v4.1.
Oliver Hartkopp fixed a bug in the generic CAN frame handling code, which may
lead to loss of CAN frames. It was introduced during v4.1 development.
Please queue via net/master if possible, net-next/master otherwise. I've added
stable on Cc, just in case.
regards,
Marc
---
The following changes since commit 7b48f45797be7c4bdbb772de80efe6bdcd78e81d:
isdn: disable HiSax NetJet driver on microblaze arch (2015-06-21 09:53:01 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-4.1-20150621
for you to fetch changes up to 36c01245eb8046c16eee6431e7dbfbb302635fa8:
can: fix loss of CAN frames in raw_rcv (2015-06-21 18:58:58 +0200)
----------------------------------------------------------------
linux-can-fixes-for-4.1-20150621
----------------------------------------------------------------
Oliver Hartkopp (1):
can: fix loss of CAN frames in raw_rcv
drivers/net/can/dev.c | 5 +++++
drivers/net/can/slcan.c | 1 +
drivers/net/can/vcan.c | 3 +++
net/can/af_can.c | 6 +++++-
4 files changed, 14 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] can: fix loss of CAN frames in raw_rcv 2015-06-21 17:04 pull-request: can 2015-06-21 Marc Kleine-Budde @ 2015-06-21 17:04 ` Marc Kleine-Budde 2015-06-23 13:43 ` pull-request: can 2015-06-21 David Miller 1 sibling, 0 replies; 8+ messages in thread From: Marc Kleine-Budde @ 2015-06-21 17:04 UTC (permalink / raw) To: netdev Cc: davem, linux-can, kernel, Oliver Hartkopp, linux-stable, Marc Kleine-Budde From: Oliver Hartkopp <socketcan@hartkopp.net> As reported by Manfred Schlaegl here http://marc.info/?l=linux-netdev&m=143482089824232&w=2 commit 514ac99c64b "can: fix multiple delivery of a single CAN frame for overlapping CAN filters" requires the skb->tstamp to be set to check for identical CAN skbs. As net timestamping is influenced by several players (netstamp_needed and netdev_tstamp_prequeue) Manfred missed a proper timestamp which leads to CAN frame loss. As skb timestamping became now mandatory for CAN related skbs this patch makes sure that received CAN skbs always have a proper timestamp set. Maybe there's a better solution in the future but this patch fixes the CAN frame loss so far. Reported-by: Manfred Schlaegl <manfred.schlaegl@gmx.at> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- drivers/net/can/dev.c | 5 +++++ drivers/net/can/slcan.c | 1 + drivers/net/can/vcan.c | 3 +++ net/can/af_can.c | 6 +++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index b0f69248cb71..e9b1810d319f 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -440,6 +440,9 @@ unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx) struct can_frame *cf = (struct can_frame *)skb->data; u8 dlc = cf->can_dlc; + if (!(skb->tstamp.tv64)) + __net_timestamp(skb); + netif_rx(priv->echo_skb[idx]); priv->echo_skb[idx] = NULL; @@ -575,6 +578,7 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf) if (unlikely(!skb)) return NULL; + __net_timestamp(skb); skb->protocol = htons(ETH_P_CAN); skb->pkt_type = PACKET_BROADCAST; skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -603,6 +607,7 @@ struct sk_buff *alloc_canfd_skb(struct net_device *dev, if (unlikely(!skb)) return NULL; + __net_timestamp(skb); skb->protocol = htons(ETH_P_CANFD); skb->pkt_type = PACKET_BROADCAST; skb->ip_summed = CHECKSUM_UNNECESSARY; diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index c837eb91d43e..f64f5290d6f8 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -207,6 +207,7 @@ static void slc_bump(struct slcan *sl) if (!skb) return; + __net_timestamp(skb); skb->dev = sl->dev; skb->protocol = htons(ETH_P_CAN); skb->pkt_type = PACKET_BROADCAST; diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c index 674f367087c5..0ce868de855d 100644 --- a/drivers/net/can/vcan.c +++ b/drivers/net/can/vcan.c @@ -78,6 +78,9 @@ static void vcan_rx(struct sk_buff *skb, struct net_device *dev) skb->dev = dev; skb->ip_summed = CHECKSUM_UNNECESSARY; + if (!(skb->tstamp.tv64)) + __net_timestamp(skb); + netif_rx_ni(skb); } diff --git a/net/can/af_can.c b/net/can/af_can.c index 32d710eaf1fc..689c818ed007 100644 --- a/net/can/af_can.c +++ b/net/can/af_can.c @@ -310,8 +310,12 @@ int can_send(struct sk_buff *skb, int loop) return err; } - if (newskb) + if (newskb) { + if (!(newskb->tstamp.tv64)) + __net_timestamp(newskb); + netif_rx_ni(newskb); + } /* update statistics */ can_stats.tx_frames++; -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: pull-request: can 2015-06-21 2015-06-21 17:04 pull-request: can 2015-06-21 Marc Kleine-Budde 2015-06-21 17:04 ` [PATCH] can: fix loss of CAN frames in raw_rcv Marc Kleine-Budde @ 2015-06-23 13:43 ` David Miller 2015-06-30 19:31 ` missing in stable 4.1.1 - was " Oliver Hartkopp 1 sibling, 1 reply; 8+ messages in thread From: David Miller @ 2015-06-23 13:43 UTC (permalink / raw) To: mkl; +Cc: netdev, linux-can, kernel From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Sun, 21 Jun 2015 19:04:58 +0200 > this is a, probably too late, pull request for v4.1. > > Oliver Hartkopp fixed a bug in the generic CAN frame handling code, which may > lead to loss of CAN frames. It was introduced during v4.1 development. > > Please queue via net/master if possible, net-next/master otherwise. I've added > stable on Cc, just in case. Pulled, thanks. ^ permalink raw reply [flat|nested] 8+ messages in thread
* missing in stable 4.1.1 - was Re: pull-request: can 2015-06-21 2015-06-23 13:43 ` pull-request: can 2015-06-21 David Miller @ 2015-06-30 19:31 ` Oliver Hartkopp 2015-06-30 20:07 ` Greg KH 2015-06-30 21:20 ` David Miller 0 siblings, 2 replies; 8+ messages in thread From: Oliver Hartkopp @ 2015-06-30 19:31 UTC (permalink / raw) To: stable, gregkh; +Cc: David Miller, mkl, netdev, linux-can, kernel Hello Greg, On 23.06.2015 15:43, David Miller wrote: > From: Marc Kleine-Budde <mkl@pengutronix.de> > Date: Sun, 21 Jun 2015 19:04:58 +0200 > >> this is a, probably too late, pull request for v4.1. >> >> Oliver Hartkopp fixed a bug in the generic CAN frame handling code, which may >> lead to loss of CAN frames. It was introduced during v4.1 development. >> >> Please queue via net/master if possible, net-next/master otherwise. I've added >> stable on Cc, just in case. > > Pulled, thanks. the patch "can: fix loss of CAN frames in raw_rcv" was sent to stable on 2015-06-21 but unfortunately did not find its way into 4.1.1 :-( The upstream commit is: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8 which slipped into 4.2 at merge window opening time. So it just got lost in the stable queue somehow. Best regards, Oliver ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: missing in stable 4.1.1 - was Re: pull-request: can 2015-06-21 2015-06-30 19:31 ` missing in stable 4.1.1 - was " Oliver Hartkopp @ 2015-06-30 20:07 ` Greg KH 2015-06-30 20:28 ` Oliver Hartkopp 2015-06-30 21:20 ` David Miller 1 sibling, 1 reply; 8+ messages in thread From: Greg KH @ 2015-06-30 20:07 UTC (permalink / raw) To: Oliver Hartkopp; +Cc: stable, David Miller, mkl, netdev, linux-can, kernel On Tue, Jun 30, 2015 at 09:31:36PM +0200, Oliver Hartkopp wrote: > Hello Greg, > > On 23.06.2015 15:43, David Miller wrote: > >From: Marc Kleine-Budde <mkl@pengutronix.de> > >Date: Sun, 21 Jun 2015 19:04:58 +0200 > > > >>this is a, probably too late, pull request for v4.1. > >> > >>Oliver Hartkopp fixed a bug in the generic CAN frame handling code, which may > >>lead to loss of CAN frames. It was introduced during v4.1 development. > >> > >>Please queue via net/master if possible, net-next/master otherwise. I've added > >>stable on Cc, just in case. > > > >Pulled, thanks. > > the patch "can: fix loss of CAN frames in raw_rcv" was sent to stable on > 2015-06-21 but unfortunately did not find its way into 4.1.1 :-( > > The upstream commit is: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8 > > which slipped into 4.2 at merge window opening time. > > So it just got lost in the stable queue somehow. No, it's still there. I don't queue up patches for a stable release until they have shown up in a public release from Linus. So in this case, it will be elgible to be in a stable kernel after 4.2-rc1 is out. Unless you tell me otherwise, so if you want this in the next 4.1-stable release, I can queue it up now. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: missing in stable 4.1.1 - was Re: pull-request: can 2015-06-21 2015-06-30 20:07 ` Greg KH @ 2015-06-30 20:28 ` Oliver Hartkopp 2015-06-30 21:04 ` Greg KH 0 siblings, 1 reply; 8+ messages in thread From: Oliver Hartkopp @ 2015-06-30 20:28 UTC (permalink / raw) To: Greg KH; +Cc: stable, David Miller, mkl, netdev, linux-can, kernel On 30.06.2015 22:07, Greg KH wrote: > On Tue, Jun 30, 2015 at 09:31:36PM +0200, Oliver Hartkopp wrote: >> The upstream commit is: >> >> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8 >> >> which slipped into 4.2 at merge window opening time. >> >> So it just got lost in the stable queue somehow. > > No, it's still there. I don't queue up patches for a stable release > until they have shown up in a public release from Linus. So in this > case, it will be elgible to be in a stable kernel after 4.2-rc1 is out. > > Unless you tell me otherwise, so if you want this in the next 4.1-stable > release, I can queue it up now. I would really appreciate it if you can queue it up now. We already had a bug report for 4.1.0 which is fixed by this patch. Thanks & best regards, Oliver ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: missing in stable 4.1.1 - was Re: pull-request: can 2015-06-21 2015-06-30 20:28 ` Oliver Hartkopp @ 2015-06-30 21:04 ` Greg KH 0 siblings, 0 replies; 8+ messages in thread From: Greg KH @ 2015-06-30 21:04 UTC (permalink / raw) To: Oliver Hartkopp; +Cc: stable, David Miller, mkl, netdev, linux-can, kernel On Tue, Jun 30, 2015 at 10:28:08PM +0200, Oliver Hartkopp wrote: > On 30.06.2015 22:07, Greg KH wrote: > >On Tue, Jun 30, 2015 at 09:31:36PM +0200, Oliver Hartkopp wrote: > > >>The upstream commit is: > >> > >>http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8 > >> > >>which slipped into 4.2 at merge window opening time. > >> > >>So it just got lost in the stable queue somehow. > > > >No, it's still there. I don't queue up patches for a stable release > >until they have shown up in a public release from Linus. So in this > >case, it will be elgible to be in a stable kernel after 4.2-rc1 is out. > > > >Unless you tell me otherwise, so if you want this in the next 4.1-stable > >release, I can queue it up now. > > I would really appreciate it if you can queue it up now. > > We already had a bug report for 4.1.0 which is fixed by this patch. Ok, now queued up, thanks. greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: missing in stable 4.1.1 - was Re: pull-request: can 2015-06-21 2015-06-30 19:31 ` missing in stable 4.1.1 - was " Oliver Hartkopp 2015-06-30 20:07 ` Greg KH @ 2015-06-30 21:20 ` David Miller 1 sibling, 0 replies; 8+ messages in thread From: David Miller @ 2015-06-30 21:20 UTC (permalink / raw) To: socketcan; +Cc: stable, gregkh, mkl, netdev, linux-can, kernel From: Oliver Hartkopp <socketcan@hartkopp.net> Date: Tue, 30 Jun 2015 21:31:36 +0200 > Hello Greg, > > On 23.06.2015 15:43, David Miller wrote: >> From: Marc Kleine-Budde <mkl@pengutronix.de> >> Date: Sun, 21 Jun 2015 19:04:58 +0200 >> >>> this is a, probably too late, pull request for v4.1. >>> >>> Oliver Hartkopp fixed a bug in the generic CAN frame handling code, >>> which may >>> lead to loss of CAN frames. It was introduced during v4.1 development. >>> >>> Please queue via net/master if possible, net-next/master >>> otherwise. I've added >>> stable on Cc, just in case. >> >> Pulled, thanks. > > the patch "can: fix loss of CAN frames in raw_rcv" was sent to stable > on 2015-06-21 but unfortunately did not find its way into 4.1.1 :-( > > The upstream commit is: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8 > > which slipped into 4.2 at merge window opening time. > > So it just got lost in the stable queue somehow. Please take care of CAN -stable submissions yourself, thanks. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-30 21:20 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-21 17:04 pull-request: can 2015-06-21 Marc Kleine-Budde 2015-06-21 17:04 ` [PATCH] can: fix loss of CAN frames in raw_rcv Marc Kleine-Budde 2015-06-23 13:43 ` pull-request: can 2015-06-21 David Miller 2015-06-30 19:31 ` missing in stable 4.1.1 - was " Oliver Hartkopp 2015-06-30 20:07 ` Greg KH 2015-06-30 20:28 ` Oliver Hartkopp 2015-06-30 21:04 ` Greg KH 2015-06-30 21:20 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).