From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f65.google.com ([209.85.166.65]:42230 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726441AbeK0Dk3 (ORCPT ); Mon, 26 Nov 2018 22:40:29 -0500 Received: by mail-io1-f65.google.com with SMTP id x6so14474912ioa.9 for ; Mon, 26 Nov 2018 08:45:50 -0800 (PST) From: Jens Axboe To: linux-block@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 01/20] aio: fix failure to put the file pointer Date: Mon, 26 Nov 2018 09:45:25 -0700 Message-Id: <20181126164544.5699-2-axboe@kernel.dk> In-Reply-To: <20181126164544.5699-1-axboe@kernel.dk> References: <20181126164544.5699-1-axboe@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: If the ioprio capability check fails, we return without putting the file pointer. Fixes: d9a08a9e616b ("fs: Add aio iopriority support") Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- fs/aio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/aio.c b/fs/aio.c index b984918be4b7..205390c0c1bb 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; } -- 2.17.1