lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181213053834.GH4860@jagdpanzerIV>
Date:   Thu, 13 Dec 2018 14:38:34 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Dmitry Safonov <dima@...sta.com>, Jiri Slaby <jslaby@...e.cz>,
        kernel test robot <rong.a.chen@...el.com>, lkp@...org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mikulas Patocka <mpatocka@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-serial@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Waiman Long <longman@...hat.com>
Subject: Re: [LKP] [tty] c96cf923a9:
 WARNING:possible_circular_locking_dependency_detected

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