From: Jack Stone <jwjstone@fastmail.fm>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mac <kmac@poczta.fm>,
linux-kernel@vger.kernel.org, linux-ppp@vger.kernel.org,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: 'scheduling while atomic' during ppp connection on 2.6.37.1 and
Date: Mon, 21 Mar 2011 17:40:32 +0000 [thread overview]
Message-ID: <4D878D90.6070100@fastmail.fm> (raw)
In-Reply-To: <20110321112723.248e7a52@lxorguk.ukuu.org.uk>
On 21/03/2011 11:27, Alan Cox wrote:
> It's quite likely that was as broken before your change as after. The
> locking in the code makes no sense so I flagged it up. The
> nozomi ntty_write also has lots of oddness in it that really needs
> sorting out.
>
> I suspect that the chunk
>
> if (!dc || !port)
> return -ENODEV;
>
> mutex_lock(&port->tty_sem);
>
> if (unlikely(!port->port.count)) {
> DBG1(" ");
> goto exit;
> }
>
> and
>
> /* notify card */
> if (unlikely(dc = NULL)) {
> DBG1("No device context?");
> goto exit;
> }
>
> and the mutex unlock are actually not doing anything
>
> On the write_room case I think that as the code already uses tty_port
> helpers it needs to simply just return the correct value and not do all
> the other checks. chars_in_buffer() likewise
>
> So in fact I don't think at this point the tty_sem needs replacing with
> anything, but the various bogus port.count checks want ripping out.
>
>
Thank you very much for the explanation. I will do my best to respin the
patch with appropriate changes.
Jack
WARNING: multiple messages have this Message-ID (diff)
From: Jack Stone <jwjstone@fastmail.fm>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mac <kmac@poczta.fm>,
linux-kernel@vger.kernel.org, linux-ppp@vger.kernel.org,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38
Date: Mon, 21 Mar 2011 17:40:32 +0000 [thread overview]
Message-ID: <4D878D90.6070100@fastmail.fm> (raw)
In-Reply-To: <20110321112723.248e7a52@lxorguk.ukuu.org.uk>
On 21/03/2011 11:27, Alan Cox wrote:
> It's quite likely that was as broken before your change as after. The
> locking in the code makes no sense so I flagged it up. The
> nozomi ntty_write also has lots of oddness in it that really needs
> sorting out.
>
> I suspect that the chunk
>
> if (!dc || !port)
> return -ENODEV;
>
> mutex_lock(&port->tty_sem);
>
> if (unlikely(!port->port.count)) {
> DBG1(" ");
> goto exit;
> }
>
> and
>
> /* notify card */
> if (unlikely(dc == NULL)) {
> DBG1("No device context?");
> goto exit;
> }
>
> and the mutex unlock are actually not doing anything
>
> On the write_room case I think that as the code already uses tty_port
> helpers it needs to simply just return the correct value and not do all
> the other checks. chars_in_buffer() likewise
>
> So in fact I don't think at this point the tty_sem needs replacing with
> anything, but the various bogus port.count checks want ripping out.
>
>
Thank you very much for the explanation. I will do my best to respin the
patch with appropriate changes.
Jack
next prev parent reply other threads:[~2011-03-21 17:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-19 22:06 'scheduling while atomic' during ppp connection on 2.6.37.1 and Mac
2011-03-19 22:06 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Mac
2011-03-20 18:42 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Jack Stone
2011-03-20 18:42 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Jack Stone
2011-03-20 21:52 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Jiri Slaby
2011-03-20 21:52 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Jiri Slaby
2011-03-20 23:09 ` Jack Stone
2011-03-20 21:58 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Alan Cox
2011-03-20 21:58 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Alan Cox
2011-03-20 23:05 ` Jack Stone
2011-03-21 11:27 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Alan Cox
2011-03-21 11:27 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Alan Cox
2011-03-21 17:40 ` Jack Stone [this message]
2011-03-21 17:40 ` Jack Stone
2011-03-21 9:15 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Jiri Slaby
2011-03-21 9:15 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Jiri Slaby
2011-03-21 11:02 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Alan Cox
2011-03-21 11:02 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Alan Cox
2011-03-31 20:53 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Jiri Slaby
2011-03-31 20:53 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Jiri Slaby
2011-03-31 21:39 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and Alan Cox
2011-03-31 21:39 ` 'scheduling while atomic' during ppp connection on 2.6.37.1 and 2.6.38 Alan Cox
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=4D878D90.6070100@fastmail.fm \
--to=jwjstone@fastmail.fm \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.