[PATCH v3 0/3] fix possible memleak in '__blk_trace_remove'

Ye Bin posted 3 patches 3 years, 5 months ago
kernel/trace/blktrace.c | 82 ++++++++++++++++++++---------------------
1 file changed, 39 insertions(+), 43 deletions(-)
[PATCH v3 0/3] fix possible memleak in '__blk_trace_remove'
Posted by Ye Bin 3 years, 5 months ago
From: Ye Bin <yebin10@huawei.com>

Diff v3 VS v2
1. Invert the check of 'blk_trace_{start,stop}' and return early from the
function for the error case.

Diff v2 VS v1:
1. Introduce 'blk_trace_{start,stop}' helper instead of 'blk_trace_switch_state'.
2. Move stop block trace from '__blk_trace_remove' to 'blk_trace_cleanup'.

Ye Bin (3):
  blktrace: introduce 'blk_trace_{start,stop}' helper
  blktrace: fix possible memleak in '__blk_trace_remove'
  blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'

 kernel/trace/blktrace.c | 82 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 43 deletions(-)

-- 
2.31.1
Re: [PATCH v3 0/3] fix possible memleak in '__blk_trace_remove'
Posted by Jens Axboe 3 years, 5 months ago
On Wed, 19 Oct 2022 11:35:59 +0800, Ye Bin wrote:
> From: Ye Bin <yebin10@huawei.com>
> 
> Diff v3 VS v2
> 1. Invert the check of 'blk_trace_{start,stop}' and return early from the
> function for the error case.
> 
> Diff v2 VS v1:
> 1. Introduce 'blk_trace_{start,stop}' helper instead of 'blk_trace_switch_state'.
> 2. Move stop block trace from '__blk_trace_remove' to 'blk_trace_cleanup'.
> 
> [...]

Applied, thanks!

[1/3] blktrace: introduce 'blk_trace_{start,stop}' helper
      commit: 60a9bb9048f9e95029df10a9bc346f6b066c593c
[2/3] blktrace: fix possible memleak in '__blk_trace_remove'
      commit: dcd1a59c62dc49da75539213611156d6db50ab5d
[3/3] blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'
      commit: 2db96217e7e515071726ca4ec791742c4202a1b2

Best regards,
-- 
Jens Axboe