summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-19 14:55:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-21 17:09:03 +0200
commitd44e463c9460003f9606cc8ddbee76e49cd46783 (patch)
tree0f85d5c8756dd870e1a1c351c00a72e781840508 /block
parent01e3e6315171641d040cdaf1818b7ec10fc8dd72 (diff)
downloadlinux-stable-d44e463c9460003f9606cc8ddbee76e49cd46783.tar.gz
linux-stable-d44e463c9460003f9606cc8ddbee76e49cd46783.tar.bz2
linux-stable-d44e463c9460003f9606cc8ddbee76e49cd46783.zip
Revert "bsg-lib: don't free job in bsg_prepare_job"
This reverts commit 668cee82cd28d2c38a99f7cbddf3b3fd58f257b9 which was commit f507b54dccfd8000c517d740bc45f20c74532d18 upstream. Ben reports: That function doesn't exist here (it was introduced in 4.13). Instead, this backport has modified bsg_create_job(), creating a leak. Please revert this on the 3.18, 4.4 and 4.9 stable branches. So I'm dropping it from here. Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Ming Lei <ming.lei@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Diffstat (limited to 'block')
-rw-r--r--block/bsg-lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 341b8d858e67..650f427d915b 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -147,6 +147,7 @@ static int bsg_create_job(struct device *dev, struct request *req)
failjob_rls_rqst_payload:
kfree(job->request_payload.sg_list);
failjob_rls_job:
+ kfree(job);
return -ENOMEM;
}