Re: [LKP] [tty] c96cf923a9: WARNING:possible_circular_locking_dependency_detected

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

 



On (12/12/18 10:07), Peter Zijlstra wrote:
> > +	uart_port_lock(state, flags);
> > +	xmit_buf = state->xmit.buf;
> > +	state->xmit.buf = NULL;
> > +	uart_port_unlock(uport, flags);
> > +
> >  	/*
> >  	 * Free the transmit buffer page.
> >  	 */
> > -	uart_port_lock(state, flags);
> > -	if (state->xmit.buf) {
> > -		free_page((unsigned long)state->xmit.buf);
> > -		state->xmit.buf = NULL;
> > -	}
> > -	uart_port_unlock(uport, flags);
> > +	if (xmit_buf)
> > +		free_page((unsigned long)xmit_buf);
> >  }
> 
> That looks sensible anyhow. One should strive to not do alloc or free
> under locks as much as possible anyway.

Right, good point.

	-ss



[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