Re: [PATCH] target: iscsi: use GFP_NOIO with loopback connections

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

 



po 27. 2. 2023 v 9:00 odesílatel Maurizio Lombardi <mlombard@xxxxxxxxxx> napsal:
>
> Fix the issue by using memalloc_noio_*() to enable implicit GFP_NOIO
> in the vulnerable code paths, when the connection is in loopback.
>
> @@ -1289,6 +1291,12 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
>                 iscsit_free_conn(conn);
>                 return 1;
>         }
> +
> +       dst = sk_dst_get(conn->sock->sk);
> +       if (dst && dst->dev && dst->dev->flags & IFF_LOOPBACK)
> +               conn->loopback = true;
> +       dst_release(dst);
> +

As discussed in the other thread, conn->sock is not set when
isert/cxgbit etc are used.
So we need to check it here otherwise the kernel would crash.

I think that "conn->loopback" should be set by the iscsit_accept_np() callback.

Maurizio





[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux