netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
@ 2020-02-13  9:32 yangerkun
  2020-02-16  5:32 ` yangerkun
  2020-02-25 19:04 ` Oliver Hartkopp
  0 siblings, 2 replies; 10+ messages in thread
From: yangerkun @ 2020-02-13  9:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, maowenan, yangerkun

As the description before netdev_run_todo, we cannot call free_netdev
before rtnl_unlock, fix it by reorder the code.

Signed-off-by: yangerkun <yangerkun@huawei.com>
---
 drivers/net/slip/slip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 6f4d7ba8b109..babb01888b78 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty)
 	tty->disc_data = NULL;
 	clear_bit(SLF_INUSE, &sl->flags);
 	sl_free_netdev(sl->dev);
+	/* do not call free_netdev before rtnl_unlock */
+	rtnl_unlock();
 	free_netdev(sl->dev);
+	return err;
 
 err_exit:
 	rtnl_unlock();
-- 
2.23.0.rc2.8.gff66981f45


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-13  9:32 [RFC] slip: not call free_netdev before rtnl_unlock in slip_open yangerkun
@ 2020-02-16  5:32 ` yangerkun
  2020-02-19 14:39   ` yangerkun
  2020-02-25 19:04 ` Oliver Hartkopp
  1 sibling, 1 reply; 10+ messages in thread
From: yangerkun @ 2020-02-16  5:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, maowenan

Ping.

On 2020/2/13 17:32, yangerkun wrote:
> As the description before netdev_run_todo, we cannot call free_netdev
> before rtnl_unlock, fix it by reorder the code.
> 
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
>   drivers/net/slip/slip.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
> index 6f4d7ba8b109..babb01888b78 100644
> --- a/drivers/net/slip/slip.c
> +++ b/drivers/net/slip/slip.c
> @@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty)
>   	tty->disc_data = NULL;
>   	clear_bit(SLF_INUSE, &sl->flags);
>   	sl_free_netdev(sl->dev);
> +	/* do not call free_netdev before rtnl_unlock */
> +	rtnl_unlock();
>   	free_netdev(sl->dev);
> +	return err;
>   
>   err_exit:
>   	rtnl_unlock();
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-16  5:32 ` yangerkun
@ 2020-02-19 14:39   ` yangerkun
  2020-02-25  8:57     ` yangerkun
  0 siblings, 1 reply; 10+ messages in thread
From: yangerkun @ 2020-02-19 14:39 UTC (permalink / raw)
  To: davem; +Cc: netdev, maowenan, yangerkun

Ping again..

On 2020/2/16 13:32, yangerkun wrote:
> Ping.
> 
> On 2020/2/13 17:32, yangerkun wrote:
>> As the description before netdev_run_todo, we cannot call free_netdev
>> before rtnl_unlock, fix it by reorder the code.
>>
>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>> ---
>>   drivers/net/slip/slip.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
>> index 6f4d7ba8b109..babb01888b78 100644
>> --- a/drivers/net/slip/slip.c
>> +++ b/drivers/net/slip/slip.c
>> @@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty)
>>       tty->disc_data = NULL;
>>       clear_bit(SLF_INUSE, &sl->flags);
>>       sl_free_netdev(sl->dev);
>> +    /* do not call free_netdev before rtnl_unlock */
>> +    rtnl_unlock();
>>       free_netdev(sl->dev);
>> +    return err;
>>   err_exit:
>>       rtnl_unlock();
>>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-19 14:39   ` yangerkun
@ 2020-02-25  8:57     ` yangerkun
  2020-02-25 18:39       ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: yangerkun @ 2020-02-25  8:57 UTC (permalink / raw)
  To: davem; +Cc: netdev, maowenan, yangerkun

Ping. And anyone can give some advise about this patch?

Thanks,
Kun.

