All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maurizio Lombardi <mlombard@redhat.com>
To: martin.petersen@oracle.com
Cc: michael.christie@oracle.com, target-devel@vger.kernel.org
Subject: Re: [PATCH] target: iscsi: use GFP_NOIO with loopback connections
Date: Wed, 22 Mar 2023 14:59:37 +0100	[thread overview]
Message-ID: <CAFL455n3w6MoWTC6sj2T_oSg38oF-zSpQFaiJshknd91OJShTg@mail.gmail.com> (raw)
In-Reply-To: <20230227075735.8695-1-mlombard@redhat.com>

po 27. 2. 2023 v 9:00 odesílatel Maurizio Lombardi <mlombard@redhat.com> 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


      reply	other threads:[~2023-03-22 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27  7:57 [PATCH] target: iscsi: use GFP_NOIO with loopback connections Maurizio Lombardi
2023-03-22 13:59 ` Maurizio Lombardi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFL455n3w6MoWTC6sj2T_oSg38oF-zSpQFaiJshknd91OJShTg@mail.gmail.com \
    --to=mlombard@redhat.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.