linux/drivers/infiniband/sw/rxe
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
..
Kconfig RDMA/rxe: Fix missing kconfig dependency on CRYPTO 2021-03-01 14:46:31 -04:00
Makefile RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs 2021-06-16 20:51:17 -03:00
rxe_av.c RDMA/rxe: Fix a bug in rxe_fill_ip_info() 2021-04-21 16:09:04 -03:00
rxe_comp.c Linux 5.13-rc7 2021-06-22 14:43:51 -03:00
rxe_cq.c RDMA/rxe: Protext kernel index from user space 2021-06-03 15:53:01 -03:00
rxe_hdr.h RDMA/rxe: Remove unused pkt->offset 2021-02-16 14:42:59 -04:00
rxe_hw_counters.c RDMA: Split the alloc_hw_stats() ops to port and device variants 2021-06-16 20:58:29 -03:00
rxe_hw_counters.h RDMA: Split the alloc_hw_stats() ops to port and device variants 2021-06-16 20:58:29 -03:00
rxe_icrc.c RDMA/rxe: Add SPDX hdrs to rxe source files 2020-08-31 12:20:02 -03:00
rxe_loc.h RDMA/rxe: Disallow MR dereg and invalidate when bound 2021-06-16 20:51:19 -03:00
rxe_mcast.c RDMA/rxe: Fix memory allocation while in a spin lock 2021-08-19 20:11:16 -03:00
rxe_mmap.c RDMA/rxe: Add SPDX hdrs to rxe source files 2020-08-31 12:20:02 -03:00
rxe_mr.c RDMA/rxe: Fix memory leak in error path code 2021-07-15 14:44:12 -03:00
rxe_mw.c RDMA/rxe: Implement memory access through MWs 2021-06-16 20:51:18 -03:00
rxe_net.c RDMA/rxe: Restore setting tot_len in the IPv4 header 2021-08-02 12:45:22 -03:00
rxe_net.h RDMA/rxe: Add SPDX hdrs to rxe source files 2020-08-31 12:20:02 -03:00
rxe_opcode.c RDMA/rxe: Add support for bind MW work requests 2021-06-16 20:51:18 -03:00
rxe_opcode.h RDMA/rxe: Replace WR_REG_MASK by WR_LOCAL_OP_MASK 2021-06-16 20:51:18 -03:00
rxe_param.h RDMA/rxe: Enable MW object pool 2021-06-16 20:51:17 -03:00
rxe_pool.c RDMA/rxe: Add ib_alloc_mw and ib_dealloc_mw verbs 2021-06-16 20:51:17 -03:00
rxe_pool.h RDMA/rxe: Return errors for add index and key 2021-06-16 20:51:17 -03:00
rxe_qp.c Linux 5.13-rc7 2021-06-22 14:43:51 -03:00
rxe_queue.c RDMA/rxe: Zero out index member of struct rxe_queue 2021-08-20 15:48:58 -03:00
rxe_queue.h RDMA/rxe: Protext kernel index from user space 2021-06-03 15:53:01 -03:00
rxe_recv.c RDMA/rxe: Fix extra deref in rxe_rcv_mcast_pkt() 2021-03-05 14:15:18 -04:00
rxe_req.c RDMA/rxe: Implement invalidate MW operations 2021-06-16 20:51:18 -03:00
rxe_resp.c RDMA/rxe: Use the correct size of wqe when processing SRQ 2021-08-02 12:45:22 -03:00
rxe_srq.c RDMA/rxe: Protext kernel index from user space 2021-06-03 15:53:01 -03:00
rxe_sysfs.c Merge branch 'mlx5_active_speed' into rdma.git for-next 2020-09-18 10:31:45 -03:00
rxe_task.c RDMA/rxe: Convert tasklets to use new tasklet_setup() API 2020-09-03 12:01:53 -03:00
rxe_task.h RDMA/rxe: Convert tasklets to use new tasklet_setup() API 2020-09-03 12:01:53 -03:00
rxe_verbs.c RDMA: Remove rdma_set_device_sysfs_group() 2021-06-16 20:58:32 -03:00
rxe_verbs.h RDMA/rxe: Implement memory access through MWs 2021-06-16 20:51:18 -03:00
rxe.c RDMA/rxe: Enable MW object pool 2021-06-16 20:51:17 -03:00
rxe.h Merge branch 'mlx5_active_speed' into rdma.git for-next 2020-09-18 10:31:45 -03:00