From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Dmitry Safonov <dima@arista.com>, Jiri Slaby <jslaby@suse.cz>,
kernel test robot <rong.a.chen@intel.com>,
lkp@01.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mikulas Patocka <mpatocka@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-serial@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Waiman Long <longman@redhat.com>
Subject: Re: [LKP] [tty] c96cf923a9: WARNING:possible_circular_locking_dependency_detected
Date: Thu, 13 Dec 2018 14:38:34 +0900 [thread overview]
Message-ID: <20181213053834.GH4860@jagdpanzerIV> (raw)
In-Reply-To: <20181212090751.GU5289@hirez.programming.kicks-ass.net>
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
next prev parent reply other threads:[~2018-12-13 5:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 9:11 [LKP] [tty] c96cf923a9: WARNING:possible_circular_locking_dependency_detected kernel test robot
2018-12-11 13:49 ` Jiri Slaby
2018-12-11 20:59 ` Dmitry Safonov
2018-12-12 3:42 ` Sergey Senozhatsky
2018-12-12 5:04 ` Sergey Senozhatsky
2018-12-12 15:12 ` Waiman Long
2018-12-12 9:07 ` Peter Zijlstra
2018-12-13 5:38 ` Sergey Senozhatsky [this message]
2018-12-12 14:54 ` Dmitry Safonov
2018-12-13 2:19 ` Sergey Senozhatsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213053834.GH4860@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=dima@arista.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lkp@01.org \
--cc=longman@redhat.com \
--cc=mpatocka@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rong.a.chen@intel.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).