mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+8b23309d5788a79d3eea@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [block?] general protection fault in bio_first_folio
Date: Sat, 16 Dec 2023 15:00:12 +0800	[thread overview]
Message-ID: <20231216070012.1643-1-hdanton@sina.com> (raw)
In-Reply-To: <0000000000006c14cd060c99ac12@google.com>

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;
 }
--

  parent reply	other threads:[~2023-12-16  7:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-16  5:20 syzbot
2023-12-16  5:53 ` Matthew Wilcox
2023-12-16  7:01   ` syzbot
2023-12-16  6:22 ` [syzbot] " syzbot
2023-12-16  7:00 ` Hillf Danton [this message]
2023-12-16  8:11   ` syzbot
2023-12-16  7:29 ` syzbot
     [not found] <tencent_5FFF86C0D2F7065549A1AEC8EEEDCC9EE706@qq.com>
2023-12-16  7:29 ` syzbot
     [not found] <tencent_F3CD8D809237DDE95DB69927CFA68DBF2507@qq.com>
2023-12-16  9:19 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231216070012.1643-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+8b23309d5788a79d3eea@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®