Skip to content

block: fix page leak in bio_copy_kern when bio_add_page fails#630

Open
blktests-ci[bot] wants to merge 1 commit intofor-next_basefrom
series/1060453=>for-next
Open

block: fix page leak in bio_copy_kern when bio_add_page fails#630
blktests-ci[bot] wants to merge 1 commit intofor-next_basefrom
series/1060453=>for-next

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Mar 10, 2026

Pull request for series with
subject: block: fix page leak in bio_copy_kern when bio_add_page fails
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1060453

@blktests-ci
Copy link
Author

blktests-ci bot commented Mar 10, 2026

Upstream branch: 3eaa153
series: https://patchwork.kernel.org/project/linux-block/list/?series=1060453
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=1060453
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: block: fix page leak in bio_copy_kern when bio_add_page fails
Using index info to reconstruct a base tree...
M	block/blk-map.c
Falling back to patching base and 3-way merge...
Auto-merging block/blk-map.c
CONFLICT (content): Merge conflict in block/blk-map.c
Patch failed at 0001 block: fix page leak in bio_copy_kern when bio_add_page fails'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:

diff --cc block/blk-map.c
index 768549f19f97,ed0ff4e77833..000000000000
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@@ -398,7 -398,10 +398,14 @@@ static struct bio *bio_copy_kern(struc
  		if (op_is_write(op))
  			memcpy(page_address(page), p, bytes);
  
++<<<<<<< HEAD
 +		__bio_add_page(bio, page, bytes, 0);
++=======
+ 		if (bio_add_page(bio, page, bytes, 0) < bytes) {
+ 			__free_page(page);
+ 			break;
+ 		}
++>>>>>>> block: fix page leak in bio_copy_kern when bio_add_page fails
  
  		len -= bytes;
  		p += bytes;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant