All of lore.kernel.org
 help / color / mirror / Atom feed
From: f6bvp <f6bvp@free.fr>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Stearn <richard@rns-stearn.demon.co.uk>,
	Linux-Ham list <linux-hams@vger.kernel.org>
Subject: Re: kernel crash when device rose set down
Date: Wed, 17 Jun 2015 11:12:36 +0200	[thread overview]
Message-ID: <55813A04.7000902@free.fr> (raw)
In-Reply-To: <557EAB73.7010104@free.fr>

Hello Ralf,

This is to publicize the patch you made against an important
bug responsible of kernel panic when seting rose device down..

Bernard

Le 15/06/2015 12:39, f6bvp a écrit :
> Bingo Ralf !
>
> You have found the bug.
>
> 73 de Bernard, f6bvp
>
>
> Le 15/06/2015 03:21, Ralf Baechle a écrit :
>> On Sun, Jun 14, 2015 at 12:06:53AM +0200, f6bvp wrote:
>>
>>> After neutralizing the three lines I could execute command
>>> "ifconfig rose down" without any issue.
>>> I guess the loop ran through the list of possible rose devices
>>> from rose9 to rose0.
>>> -----------------------
>>> [  214.831371] DEBUG: Passed rose_close 131
>>> [  214.831462] DEBUG: Passed rose_device_event 217
>>> [  214.831465] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831467] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831470] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831472] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831474] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831476] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831478] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831480] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831483] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831485] DEBUG: Passed rose_kill_by_device 192
>>> [  214.831487] DEBUG: Passed rose_kill_by_device 199
>>> [root@RaspBerry-Pi-f6bvp-8 bernard]#
>>> -----------------------
>>> And the bug may be there, for I think  it should not try to 
>>> disconnect ALL
>>> possible rose devices but
>>> only the one we want ?
>> The look is iterating through all ROSE sockets shutting down the ones
>> that are associated with the device being shut down.  That is correct.
>> What's not correct is that the code is trying to reduce the socket's
>> neighbour's use counter unconditionally - there might not even be a
>> neighbour such as for example for a listening socket.
>>
>> Can you test this please?
>>
>> 73,
>>
>>    Ralf
>>
>> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
>>
>> diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
>> index 8ae6030..dd304bc 100644
>> --- a/net/rose/af_rose.c
>> +++ b/net/rose/af_rose.c
>> @@ -192,7 +192,8 @@ static void rose_kill_by_device(struct net_device 
>> *dev)
>>             if (rose->device == dev) {
>>               rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0);
>> -            rose->neighbour->use--;
>> +            if (rose->neighbour)
>> +                rose->neighbour->use--;
>>               rose->device = NULL;
>>           }
>>       }
>

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-06-17  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 14:31 [PATCH net-next 1/1] - ROSE device usage count Richard Stearn
2015-05-20 15:16 ` walter harms
2015-06-15  8:42   ` Ralf Baechle DL5RB
     [not found] ` <555CC7A8.30108@trinnet.net>
     [not found]   ` <5576BE7C.7070704@free.fr>
2015-06-09 12:34     ` Richard Stearn
     [not found]     ` <557759F2.2090406@free.fr>
     [not found]       ` <55780375.1080504@rns-stearn.demon.co.uk>
     [not found]         ` <557CA340.3030708@free.fr>
     [not found]           ` <557CA97D.9050300@free.fr>
     [not found]             ` <20150615012146.GA23451@linux-mips.org>
     [not found]               ` <557EAB73.7010104@free.fr>
2015-06-17  9:12                 ` f6bvp [this message]
2015-06-15 18:45 ` [PATCH net-next 1/1] - ROSE device usage count - repost with signoff Richard Stearn

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=55813A04.7000902@free.fr \
    --to=f6bvp@free.fr \
    --cc=linux-hams@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=richard@rns-stearn.demon.co.uk \
    /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.