diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1397,6 +1397,9 @@ static ssize_t aio_setup_iocb(struct kiocb *kiocb) | |||
1397 | if (unlikely(!access_ok(VERIFY_WRITE, kiocb->ki_buf, | 1397 | if (unlikely(!access_ok(VERIFY_WRITE, kiocb->ki_buf, |
1398 | kiocb->ki_left))) | 1398 | kiocb->ki_left))) |
1399 | break; | 1399 | break; |
1400 | ret = security_file_permission(file, MAY_READ); | ||
1401 | if (unlikely(ret)) | ||
1402 | break; | ||
1400 | ret = -EINVAL; | 1403 | ret = -EINVAL; |
1401 | if (file->f_op->aio_read) | 1404 | if (file->f_op->aio_read) |
1402 | kiocb->ki_retry = aio_pread; | 1405 | kiocb->ki_retry = aio_pread; |
@@ -1409,6 +1412,9 @@ static ssize_t aio_setup_iocb(struct kiocb *kiocb) | |||
1409 | if (unlikely(!access_ok(VERIFY_READ, kiocb->ki_buf, | 1412 | if (unlikely(!access_ok(VERIFY_READ, kiocb->ki_buf, |
1410 | kiocb->ki_left))) | 1413 | kiocb->ki_left))) |
1411 | break; | 1414 | break; |
1415 | ret = security_file_permission(file, MAY_WRITE); | ||
1416 | if (unlikely(ret)) | ||
1417 | break; | ||
1412 | ret = -EINVAL; | 1418 | ret = -EINVAL; |
1413 | if (file->f_op->aio_write) | 1419 | if (file->f_op->aio_write) |
1414 | kiocb->ki_retry = aio_pwrite; | 1420 | kiocb->ki_retry = aio_pwrite; |