From: Pavel Machek <pavel@ucw.cz>
To: B.Steinbrink@gmx.de, "Rafael J. Wysocki" <rjw@sisk.pl>,
Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>
Subject: fix oops on cat /dev/snapshot
Date: Mon, 11 Jun 2007 14:17:16 +0200 [thread overview]
Message-ID: <20070611121716.GA1904@elf.ucw.cz> (raw)
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;
res = snapshot_read_next(&data->handle, count);
if (res > 0) {
if (copy_to_user(buf, data_of(data->handle), res))
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next reply other threads:[~2007-06-11 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 12:17 Pavel Machek [this message]
2007-06-11 14:36 ` Rafael J. Wysocki
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=20070611121716.GA1904@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=B.Steinbrink@gmx.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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®