On Fri, Feb 14, 2025 at 03:10:10PM +0100, Christoph Hellwig wrote: > On Fri, Feb 14, 2025 at 04:46:38PM +0800, Ming Lei wrote: > > Discard request may use special payload only and doesn't have bio > > attached, so the request iterator has to be initialized from valid > > req->bio, otherwise NULL pointer dereferenced is triggered. > > So while the code changes here look good to me, the commit message is > wrong. discard requests always have at least one bio attached, so we're > not going to hit this condition. Discard requests also aren't even > handled by the function in Cheyenne's report. I'm pretty sure this is > a flush request, as these are the only non-passthrough requests without > a bio. > > > + /* discard request may not have bio attached */ > > + if (iter.bio) > > + iter.iter = iter.bio->bi_iter; > > Same for the comment. You are right, it should be the flush internal request, even though mapping discard request may not need bio, I will fix the commit log and comment. Thanks, Ming