Re: [PATCH] nvme: fix out of bounds access in nvme_cqe_pending

2019-01-10 Thread Keith Busch
On Wed, Jan 09, 2019 at 05:54:59PM -0800, Yao HongBo wrote: > On 1/10/2019 2:39 AM, Christoph Hellwig wrote: > > On Mon, Jan 07, 2019 at 10:22:07AM +0800, Hongbo Yao wrote: > >> There is an out of bounds array access in nvme_cqe_peding(). > >> > >> When enable irq_thread for nvme interrupt, there i

Re: [PATCH] nvme: fix out of bounds access in nvme_cqe_pending

2019-01-09 Thread Yao HongBo
On 1/10/2019 2:39 AM, Christoph Hellwig wrote: > On Mon, Jan 07, 2019 at 10:22:07AM +0800, Hongbo Yao wrote: >> There is an out of bounds array access in nvme_cqe_peding(). >> >> When enable irq_thread for nvme interrupt, there is racing between the >> nvmeq->cq_head updating and reading. > > J

Re: [PATCH] nvme: fix out of bounds access in nvme_cqe_pending

2019-01-09 Thread Christoph Hellwig
On Mon, Jan 07, 2019 at 10:22:07AM +0800, Hongbo Yao wrote: > There is an out of bounds array access in nvme_cqe_peding(). > > When enable irq_thread for nvme interrupt, there is racing between the > nvmeq->cq_head updating and reading. Just curious: why did you enable this option? Do you have a

[PATCH] nvme: fix out of bounds access in nvme_cqe_pending

2019-01-06 Thread Hongbo Yao
There is an out of bounds array access in nvme_cqe_peding(). When enable irq_thread for nvme interrupt, there is racing between the nvmeq->cq_head updating and reading. nvmeq->cq_head is updated in nvme_update_cq_head(), if nvmeq->cq_head equals nvmeq->q_depth and before its value set to zero, nv