Re: [PATCH -next] workqueue: fix a memory leak in wq->lock_name

2019-03-03 Thread Bart Van Assche
On 3/3/19 6:34 AM, Qian Cai wrote: diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 497900263dbc..e780bf73eced 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3445,6 +3445,8 @@ static void wq_init_lockdep(struct workqueue_struct *wq) lock_name = kasprintf(GFP_KERNEL

[PATCH -next] workqueue: fix a memory leak in wq->lock_name

2019-03-03 Thread Qian Cai
The linux-next commit 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues") introduced a memory leak as wq_free_lockdep() calls kfree(wq->lock_name) but wq_init_lockdep() does not point wq->lock_name to the newly allocated slab object. This can be reproduced by running LTP fall