summaryrefslogtreecommitdiff
path: root/scripts/cleanpatch
diff options
context:
space:
mode:
authorJackie Liu <liuyun01@kylinos.cn>2026-07-15 15:35:18 +0800
committerJens Axboe <axboe@kernel.dk>2026-07-16 06:08:14 -0600
commitbd2df8dc72201f626d66ca97f2afc8b7f2740713 (patch)
tree16d16b395707365871aa4454b9ee0dfede929c50 /scripts/cleanpatch
parentdaff723f2d4c618d5f9186a990f47bf75878abeb (diff)
block: free copied pages when blk_rq_map_kern() fails
bio_copy_kern() allocates pages that are normally freed by the bio completion callback. If blk_rq_append_bio() rejects the bio, however, blk_rq_map_kern() only drops the bio reference. Since bio_put() does not free pages referenced by the bio vectors, those pages leak. This can happen when the bio exceeds the queue segment constraints or when a later mapping cannot be merged into a request built by earlier calls. Track whether the buffer was copied and free those pages before dropping the rejected bio. Fixes: 3a5a39276d2a ("block: allow blk_rq_map_kern to append to requests") Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Jackie Liu <liuyun01@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260715073518.96042-1-liu.yun@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/cleanpatch')
0 files changed, 0 insertions, 0 deletions