Skip to content

Commit b54fa64

Browse files
committed
Merge tag 'linux-can-fixes-for-5.9-20201008' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
==================== linux-can-fixes-for-5.9-20201008 The first patch is by Lucas Stach and fixes m_can driver by removing an erroneous call to m_can_class_suspend() in runtime suspend. Which causes the pinctrl state to get stuck on the "sleep" state, which breaks all CAN functionality on SoCs where this state is defined. The last two patches target the j1939 protocol: Cong Wang fixes a syzbot finding of an uninitialized variable in the j1939 transport protocol. I contribute a patch, that fixes the initialization of a same uninitialized variable in a different function. ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 7b50ee3 + 13ba4c4 commit b54fa64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/can/m_can/m_can_platform.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
144144
struct net_device *ndev = dev_get_drvdata(dev);
145145
struct m_can_classdev *mcan_class = netdev_priv(ndev);
146146

147-
m_can_class_suspend(dev);
148-
149147
clk_disable_unprepare(mcan_class->cclk);
150148
clk_disable_unprepare(mcan_class->hclk);
151149

net/can/j1939/transport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ sk_buff *j1939_tp_tx_dat_new(struct j1939_priv *priv,
580580
skb->dev = priv->ndev;
581581
can_skb_reserve(skb);
582582
can_skb_prv(skb)->ifindex = priv->ndev->ifindex;
583+
can_skb_prv(skb)->skbcnt = 0;
583584
/* reserve CAN header */
584585
skb_reserve(skb, offsetof(struct can_frame, data));
585586

@@ -1487,6 +1488,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
14871488
skb->dev = priv->ndev;
14881489
can_skb_reserve(skb);
14891490
can_skb_prv(skb)->ifindex = priv->ndev->ifindex;
1491+
can_skb_prv(skb)->skbcnt = 0;
14901492
skcb = j1939_skb_to_cb(skb);
14911493
memcpy(skcb, rel_skcb, sizeof(*skcb));
14921494

0 commit comments

Comments
 (0)