Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'ieee802154-for-davem-2020-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan

Stefan Schmidt says:

====================
pull-request: ieee802154 for net 2020-09-08

An update from ieee802154 for your *net* tree.

A potential memory leak fix for ca8210 from Liu Jian,
a check on the return for a register read in adf7242
and finally a user after free fix in the softmac tx
function from Eric found by syzkaller.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+9 -4
+3 -1
drivers/net/ieee802154/adf7242.c
··· 882 882 int ret; 883 883 u8 lqi, len_u8, *data; 884 884 885 - adf7242_read_reg(lp, 0, &len_u8); 885 + ret = adf7242_read_reg(lp, 0, &len_u8); 886 + if (ret) 887 + return ret; 886 888 887 889 len = len_u8; 888 890
+1
drivers/net/ieee802154/ca8210.c
··· 2925 2925 ); 2926 2926 if (!priv->irq_workqueue) { 2927 2927 dev_crit(&priv->spi->dev, "alloc of irq_workqueue failed!\n"); 2928 + destroy_workqueue(priv->mlme_workqueue); 2928 2929 return -ENOMEM; 2929 2930 } 2930 2931
+5 -3
net/mac802154/tx.c
··· 34 34 if (res) 35 35 goto err_tx; 36 36 37 - ieee802154_xmit_complete(&local->hw, skb, false); 38 - 39 37 dev->stats.tx_packets++; 40 38 dev->stats.tx_bytes += skb->len; 39 + 40 + ieee802154_xmit_complete(&local->hw, skb, false); 41 41 42 42 return; 43 43 ··· 78 78 79 79 /* async is priority, otherwise sync is fallback */ 80 80 if (local->ops->xmit_async) { 81 + unsigned int len = skb->len; 82 + 81 83 ret = drv_xmit_async(local, skb); 82 84 if (ret) { 83 85 ieee802154_wake_queue(&local->hw); ··· 87 85 } 88 86 89 87 dev->stats.tx_packets++; 90 - dev->stats.tx_bytes += skb->len; 88 + dev->stats.tx_bytes += len; 91 89 } else { 92 90 local->tx_skb = skb; 93 91 queue_work(local->workqueue, &local->tx_work);