From: Ralf Baechle <ralf@linux-mips.org>
To: jc@eclis.ch
Cc: Thomas Osterried <thomas@osterried.de>,
David Ranch <dranch@trinnet.net>,
linux-hams@trinnet.net, linux-hams@vger.kernel.org
Subject: Re: [PATCH 1/1] Force mkiss to reset the line discipline when serial device is removed
Date: Thu, 1 Oct 2015 09:31:18 +0200 [thread overview]
Message-ID: <20151001073117.GA31401@linux-mips.org> (raw)
In-Reply-To: <1443668180-1283-1-git-send-email-jc@eclis.ch>
On Thu, Oct 01, 2015 at 04:56:20AM +0200, jc@eclis.ch wrote:
> From: Jean-Christian de Rivaz <jc@eclis.ch>
>
> Without the TTY_DRIVER_RESET_TERMIOS in the tty driver flags, the
> ax_open() is called again and a new unconfigured interface replace the
> one that was just deleted. Since this parasit interface is not linked
> to any serial device, when a packet is send the kernel will panic.
>
> Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch>
> ---
> drivers/net/hamradio/mkiss.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
> index 216bfd3..788f43e 100644
> --- a/drivers/net/hamradio/mkiss.c
> +++ b/drivers/net/hamradio/mkiss.c
> @@ -612,6 +612,11 @@ static int ax_open(struct net_device *dev)
>
> ax->flags &= (1 << AXF_INUSE); /* Clear ESCAPE & ERROR flags */
>
> + /* Will force N_TTY discipline in tty_ldisc_hangup() to avoid
> + * tty_ldisc_reinit() call ax_open() again when the serial
> + * device is removed */
> + ax->tty->driver->flags |= TTY_DRIVER_RESET_TERMIOS;
TTY_DRIVER_RESET_TERMIOS is a flag for use by the device driver so I don't
think this is ok.
Ralf
next prev parent reply other threads:[~2015-10-01 7:31 UTC|newest]
Thread overview: 25+ 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
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 [this message]
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 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 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=20151001073117.GA31401@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=dranch@trinnet.net \
--cc=jc@eclis.ch \
--cc=linux-hams@trinnet.net \
--cc=linux-hams@vger.kernel.org \
--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 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).