linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [uml-devel] [PATCH 1/2] um: vector_kern: Unlock on error in vector_net_open()
       [not found] ` <54b3ee94-6afd-7907-3764-e2413f231209@cambridgegreys.com>
@ 2017-12-11  9:33   ` Richard Weinberger
  2017-12-11  9:36     ` Anton Ivanov
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2017-12-11  9:33 UTC (permalink / raw)
  To: Anton Ivanov
  Cc: user-mode-linux-user, Jeff Dike, kernel-janitors,
	user-mode-linux-devel, Dan Carpenter

Anton,

Am Samstag, 9. Dezember 2017, 18:09:17 CET schrieb Anton Ivanov:
> Thanks,
> 
> I guess I missed that one.
> 
> A.
> 
> On 09/12/17 11:49, Dan Carpenter wrote:
> > We need to unlock and restore IRQs on this error path.
> > 
> > Fixes: ad1f62ab2bd4 ("High Performance UML Vector Network Driver")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> > index d1d53015d572..bb83a2d22ac2 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);

Please review/ack these patches.

Thanks,
//richard

------------------------------------------------------------------------------
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [uml-devel] [PATCH 1/2] um: vector_kern: Unlock on error in vector_net_open()
  2017-12-11  9:33   ` [uml-devel] [PATCH 1/2] um: vector_kern: Unlock on error in vector_net_open() Richard Weinberger
@ 2017-12-11  9:36     ` Anton Ivanov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Ivanov @ 2017-12-11  9:36 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: dan.carpenter

Both are correct - omissions on my side

Please apply.

A.


On 12/11/17 09:33, Richard Weinberger wrote:
> Anton,
>
> Am Samstag, 9. Dezember 2017, 18:09:17 CET schrieb Anton Ivanov:
>> Thanks,
>>
>> I guess I missed that one.
>>
>> A.
>>
>> On 09/12/17 11:49, Dan Carpenter wrote:
>>> We need to unlock and restore IRQs on this error path.
>>>
>>> Fixes: ad1f62ab2bd4 ("High Performance UML Vector Network Driver")
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>
>>> diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
>>> index d1d53015d572..bb83a2d22ac2 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);
> Please review/ack these patches.
>
> Thanks,
> //richard
>
> ------------------------------------------------------------------------------
> 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
> User-mode-linux-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
>


------------------------------------------------------------------------------
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-11  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20171209114940.fsi7jbxd7zbhhu74@mwanda>
     [not found] ` <54b3ee94-6afd-7907-3764-e2413f231209@cambridgegreys.com>
2017-12-11  9:33   ` [uml-devel] [PATCH 1/2] um: vector_kern: Unlock on error in vector_net_open() Richard Weinberger
2017-12-11  9:36     ` Anton Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).