From: Tigran Aivazian <tigran@veritas.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>, linux-kernel@vger.kernel.org
Subject: [patch-2.4.2] bugfix -- ENXIO for read/write beyond end of raw device
Date: Tue, 27 Feb 2001 18:38:08 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.21.0102271831540.751-100000@penguin.homenet> (raw)
In-Reply-To: <Pine.LNX.4.21.0011021622210.2677-100000@saturn.homenet>
Hi Linus,
Yes, I know that Stephen had fixed this bug ages ago but, nevertheless, it
is still present in 2.4.2 and I don't know about his plans for resending
the patch -- but it is a part of the set I maintain so I just wanted to
bring it to your attention. Small bug, small obvious fix -- why not
consider it sooner rather than later?
Regards,
Tigran
diff -urN -X dontdiff linux/drivers/char/raw.c vmfs/drivers/char/raw.c
--- linux/drivers/char/raw.c Mon Oct 2 04:35:15 2000
+++ vmfs/drivers/char/raw.c Thu Feb 22 07:21:26 2001
@@ -277,8 +277,11 @@
if ((*offp & sector_mask) || (size & sector_mask))
return -EINVAL;
- if ((*offp >> sector_bits) > limit)
+ if ((*offp >> sector_bits) >= limit) {
+ if (size)
+ return -ENXIO;
return 0;
+ }
/*
* We'll just use one kiobuf
parent reply other threads:[~2001-02-27 18:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <Pine.LNX.4.21.0011021622210.2677-100000@saturn.homenet>]
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=Pine.LNX.4.21.0102271831540.751-100000@penguin.homenet \
--to=tigran@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.com \
/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).