All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christian de Rivaz <jc@eclis.ch>
To: Ralf Baechle DL5RB <ralf@linux-mips.org>
Cc: linux-hams@vger.kernel.org
Subject: Re: AX25 mkiss interface not deleted when the serial port is removed
Date: Tue, 29 Sep 2015 17:46:58 +0200	[thread overview]
Message-ID: <560AB272.1060400@eclis.ch> (raw)
In-Reply-To: <20150929153129.GA31429@linux-mips.org>

Le 29. 09. 15 17:31, Ralf Baechle DL5RB a écrit :
> On Fri, Sep 25, 2015 at 07:21:18PM +0200, Jean-Christian de Rivaz wrote:
>
>> On a embedded system we use AX25 over an USB serial port with the kissattach
>> command. For some hardware reason the microcontroller that act as a TNC and
>> USB CDC device can be rested while the system is running, causing a USB
>> disconnect of the USN CDC device and the removal of the corresponding serial
>> port in the kernel. But the ax0 interface is not removed in this case and
>> after a few seconds the kernel panic with the crash below:
>>
>> [<c0595468>] (skb_panic) from [<c0401f70>] (skb_push+0x4c/0x50)
>> [<c0401f70>] (skb_push) from [<bf0bdad4>] (ax25_hard_header+0x34/0xf4
>> [ax25])
>> [<bf0bdad4>] (ax25_hard_header [ax25]) from [<bf0d05d4>]
>> (ax_header+0x38/0x40 [mkiss])
>> [<bf0d05d4>] (ax_header [mkiss]) from [<c041b584>]
>> (neigh_compat_output+0x8c/0xd8)
>> [<c041b584>] (neigh_compat_output) from [<c043e7a8>]
>> (ip_finish_output+0x2a0/0x914)
>> [<c043e7a8>] (ip_finish_output) from [<c043f948>] (ip_output+0xd8/0xf0)
>> [<c043f948>] (ip_output) from [<c043f04c>] (ip_local_out_sk+0x44/0x48)
> skb_push is invoked via a code path that was conceptually completly broken
> and has been rewritten recently.  So it would be great if you could retest
> with a recent release version preferably 4.2.

Hi Ralf,

I try since this morning to make the git linux master running on the 
system, but I hit many problems due to some changes on what is allowed 
in a device tree. I have solved some of them but now I have a spinlock 
kernel crash that I am completely unable to understand. I will report it 
to linux-arm-kernel in a moment.

>   I suspect this is not the
> cause but I'd like to exclude the possibility.
>

I have read the patches between my kernel and git linux master affecting 
ax15 and mkiss, and I was unable to identify something related. Please 
read the previous message from me in the linux-hams mailing list, I 
suspect it contain a better code path where the problem could be. I copy 
it below:

