public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: "xinhui.pan" <xinhuix.pan@intel.com>, Jiri Slaby <jslaby@suse.cz>,
	linux-kernel@vger.kernel.org, "Zhang,
	Yanmin" <yanmin_zhang@linux.intel.com>, mnipxh <mnipxh@gmail.com>,
	gnomes@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] tty/n_gsm.c: do not clear gsm_mux entry when the gsm is not closed
Date: Thu, 9 Oct 2014 12:13:51 -0700	[thread overview]
Message-ID: <20141009191351.GA4256@kroah.com> (raw)
In-Reply-To: <5436DB9A.6040801@hurleysoftware.com>

On Thu, Oct 09, 2014 at 03:01:46PM -0400, Peter Hurley wrote:
> On 07/28/2014 11:13 AM, Greg Kroah-Hartman wrote:
> > On Mon, Jul 28, 2014 at 03:16:25PM +0800, xinhui.pan wrote:
> >>> Why can't you do dynamic reference counting of your structure, that
> >>> would allow you to get rid of your global array, right?
> >>>
> >>
> >> Thanks for your nice comments.
> >> Struct gsm has a ref-count already. :)
> > 
> > Then you should be fine, no need to keep it in an array.
> > 
> >> And also adding a ref-count is a little hard to me. :(
> >> This global array is used to keep tracking the gsms that stands for the gsmttyXX.
> > 
> > You shouldn't need that at all, just use a list, you don't care what the
> > XX number is within the driver, just allocate a new one with the next
> > available number and you should be fine.
> > 
> >> and it can tell us if we can create a new gsm. :)
> > 
> > You should always be able to create a new gsm if you need to :)
> > 
> >> In gsm_init we set *gsm_tty_driver = alloc_tty_driver(256);*
> > 
> > Why limit to 256?  Just use a list, and a idr structure to allocate the
> > minor number, and all should be good.
> 
> Hi Greg,
> 
> This is still broken in the gsm driver.
> 
> As much as I'd like to see someone take ownership of the gsm driver and
> do this 'the right way', I think until that happens we should consider
> fixing the reuse-while-in-use error.

What happened to the gsm driver maintainers?

> Would you be willing to take a patch from me that just does the bare
> minimum to keep this from panicking in the cdev code?

Depends on what the patch looks like :)

Send it on, and I'll be glad to review it.

thanks,

greg k-h

  reply	other threads:[~2014-10-09 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24  9:17 [PATCH] tty/n_gsm.c: do not clear gsm_mux entry when the gsm is not closed xinhui.pan
2014-07-27 18:09 ` Greg Kroah-Hartman
2014-07-28  7:16   ` xinhui.pan
2014-07-28 15:13     ` Greg Kroah-Hartman
2014-10-09 19:01       ` Peter Hurley
2014-10-09 19:13         ` Greg Kroah-Hartman [this message]
2014-10-09 19:23           ` Peter Hurley
2014-10-09 19:30             ` Greg Kroah-Hartman
2014-10-09 21:49             ` One Thousand Gnomes

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=20141009191351.GA4256@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mnipxh@gmail.com \
    --cc=peter@hurleysoftware.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