RDMA: Directly cast the sockaddr union to sockaddr
commit 641114d2 upstream. gcc 9 now does allocation size tracking and thinks that passing the member of a union and then accessing beyond that member's bounds is an overflow. Instead of using the union member, use the entire union with a cast to get to the sockaddr. gcc will now know that the memory extends the full size of the union. Signed-off-by:Jason Gunthorpe <jgg@mellanox.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Showing
- drivers/infiniband/core/addr.c 5 additions, 5 deletionsdrivers/infiniband/core/addr.c
- drivers/infiniband/hw/ocrdma/ocrdma_ah.c 2 additions, 3 deletionsdrivers/infiniband/hw/ocrdma/ocrdma_ah.c
- drivers/infiniband/hw/ocrdma/ocrdma_hw.c 2 additions, 3 deletionsdrivers/infiniband/hw/ocrdma/ocrdma_hw.c
Please register or sign in to comment