diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-26 01:06:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-26 01:06:45 -0400 |
commit | 1f57389a38dc1e8be167ec601f39f78f0bed3a96 (patch) | |
tree | 5f33d00a046597ae33855cee13d17d77048ba712 /fs | |
parent | 077783f87708b24054452e5c07685ead2c28b1eb (diff) | |
parent | 6693e74a16ef563960764bd963f1048392135c3c (diff) |
Merge branch 'master'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 6 | ||||
-rw-r--r-- | fs/inotify.c | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -1397,6 +1397,9 @@ static ssize_t aio_setup_iocb(struct kiocb *kiocb) if (unlikely(!access_ok(VERIFY_WRITE, kiocb->ki_buf, kiocb->ki_left))) break; + ret = security_file_permission(file, MAY_READ); + if (unlikely(ret)) + break; ret = -EINVAL; if (file->f_op->aio_read) kiocb->ki_retry = aio_pread; @@ -1409,6 +1412,9 @@ static ssize_t aio_setup_iocb(struct kiocb *kiocb) if (unlikely(!access_ok(VERIFY_READ, kiocb->ki_buf, kiocb->ki_left))) break; + ret = security_file_permission(file, MAY_WRITE); + if (unlikely(ret)) + break; ret = -EINVAL; if (file->f_op->aio_write) kiocb->ki_retry = aio_pwrite; diff --git a/fs/inotify.c b/fs/inotify.c index a37e9fb1da5..9fbaebfdf40 100644 --- a/fs/inotify.c +++ b/fs/inotify.c @@ -176,6 +176,7 @@ static inline void put_inotify_dev(struct inotify_device *dev) if (atomic_dec_and_test(&dev->count)) { atomic_dec(&dev->user->inotify_devs); free_uid(dev->user); + idr_destroy(&dev->idr); kfree(dev); } } |