Subject: Re: [PATCH] net: rose: fix unregistered netdevice: waiting for rose0 to become free

From: Jakub Kicinski <[email-masked]>
Date: Fri, 15 Jul 2022 15:43:14 -0700

On Fri, 15 Jul 2022 17:59:06 +0200 Bernard f6bvp wrote:
> Here is the context.
> 
> This patch adds dev_put(dev) in order to allow removal of rose module 
> after use of AX25 and ROSE via rose0 device.
> 
> Otherwise when trying to remove rose module via rmmod rose an infinite 
> loop message was displayed on all consoles with xx being a random number.
> 
> unregistered_netdevice: waiting for rose0 to become free. Usage count = xx
> 
> unregistered_netdevice: waiting for rose0 to become free. Usage count = xx
> 
> ...
> 
> With the patch it is ok to rmmod rose.
> 
> This bug appeared with kernel 4.10 and was tentatively repaired five 
> years ago.

Please try resending with git send-email.
Your current email contains HTML so it won't make it to netdev@
and other vger lists.

> *Subject: [BUG] unregistered netdevice: wainting for rose0 to become 
> free. Usage count = xx <https://marc.info/?t=148811830800001&r=1&w=2> 
> From: f6bvp <f6bvp () free ! fr> 
> <https://marc.info/?a=128152583500001&r=1&w=2> Date: 2017-02-26 14:09:08 
> <https://marc.info/?l=linux-hams&r=1&w=2&b=201702> Message-ID: 
> ce03a972-a3b0-ca24-5195-2fe2fd5c44d3 () free ! fr 
> <https://marc.info/?i=ce03a972-a3b0-ca24-5195-2fe2fd5c44d3%20()%20free%20!%20fr>* 
> 
> 
> Since then the bug reamains.

Is it possible to use a link to the lore.kernel.org archive? It's the
most common way of referring to past threads these days.

> Signed-off-by: Bernard f6bvp / ai7bg

Well formed s-o-b is required, "the name you'd use if you were signing
a legal document".

> diff --git a/a/net/rose/af_rose.c b/b/net/rose/af_rose.c
> index bf2d986..41e106a 100644
> --- a/a/net/rose/af_rose.c
> +++ b/b/net/rose/af_rose.c
> @@ -711,6 +711,7 @@ static int rose_bind(struct socket *sock, struct 
> sockaddr *uaddr, int addr_len)
>          rose_insert_socket(sk);
> 
>          sock_reset_flag(sk, SOCK_ZAPPED);
> +       dev_put(dev);
> 
>          return 0;
>   }