On 2020/2/19 22:39, yangerkun wrote:
> Ping again..
> 
> On 2020/2/16 13:32, yangerkun wrote:
>> Ping.
>>
>> On 2020/2/13 17:32, yangerkun wrote:
>>> As the description before netdev_run_todo, we cannot call free_netdev
>>> before rtnl_unlock, fix it by reorder the code.
>>>
>>> Signed-off-by: yangerkun <yangerkun@huawei.com>
>>> ---
>>>   drivers/net/slip/slip.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
>>> index 6f4d7ba8b109..babb01888b78 100644
>>> --- a/drivers/net/slip/slip.c
>>> +++ b/drivers/net/slip/slip.c
>>> @@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty)
>>>       tty->disc_data = NULL;
>>>       clear_bit(SLF_INUSE, &sl->flags);
>>>       sl_free_netdev(sl->dev);
>>> +    /* do not call free_netdev before rtnl_unlock */
>>> +    rtnl_unlock();
>>>       free_netdev(sl->dev);
>>> +    return err;
>>>   err_exit:
>>>       rtnl_unlock();
>>>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-25  8:57     ` yangerkun
@ 2020-02-25 18:39       ` David Miller
  2020-02-26  1:35         ` yangerkun
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2020-02-25 18:39 UTC (permalink / raw)
  To: yangerkun; +Cc: netdev, maowenan

From: yangerkun <yangerkun@huawei.com>
Date: Tue, 25 Feb 2020 16:57:16 +0800

> Ping. And anyone can give some advise about this patch?

You've pinged us 5 or 6 times already.

Obviously that isn't causing anyone to look more deeply into your
patch.

You have to accept the fact that using the same exact strategy over
and over again to get someone to look at this is not working.

Please.

Thank you.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-13  9:32 [RFC] slip: not call free_netdev before rtnl_unlock in slip_open yangerkun
  2020-02-16  5:32 ` yangerkun
@ 2020-02-25 19:04 ` Oliver Hartkopp
  1 sibling, 0 replies; 10+ messages in thread
From: Oliver Hartkopp @ 2020-02-25 19:04 UTC (permalink / raw)
  To: yangerkun, davem; +Cc: netdev, maowenan

I pick it up to take a look at this :-)

On 13/02/2020 10.32, yangerkun wrote:
> As the description before netdev_run_todo, we cannot call free_netdev
> before rtnl_unlock, fix it by reorder the code.
> 
> Signed-off-by: yangerkun <yangerkun@huawei.com>

Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net>

The same issue applies to slcan_open() in slcan.c too.

I'll send a patch for it, when this fix got merged.

Best regards,
Oliver

> ---
>   drivers/net/slip/slip.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
> index 6f4d7ba8b109..babb01888b78 100644
> --- a/drivers/net/slip/slip.c
> +++ b/drivers/net/slip/slip.c
> @@ -863,7 +863,10 @@ static int slip_open(struct tty_struct *tty)
>   	tty->disc_data = NULL;
>   	clear_bit(SLF_INUSE, &sl->flags);
>   	sl_free_netdev(sl->dev);
> +	/* do not call free_netdev before rtnl_unlock */
> +	rtnl_unlock();
>   	free_netdev(sl->dev);
> +	return err;
>   
>   err_exit:
>   	rtnl_unlock();
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-25 18:39       ` David Miller
@ 2020-02-26  1:35         ` yangerkun
  2020-02-26  3:30           ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: yangerkun @ 2020-02-26  1:35 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, maowenan



On 2020/2/26 2:39, David Miller wrote:
> From: yangerkun <yangerkun@huawei.com>
> Date: Tue, 25 Feb 2020 16:57:16 +0800
> 
>> Ping. And anyone can give some advise about this patch?
> 
> You've pinged us 5 or 6 times already.
Hi,

Thanks for your reply!

I am so sorry for the frequently ping which can make some noise. Wont't 
happen again after this...

Thanks,
Kun.

> 
> Obviously that isn't causing anyone to look more deeply into your
> patch.
> 
> You have to accept the fact that using the same exact strategy over
> and over again to get someone to look at this is not working.
> 
> Please.
> 
> Thank you.
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-26  1:35         ` yangerkun
@ 2020-02-26  3:30           ` David Miller
  2020-02-26  7:28             ` Oliver Hartkopp
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2020-02-26  3:30 UTC (permalink / raw)
  To: yangerkun; +Cc: netdev, maowenan

