lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [syzbot] [block?] general protection fault in bio_first_folio
From
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [block?] general protection fault in bio_first_folio
Author: eadavis@qq.com

please test general protection fault in bio_first_folio

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git abb240f7a2bd

diff --git a/block/blk-map.c b/block/blk-map.c
index 8584babf3ea0..6c6f0ef1407b 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -344,7 +344,8 @@ static int bio_map_user_iov(struct request *rq, struct iov_iter *iter,
return 0;

out_unmap:
- bio_release_pages(bio, false);
+ if (bio->bi_vcnt)
+ bio_release_pages(bio, false);
blk_mq_map_bio_put(bio);
return ret;
}

\
 
 \ /
  Last update: 2023-12-16 08:30    [W:0.045 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site