summaryrefslogtreecommitdiffstats
path: root/fs/io-wq.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-26 10:20:34 -0700
committerJens Axboe <axboe@kernel.dk>2021-03-04 06:34:00 -0700
commit470ec4ed8c91b4db398ad607c700e9ce88365202 (patch)
tree6ff6767d6808e857a8df13272550012577646a5c /fs/io-wq.c
parentd364d9e5db41678b77ed95c41e3ccaad9ab99ba0 (diff)
downloadlinux-470ec4ed8c91b4db398ad607c700e9ce88365202.tar.bz2
io-wq: fix double put of 'wq' in error path
We are already freeing the wq struct in both spots, so don't put it and get it freed twice. Reported-by: syzbot+7bf785eedca35ca05501@syzkaller.appspotmail.com Fixes: 4fb6ac326204 ("io-wq: improve manager/worker handling over exec") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io-wq.c')
-rw-r--r--fs/io-wq.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index 7a1d51c1aca9..f0b7e9ff63fa 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -826,7 +826,6 @@ static int io_wq_fork_manager(struct io_wq *wq)
return 0;
}
- io_wq_put(wq);
return ret;
}
@@ -1078,7 +1077,6 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
if (!ret)
return wq;
- io_wq_put(wq);
io_wq_put_hash(data->hash);
err:
cpuhp_state_remove_instance_nocalls(io_wq_online, &wq->cpuhp_node);