]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vmxnet3: fix lock imbalance in vmxnet3_tq_xmit()
authorArnd Bergmann <arnd@arndb.de>
Mon, 14 Mar 2016 14:53:57 +0000 (15:53 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:30:03 +0000 (13:30 -0800)
commit2749e82dfe3112dafaf13f4af109c8bc2e2bfbab
treec518247b1eb8d55be9f5d7d8acfe4e3ebcd0b7cc
parent5e8bc2b32e8e53ffddfd309662b4e57261275222
vmxnet3: fix lock imbalance in vmxnet3_tq_xmit()

Orabug: 25639933

A recent bug fix rearranged the code in vmxnet3_tq_xmit() in a
way that left the error handling for oversized headers unlock
a lock that had not been taken yet. Gcc warns about the incorrect
use of the 'flags' variable because of that:

drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_tq_xmit.constprop':
include/linux/spinlock.h:246:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This changes the error handling path to 'goto' the end of the function
beyond the lock/unlock pair.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cec05562fb1d ("vmxnet3: avoid calling pskb_may_pull with interrupts disabled")
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit efc21d95067f658a20e51e24c4c86d68f23b7f7f)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/vmxnet3/vmxnet3_drv.c