[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231216070012.1643-1-hdanton@sina.com>
Date: Sat, 16 Dec 2023 15:00:12 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+8b23309d5788a79d3eea@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [block?] general protection fault in bio_first_folio
On Fri, 15 Dec 2023 21:20:22 -0800
> HEAD commit: abb240f7a2bd Add linux-next specific files for 20231212
> git tree: linux-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13274512e80000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git abb240f7a2bd
--- x/block/blk-map.c
+++ y/block/blk-map.c
@@ -269,6 +269,7 @@ static int bio_map_user_iov(struct reque
unsigned int max_sectors = queue_max_hw_sectors(rq->q);
unsigned int nr_vecs = iov_iter_npages(iter, BIO_MAX_VECS);
struct bio *bio;
+ int add_pg = 0;
int ret;
int j;
@@ -322,6 +323,7 @@ static int bio_map_user_iov(struct reque
bio_release_page(bio, page);
bytes -= n;
offs = 0;
+ add_pg = 1;
}
}
/*
@@ -344,7 +346,8 @@ static int bio_map_user_iov(struct reque
return 0;
out_unmap:
- bio_release_pages(bio, false);
+ if (add_pg)
+ bio_release_pages(bio, false);
blk_mq_map_bio_put(bio);
return ret;
}
--
Powered by blists - more mailing lists