Skip to contentSkip to conversation

aio: fix failure to put the file pointer

PATCH Applied Jens Axboe 2 participants 2 messages Nov 18, 2018

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

PATCH v2 1/1 aio: fix failure to put the file pointer

If the ioprio capability check fails, we return without putting the file pointer.

Fixes d9a08a9e616b ("fs: Add aio iopriority support")
fs/aio.c +1 -0
index b36691268b6c..3d9bc81cf500 100644
@@ -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;
 		}
 
Signature · 1 line
Jens Axboe
maintainer Applied
#1 lore raw
Quoted 2 lines · Jens Axboe

If the ioprio capability check fails, we return without putting the file pointer.

Applied.