Re: [PATCH -next] um: vector: fix missing unlock on error in vector_net_open()
Anton Ivanov <[email protected]> Fri, 05 Jan 2018 07:54:33 +0000
| Newsgroups | gmane.linux.uml.devel,gmane.linux.uml.user,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
I think we have a similar patch pending. Thanks for noticing. I will review and double check vs queued up patches. A. On 5 January 2018 07:22:52 GMT+00:00, Wei Yongjun <[email protected]> wrote: >Add the missing unlock before return from function vector_net_open() >in the error handling case. > >Fixes: ad1f62ab2bd4 ("High Performance UML Vector Network Driver") >Signed-off-by: Wei Yongjun <[email protected]> >--- > arch/um/drivers/vector_kern.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/arch/um/drivers/vector_kern.c >b/arch/um/drivers/vector_kern.c >index d1d5301..bb83a2d 100644 >--- a/arch/um/drivers/vector_kern.c >+++ b/arch/um/drivers/vector_kern.c >@@ -1156,8 +1156,10 @@ static int vector_net_open(struct net_device >*dev) > struct vector_device *vdevice; > > spin_lock_irqsave(&vp->lock, flags); >- if (vp->opened) >+ if (vp->opened) { >+ spin_unlock_irqrestore(&vp->lock, flags); > return -ENXIO; >+ } > vp->opened = true; > spin_unlock_irqrestore(&vp->lock, flags); -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel