Re: [PATCH: tty-next] TTY: serial: Move mutex_unlock in uart_close function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 22, 2011 at 03:43:30PM -0700, Greg KH wrote:
> On Mon, Aug 29, 2011 at 03:43:36PM +0900, Nobuhiro Iwamatsu wrote:
> > When mutex_lock is not called, mutex_unlock is sometimes called.
> > This deletes unnecessary goto and makes modifications so that
> > mutex_unlock is called.
> 
> No you don't, your patch prevents mutex_unlock() from being called:
> 
> > --- a/drivers/tty/serial/serial_core.c
> > +++ b/drivers/tty/serial/serial_core.c
> > @@ -1262,7 +1262,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
> >  
> >  	if (tty_hung_up_p(filp)) {
> >  		spin_unlock_irqrestore(&port->lock, flags);
> > -		goto done;
> > +		return;
> 
> Before this mutex_lock() was called, so we need to unlock it, yet you
> just prevented that from happening.
> 
> So this patch is not correct at all, right?

Nevermind, I was looking at the wrong tree, your patch is correct, and
identical to what Jiri sent out after you did, so I'll take your
version, as you got it to me first.

Sorry for the noise and confusion.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux