The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andreas Laumann <al@authentidate.de>
To: Oliver Neukum <oliver@neukum.org>
Cc: Kevin Fenzi <kevin@scrye.com>, linux-kernel@vger.kernel.org
Subject: Re: usbserial not working/oops on removal
Date: Sat, 03 Mar 2007 22:05:16 +0100	[thread overview]
Message-ID: <1172955916.5393.16.camel@justine.inexnet.de> (raw)
In-Reply-To: <200703032143.34664.oliver@neukum.org>

Am Samstag, den 03.03.2007, 21:43 +0100 schrieb Oliver Neukum:
> Am Samstag, 3. März 2007 14:27 schrieb Andreas Laumann:
> > Unfortunately your fix  does not work.  The first one seems registered
> > correctly, but after that it fails again for the next one.  
> 
> Unfortunately the last patch I sent you introduced a race. Could you test
> this alternative patch?
> 
> 	Regards
> 		Oliver
> 
> --- a/drivers/usb/serial/usb-serial.c	2007-03-03 16:28:22.000000000 +0100
> +++ b/drivers/usb/serial/usb-serial.c	2007-03-03 21:37:27.000000000 +0100
> @@ -99,9 +99,12 @@
>  			continue;
>  
>  		*minor = i;
> +		j = 0;
>  		dbg("%s - minor base = %d", __FUNCTION__, *minor);
> -		for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
> +		for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) {
>  			serial_table[i] = serial;
> +			serial->port[j++]->number = i;
> +		}
>  		spin_unlock(&table_lock);
>  		return serial;
>  	}
> @@ -847,7 +850,6 @@
>  		port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
>  		if (!port)
>  			goto probe_error;
> -		port->number = i + serial->minor;
>  		port->serial = serial;
>  		spin_lock_init(&port->lock);
>  		mutex_init(&port->mutex);

On top of the first patch ? Sure, I'll try it in a couple of minutes

Btw, I got rejects from the last patch (the racy one) you've sent and
had to apply them manually.  Which version do you use ? 

Regards
	Andreas



  reply	other threads:[~2007-03-03 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03  2:37 usbserial not working/oops on removal Kevin Fenzi
2007-03-03  6:45 ` Oliver Neukum
2007-03-03  7:12   ` Kevin Fenzi
2007-03-03  7:19   ` Andreas Laumann
2007-03-03 10:38     ` Oliver Neukum
2007-03-03 13:27       ` Andreas Laumann
2007-03-03 15:33         ` Oliver Neukum
2007-03-03 20:15           ` Andreas Laumann
2007-03-03 20:43         ` Oliver Neukum
2007-03-03 21:05           ` Andreas Laumann [this message]
2007-03-03 21:59           ` Andreas Laumann

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=1172955916.5393.16.camel@justine.inexnet.de \
    --to=al@authentidate.de \
    --cc=kevin@scrye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox