All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kgraul@linux.ibm.com
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	heiko.carstens@de.ibm.com, raspl@linux.ibm.com,
	ubraun@linux.ibm.com
Subject: Re: [PATCH net] net/smc: fix cleanup for linkgroup setup failures
Date: Wed, 26 Feb 2020 20:18:43 -0800 (PST)	[thread overview]
Message-ID: <20200226.201843.1419217208264213943.davem@davemloft.net> (raw)
In-Reply-To: <20200225153436.26498-1-kgraul@linux.ibm.com>

From: Karsten Graul <kgraul@linux.ibm.com>
Date: Tue, 25 Feb 2020 16:34:36 +0100

> From: Ursula Braun <ubraun@linux.ibm.com>
> 
> If an SMC connection to a certain peer is setup the first time,
> a new linkgroup is created. In case of setup failures, such a
> linkgroup is unusable and should disappear. As a first step the
> linkgroup is removed from the linkgroup list in smc_lgr_forget().
> 
> There are 2 problems:
> smc_listen_decline() might be called before linkgroup creation
> resulting in a crash due to calling smc_lgr_forget() with
> parameter NULL.
> If a setup failure occurs after linkgroup creation, the connection
> is never unregistered from the linkgroup, preventing linkgroup
> freeing.
> 
> This patch introduces an enhanced smc_lgr_cleanup_early() function
> which
> * contains a linkgroup check for early smc_listen_decline()
>   invocations
> * invokes smc_conn_free() to guarantee unregistering of the
>   connection.
> * schedules fast linkgroup removal of the unusable linkgroup
> 
> And the unused function smcd_conn_free() is removed from smc_core.h.
> 
> Fixes: 3b2dec2603d5b ("net/smc: restructure client and server code in af_smc")
> Fixes: 2a0674fffb6bc ("net/smc: improve abnormal termination of link groups")
> Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2020-02-27  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 15:34 [PATCH net] net/smc: fix cleanup for linkgroup setup failures Karsten Graul
2020-02-27  4:18 ` David Miller [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=20200226.201843.1419217208264213943.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.ibm.com \
    --cc=ubraun@linux.ibm.com \
    /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.