Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03f41fac authored by Qu Wenruo's avatar Qu Wenruo Committed by Sasha Levin
Browse files

btrfs: async-thread: Fix a use-after-free error for trace



[ Upstream commit 0a95b851370b84a4b9d92ee6d1fa0926901d0454 ]

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().

Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 6050b33f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment