From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: B.Steinbrink@gmx.de, Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: fix oops on cat /dev/snapshot
Date: Mon, 11 Jun 2007 16:36:42 +0200 [thread overview]
Message-ID: <200706111636.42555.rjw@sisk.pl> (raw)
In-Reply-To: <20070611121716.GA1904@elf.ucw.cz>
On Monday, 11 June 2007 14:17, Pavel Machek wrote:
> What /dev/snapshot is simply cat-ed -- without ioctls used in normal
> operation -- it oopses. This one should fix it.
>
> Signed-off-by: Pavel Machek <pavel@suse.cz>
>
> --- clean-mm/kernel/power/user.c 2007-06-09 16:18:12.000000000 +0200
> +++ linux-mm/kernel/power/user.c 2007-06-11 14:06:19.000000000 +0200
> @@ -99,6 +99,8 @@
> ssize_t res;
>
> data = filp->private_data;
> + if (!data->ready)
> + return -EINVAL;
I'd like to use -ENODATA here.
> res = snapshot_read_next(&data->handle, count);
> if (res > 0) {
> if (copy_to_user(buf, data_of(data->handle), res))
>
I have a patch for that and I'm going to post it in a while if you don't
mind.
I've already posted it once, here: http://lkml.org/lkml/2007/6/10/146
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
next prev parent reply other threads:[~2007-06-11 14:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 12:17 Pavel Machek
2007-06-11 14:36 ` Rafael J. Wysocki [this message]
2007-06-11 14:32 ` Pavel Machek
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=200706111636.42555.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=B.Steinbrink@gmx.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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®