Re: [PATCH for-rc] RDMA/rxe: Fix failure during driver load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 1 Jun 2021, at 10:45, Zhu Yanjun <zyjzyj2000@xxxxxxxxx> wrote:
> 
> On Tue, Jun 1, 2021 at 1:58 PM Kamal Heib <kamalheib1@xxxxxxxxx> wrote:
>> 
>> To avoid the following failure when trying to load the rdma_rxe module
>> while IPv6 is disabled, Add a check to make sure that IPv6 is enabled
>> before trying to create the IPv6 UDP tunnel.
>> 
>> $ modprobe rdma_rxe
>> modprobe: ERROR: could not insert 'rdma_rxe': Operation not permitted
> 
> About this problem, this link:
> https://patchwork.kernel.org/project/linux-rdma/patch/20210413234252.12209-1-yanjun.zhu@xxxxxxxxx/
> also tries to solve ipv6 problem.
> 
> Zhu Yanjun
> 

Yes, but this patch is fixing the problem more cleanly and I’ve tested it.

Could you please review and ACK this patch?

Thanks,
Kamal


>> 
>> Fixes: dfdd6158ca2c ("IB/rxe: Fix kernel panic in udp_setup_tunnel")
>> Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
>> ---
>> drivers/infiniband/sw/rxe/rxe_net.c | 14 ++++++++------
>> 1 file changed, 8 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
>> index 01662727dca0..f353fc18769f 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_net.c
>> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
>> @@ -617,12 +617,14 @@ static int rxe_net_ipv6_init(void)
>> {
>> #if IS_ENABLED(CONFIG_IPV6)
>> 
>> -       recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net,
>> -                                               htons(ROCE_V2_UDP_DPORT), true);
>> -       if (IS_ERR(recv_sockets.sk6)) {
>> -               recv_sockets.sk6 = NULL;
>> -               pr_err("Failed to create IPv6 UDP tunnel\n");
>> -               return -1;
>> +       if (ipv6_mod_enabled()) {
>> +               recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net,
>> +                                       htons(ROCE_V2_UDP_DPORT), true);
>> +               if (IS_ERR(recv_sockets.sk6)) {
>> +                       recv_sockets.sk6 = NULL;
>> +                       pr_err("Failed to create IPv6 UDP tunnel\n");
>> +                       return -1;
>> +               }
>>        }
>> #endif
>>        return 0;
>> --
>> 2.26.3
>> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux