Skip to content

blktrace: fix trace buffer leak and limit trace buffer size

Ming Lei linux-block lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2block: shutdown blktrace in case of fatal signal pendingfs/block_dev.c+6 -06 replies
2/2blktrace: limit allowed total trace buffer sizekernel/trace/blktrace.c+32 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] blktrace: fix trace buffer leak and limit trace buffer size

blktrace may pass big trace buffer size via '-b', meantime the system may have lots of CPU cores, so too much memory can be allocated for blktrace.

The 1st patch shutdown bltrace in blkdev_close() in case of task exiting, for avoiding trace buffer leak.

The 2nd patch limits max trace buffer size for avoiding potential OOM.

Ming Lei (2):
block: shutdown blktrace in case of fatal signal pending
blktrace: limit allowed total trace buffer size

 fs/block_dev.c          |  6 ++++++
 kernel/trace/blktrace.c | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
Signature · 1 line
2.29.2