diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-01 13:04:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-01 13:04:39 -0700 |
commit | 5c6ba7d53274b5e8b13ecbc727d8eb1ea4a2bcdc (patch) | |
tree | a790a3dfc2dd6bbe597d801f0927456564a8ff54 /drivers | |
parent | 7f2ebde737c933d75718a1fca933af4e9d53006b (diff) | |
parent | 3026050179a3a9a6f5c892c414b5e36ecf092081 (diff) |
Merge tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Pull HSI fix from Sebastian Reichel:
"Fix double free fix in ssi-protocol"
* tag 'hsi-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
HSI: ssi_protocol: double free in ssip_pn_xmit()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hsi/clients/ssi_protocol.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c index 7ef819680acd..26b05106f0d3 100644 --- a/drivers/hsi/clients/ssi_protocol.c +++ b/drivers/hsi/clients/ssi_protocol.c @@ -980,7 +980,7 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev) goto drop; /* Pad to 32-bits - FIXME: Revisit*/ if ((skb->len & 3) && skb_pad(skb, 4 - (skb->len & 3))) - goto drop; + goto inc_dropped; /* * Modem sends Phonet messages over SSI with its own endianess... @@ -1032,8 +1032,9 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev) drop2: hsi_free_msg(msg); drop: - dev->stats.tx_dropped++; dev_kfree_skb(skb); +inc_dropped: + dev->stats.tx_dropped++; return 0; } |