Skip to content
Commit efc21d95 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

vmxnet3: fix lock imbalance in vmxnet3_tq_xmit()



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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: cec05562

 ("vmxnet3: avoid calling pskb_may_pull with interrupts disabled")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 888506a9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment