From: Nathan Zimmer <nzimmer@sgi.com>
To: Holger Hans Peter Freyther <holger@freyther.de>
Cc: <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] timer_list: Correct the show function for timer_list by using iter->now
Date: Tue, 23 Jul 2013 17:50:43 -0500 [thread overview]
Message-ID: <51EF08C3.7040609@sgi.com> (raw)
In-Reply-To: <20130723071802.GA7966@xiaoyu.lan>
On 07/23/2013 02:18 AM, Holger Hans Peter Freyther wrote:
> On Mon, Jul 22, 2013 at 04:18:31PM -0500, Nathan Zimmer wrote:
>> This patch corrects the issue with /proc/timer_list reported by Holger.
>> When reading from the proc file with a sufficently small buffer, 2k so not
>> really that small, there was one could get hung trying to read the file a
>> chunk at a time.
> I think it makes sense to always use iter->now but it does not solve
> the issue with dropbear/my test case. Or is this meant to be applied
> on top of the previous patch?
>
>
> holger
>
Ah sorry I networked booted the wrong kernel and got excited.
However after hitting my head against this for the better part of the
day I found
the root cause of my issue.
In seq_read about halfway down when we flush the buffer to userland.
m->index is advanced without calling m->op->next().
My iterator doesn't take notice of that and thus fails to advance.
/* if not empty - flush it first */
if (m->count) {
n = min(m->count, size);
err = copy_to_user(buf, m->buf + m->from, n);
if (err)
goto Efault;
m->count -= n;
m->from += n;
size -= n;
buf += n;
copied += n;
if (!m->count)
m->index++;
....
I'll need to think about how to correct it.
For the moment probably the right thing would be to revert b3956a896ea5
next prev parent reply other threads:[~2013-07-23 22:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130720054300.GA29718@xiaoyu.lan>
2013-07-22 21:18 ` [PATCH] timer_list: Correct the show function for timer_list by using iter->now Nathan Zimmer
2013-07-23 7:18 ` Holger Hans Peter Freyther
2013-07-23 22:50 ` Nathan Zimmer [this message]
2013-07-24 14:31 ` [PATCH] timer_list: Correct the iterator for timer_list Nathan Zimmer
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=51EF08C3.7040609@sgi.com \
--to=nzimmer@sgi.com \
--cc=holger@freyther.de \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).