diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-17 17:43:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 11:24:33 +0300 |
commit | df66ef67c3344b767b3d1d8396d4a3e81942c4e9 (patch) | |
tree | 8544ae4c84074574f7f53a79a423428ac442ce24 /fs/aio.c | |
parent | 5689666aa13422264366940db51173a51f27002c (diff) | |
download | linux-df66ef67c3344b767b3d1d8396d4a3e81942c4e9.tar.xz |
aio: fix failure to put the file pointer
[ Upstream commit 53fffe29a9e664a999dd3787e4428da8c30533e0 ]
If the ioprio capability check fails, we return without putting
the file pointer.
Fixes: d9a08a9e616b ("fs: Add aio iopriority support")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1436,6 +1436,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) ret = ioprio_check_cap(iocb->aio_reqprio); if (ret) { pr_debug("aio ioprio check cap error: %d\n", ret); + fput(req->ki_filp); return ret; } |