linux/drivers/infiniband
Xiao Yang cc4f596cf8 RDMA/rxe: Zero out index member of struct rxe_queue
1) New index member of struct rxe_queue was introduced but not zeroed so
   the initial value of index may be random.

2) The current index is not masked off to index_mask.

In this case producer_addr() and consumer_addr() will get an invalid
address by the random index and then accessing the invalid address
triggers the following panic:

"BUG: unable to handle page fault for address: ffff9ae2c07a1414"

Fix the issue by using kzalloc() to zero out index member.

Fixes: 5bcf5a59c4 ("RDMA/rxe: Protext kernel index from user space")
Link: https://lore.kernel.org/r/20210820111509.172500-1-yangx.jy@fujitsu.com
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-08-20 15:48:58 -03:00
..
core RDMA/uverbs: Track dmabuf memory regions 2021-08-19 09:59:53 -03:00
hw RDMA/efa: Free IRQ vectors on error flow 2021-08-20 15:27:47 -03:00
sw RDMA/rxe: Zero out index member of struct rxe_queue 2021-08-20 15:48:58 -03:00
ulp SCSI misc on 20210702 2021-07-02 15:14:36 -07:00
Kconfig RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw 2021-06-02 20:06:36 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00