All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Thomas Osterried <thomas@osterried.de>
Cc: Duoming Zhou <duoming@zju.edu.cn>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-hams@vger.kernel.org
Subject: Re: [PATCH net] ax25: Fix ax25 session cleanup problem in ax25_release
Date: Fri, 27 May 2022 17:33:12 -0700	[thread overview]
Message-ID: <20220527173312.71122dbe@kernel.org> (raw)
In-Reply-To: <0213B378-9CFF-456E-814E-B27A132CF8F3@osterried.de>

On Fri, 27 May 2022 13:29:30 +0200 Thomas Osterried wrote:
> > I Tested several cases: this patch works as expected.  
> If you agree, that no concurrent process is able to re-use this ax25_cb,
> and because all timers are stoppeed, the cleanup with  ax25_cb_del(s);
> should be safe.
> 
> 
> My successfull test was this:
> 
> diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
> index 363d47f94532..de417b974c07 100644
> --- a/net/ax25/af_ax25.c
> +++ b/net/ax25/af_ax25.c
> @@ -91,6 +92,7 @@ static void ax25_kill_by_device(struct net_device *dev)
>                                 spin_unlock_bh(&ax25_list_lock);
>                                 ax25_disconnect(s, ENETUNREACH);
>                                 s->ax25_dev = NULL;
> +                               ax25_cb_del(s);
>                                 spin_lock_bh(&ax25_list_lock);
>                                 goto again;
>                         }

Thanks a lot for the testing and analysis! We'll give v2 [1] another
day or two on the list and merge it into net.

[1]
https://lore.kernel.org/all/20220527151822.23217-1-duoming@zju.edu.cn/

  parent reply	other threads:[~2022-05-28  0:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 11:28 [PATCH net] ax25: Fix ax25 session cleanup problem in ax25_release Duoming Zhou
2022-05-27  8:11 ` Thomas Osterried
2022-05-27 11:29   ` Thomas Osterried
2022-05-27 14:23     ` duoming
2022-05-28  0:33     ` Jakub Kicinski [this message]
2022-05-28 13:29       ` duoming

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=20220527173312.71122dbe@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=duoming@zju.edu.cn \
    --cc=linux-hams@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thomas@osterried.de \
    /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.