public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: pp <mnipxh@gmail.com>
Cc: jslaby@suse.cz, linux-kernel@vger.kernel.org,
	yanmin_zhang@linux.intel.com, xinhuix.pan@intel.com
Subject: Re: [PATCH] tty/tty_io.c: make a check before reuse cdev
Date: Mon, 21 Jul 2014 08:38:40 -0700	[thread overview]
Message-ID: <20140721153840.GA6802@kroah.com> (raw)
In-Reply-To: <53CD0BD4.4050007@gmail.com>

On Mon, Jul 21, 2014 at 08:47:16PM +0800, pp wrote:
> As reuse the cdev may cause panic. After we unregister the tty device, we may use tty_hangup() o
> other similar function to send a signal(SIGHUP) to process which has opend our device. But that
> not succeed if the process couldn't get the signal. for example, a process forked
> but his parent quited never get SIGHUP.
> 
> Here is our scence.
> tty driver register its device and init the cdevs, then process "A" open one cdev.
> tty driver unregister its device and cdev_del the cdevs, call tty_hangup to (S)send signal SIGHUP to process A.
> But that step(S) fails.

How can that fail?  What driver does this fail for?

> tty driver register its device and (D)init the cdevs again.

What driver does this with an "old" device, it should have created a new
one, otherwise, as you have pointed out, it's a bug.

thanks,

greg k-h

  reply	other threads:[~2014-07-21 15:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 12:47 [PATCH] tty/tty_io.c: make a check before reuse cdev pp
2014-07-21 15:38 ` Greg KH [this message]
2014-07-22 11:52   ` xinhui.pan
2014-07-22 16:40     ` Peter Hurley
2014-07-22 17:38       ` Greg KH
2014-07-23  9:21       ` xinhui.pan
2014-07-23 16:04         ` Peter Hurley
2014-07-24 10:23           ` xinhui.pan
2014-07-25 15:24           ` xinhui
2014-07-23 16:07         ` One Thousand Gnomes
2014-07-24 11:01           ` xinhui.pan
2014-07-24 11:03           ` xinhui.pan

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=20140721153840.GA6802@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnipxh@gmail.com \
    --cc=xinhuix.pan@intel.com \
    --cc=yanmin_zhang@linux.intel.com \
    /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