]> Git Repo - linux.git/commit
lib: parser: optimize match_NUMBER apis to use local array
authorLi Lingfeng <[email protected]>
Fri, 20 Jan 2023 03:23:52 +0000 (11:23 +0800)
committerAndrew Morton <[email protected]>
Thu, 9 Feb 2023 23:56:51 +0000 (15:56 -0800)
commit67222c4ba8afe409d1e049a8f1e687c8a214fec7
treeef7f8ab438d02014220403e3ddc4875cdb00fd48
parentbadc28d4924bfed73efc93f716a0c3aa3afbdf6f
lib: parser: optimize match_NUMBER apis to use local array

Memory will be allocated to store substring_t in match_strdup(), which
means the caller of match_strdup() may need to be scheduled out to wait
for reclaiming memory.  smatch complains that this can cuase sleeping in
an atoic context.

Using local array to store substring_t to remove the restriction.

Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 2c0647988433 ("blk-iocost: don't release 'ioc->lock' while updating params")
Signed-off-by: Li Lingfeng <[email protected]>
Reported-by: Yu Kuai <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: BingJing Chang <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Hou Tao <[email protected]>
Cc: James Smart <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: yangerkun <[email protected]>
Cc: Zhang Yi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
lib/parser.c
This page took 0.052544 seconds and 4 git commands to generate.