[  251.460000] drivers/net/hamradio/mkiss.c:738 mkiss_open()
[  251.460000] CPU: 0 PID: 247 Comm: kworker/0:1 Tainted: G W 
3.19.0-rc1+ #41
[  251.500000] Hardware name: Atmel SAMA5 (Device Tree)
[  251.500000] Workqueue: usb_hub_wq hub_event
[  251.500000] [<c00149f4>] (unwind_backtrace) from [<c00124f8>] 
(show_stack+0x20/0x24)
[  251.550000] [<c00124f8>] (show_stack) from [<c0594700>] 
(dump_stack+0x20/0x28)
[  251.550000] [<c0594700>] (dump_stack) from [<bf093ed0>] 
(mkiss_open+0x34/0x2e8 [mkiss])
[  251.570000] [<bf093ed0>] (mkiss_open [mkiss]) from [<c02d5b3c>] 
(tty_ldisc_open+0x54/0x94)
[  251.570000] [<c02d5b3c>] (tty_ldisc_open) from [<c02d63a8>] 
(tty_ldisc_hangup+0x190/0x1bc)
[  251.590000] [<c02d63a8>] (tty_ldisc_hangup) from [<c02cdc10>] 
(__tty_hangup+0x2b4/0x3ec)
[  251.590000] [<c02cdc10>] (__tty_hangup) from [<c02cdd88>] 
(tty_vhangup+0x1c/0x20)
[  251.610000] [<c02cdd88>] (tty_vhangup) from [<bf00f628>] 
(acm_disconnect+0xcc/0x1a8 [cdc_acm])
[  251.610000] [<bf00f628>] (acm_disconnect [cdc_acm]) from [<c0377938>] 
(usb_unbind_interface+0x7c/0x288)
[  251.630000] [<c0377938>] (usb_unbind_interface) from [<c02f8548>] 
(__device_release_driver+0x80/0xd4)
[  251.630000] [<c02f8548>] (__device_release_driver) from [<c02f85c8>] 
(device_release_driver+0x2c/0x38)
[  251.650000] [<c02f85c8>] (device_release_driver) from [<c02f8148>] 
(bus_remove_device+0xe4/0x104)
[  251.650000] [<c02f8148>] (bus_remove_device) from [<c02f5830>] 
(device_del+0x108/0x1f0)
[  251.670000] [<c02f5830>] (device_del) from [<c03753d8>] 
(usb_disable_device+0xb0/0x1fc)
[  251.670000] [<c03753d8>] (usb_disable_device) from [<c036cb0c>] 
(usb_disconnect+0x74/0x250)
[  251.680000] [<c036cb0c>] (usb_disconnect) from [<c036e4b4>] 
(hub_event+0x4ec/0x1110)
[  251.710000] [<c036e4b4>] (hub_event) from [<c00369b0>] 
(process_one_work+0x120/0x424)
[  251.710000] [<c00369b0>] (process_one_work) from [<c0036e5c>] 
(worker_thread+0x164/0x4c0)
[  251.730000] [<c0036e5c>] (worker_thread) from [<c003b9f8>] 
(kthread+0xdc/0xf8)
[  251.730000] [<c003b9f8>] (kthread) from [<c000f038>] 
(ret_from_fork+0x14/0x3c)

So tty_ldisc_hangup() seem to open a new mkiss line discipline that will 
bring back the ax0 interface on a new deleted serial device.

Regards,
Jean-Christian

--
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

  reply	other threads:[~2015-09-29 15:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 17:21 AX25 mkiss interface not deleted when the serial port is removed Jean-Christian de Rivaz
2015-09-28 20:06 ` Jean-Christian de Rivaz
2015-09-28 23:13   ` Jean-Christian de Rivaz
2015-09-29  2:13     ` David Ranch
2015-09-29 15:31 ` Ralf Baechle DL5RB
2015-09-29 15:46   ` Jean-Christian de Rivaz [this message]
2015-09-29 16:49   ` David Ranch
2015-09-29 17:14     ` Ralf Baechle
2015-09-30  0:29   ` Jean-Christian de Rivaz
2015-09-30 20:22     ` Thomas Osterried
2015-09-30 23:04       ` Jean-Christian de Rivaz
2015-10-01  2:56         ` [PATCH 1/1] Force mkiss to reset the line discipline when serial device " jc
2015-10-01  7:31           ` Ralf Baechle
2015-10-01  9:18             ` [PATCH v2 " Jean-Christian de Rivaz
2015-10-01 16:56               ` Jean-Christian de Rivaz
2015-10-01 22:57                 ` Peter Hurley
2015-10-02  8:30                   ` Jean-Christian de Rivaz
2015-10-02  8:30                     ` Jean-Christian de Rivaz
2015-10-02 10:35                     ` Thomas Osterried
2015-10-02 10:35                       ` Thomas Osterried
2015-10-02 13:48                       ` Jean-Christian de Rivaz
2015-10-02 17:25                         ` Jean-Christian de Rivaz
2015-10-02 17:25                           ` Jean-Christian de Rivaz
2015-10-02 21:46                           ` [PATCH 1/1] Add poll method to mkiss let notify hangup to the user process Jean-Christian de Rivaz
2015-10-03  0:29                             ` David Ranch
2015-10-03  1:02                               ` Jean-Christian de Rivaz
2016-02-11 19:14                               ` Thomas Osterried
2015-10-02 21:40                         ` [PATCH 1/1] Close the file descriptor and exit when the kernel notice hangup Jean-Christian de Rivaz

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=560AB272.1060400@eclis.ch \
    --to=jc@eclis.ch \
    --cc=linux-hams@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    /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.