Re: [PATCH] Convert serial_core oopses to BUG_ON



On Sun, Feb 26, 2006 at 11:34:48PM +0100, Karol Kozimor wrote:
Thus wrote Russell King:
Calling serial functions to flush buffers, or try to send more data
after the port has been closed or hung up is a bug in the code doing
the calling, not in the serial_core driver.

Make this explicitly obvious by adding BUG_ON()'s.

If we make it

if (!info) {
WARN_ON(1);
return;
}

will that allow people's kernels to limp along until it gets fixed?
"until" - I think you mean "if anyone ever bothers" so no I don't agree.

Russel, I agree this should be clearly marked and an oops seems okay here,
but we're talking dead systems here (dead as in all interrupts masked type
of dead). Most users won't even be aware an oops occured, let alone be able
to read the messages on the console.

I was just lucky because after the first one I got (#5958, a regular oops)
I tried to nail it down in text mode, with the console loglevel upped a
bit, so I was able to see what the panic (#6131) was all about.

I think we really need those *_ON()s at least in uart_write().

I don't think it'll make a blind bit of difference. The oopses have
been known about (to me and others) since about October 2005... Pavel
Machek was the first to report the hci_uart problems.

I diagnosed the uart_flush_buffer() oops being caused by hci_uart back
in October and where did that get us - nowhere at the time, but later
another bug report in bugzilla against serial and no progress.

Excuse me if I'm despondent on this issue - I'm personally looking for
a way out of being assigned blame for the crap known as hci_uart.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
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/



Relevant Pages

  • Re: Oops while modprobing phy fixed module
    ... bug didn't get triggered on that particular test. ... 3007e997de91ec59af39a3f9c91595b31ae6e08b is first bad commit ... Hmm, I don't see why this one could introduce an oops in SLUB, ... I will enable DEBUG option and reproduce in a bit. ...
    (Linux-Kernel)
  • Re: [BUG] 2.6.5 ntfs
    ... The oops happened when drl.length is accessed and from the ... in the run list code of ntfs. ... If I am correct and there is no bug in the run list code of ntfs, ... >> created with and which windows version last accessed the files? ...
    (Linux-Kernel)
  • Re: [v4l-dvb-maintainer] [GIT PATCHES] V4L/DVB updates
    ... Fix 3/3 for bug 7819: ... The bug that these patches fix has been around throughout the entire ... Sure, this will prevent an OOPS on some, and hopefully all devices... ...
    (Linux-Kernel)
  • Re: [v4l-dvb-maintainer] [GIT PATCHES] V4L/DVB updates
    ... Fix 3/3 for bug 7819: ... The bug that these patches fix has been around throughout the entire ... Sure, this will prevent an OOPS on some, and hopefully all devices... ...
    (Linux-Kernel)
  • [BUG ALSA 2.6.17-rc1] Oops when Gaim tries to play sound
    ... I got this Oops when Gaim tried to play a sound: ... unable to handle kernel NULL pointer dereference at virtual address 00000098 ... BUG: gaim/8111, lock held at task exit time! ...
    (Linux-Kernel)