mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Jack Stone <jwjstone@fastmail.fm>, Mac <kmac@poczta.fm>,
	linux-kernel@vger.kernel.org, linux-ppp@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Jiri Slaby <jirislaby@gmail.com>
Subject: Re: 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38
Date: Thu, 31 Mar 2011 22:39:14 +0100	[thread overview]
Message-ID: <20110331223914.458a36b7@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <4D94E9E7.2050600@suse.cz>

> What is the proper way to avoid a race with HUP in tty->ops->write,
> chars_in_buffer, ntty_write_room and possibly others?

You shouldn't need to do anything in those cases as tty and
tty->driver_data won't be going anywhere. port->tty may go NULL and the
IRQ handlers etc need to get the refs properly and keep refs when needed
so the tty isn't freed under them, but that *should* be all that is
needed if the logic is right.

> I looked into the drivers, moxa tests tty->driver_data (why? [1]), mxser
> does nothing as well as rocket and many others. What is the reference
> driver I should look into?

I think its a delusion from early drivers that never got sorted

> 
> [1] Perhaps leftover from when moxa_shutdown used to NULL it.
> 
> I don't see why the driver should care at all. It has a tty,
> tty->driver_data and thus all the HW info. So it should ignore the race,
> i.e. test nothing, right?

Yes


  reply	other threads:[~2011-03-31 21:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-19 22:06 Mac
2011-03-20 18:42 ` Jack Stone
2011-03-20 21:52   ` Jiri Slaby
2011-03-20 23:09     ` Jack Stone
2011-03-20 21:58   ` Alan Cox
2011-03-20 23:05     ` Jack Stone
2011-03-21 11:27       ` Alan Cox
2011-03-21 17:40         ` Jack Stone
2011-03-21  9:15     ` Jiri Slaby
2011-03-21 11:02       ` Alan Cox
2011-03-31 20:53         ` Jiri Slaby
2011-03-31 21:39           ` Alan Cox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-19 21:56 Mac

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=20110331223914.458a36b7@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=jirislaby@gmail.com \
    --cc=jslaby@suse.cz \
    --cc=jwjstone@fastmail.fm \
    --cc=kmac@poczta.fm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@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®