[patch] inotify: silly fix

Robert Love
2004-09-28T01:05:49Z

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Sun, 2004-09-26 at 22:02 -0400, John McCutchan wrote:

John,

> Announcing the release of inotify 0.10.0.
> Attached is a patch to 2.6.8.1.

John, as Andrew pointed out, we are missing some braces in an
inopportune location. I think we need to refactor this code entirely,
to remove the access_ok() checks and use copy_{to,from}_user(), but we
can take this in the meantime since the patch is dead without it.

I'll take paper, please. One brown paper bag right over my head.

Robert Love

[-- Attachment #2: inotify-rml-typo-1.patch --]
[-- Type: text/x-patch, Size: 648 bytes --]

ARE WE SERIOUS?

Signed-Off-By: Robert Love <rml@novell.com>

drivers/char/inotify.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -urN linux-inotify/drivers/char/inotify.c linux/drivers/char/inotify.c
--- linux-inotify/drivers/char/inotify.c 2004-09-25 15:23:10.000000000 -0400
+++ linux/drivers/char/inotify.c 2004-09-27 21:00:48.455011760 -0400
@@ -970,9 +970,10 @@
if (_IOC_DIR(cmd) & _IOC_READ)
err = !access_ok(VERIFY_READ, (void *) arg, _IOC_SIZE(cmd));

- if (err)
+ if (err) {
err = -EFAULT;
goto out;
+ }

if (_IOC_DIR(cmd) & _IOC_WRITE)
err = !access_ok(VERIFY_WRITE, (void *)arg, _IOC_SIZE(cmd));