diff options
| author | Brian Silverman <brian.silverman@bluerivertech.com> | 2022-01-05 16:29:50 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-16 09:12:44 +0100 |
| commit | 3fbbf56948b2396a44d45de5aebf36f42bd9c90c (patch) | |
| tree | fe113e5e145edb32fc1ad8231c720430518c7711 | |
| parent | 1079b56de4af202d63ff769cf2d21491a595c9a5 (diff) | |
| download | linux-3fbbf56948b2396a44d45de5aebf36f42bd9c90c.tar.gz linux-3fbbf56948b2396a44d45de5aebf36f42bd9c90c.tar.bz2 linux-3fbbf56948b2396a44d45de5aebf36f42bd9c90c.zip | |
can: gs_usb: gs_can_start_xmit(): zero-initialize hf->{flags,reserved}
commit 89d58aebe14a365c25ba6645414afdbf4e41cea4 upstream.
No information is deliberately sent in hf->flags in host -> device
communications, but the open-source candleLight firmware echoes it
back, which can result in the GS_CAN_FLAG_OVERFLOW flag being set and
generating spurious ERRORFRAMEs.
While there also initialize the reserved member with 0.
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Link: https://lore.kernel.org/all/20220106002952.25883-1-brian.silverman@bluerivertech.com
Link: https://github.com/candle-usb/candleLight_fw/issues/87
Cc: stable@vger.kernel.org
Signed-off-by: Brian Silverman <brian.silverman@bluerivertech.com>
[mkl: initialize the reserved member, too]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/net/can/usb/gs_usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 9a30e5f0c894..8dcdd5162ecf 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -508,6 +508,8 @@ static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb, hf->echo_id = idx; hf->channel = dev->channel; + hf->flags = 0; + hf->reserved = 0; cf = (struct can_frame *)skb->data; |
