[PATCH] nvme: Fix discard buffer overrun

Keith Busch keith.busch at intel.com
Thu Feb 1 07:05:34 PST 2018


On Thu, Feb 01, 2018 at 10:55:30PM +0800, jianchao.wang wrote:
> Hi Keith
> 
> Since each discard bio merged into a request is counted as one segment,
> why not let blk_rq_nr_discard_segments return numbers of bios directly.

Right, I'm all for fixing the discard segment count. At the same time,
I don't want to depend on it's correctness to not access out-of-bounds
array indices.



More information about the Linux-nvme mailing list