RE: [PATCH 5/5] tty: n_gsm: Fixed NULL ptr OOPs in tty_write_room()

From: Gorby, Russ
Date: Mon Jun 06 2011 - 13:13:53 EST




>-----Original Message-----
>From: Alan Cox [mailto:alan@xxxxxxxxxxxxxxxxxxx]
>Sent: Friday, June 03, 2011 3:10 PM
>To: Gorby, Russ
>Cc: Greg Kroah-Hartman; linux-kernel@xxxxxxxxxxxxxxx; Ahmed, Suhail
>Subject: Re: [PATCH 5/5] tty: n_gsm: Fixed NULL ptr OOPs in
>tty_write_room()
>
>On Fri, 3 Jun 2011 12:03:41 -0700
>Russ Gorby <russ.gorby@xxxxxxxxx> wrote:
>
>> We saw a case where gsmld_output was called after the MUX
>> was shutdown. In this case gsm->tty was null so tty_write_room(NULL)
>> was called which resulted in an exception.
>
>This is papering over a problem. It shouldn't be happening. Do you have
>a
>copy of the backtrace of the event and does it occur a lot. If it's a
>one
>off freak event so far then instead add
>
> if (gsm->tty == NULL) {
> WARN_ON(1);
> return -ENXIO;
> }
>
>so we get dumps from it and the box survives when it occurs. That'll get
>us traces to nail it properly. For one your patch is not a valid
>ultimate fix because if it can occur what stops gsm->tty changing as it
>occurs.

[Gorby, Russ] Fair enough - no I don't have a trace and it only happened once. We're also running on the .36 kernel that I've seen some other TTY-weirdness with. I'll add the WARN_ON locally and try to capture another trace for analysis.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/