Patch "btrfs: async-thread: Fix a use-after-free error for trace" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
btrfs: async-thread: Fix a use-after-free error for trace
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
btrfs-async-thread-fix-a-use-after-free-error-for-trace.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
0a95b851370b84a4b9d92ee6d1fa0926901d0454Mon Sep 17 00:00:00 2001
From: Qu Wenruo <[email protected]>
Date: Fri, 22 Jan 2016 09:28:38 +0800
Subject: btrfs: async-thread: Fix a use-after-free error for trace
From: Qu Wenruo <[email protected]>
commit 0a95b851370b84a4b9d92ee6d1fa0926901d0454 upstream.
Parameter of trace_btrfs_work_queued() can be freed in its workqueue. So no one use use that pointer after queue_work().
Fix the user-after-free bug by move the trace line before queue_work().
--- fs/btrfs/async-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/async-thread.c +1 -1
@@ -328,8 +328,8 @@ static inline void __btrfs_queue_work(stlist_add_tail (&work->ordered_list, &wq->ordered_list);spin_unlock_irqrestore (&wq->list_lock, flags); } -queue_work (wq->normal_wq, &work->normal_work);trace_btrfs_work_queued (work); +queue_work (wq->normal_wq, &work->normal_work); } void btrfs_queue_work(struct btrfs_workqueue *wq,
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/btrfs-async-thread-fix-a-use-after-free-error-for-trace.patch