Messages in this thread Patch in this message | | | Subject | [patch] inotify: silly fix | From | Robert Love <> | Date | Mon, 27 Sep 2004 21:05:51 -0400 |
| |
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
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)); | |