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: Sun, 20 Mar 2011 23:05:46 +0000 [thread overview]
Message-ID: <6627fbdd-cce6-4717-8920-3a0d7526274b@email.android.com> (raw)
In-Reply-To: <20110320215826.79cadfe2@lxorguk.ukuu.org.uk>
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> + spin_lock_irqsave(&dc->spin_mutex, flags);
>> if (port->port.count)
>> room = kfifo_avail(&port->fifo_ul);
>> - mutex_unlock(&port->tty_sem);
>> + spin_unlock_irqrestore(&dc->spin_mutex, flags);
>
>dc->spin_mutex does not protect port->port.count.
Sorry if I'm being stupid here but do you mean that port->port.count is modified outside of dc->spin_mutex or that dc->spin_mutex should not be used to protect port->port.count?
I replaced all instances of the port->tty_sem with dc->spin_mutex and port->port.count is only used if dc is non null.
The only other possible problem I see with the change is that the new locking does not allow sleeping in places where it could sleep and disabled irqs where they were not disabled before.
Thank you for your time,
Jack
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
next prev parent reply other threads:[~2011-03-20 23:06 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 [this message]
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
-- 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=6627fbdd-cce6-4717-8920-3a0d7526274b@email.android.com \
--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 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®