From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Ilya Zykov <ilya@ilyx.ru>
Cc: Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: Race condition in tty buffer's function flush_to_ldisc().
Date: Mon, 7 Nov 2011 18:39:50 +0000 [thread overview]
Message-ID: <20111107183950.4ec7a959@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <4EB822C7.6070200@ilyx.ru>
> Nested call flush_to_ldisc() happened on different CPU only. It happens because
> one side pty call "schedule_work(&tty->buf.work)" on one CPU from "tty_flip_buffer_push()",
> the other side call "schedule_work(&tty->buf.work)" from n_tty's layer from "n_tty_set_room()"
> on different CPU. It also can happen in interrupt if interrupt handle on
> different CPU. Schedule_work() schedule work on CPU which was called(IMHO).
But the two sides are different ttys so that specific case shouldn't
matter.
Something is clearly happening because you trigger the trace but I don't
see why the paths you indicate cause it ? If you make mthread a cpu
struct variable and add a WARN_ON(1) in the error case do you get any
useful traces ?
Alan
next prev parent reply other threads:[~2011-11-07 18:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 11:14 Ilya Zykov
2011-11-07 11:58 ` Alan Cox
2011-11-07 12:20 ` Ilya Zykov
2011-11-07 13:06 ` Alan Cox
2011-11-07 13:44 ` Ilya Zykov
2011-11-07 14:50 ` Alan Cox
2011-11-07 14:52 ` Ilya Zykov
2011-11-07 18:26 ` Ilya Zykov
2011-11-07 18:39 ` Alan Cox [this message]
2011-11-07 18:41 ` Alan Cox
2011-11-07 12:35 ` Ilya Zykov
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=20111107183950.4ec7a959@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=ilya@ilyx.ru \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®