lkml.org 
[lkml]   [2016]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] vmxnet3: fix lock imbalance in vmxnet3_tq_xmit()
From
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 14 Mar 2016 15:53:57 +0100

> 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")

Applied and queued up for -stable, thanks.

\
 
 \ /
  Last update: 2016-03-14 18:41    [W:0.060 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site