Message ID | 20181117235317.7366-3-axboe@kernel.dk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support for polled aio | expand |
On Sat, Nov 17, 2018 at 04:53:14PM -0700, Jens Axboe wrote: > 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> Looks good. Please also send it to Al so that it can go into 4.20 and -stable. Reviewed-by: Christoph Hellwig <hch@lst.de>
On 11/19/18 1:07 AM, Christoph Hellwig wrote: > On Sat, Nov 17, 2018 at 04:53:14PM -0700, Jens Axboe wrote: >> 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> > > Looks good. Please also send it to Al so that it can go into 4.20 > and -stable. > > Reviewed-by: Christoph Hellwig <hch@lst.de> Al already took it, but it's still in the series since it's not in Linus's tree yet.
diff --git a/fs/aio.c b/fs/aio.c index b36691268b6c..3d9bc81cf500 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -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; }
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> --- fs/aio.c | 1 + 1 file changed, 1 insertion(+)