From: yangerkun <yangerkun@huawei.com>
Date: Wed, 26 Feb 2020 09:35:38 +0800

> 
> 
> On 2020/2/26 2:39, David Miller wrote:
>> From: yangerkun <yangerkun@huawei.com>
>> Date: Tue, 25 Feb 2020 16:57:16 +0800
>> 
>>> Ping. And anyone can give some advise about this patch?
>> You've pinged us 5 or 6 times already.
> Hi,
> 
> Thanks for your reply!
> 
> I am so sorry for the frequently ping which can make some
> noise. Wont't happen again after this...

Ok.  But please repost your patch without the RFC tag.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-26  3:30           ` David Miller
@ 2020-02-26  7:28             ` Oliver Hartkopp
  2020-02-26 12:01               ` yangerkun
  0 siblings, 1 reply; 10+ messages in thread
From: Oliver Hartkopp @ 2020-02-26  7:28 UTC (permalink / raw)
  To: David Miller, yangerkun; +Cc: netdev, maowenan



On 26/02/2020 04.30, David Miller wrote:
> From: yangerkun <yangerkun@huawei.com>
> Date: Wed, 26 Feb 2020 09:35:38 +0800
> 
>>
>>
>> On 2020/2/26 2:39, David Miller wrote:
>>> From: yangerkun <yangerkun@huawei.com>
>>> Date: Tue, 25 Feb 2020 16:57:16 +0800
>>>
>>>> Ping. And anyone can give some advise about this patch?
>>> You've pinged us 5 or 6 times already.
>> Hi,
>>
>> Thanks for your reply!
>>
>> I am so sorry for the frequently ping which can make some
>> noise. Wont't happen again after this...
> 
> Ok.  But please repost your patch without the RFC tag.
> 

In fact the comment

/* do not call free_netdev before rtnl_unlock */

is also obsolete and can be omitted as you describe the change in the 
commit message.

In similar code snipets in the kernel there are also no comments for this.

Thanks,
Oliver

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC] slip: not call free_netdev before rtnl_unlock in slip_open
  2020-02-26  7:28             ` Oliver Hartkopp
@ 2020-02-26 12:01               ` yangerkun
  0 siblings, 0 replies; 10+ messages in thread
From: yangerkun @ 2020-02-26 12:01 UTC (permalink / raw)
  To: Oliver Hartkopp, David Miller; +Cc: netdev, maowenan



On 2020/2/26 15:28, Oliver Hartkopp wrote:
> 
> 
> On 26/02/2020 04.30, David Miller wrote:
>> From: yangerkun <yangerkun@huawei.com>
>> Date: Wed, 26 Feb 2020 09:35:38 +0800
>>
>>>
>>>
>>> On 2020/2/26 2:39, David Miller wrote:
>>>> From: yangerkun <yangerkun@huawei.com>
>>>> Date: Tue, 25 Feb 2020 16:57:16 +0800
>>>>
>>>>> Ping. And anyone can give some advise about this patch?
>>>> You've pinged us 5 or 6 times already.
>>> Hi,
>>>
>>> Thanks for your reply!
>>>
>>> I am so sorry for the frequently ping which can make some
>>> noise. Wont't happen again after this...
>>
>> Ok.  But please repost your patch without the RFC tag.
>>
> 
> In fact the comment
> 
> /* do not call free_netdev before rtnl_unlock */
> 
> is also obsolete and can be omitted as you describe the change in the 
> commit message.

Hi,

Yes. No need for this commit message. I will resend the patch!

Thanks,
Kun.

> 
> In similar code snipets in the kernel there are also no comments for this.
> 
> Thanks,
> Oliver
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-02-26 12:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  9:32 [RFC] slip: not call free_netdev before rtnl_unlock in slip_open yangerkun
2020-02-16  5:32 ` yangerkun
2020-02-19 14:39   ` yangerkun
2020-02-25  8:57     ` yangerkun
2020-02-25 18:39       ` David Miller
2020-02-26  1:35         ` yangerkun
2020-02-26  3:30           ` David Miller
2020-02-26  7:28             ` Oliver Hartkopp
2020-02-26 12:01               ` yangerkun
2020-02-25 19:04 ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).