Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 161274

Summary: spin_is_locked unitialised in drivers/serial/8250.c
Product: [Fedora] Fedora Reporter: Paul Jakma <paul+rhbugz>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.13-1.1526_FC4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-06 15:25:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Paul Jakma 2005-06-21 22:41:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.8) Gecko/20050513 Galeon/1.3.21

Description of problem:
Kernel hangs with (roughly): 

not syncing. drivers/serial/8250.c (32xx) spin_is_locked on uninitialised spinlock

The call path is (roughly):

<panic path>
serial8250_startup
uart_status
uart_open
tty_open
<VFS call path>

I'm guessing it's the spin_lock_irqsave in serial8250_startup.

I can reproduce this reliably by starting cups, which (annoyingly) tries to open serial devices for no good reason. Or alternatively with 'setserial /dev/ttyS0'. This happens with the kernel-2.6.11-1.35_FC3 kernel too, it doesnt happen with the kernel-2.6.9-1.681_FC3 kernel.

The machine is a Sony Vaio PCG-C1F, Pentium 266MMX. lspci -v:

00:00.0 Host bridge: Intel Corporation 430TX - 82439TX MTXC (rev 01)

# cat /proc/interrupts 
           CPU0       
  0:    1925081          XT-PIC  timer
  1:          8          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  3:      12326          XT-PIC  0.0
  5:          1          XT-PIC  ES1688
  8:          1          XT-PIC  rtc
  9:         32          XT-PIC  acpi, uhci_hcd:usb1, yenta
 12:        110          XT-PIC  i8042
 14:       6858          XT-PIC  ide0
NMI:          0 
ERR:          0

The problem appears to be because there is a pcmcia PRISM-I card on IRQ 3.

# cat /sys/class/tty/ttyS0/device/resources 
state = active
io 0x3f8-0x3ff

# cardctl config
Socket 0:
  Vcc 3.3V  Vpp1 0.0V  Vpp2 0.0V
  interface type is "memory and I/O"
  irq 3 [exclusive] [level]
  function 0:
    config base 0x03e0
      option 0x41
    io 0x0100-0x013f [16bit]

I can't disable ttyS0, dmesg startup shows:

PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:MOUE] at 0x60,0x64 irq 1,12
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled
ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
pnp: Device 00:09 activated.
ttyS0 at I/O 0x3f8 (irq = -1) is a 16550A

If I try disable via PNP:

# echo disable > /sys/class/tty/ttyS0/device/resources
# dmesg |tail -1
pnp: Device 00:09 cannot be configured because it is in use.

I've tried various boot options, such as pci=usepirqmask, pci=routeirq, acpi=off, acpi=on. I've tried BIOS options like PNP OS = yes and no, but no difference unfortunately. There is no option to disable ttyS0 in the BIOS because this machine does not have a serial port. It has only the IRDA port, which is detected as ttyS2 in the dmesg above (despite it being set in the BIOS to COM1 settings - and yes, i've tried with IRDA disabled).

Is there a way to tell linux /dev/ttyS0 does not exist?


Version-Release number of selected component (if applicable):
kernel-2.6.11-1.1369_FC4

How reproducible:
Always

Steps to Reproduce:
1. Boot kernel-2.6.11-1.1369_FC4 or kernel-2.6.11-1.35_FC3
2. setserial /dev/ttyS0 or start cups.
3. panic with spin_is_locked on unitialised spinlock
  

Actual Results:  panic

Expected Results:  nothing. machine should not have panic'd.


Additional info:

Comment 1 Paul Jakma 2005-06-21 22:43:25 UTC
lspci -v:

00:00.0 Host bridge: Intel Corporation 430TX - 82439TX MTXC (rev 01)
        Flags: bus master, medium devsel, latency 32

00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 02)
        Flags: bus master, medium devsel, latency 0

00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
(prog-if 80 [Master])
        Flags: bus master, medium devsel, latency 64
        I/O ports at fcf0 [size=16]

00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
(prog-if 00 [UHCI])
        Flags: bus master, medium devsel, latency 64, IRQ 9
        I/O ports at fcc0 [size=32]

00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
        Flags: medium devsel, IRQ 9

00:08.0 VGA compatible controller: Neomagic Corporation NM2200 [MagicGraph
256AV] (rev 20) (prog-if 00 [VGA])
        Subsystem: Sony Corporation: Unknown device 802a
        Flags: medium devsel, IRQ 9
        Memory at fd000000 (32-bit, prefetchable) [size=16M]
        Memory at fe800000 (32-bit, non-prefetchable) [size=4M]
        Memory at fed00000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: [dc] Power Management version 1

00:09.0 FireWire (IEEE 1394): Sony Corporation CXD1947Q i.LINK Controller (rev
01) (prog-if 00 [Generic])
        Subsystem: Sony Corporation CXD1947Q i.LINK Controller
        Flags: medium devsel, IRQ 255
        Memory at fecffc00 (32-bit, non-prefetchable) [disabled] [size=512]
        Capabilities: [dc] Power Management version 1

00:0a.0 CardBus bridge: Ricoh Co Ltd RL5c475
        Subsystem: Sony Corporation: Unknown device 802b
        Flags: bus master, medium devsel, latency 168, IRQ 9
        Memory at 08000000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
        Memory window 0: 08400000-087ff000 (prefetchable)
        Memory window 1: 08800000-08bff000
        I/O window 0: 00004000-000040ff
        I/O window 1: 00004400-000044ff
        16-bit legacy interface ports at 0001



Comment 2 Dave Jones 2005-07-15 21:45:44 UTC
[This comment has been added as a mass update for all FC4 kernel bugs.
 If you have migrated this bug from an FC3 bug today, ignore this comment.]

Please retest your problem with todays 2.6.12-1.1398_FC4 update.

If your problem involved being unable to boot, or some hardware not being
detected correctly, please make sure your /etc/modprobe.conf is correct *BEFORE*
installing any kernel updates.
If in doubt, you can recreate this file using..

mv /etc/sysconfig/hwconf /etc/sysconfig/hwconf.bak
mv /etc/modprobe.conf /etc/modprobe.conf.bak
kudzu


Thank you.


Comment 3 Paul Jakma 2005-08-28 23:41:10 UTC
This problem still occurs with 2.6.12-1.1398_FC4.



Comment 4 Dave Jones 2005-10-03 01:50:16 UTC
Does it reoccur with the 2.6.13 based update ? If so, I'll point the upstream
maintainer at this.


Comment 5 Paul Jakma 2005-10-06 15:25:45 UTC
It's fixed:

Serial: 8250/16550 driver $Revision: 1.90 $ 32 ports, IRQ sharing enabled
ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
pnp: Device 00:09 activated.
ttyS0 at I/O 0x3f8 (irq = 10) is a 16550A

And cups/setserial opening ttyS0 no longer hang it. Yay! :)

Thanks.