[2.6.29-rc2] fb_mmap: circular locking dependency on hibernation
25 messages,
8 authors,
2009-04-07 · open the first message on its own page
I do not know if this is new; I usually do not hibernate at all and was
testing another driver actually. I do not remember such issues in 2.6.28
though. Dmesg follows; config attached.
[ 0.000000] Linux version 2.6.29-rc2-1avb (bor@cooker) (gcc version 4.3.2
(GCC) ) #11 Tue Jan 20 19:30:32 MSK 2009
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] PAT WC disabled due to known CPU erratum.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e0000 - 00000000000eee00 (reserved)
[ 0.000000] BIOS-e820: 00000000000eee00 - 00000000000ef000 (ACPI NVS)
[ 0.000000] BIOS-e820: 00000000000ef000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000001ef60000 (usable)
[ 0.000000] BIOS-e820: 000000001ef60000 - 000000001ef70000 (ACPI data)
[ 0.000000] BIOS-e820: 000000001ef70000 - 0000000020000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
[ 0.000000] DMI 2.3 present.
[ 0.000000] last_pfn = 0x1ef60 max_arch_pfn = 0x100000
[ 0.000000] kernel direct mapping tables up to 1ef60000 @ 7000-d000
[ 0.000000] RAMDISK: 1ebcf000 - 1ef4f86c
[ 0.000000] ACPI: RSDP 000F0090, 0014 (r0 TOSHIB)
[ 0.000000] ACPI: RSDT 1EF60000, 0028 (r1 TOSHIB 750 970814 TASM
4010000)
[ 0.000000] ACPI: FACP 1EF60054, 0084 (r2 TOSHIB 750 970814 TASM
4010000)
[ 0.000000] FADT: X_PM1a_EVT_BLK.bit_width (16) does not match
PM1_EVT_LEN (4)
[ 0.000000] ACPI: DSDT 1EF600D8, 68DA (r1 TOSHIB 4000 20020417 MSFT
100000A)
[ 0.000000] ACPI: FACS 000EEE00, 0040
[ 0.000000] 495MB LOWMEM available.
[ 0.000000] mapped low ram: 0 - 1ef60000
[ 0.000000] low ram: 00000000 - 1ef60000
[ 0.000000] bootmap 00001000 - 00004dec
[ 0.000000] (7 early reservations) ==> bootmem [0000000000 - 001ef60000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==>
[0000000000 - 0000001000]
[ 0.000000] #1 [0000100000 - 0000973d98] TEXT DATA BSS ==>
[0000100000 - 0000973d98]
[ 0.000000] #2 [001ebcf000 - 001ef4f86c] RAMDISK ==>
[001ebcf000 - 001ef4f86c]
[ 0.000000] #3 [0000974000 - 0000978000] INIT_PG_TABLE ==>
[0000974000 - 0000978000]
[ 0.000000] #4 [000009fc00 - 0000100000] BIOS reserved ==>
[000009fc00 - 0000100000]
[ 0.000000] #5 [0000007000 - 0000009000] PGTABLE ==>
[0000007000 - 0000009000]
[ 0.000000] #6 [0000001000 - 0000005000] BOOTMAP ==>
[0000001000 - 0000005000]
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000000 -> 0x00001000
[ 0.000000] Normal 0x00001000 -> 0x0001ef60
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[2] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x0000009f
[ 0.000000] 0: 0x00000100 -> 0x0001ef60
[ 0.000000] On node 0 totalpages: 126719
[ 0.000000] free_area_init_node: node 0, pgdat c03caa00, node_mem_map
c1000000
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 3967 pages, LIFO batch:0
[ 0.000000] Normal zone: 959 pages used for memmap
[ 0.000000] Normal zone: 121761 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0xee08
[ 0.000000] PM: Registered nosave memory: 000000000009f000 -
00000000000a0000
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 -
00000000000e0000
[ 0.000000] PM: Registered nosave memory: 00000000000e0000 -
00000000000ee000
[ 0.000000] PM: Registered nosave memory: 00000000000ee000 -
00000000000ef000
[ 0.000000] PM: Registered nosave memory: 00000000000ef000 -
0000000000100000
[ 0.000000] Allocating PCI resources starting at 30000000 (gap:
20000000:dff80000)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total
pages: 125728
[ 0.000000] Kernel command line: BOOT_IMAGE=2.6.29-rc2-1avb root=LABEL=/
resume=LABEL=swap acpi_backlight=vendor
netconsole=@10.0.0.1/eth0,@10.0.0.2/00:17:42:21:27:e4 vga=791
[ 0.000000] Enabling fast FPU save and restore... done.
[ 0.000000] Enabling unmasked SIMD FPU exception support... done.
[ 0.000000] Initializing CPU#0
[ 0.000000] CPU 0 irqstacks, hard=c0414000 soft=c0413000
[ 0.000000] PID hash table entries: 2048 (order: 11, 8192 bytes)
[ 0.000000] Fast TSC calibration using PIT
[ 0.000000] Detected 747.638 MHz processor.
[ 0.003333] Console: colour dummy device 80x25
[ 0.003333] console [tty0] enabled
[ 0.003333] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc.,
Ingo Molnar
[ 0.003333] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.003333] ... MAX_LOCK_DEPTH: 48
[ 0.003333] ... MAX_LOCKDEP_KEYS: 8191
[ 0.003333] ... CLASSHASH_SIZE: 4096
[ 0.003333] ... MAX_LOCKDEP_ENTRIES: 8192
[ 0.003333] ... MAX_LOCKDEP_CHAINS: 16384
[ 0.003333] ... CHAINHASH_SIZE: 8192
[ 0.003333] memory used by lock dependency info: 2591 kB
[ 0.003333] per task-struct memory footprint: 1920 bytes
[ 0.003333] ------------------------
[ 0.003333] | Locking API testsuite:
[ 0.003333]
----------------------------------------------------------------------------
[ 0.003333] | spin |wlock |rlock |mutex
| wsem | rsem |
[ 0.003333]
--------------------------------------------------------------------------
[ 0.003333] A-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-B-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-B-C-C-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-C-A-B-C deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-B-C-C-D-D-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-C-D-B-D-D-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] A-B-C-D-B-C-D-A deadlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] double unlock: ok | ok | ok | ok
| ok | ok |
[ 0.003333] initialize held: ok | ok | ok | ok
| ok | ok |
[ 0.003333] bad unlock order: ok | ok | ok | ok
| ok | ok |
[ 0.003333]
--------------------------------------------------------------------------
[ 0.003333] recursive read-lock: | ok |
| ok |
[ 0.003333] recursive read-lock #2: | ok |
| ok |
[ 0.003333] mixed read-write-lock: | ok |
| ok |
[ 0.003333] mixed write-read-lock: | ok |
| ok |
[ 0.003333]
--------------------------------------------------------------------------
[ 0.003333] hard-irqs-on + irq-safe-A/12: ok | ok | ok |
[ 0.003333] soft-irqs-on + irq-safe-A/12: ok | ok | ok |
[ 0.003333] hard-irqs-on + irq-safe-A/21: ok | ok | ok |
[ 0.003333] soft-irqs-on + irq-safe-A/21: ok | ok | ok |
[ 0.003333] sirq-safe-A => hirqs-on/12: ok | ok | ok |
[ 0.003333] sirq-safe-A => hirqs-on/21: ok | ok | ok |
[ 0.003333] hard-safe-A + irqs-on/12: ok | ok | ok |
[ 0.003333] soft-safe-A + irqs-on/12: ok | ok | ok |
[ 0.003333] hard-safe-A + irqs-on/21: ok | ok | ok |
[ 0.003333] soft-safe-A + irqs-on/21: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/123: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/123: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/132: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/132: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/213: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/213: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/231: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/231: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/312: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/312: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #1/321: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #1/321: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/123: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/123: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/132: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/132: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/213: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/213: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/231: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/231: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/312: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/312: ok | ok | ok |
[ 0.003333] hard-safe-A + unsafe-B #2/321: ok | ok | ok |
[ 0.003333] soft-safe-A + unsafe-B #2/321: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/123: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/123: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/132: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/132: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/213: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/213: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/231: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/231: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/312: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/312: ok | ok | ok |
[ 0.003333] hard-irq lock-inversion/321: ok | ok | ok |
[ 0.003333] soft-irq lock-inversion/321: ok | ok | ok |
[ 0.003333] hard-irq read-recursion/123: ok |
[ 0.003333] soft-irq read-recursion/123: ok |
[ 0.003333] hard-irq read-recursion/132: ok |
[ 0.003333] soft-irq read-recursion/132: ok |
[ 0.003333] hard-irq read-recursion/213: ok |
[ 0.003333] soft-irq read-recursion/213: ok |
[ 0.003333] hard-irq read-recursion/231: ok |
[ 0.003333] soft-irq read-recursion/231: ok |
[ 0.003333] hard-irq read-recursion/312: ok |
[ 0.003333] soft-irq read-recursion/312: ok |
[ 0.003333] hard-irq read-recursion/321: ok |
[ 0.003333] soft-irq read-recursion/321: ok |
[ 0.003333] -------------------------------------------------------
[ 0.003333] Good, all 218 testcases passed! |
[ 0.003333] ---------------------------------
[ 0.003333] Dentry cache hash table entries: 65536 (order: 6, 262144
bytes)
[ 0.003333] Inode-cache hash table entries: 32768 (order: 5, 131072
bytes)
[ 0.003333] Memory: 489984k/507264k available (2103k kernel code, 16676k
reserved, 795k data, 232k init, 0k highmem)
[ 0.003333] virtual kernel memory layout:
[ 0.003333] fixmap : 0xfffed000 - 0xfffff000 ( 72 kB)
[ 0.003333] vmalloc : 0xdf760000 - 0xfffeb000 ( 520 MB)
[ 0.003333] lowmem : 0xc0000000 - 0xdef60000 ( 495 MB)
[ 0.003333] .init : 0xc03d6000 - 0xc0410000 ( 232 kB)
[ 0.003333] .data : 0xc030dee5 - 0xc03d4e00 ( 795 kB)
[ 0.003333] .text : 0xc0100000 - 0xc030dee5 (2103 kB)
[ 0.003333] Checking if this processor honours the WP bit even in
supervisor mode...Ok.
[ 0.003333] SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0,
CPUs=1, Nodes=1
[ 0.003387] Calibrating delay loop (skipped), value calculated using
timer frequency.. 1495.57 BogoMIPS (lpj=2492126)
[ 0.003552] Mount-cache hash table entries: 512
[ 0.005949] CPU: L1 I cache: 16K, L1 D cache: 16K
[ 0.005998] CPU: L2 cache: 256K
[ 0.006015] CPU serial number disabled.
[ 0.006073] CPU: Intel Pentium III (Coppermine) stepping 0a
[ 0.006122] Checking 'hlt' instruction... OK.
[ 0.017647] Freeing SMP alternatives: 0k freed
[ 0.017668] ACPI: Core revision 20081204
[ 0.046435] ACPI: setting ELCR to 0200 (from 0a00)
[ 0.049570] Testing tracer nop: PASSED
[ 0.054405] net_namespace: 732 bytes
[ 0.056093] NET: Registered protocol family 16
[ 0.059534] ACPI: bus type pci registered
[ 0.061588] PCI: PCI BIOS revision 2.10 entry at 0xfe5ae, last bus=5
[ 0.061638] PCI: Using configuration type 1 for base access
[ 0.072918] bio: create slab <bio-0> at 0
[ 0.083510] ACPI: EC: Look up EC in DSDT
[ 0.111712] ACPI: Interpreter enabled
[ 0.111777] ACPI: (supports S0 S3 S4 S5)
[ 0.112198] ACPI: Using PIC for interrupt routing
[ 0.171477] ACPI: ACPI Dock Station Driver: 2 docks/bays found
[ 0.171654] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 0.172771] pci 0000:00:00.0: reg 10 32bit mmio: [0xf0000000-0xf3ffffff]
[ 0.173162] pci 0000:00:02.0: reg 10 32bit mmio: [0xf7eff000-0xf7efffff]
[ 0.173362] pci 0000:00:02.0: PME# supported from D3hot D3cold
[ 0.173401] pci 0000:00:02.0: PME# disabled
[ 0.173569] pci 0000:00:04.0: reg 20 io port: [0xeff0-0xefff]
[ 0.173753] pci 0000:00:06.0: reg 10 io port: [0xed00-0xedff]
[ 0.173777] pci 0000:00:06.0: reg 14 32bit mmio: [0xf7efe000-0xf7efefff]
[ 0.173903] pci 0000:00:06.0: supports D1 D2
[ 0.173911] pci 0000:00:06.0: PME# supported from D2 D3hot D3cold
[ 0.173939] pci 0000:00:06.0: PME# disabled
[ 0.174346] pci 0000:00:08.0: quirk: region ee00-ee3f claimed by ali7101
ACPI
[ 0.174377] pci 0000:00:08.0: quirk: region ef00-ef1f claimed by ali7101
SMB
[ 0.174497] pci 0000:00:0a.0: reg 10 32bit mmio: [0xf7efd000-0xf7efdfff]
[ 0.174521] pci 0000:00:0a.0: reg 14 io port: [0xeb40-0xeb7f]
[ 0.174545] pci 0000:00:0a.0: reg 18 32bit mmio: [0xf7d00000-0xf7dfffff]
[ 0.174657] pci 0000:00:0a.0: supports D1 D2
[ 0.174665] pci 0000:00:0a.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.174694] pci 0000:00:0a.0: PME# disabled
[ 0.174822] pci 0000:00:10.0: reg 10 32bit mmio: [0x000000-0x000fff]
[ 0.174882] pci 0000:00:10.0: supports D1 D2
[ 0.174890] pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.174919] pci 0000:00:10.0: PME# disabled
[ 0.175033] pci 0000:00:11.0: reg 10 32bit mmio: [0x000000-0x000fff]
[ 0.175198] pci 0000:00:11.1: reg 10 32bit mmio: [0x000000-0x000fff]
[ 0.175375] pci 0000:00:12.0: reg 10 32bit mmio: [0xf7cffe00-0xf7cfffff]
[ 0.175519] pci 0000:00:12.0: supports D1 D2
[ 0.175527] pci 0000:00:12.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.175556] pci 0000:00:12.0: PME# disabled
[ 0.175744] pci 0000:01:00.0: reg 10 32bit mmio: [0xfc000000-0xfdffffff]
[ 0.175768] pci 0000:01:00.0: reg 14 32bit mmio: [0xfbc00000-0xfbffffff]
[ 0.175790] pci 0000:01:00.0: reg 18 32bit mmio: [0xf8000000-0xf9ffffff]
[ 0.175813] pci 0000:01:00.0: reg 1c 32bit mmio: [0xf7ff8000-0xf7ffffff]
[ 0.175859] pci 0000:01:00.0: reg 30 32bit mmio: [0x000000-0x00ffff]
[ 0.175929] pci 0000:01:00.0: supports D1 D2
[ 0.176064] pci 0000:00:01.0: bridge 32bit mmio: [0xf7f00000-0xfdffffff]
[ 0.176270] pci_bus 0000:00: on NUMA node 0
[ 0.176318] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 0.177084] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
[ 0.214680] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11)
[ 0.215642] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 *11)
[ 0.216547] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 *11)
[ 0.217589] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 *11)
[ 0.218493] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11)
[ 0.219394] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 *11)
[ 0.221045] ACPI: Power Resource [PFAN] (off)
[ 0.224275] PCI: Using ACPI for IRQ routing
[ 0.227664] pnp: PnP ACPI init
[ 0.227664] ACPI: bus type pnp registered
[ 0.254556] pnp: PnP ACPI: found 12 devices
[ 0.254615] ACPI: ACPI bus type pnp unregistered
[ 0.254732] system 00:00: iomem range 0x0-0x9ffff could not be reserved
[ 0.254763] system 00:00: iomem range 0xe0000-0xeffff could not be
reserved
[ 0.254792] system 00:00: iomem range 0xf0000-0xfffff could not be
reserved
[ 0.254820] system 00:00: iomem range 0x100000-0x1ef5ffff could not be
reserved
[ 0.254850] system 00:00: iomem range 0x1ef60000-0x1ef6ffff could not be
reserved
[ 0.254881] system 00:00: iomem range 0x1f000000-0x1fffffff has been
reserved
[ 0.254908] system 00:00: iomem range 0x1ef70000-0x1effffff has been
reserved
[ 0.254939] system 00:00: iomem range 0xffe00000-0xffffffff could not be
reserved
[ 0.255031] system 00:08: ioport range 0x370-0x371 has been reserved
[ 0.255058] system 00:08: ioport range 0x40b-0x40b has been reserved
[ 0.255084] system 00:08: ioport range 0x480-0x48f has been reserved
[ 0.255110] system 00:08: ioport range 0x4d0-0x4d1 has been reserved
[ 0.255135] system 00:08: ioport range 0x4d6-0x4d6 has been reserved
[ 0.255161] system 00:08: ioport range 0x6c0-0x6ff has been reserved
[ 0.255187] system 00:08: ioport range 0xe000-0xe07f has been reserved
[ 0.255213] system 00:08: ioport range 0xe080-0xe0ff has been reserved
[ 0.255240] system 00:08: ioport range 0xe400-0xe47f has been reserved
[ 0.255267] system 00:08: ioport range 0xe480-0xe4ff has been reserved
[ 0.255294] system 00:08: ioport range 0xe800-0xe87f has been reserved
[ 0.255321] system 00:08: ioport range 0xe880-0xe8ff has been reserved
[ 0.255348] system 00:08: ioport range 0xec00-0xec7f has been reserved
[ 0.255376] system 00:08: ioport range 0xec80-0xecff has been reserved
[ 0.255404] system 00:08: ioport range 0xee00-0xee41 could not be
reserved
[ 0.255432] system 00:08: ioport range 0xee90-0xee9f has been reserved
[ 0.255458] system 00:08: ioport range 0xeeac-0xeeac has been reserved
[ 0.255487] system 00:08: ioport range 0xef00-0xef3f could not be
reserved
[ 0.255514] system 00:08: ioport range 0xef40-0xef5f has been reserved
[ 0.294689] pci 0000:00:01.0: PCI bridge, secondary bus 0000:01
[ 0.294746] pci 0000:00:01.0: IO window: disabled
[ 0.294778] pci 0000:00:01.0: MEM window: 0xf7f00000-0xfdffffff
[ 0.294808] pci 0000:00:01.0: PREFETCH window:
0x00000048000000-0x000000480fffff
[ 0.294855] pci 0000:00:10.0: CardBus bridge, secondary bus 0000:02
[ 0.294877] pci 0000:00:10.0: IO window: 0x001000-0x0010ff
[ 0.294904] pci 0000:00:10.0: IO window: 0x001400-0x0014ff
[ 0.294932] pci 0000:00:10.0: PREFETCH window: 0x30000000-0x33ffffff
[ 0.294962] pci 0000:00:10.0: MEM window: 0x34000000-0x37ffffff
[ 0.294992] pci 0000:00:11.0: CardBus bridge, secondary bus 0000:06
[ 0.295013] pci 0000:00:11.0: IO window: 0x001800-0x0018ff
[ 0.295040] pci 0000:00:11.0: IO window: 0x001c00-0x001cff
[ 0.295068] pci 0000:00:11.0: PREFETCH window: 0x38000000-0x3bffffff
[ 0.295098] pci 0000:00:11.0: MEM window: 0x3c000000-0x3fffffff
[ 0.295128] pci 0000:00:11.1: CardBus bridge, secondary bus 0000:0a
[ 0.295149] pci 0000:00:11.1: IO window: 0x002000-0x0020ff
[ 0.295176] pci 0000:00:11.1: IO window: 0x002400-0x0024ff
[ 0.295204] pci 0000:00:11.1: PREFETCH window: 0x40000000-0x43ffffff
[ 0.295234] pci 0000:00:11.1: MEM window: 0x44000000-0x47ffffff
[ 0.295300] pci 0000:00:01.0: setting latency timer to 64
[ 0.295334] pci 0000:00:10.0: enabling device (0000 -> 0003)
[ 0.297239] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 0.297270] PCI: setting IRQ 11 as level-triggered
[ 0.297283] pci 0000:00:10.0: PCI INT A -> Link[LNKC] -> GSI 11 (level,
low) -> IRQ 11
[ 0.297342] pci 0000:00:11.0: enabling device (0000 -> 0003)
[ 0.298804] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
[ 0.298830] pci 0000:00:11.0: PCI INT A -> Link[LNKA] -> GSI 11 (level,
low) -> IRQ 11
[ 0.298887] pci 0000:00:11.1: enabling device (0000 -> 0003)
[ 0.300381] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
[ 0.300407] pci 0000:00:11.1: PCI INT B -> Link[LNKB] -> GSI 11 (level,
low) -> IRQ 11
[ 0.300454] pci_bus 0000:00: resource 0 io: [0x00-0xffff]
[ 0.300463] pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
[ 0.300473] pci_bus 0000:01: resource 0 mem: [0x0-0x0]
[ 0.300482] pci_bus 0000:01: resource 1 mem: [0xf7f00000-0xfdffffff]
[ 0.300491] pci_bus 0000:01: resource 2 mem: [0x48000000-0x480fffff]
[ 0.300500] pci_bus 0000:01: resource 3 mem: [0x0-0x0]
[ 0.300511] pci_bus 0000:02: resource 0 io: [0x1000-0x10ff]
[ 0.300519] pci_bus 0000:02: resource 1 io: [0x1400-0x14ff]
[ 0.300528] pci_bus 0000:02: resource 2 mem: [0x30000000-0x33ffffff]
[ 0.300538] pci_bus 0000:02: resource 3 mem: [0x34000000-0x37ffffff]
[ 0.300549] pci_bus 0000:06: resource 0 io: [0x1800-0x18ff]
[ 0.300558] pci_bus 0000:06: resource 1 io: [0x1c00-0x1cff]
[ 0.300567] pci_bus 0000:06: resource 2 mem: [0x38000000-0x3bffffff]
[ 0.300576] pci_bus 0000:06: resource 3 mem: [0x3c000000-0x3fffffff]
[ 0.300587] pci_bus 0000:0a: resource 0 io: [0x2000-0x20ff]
[ 0.300596] pci_bus 0000:0a: resource 1 io: [0x2400-0x24ff]
[ 0.300605] pci_bus 0000:0a: resource 2 mem: [0x40000000-0x43ffffff]
[ 0.300614] pci_bus 0000:0a: resource 3 mem: [0x44000000-0x47ffffff]
[ 0.300756] NET: Registered protocol family 2
[ 0.301970] IP route cache hash table entries: 4096 (order: 2, 16384
bytes)
[ 0.303014] TCP established hash table entries: 16384 (order: 5, 131072
bytes)
[ 0.303884] TCP bind hash table entries: 16384 (order: 7, 655360 bytes)
[ 0.310494] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.310774] TCP reno registered
[ 0.311551] NET: Registered protocol family 1
[ 0.313040] checking if image is initramfs... it is
[ 0.796938] Switched to high resolution mode on CPU 0
[ 1.225537] Freeing initrd memory: 3586k freed
[ 1.234331] Initializing RT-Tester: OK
[ 1.235665] audit: initializing netlink socket (disabled)
[ 1.235913] type=2000 audit(1233033829.233:1): initialized
[ 1.244706] Kprobe smoke test started
[ 1.256339] Kprobe smoke test passed successfully
[ 1.256455] Testing tracer sched_switch: PASSED
[ 1.397402] msgmni has been set to 964
[ 1.398991] io scheduler noop registered
[ 1.399027] io scheduler anticipatory registered
[ 1.399046] io scheduler deadline registered
[ 1.399175] io scheduler cfq registered (default)
[ 1.399463] pci 0000:00:07.0: Activating ISA DMA hang workarounds
[ 1.399544] pci 0000:00:0a.0: Firmware left e100 interrupts enabled;
disabling
[ 1.399644] pci 0000:01:00.0: Boot video device
[ 1.402760] vesafb: framebuffer at 0xfc000000, mapped to 0xdf780000,
using 3072k, total 16384k
[ 1.402811] vesafb: mode is 1024x768x16, linelength=2048, pages=9
[ 1.402833] vesafb: protected mode interface info at c000:775e
[ 1.402854] vesafb: pmi: set display start = c00c777f, set palette =
c00c77e2
[ 1.402876] vesafb: scrolling: redraw
[ 1.402896] vesafb: Truecolor: size=0:5:6:5, shift=0:11:5:0
[ 1.470527] Console: switching to colour frame buffer device 128x48
[ 1.536053] fb0: VESA VGA frame buffer device
[ 1.989186] brd: module loaded
[ 1.989638] e100: Intel(R) PRO/100 Network Driver, 3.5.23-k6-NAPI
[ 1.990749] e100: Copyright(c) 1999-2006 Intel Corporation
[ 1.993859] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[ 1.994598] e100 0000:00:0a.0: PCI INT A -> Link[LNKD] -> GSI 11 (level,
low) -> IRQ 11
[ 2.022604] e100 0000:00:0a.0: PME# disabled
[ 2.024489] e100: eth0: e100_probe: addr 0xf7efd000, irq 11, MAC addr
00:00:39:d7:14:a1
[ 2.025918] netconsole: local port 6665
[ 2.026404] netconsole: local IP 10.0.0.1
[ 2.026983] netconsole: interface eth0
[ 2.027451] netconsole: remote port 6666
[ 2.027938] netconsole: remote IP 10.0.0.2
[ 2.028447] netconsole: remote ethernet address 00:17:42:21:27:e4
[ 2.029235] netconsole: device eth0 not up yet, forcing it
[ 2.045232] e100: eth0: e100_request_firmware: Failed to load firmware
"e100/d101m_ucode.bin": -22
[ 2.047191] netconsole: failed to open eth0
[ 2.047723] netconsole: cleaning up
[ 2.049470] PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:PS2M] at 0x60,0x64
irq 1,12
[ 2.056103] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.056902] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.060664] mice: PS/2 mouse device common for all mice
[ 2.062107] cpuidle: using governor ladder
[ 2.086864] cpuidle: using governor menu
[ 2.111329] TCP cubic registered
[ 2.135419] Using IPI Shortcut mode
[ 2.162752] registered taskstats version 1
[ 2.187758] BIOS EDD facility v0.16 2004-Jun-25, 1 devices found
[ 2.214215] Freeing unused kernel memory: 232k freed
[ 2.239579] Write protecting the kernel text: 2104k
[ 2.264192] Write protecting the kernel read-only data: 624k
[ 2.310598] input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input0
[ 2.948066] SCSI subsystem initialized
[ 3.019183] Driver 'sd' needs updating - please use bus_type methods
[ 3.151165] libata version 3.00 loaded.
[ 3.193858] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[ 3.218466] scsi0 : pata_ali
[ 3.242920] scsi1 : pata_ali
[ 3.270335] ata1: PATA max UDMA/66 cmd 0x1f0 ctl 0x3f6 bmdma 0xeff0 irq
14
[ 3.293472] ata2: PATA max UDMA/66 cmd 0x170 ctl 0x376 bmdma 0xeff8 irq
15
[ 3.474174] ata1.00: ATA-5: IC25N020ATDA04-0, DA3OA70A, max UDMA/100
[ 3.496903] ata1.00: 39070080 sectors, multi 0: LBA
[ 3.519237] ata1.00: limited to UDMA/33 due to 40-wire cable
[ 3.554007] ata1.00: configured for UDMA/33
[ 3.577923] scsi 0:0:0:0: Direct-Access ATA IC25N020ATDA04-0
DA3O PQ: 0 ANSI: 5
[ 3.602301] sd 0:0:0:0: [sda] 39070080 512-byte hardware sectors: (20.0
GB/18.6 GiB)
[ 3.625312] sd 0:0:0:0: [sda] Write Protect is off
[ 3.648050] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.648233] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[ 3.673855] sd 0:0:0:0: [sda] 39070080 512-byte hardware sectors: (20.0
GB/18.6 GiB)
[ 3.698086] sd 0:0:0:0: [sda] Write Protect is off
[ 3.721993] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.722171] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[ 3.746873] sda: sda1 sda2
[ 3.803338] sd 0:0:0:0: [sda] Attached SCSI disk
[ 4.027278] ata2.00: ATAPI: TOSHIBA DVD-ROM SD-C2502, 1313, max UDMA/33
[ 4.051749] ata2.00: WARNING: ATAPI DMA disabled for reliablity issues.
It can be enabled
[ 4.076231] ata2.00: WARNING: via pata_ali.atapi_dma modparam or
corresponding sysfs node.
[ 4.113805] ata2.00: configured for UDMA/33
[ 4.142905] scsi 1:0:0:0: CD-ROM TOSHIBA DVD-ROM SD-C2502
1313 PQ: 0 ANSI: 5
[ 4.432426] ReiserFS: sda2: found reiserfs format "3.6" with standard
journal
[ 4.459136] ReiserFS: sda2: using ordered data mode
[ 4.499571] ReiserFS: sda2: journal params: device sda2, size 8192,
journal first block 18, max trans len 1024, max batch 900, max commit age
30, max trans age 30
[ 4.562985] ReiserFS: sda2: checking transaction log (sda2)
[ 7.527891] ReiserFS: sda2: replayed 9 transactions in 3 seconds
[ 7.940596] ReiserFS: sda2: Using r5 hash to sort names
[ 10.425258] usbcore: registered new interface driver usbfs
[ 10.452859] usbcore: registered new interface driver hub
[ 10.479901] usbcore: registered new device driver usb
[ 16.423816] Linux agpgart interface v0.103
[ 16.532621] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 16.537079] ACPI: AC Adapter [ADP1] (on-line)
[ 16.543204] ACPI: PCI Interrupt Link [LNKG] enabled at IRQ 11
[ 16.543233] ohci_hcd 0000:00:02.0: PCI INT A -> Link[LNKG] -> GSI 11
(level, low) -> IRQ 11
[ 16.543553] ohci_hcd 0000:00:02.0: OHCI Host Controller
[ 16.545988] ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus
number 1
[ 16.546113] ohci_hcd 0000:00:02.0: irq 11, io mem 0xf7eff000
[ 16.611443] usb usb1: configuration #1 chosen from 1 choice
[ 16.612643] hub 1-0:1.0: USB hub found
[ 16.612907] hub 1-0:1.0: 3 ports detected
[ 16.642710] input: Power Button (FF) as
/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[ 16.656970] ACPI: Power Button (FF) [PWRF]
[ 16.657791] input: Lid Switch as
/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input2
[ 16.658561] ACPI: Lid Switch [LID]
[ 16.788645] agpgart-ali 0000:00:00.0: ALi M1644 chipset
[ 16.803507] ACPI Warning (nspredef-0940): \_SB_.BAT1._BIF: Return Package
type mismatch at index 12 - found Integer, expected String/Buffer [20081204]
[ 16.805021] ACPI: Battery Slot [BAT1] (battery present)
[ 16.805246] ACPI: Battery Slot [BAT2] (battery absent)
[ 16.814244] agpgart-ali 0000:00:00.0: AGP aperture is 64M @ 0xf0000000
[ 16.818024] ACPI: CPU0 (power states: C1[C1] C2[C2])
[ 16.818893] processor ACPI_CPU:00: registered as cooling_device0
[ 17.005413] thermal LNXTHERM:01: registered as thermal_zone0
[ 17.019715] ACPI: Thermal Zone [THRM] (60 C)
[ 17.060281] input: Video Bus as
/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:14/device:15/input/input3
[ 17.070242] ACPI: Video Device [VGA] (multi-head: yes rom: yes post:
no)
[ 17.135012] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 17.135340] scsi 1:0:0:0: Attached scsi generic sg1 type 5
[ 17.200916] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.19
[ 17.200932] toshiba_acpi: HCI method: \_SB_.VALD.GHCI
[ 17.287612] pci 0000:00:08.0: enabling device (0000 -> 0001)
[ 17.288765] ALi_M1535: initialized. timeout=60 sec (nowayout=0)
[ 17.370347] fan PNP0C0B:00: registered as cooling_device1
[ 17.370387] ACPI: Fan [FAN] (off)
[ 17.757062] input: PC Speaker as /devices/platform/pcspkr/input/input4
[ 18.120823] Driver 'sr' needs updating - please use bus_type methods
[ 18.159398] sr0: scsi3-mmc drive: 24x/24x cd/rw xa/form2 cdda tray
[ 18.159422] Uniform CD-ROM driver Revision: 3.20
[ 18.160790] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 18.494394] input: ImPS/2 Generic Wheel Mouse as
/devices/platform/i8042/serio1/input/input5
[ 18.593472] yenta_cardbus 0000:00:10.0: CardBus bridge found [12a3:ab01]
[ 18.720976] yenta_cardbus 0000:00:10.0: ISA IRQ mask 0x0000, PCI irq 11
[ 18.720994] yenta_cardbus 0000:00:10.0: Socket status: 30000011
[ 18.728048] yenta_cardbus 0000:00:11.0: CardBus bridge found [1179:0001]
[ 18.854406] yenta_cardbus 0000:00:11.0: ISA IRQ mask 0x04b8, PCI irq 11
[ 18.854424] yenta_cardbus 0000:00:11.0: Socket status: 30000087
[ 18.882722] yenta_cardbus 0000:00:11.1: CardBus bridge found [1179:0001]
[ 18.967841] rtc_cmos 00:07: RTC can wake from S4
[ 18.969586] rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
[ 18.969689] rtc0: alarms up to one year, 114 bytes nvram
[ 19.007604] yenta_cardbus 0000:00:11.1: ISA IRQ mask 0x04b8, PCI irq 11
[ 19.007620] yenta_cardbus 0000:00:11.1: Socket status: 30000007
[ 19.360232] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 20.391374] NET: Registered protocol family 23
[ 20.611982] Detected unconfigured Toshiba laptop with ALi ISA bridge SMSC
IrDA chip, pre-configuring device.
[ 20.612023] Activated ALi 1533 ISA bridge port 0x02e8.
[ 20.612039] Activated ALi 1533 ISA bridge port 0x02f8.
[ 20.612293] found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e):
LPC47N227
[ 20.612308] smsc_superio_flat(): IrDA not enabled
[ 20.612336] smsc_superio_flat(): fir: 0x2f8, sir: 0x2e8, dma: 03, irq: 7,
mode: 0x02
[ 20.612375] SMsC IrDA Controller found
[ 20.612378] IrCC version 2.0, firport 0x2f8, sirport 0x2e8 dma=3, irq=7
[ 20.612604] No transceiver found. Defaulting to Fast pin select
[ 20.612646] irda0 (): not using net_device_ops yet
[ 20.613795] IrDA: Registered device irda0
[ 22.425819] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[ 22.427551] ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11
[ 22.427570] ALI 5451 0000:00:06.0: PCI INT A -> Link[LNKH] -> GSI 11
(level, low) -> IRQ 11
[ 26.013014] pcmcia_socket pcmcia_socket2: cs: IO port probe 0x100-0x3af:
excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[ 26.016539] pcmcia_socket pcmcia_socket2: cs: IO port probe 0x3e0-0x4ff:
clean.
[ 26.018111] pcmcia_socket pcmcia_socket2: cs: IO port probe 0x820-0x8ff:
clean.
[ 26.019497] pcmcia_socket pcmcia_socket2: cs: IO port probe 0xc00-0xcf7:
clean.
[ 26.022164] pcmcia_socket pcmcia_socket2: cs: IO port probe 0xa00-0xaff:
clean.
[ 26.181618] Marking TSC unstable due to TSC halts in idle
[ 26.293407] Clocksource tsc unstable (delta = -353272291 ns)
[ 26.627092] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3af:
excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[ 26.630428] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x3e0-0x4ff:
clean.
[ 26.631944] pcmcia_socket pcmcia_socket0: cs: IO port probe 0x820-0x8ff:
clean.
[ 26.633656] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcf7:
clean.
[ 26.636193] pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff:
clean.
[ 26.638326] pcmcia_socket pcmcia_socket0: cs: memory probe
0xa0000000-0xa0ffffff: clean.
[ 26.652582] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 26.661524] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3af:
excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[ 26.681139] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x3e0-0x4ff:
clean.
[ 26.682650] pcmcia_socket pcmcia_socket1: cs: IO port probe 0x820-0x8ff:
clean.
[ 26.684258] pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcf7:
clean.
[ 26.686839] pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff:
clean.
[ 26.906667] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 27.102349] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 27.184457] eth1: Hardware identity 0005:0002:0001:0002
[ 27.184576] eth1: Station identity 001f:0001:0006:000e
[ 27.184588] eth1: Firmware determined as Lucent/Agere 6.14
[ 27.184602] eth1: Attempting to download firmware agere_sta_fw.bin
[ 27.184631] hermes_dld: AUX enable returned 0
[ 27.185636] hermes_dld: AUX disable returned 0
[ 27.185645] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 27.185652] eth1: Read PDA returned 0
[ 27.185665] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 27.353708] hermes_dld: AUX enable returned 0
[ 27.353724] hermes_dld: Enabling volatile, EP 0x000f8000
[ 27.354815] hermes_dld: PROGRAM_ENABLE returned 0
[ 27.354823] eth1: Program init returned 0
[ 27.354833] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 27.402930] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 27.406209] eth1: Program returned 0
[ 27.406219] hermes_dld: Found record 0x0003 at dde3a81c
[ 27.406240] hermes_dld: Found record 0x0005 at dde3a8a8
[ 27.406259] hermes_dld: Found record 0x0008 at dde3a8d2
[ 27.406276] hermes_dld: Found record 0x0007 at dde3a8c4
[ 27.406294] hermes_dld: Found record 0x0006 at dde3a8b6
[ 27.406314] hermes_dld: Found record 0x0110 at dde3a99a
[ 27.406347] hermes_dld: Found record 0x0120 at dde3a9ba
[ 27.406380] hermes_dld: Found record 0x0130 at dde3a9da
[ 27.406412] hermes_dld: Found record 0x0140 at dde3a9fa
[ 27.406426] hermes_dld: Found record 0x0150 at dde3aa02
[ 27.406439] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 27.406472] hermes_dld: Found record 0x0101 at dde3a946
[ 27.406488] hermes_dld: Found record 0x0103 at dde3a95c
[ 27.406508] hermes_dld: Found record 0x0104 at dde3a96c
[ 27.406520] hermes_dld: Found record 0x0105 at dde3a972
[ 27.406532] hermes_dld: Found record 0x0105 at dde3a972
[ 27.406544] hermes_dld: Found record 0x0105 at dde3a972
[ 27.406556] hermes_dld: Found record 0x0107 at dde3a97e
[ 27.406568] hermes_dld: Found record 0x0109 at dde3a98c
[ 27.406587] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 27.406851] eth1: Apply PDA returned 0
[ 27.406916] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 27.406945] hermes_dld: AUX disable returned 0
[ 27.417580] eth1: Program end returned 0
[ 27.417589] eth1: hermes_present returned 1
[ 27.418413] eth1: Hardware identity 0005:0002:0001:0002
[ 27.418540] eth1: Station identity 001f:0002:0009:0030
[ 27.418552] eth1: Firmware determined as Lucent/Agere 9.48
[ 27.418560] eth1: Ad-hoc demo mode supported
[ 27.418567] eth1: IEEE standard IBSS ad-hoc mode supported
[ 27.418574] eth1: WEP supported, 104-bit key
[ 27.418582] eth1: WPA-PSK supported
[ 27.763503] eth1: MAC address 00:02:2d:26:95:6c
[ 27.763619] eth1: Station name "HERMES I"
[ 27.764340] eth1: ready
[ 27.765187] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 28.224255] Toshiba System Management Mode driver v1.11 26/9/2001
[ 28.515772] Non-volatile memory driver v1.3
[ 29.719444] device-mapper: uevent: version 1.0.3
[ 29.721544] device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised:
dm-devel@redhat.com
[ 29.879406] device-mapper: multipath: version 1.0.5 loaded
[ 30.306641] device-mapper: multipath round-robin: version 1.0.0 loaded
[ 30.308093] device-mapper: table: 254:0: multipath: error getting device
[ 30.308112] device-mapper: ioctl: error adding target to table
[ 35.035611] loop: module loaded
[ 37.628002] Adding 500432k swap on /dev/sda1. Priority:-1 extents:1
across:500432k
[ 42.476006] IrCOMM protocol (Dag Brattli)
[ 45.000236] PPP generic driver version 2.4.2
[ 54.746498] NET: Registered protocol family 17
[ 55.513822] eth1: Lucent/Agere firmware doesn't support manual roaming
[ 55.696197] eth1: New link status: Connected (0001)
[ 1655.597137] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 1667.668995] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 1672.023101] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 1676.156634] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 1676.157098] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 1676.165387] orinoco_cs_config: mem = 00010100
[ 1676.165411] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 1676.248321] eth1: Hardware identity 0005:0002:0001:0002
[ 1676.248442] eth1: Station identity 001f:0001:0006:000e
[ 1676.248453] eth1: Firmware determined as Lucent/Agere 6.14
[ 1676.253946] eth1: Attempting to download firmware agere_sta_fw.bin
[ 1676.253991] hermes_dld: AUX enable returned 0
[ 1676.254997] hermes_dld: AUX disable returned 0
[ 1676.255005] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 1676.255012] eth1: Read PDA returned 0
[ 1676.255025] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 1676.406694] hermes_dld: AUX enable returned 0
[ 1676.406711] hermes_dld: Enabling volatile, EP 0x000f8000
[ 1676.407791] hermes_dld: PROGRAM_ENABLE returned 0
[ 1676.407799] eth1: Program init returned 0
[ 1676.407809] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 1676.455929] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 1676.459209] eth1: Program returned 0
[ 1676.459219] hermes_dld: Found record 0x0003 at cb4d8c1c
[ 1676.459241] hermes_dld: Found record 0x0005 at cb4d8ca8
[ 1676.459260] hermes_dld: Found record 0x0008 at cb4d8cd2
[ 1676.459277] hermes_dld: Found record 0x0007 at cb4d8cc4
[ 1676.459295] hermes_dld: Found record 0x0006 at cb4d8cb6
[ 1676.459315] hermes_dld: Found record 0x0110 at cb4d8d9a
[ 1676.459349] hermes_dld: Found record 0x0120 at cb4d8dba
[ 1676.459382] hermes_dld: Found record 0x0130 at cb4d8dda
[ 1676.459414] hermes_dld: Found record 0x0140 at cb4d8dfa
[ 1676.459428] hermes_dld: Found record 0x0150 at cb4d8e02
[ 1676.459441] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 1676.459474] hermes_dld: Found record 0x0101 at cb4d8d46
[ 1676.459489] hermes_dld: Found record 0x0103 at cb4d8d5c
[ 1676.459509] hermes_dld: Found record 0x0104 at cb4d8d6c
[ 1676.459521] hermes_dld: Found record 0x0105 at cb4d8d72
[ 1676.459534] hermes_dld: Found record 0x0105 at cb4d8d72
[ 1676.459546] hermes_dld: Found record 0x0105 at cb4d8d72
[ 1676.459558] hermes_dld: Found record 0x0107 at cb4d8d7e
[ 1676.459571] hermes_dld: Found record 0x0109 at cb4d8d8c
[ 1676.459589] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 1676.459805] eth1: Apply PDA returned 0
[ 1676.459902] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 1676.459932] hermes_dld: AUX disable returned 0
[ 1676.470577] eth1: Program end returned 0
[ 1676.470586] eth1: hermes_present returned 1
[ 1676.471402] eth1: Hardware identity 0005:0002:0001:0002
[ 1676.471530] eth1: Station identity 001f:0002:0009:0030
[ 1676.471541] eth1: Firmware determined as Lucent/Agere 9.48
[ 1676.471549] eth1: Ad-hoc demo mode supported
[ 1676.471556] eth1: IEEE standard IBSS ad-hoc mode supported
[ 1676.471563] eth1: WEP supported, 104-bit key
[ 1676.471571] eth1: WPA-PSK supported
[ 1676.513945] eth1: MAC address 00:02:2d:26:95:6c
[ 1676.514064] eth1: Station name "HERMES I"
[ 1676.515375] eth1: ready
[ 1676.520650] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 1787.688813] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 1794.179963] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 1794.180421] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 1794.401279] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 1794.614507] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 1794.699011] eth1: Hardware identity 0005:0002:0001:0002
[ 1794.699131] eth1: Station identity 001f:0001:0006:000e
[ 1794.699143] eth1: Firmware determined as Lucent/Agere 6.14
[ 1794.709414] eth1: Attempting to download firmware agere_sta_fw.bin
[ 1794.709463] hermes_dld: AUX enable returned 0
[ 1794.710593] hermes_dld: AUX disable returned 0
[ 1794.710602] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 1794.710610] eth1: Read PDA returned 0
[ 1794.714455] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 1794.850396] hermes_dld: AUX enable returned 0
[ 1794.850413] hermes_dld: Enabling volatile, EP 0x000f8000
[ 1794.851504] hermes_dld: PROGRAM_ENABLE returned 0
[ 1794.851512] eth1: Program init returned 0
[ 1794.851521] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 1794.899782] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 1794.903062] eth1: Program returned 0
[ 1794.903073] hermes_dld: Found record 0x0003 at de9bfc1c
[ 1794.903095] hermes_dld: Found record 0x0005 at de9bfca8
[ 1794.903114] hermes_dld: Found record 0x0008 at de9bfcd2
[ 1794.903131] hermes_dld: Found record 0x0007 at de9bfcc4
[ 1794.903149] hermes_dld: Found record 0x0006 at de9bfcb6
[ 1794.903216] hermes_dld: Found record 0x0110 at de9bfd9a
[ 1794.903250] hermes_dld: Found record 0x0120 at de9bfdba
[ 1794.903283] hermes_dld: Found record 0x0130 at de9bfdda
[ 1794.903316] hermes_dld: Found record 0x0140 at de9bfdfa
[ 1794.903329] hermes_dld: Found record 0x0150 at de9bfe02
[ 1794.903343] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 1794.903376] hermes_dld: Found record 0x0101 at de9bfd46
[ 1794.903391] hermes_dld: Found record 0x0103 at de9bfd5c
[ 1794.903411] hermes_dld: Found record 0x0104 at de9bfd6c
[ 1794.903423] hermes_dld: Found record 0x0105 at de9bfd72
[ 1794.903435] hermes_dld: Found record 0x0105 at de9bfd72
[ 1794.903448] hermes_dld: Found record 0x0105 at de9bfd72
[ 1794.903460] hermes_dld: Found record 0x0107 at de9bfd7e
[ 1794.903472] hermes_dld: Found record 0x0109 at de9bfd8c
[ 1794.903490] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 1794.903706] eth1: Apply PDA returned 0
[ 1794.903771] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 1794.903800] hermes_dld: AUX disable returned 0
[ 1794.914439] eth1: Program end returned 0
[ 1794.914448] eth1: hermes_present returned 1
[ 1794.915265] eth1: Hardware identity 0005:0002:0001:0002
[ 1794.915392] eth1: Station identity 001f:0002:0009:0030
[ 1794.915403] eth1: Firmware determined as Lucent/Agere 9.48
[ 1794.915412] eth1: Ad-hoc demo mode supported
[ 1794.915419] eth1: IEEE standard IBSS ad-hoc mode supported
[ 1794.915426] eth1: WEP supported, 104-bit key
[ 1794.915434] eth1: WPA-PSK supported
[ 1794.978414] eth1: MAC address 00:02:2d:26:95:6c
[ 1794.978531] eth1: Station name "HERMES I"
[ 1794.979367] eth1: ready
[ 1794.984388] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 1796.155223] eth1: Lucent/Agere firmware doesn't support manual roaming
[ 1796.449939] eth1: New link status: Connected (0001)
[ 1815.463060] PM: Syncing filesystems ... done.
[ 1815.517782] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 1815.557683] Freezing user space processes ... (elapsed 0.02 seconds)
done.
[ 1815.582733] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
[ 1815.583550] Suspending console(s) (use no_console_suspend to debug)
[ 1815.595005] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1816.048237] sd 0:0:0:0: [sda] Stopping disk
[ 1816.749538] pci 0000:01:00.0: power state changed by ACPI to D3
[ 1816.764397] e100 0000:00:0a.0: PME# enabled
[ 1816.764649] e100 0000:00:0a.0: wake-up capability enabled by ACPI
[ 1816.764818] e100 0000:00:0a.0: PCI INT A disabled
[ 1816.833679] ALI 5451 0000:00:06.0: PCI INT A disabled
[ 1816.846939] ALI 5451 0000:00:06.0: power state changed by ACPI to D3
[ 1817.633557] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[ 1817.646806] ohci_hcd 0000:00:02.0: PCI INT A disabled
[ 1817.646913] ohci_hcd 0000:00:02.0: PME# disabled
[ 1817.676801] ACPI: Preparing to enter system sleep state S3
[ 1817.676801] Back to C!
[ 1817.676801] ohci_hcd 0000:00:02.0: restoring config space at offset 0xf
(was 0x500001ff, writing 0x5000010b)
[ 1817.676801] pci 0000:00:12.0: restoring config space at offset 0xf (was
0x1ff, writing 0x10b)
[ 1817.676801] pci 0000:01:00.0: restoring config space at offset 0xf (was
0x1ff, writing 0x10b)
[ 1817.692557] ACPI: Waking up from system sleep state S3
[ 1817.718909] agpgart-ali 0000:00:00.0: PME# disabled
[ 1817.718963] pci 0000:00:01.0: setting latency timer to 64
[ 1817.718997] ohci_hcd 0000:00:02.0: PME# disabled
[ 1817.729980] ohci_hcd 0000:00:02.0: PCI INT A -> Link[LNKG] -> GSI 11
(level, low) -> IRQ 11
[ 1817.730011] ohci_hcd 0000:00:02.0: PME# disabled
[ 1817.785281] usb usb1: root hub lost power or was reset
[ 1817.796890] pata_ali 0000:00:04.0: restoring config space at offset 0x1
(was 0x2900001, writing 0x2900005)
[ 1817.796944] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[ 1817.806834] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[ 1817.806872] ALI 5451 0000:00:06.0: restoring config space at offset 0xf
(was 0x180201ff, writing 0x1802010b)
[ 1817.807118] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[ 1817.807359] ALI 5451 0000:00:06.0: PCI INT A -> Link[LNKH] -> GSI 11
(level, low) -> IRQ 11
[ 1818.093261] pci 0000:00:07.0: PME# disabled
[ 1818.093287] ali1535_smbus 0000:00:08.0: enabling device (0000 -> 0001)
[ 1818.106618] e100 0000:00:0a.0: restoring config space at offset 0xf (was
0x380801ff, writing 0x3808010b)
[ 1818.106682] e100 0000:00:0a.0: restoring config space at offset 0x1 (was
0x2900003, writing 0x2900007)
[ 1818.106721] e100 0000:00:0a.0: wake-up capability disabled by ACPI
[ 1818.106735] e100 0000:00:0a.0: PME# disabled
[ 1818.106811] yenta_cardbus 0000:00:10.0: restoring config space at offset
0x6 (was 0x50200, writing 0xb0050200)
[ 1818.380552] ata2.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[ 1818.380562] ata2.00: ACPI cmd ef/03:42:00:00:00:00 filtered out
[ 1818.381301] ata2.00: configured for UDMA/33
[ 1819.089989] pci 0000:00:12.0: PME# disabled
[ 1819.090024] pci 0000:01:00.0: PME# disabled
[ 1819.095464] sd 0:0:0:0: [sda] Starting disk
[ 1820.043600] ata1.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[ 1820.043611] ata1.00: ACPI cmd ef/03:44:00:00:00:00 filtered out
[ 1820.057223] ata1.00: configured for UDMA/33
[ 1820.081412] sd 0:0:0:0: [sda] 39070080 512-byte hardware sectors: (20.0
GB/18.6 GiB)
[ 1820.081695] sd 0:0:0:0: [sda] Write Protect is off
[ 1820.081704] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1820.081894] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[ 1820.334337] eth1: Attempting to download firmware agere_sta_fw.bin
[ 1820.334371] hermes_dld: AUX enable returned 0
[ 1820.335394] hermes_dld: AUX disable returned 0
[ 1820.335401] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 1820.335407] eth1: Read PDA returned 0
[ 1820.417580] hermes_dld: AUX enable returned 0
[ 1820.417587] hermes_dld: Enabling volatile, EP 0x000f8000
[ 1820.418687] hermes_dld: PROGRAM_ENABLE returned 0
[ 1820.418693] eth1: Program init returned 0
[ 1820.418701] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 1820.466864] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 1820.470139] eth1: Program returned 0
[ 1820.470147] hermes_dld: Found record 0x0003 at cb4d901c
[ 1820.470167] hermes_dld: Found record 0x0005 at cb4d90a8
[ 1820.470184] hermes_dld: Found record 0x0008 at cb4d90d2
[ 1820.470200] hermes_dld: Found record 0x0007 at cb4d90c4
[ 1820.470216] hermes_dld: Found record 0x0006 at cb4d90b6
[ 1820.470234] hermes_dld: Found record 0x0110 at cb4d919a
[ 1820.470265] hermes_dld: Found record 0x0120 at cb4d91ba
[ 1820.470296] hermes_dld: Found record 0x0130 at cb4d91da
[ 1820.470327] hermes_dld: Found record 0x0140 at cb4d91fa
[ 1820.470339] hermes_dld: Found record 0x0150 at cb4d9202
[ 1820.470351] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 1820.470382] hermes_dld: Found record 0x0101 at cb4d9146
[ 1820.470396] hermes_dld: Found record 0x0103 at cb4d915c
[ 1820.470415] hermes_dld: Found record 0x0104 at cb4d916c
[ 1820.470425] hermes_dld: Found record 0x0105 at cb4d9172
[ 1820.470436] hermes_dld: Found record 0x0105 at cb4d9172
[ 1820.470447] hermes_dld: Found record 0x0105 at cb4d9172
[ 1820.470458] hermes_dld: Found record 0x0107 at cb4d917e
[ 1820.470469] hermes_dld: Found record 0x0109 at cb4d918c
[ 1820.470486] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 1820.470700] eth1: Apply PDA returned 0
[ 1820.470763] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 1820.470790] hermes_dld: AUX disable returned 0
[ 1820.481427] eth1: Program end returned 0
[ 1820.481435] eth1: hermes_present returned 1
[ 1820.493041] Restarting tasks ... done.
[ 1820.709053] eth1: New link status: Connected (0001)
[ 5502.449614] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 5511.899442] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 5518.002795] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 5526.646261] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 5526.646720] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 5526.654184] orinoco_cs_config: mem = 00010100
[ 5526.654208] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 5526.736410] eth1: Hardware identity 0005:0002:0001:0002
[ 5526.736527] eth1: Station identity 001f:0001:0006:000e
[ 5526.736538] eth1: Firmware determined as Lucent/Agere 6.14
[ 5526.736553] eth1: Attempting to download firmware agere_sta_fw.bin
[ 5526.736583] hermes_dld: AUX enable returned 0
[ 5526.737587] hermes_dld: AUX disable returned 0
[ 5526.737595] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 5526.737602] eth1: Read PDA returned 0
[ 5526.737615] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 5526.925490] hermes_dld: AUX enable returned 0
[ 5526.925504] hermes_dld: Enabling volatile, EP 0x000f8000
[ 5526.926606] hermes_dld: PROGRAM_ENABLE returned 0
[ 5526.926616] eth1: Program init returned 0
[ 5526.926626] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 5526.974783] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 5526.978054] eth1: Program returned 0
[ 5526.978065] hermes_dld: Found record 0x0003 at cb5da41c
[ 5526.978086] hermes_dld: Found record 0x0005 at cb5da4a8
[ 5526.978105] hermes_dld: Found record 0x0008 at cb5da4d2
[ 5526.978122] hermes_dld: Found record 0x0007 at cb5da4c4
[ 5526.978140] hermes_dld: Found record 0x0006 at cb5da4b6
[ 5526.978160] hermes_dld: Found record 0x0110 at cb5da59a
[ 5526.978193] hermes_dld: Found record 0x0120 at cb5da5ba
[ 5526.978226] hermes_dld: Found record 0x0130 at cb5da5da
[ 5526.978259] hermes_dld: Found record 0x0140 at cb5da5fa
[ 5526.978273] hermes_dld: Found record 0x0150 at cb5da602
[ 5526.978285] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 5526.978319] hermes_dld: Found record 0x0101 at cb5da546
[ 5526.978334] hermes_dld: Found record 0x0103 at cb5da55c
[ 5526.978354] hermes_dld: Found record 0x0104 at cb5da56c
[ 5526.978366] hermes_dld: Found record 0x0105 at cb5da572
[ 5526.978378] hermes_dld: Found record 0x0105 at cb5da572
[ 5526.978390] hermes_dld: Found record 0x0105 at cb5da572
[ 5526.978402] hermes_dld: Found record 0x0107 at cb5da57e
[ 5526.978415] hermes_dld: Found record 0x0109 at cb5da58c
[ 5526.978433] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 5526.978649] eth1: Apply PDA returned 0
[ 5526.978714] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 5526.978743] hermes_dld: AUX disable returned 0
[ 5526.989388] eth1: Program end returned 0
[ 5526.989397] eth1: hermes_present returned 1
[ 5526.990206] eth1: Hardware identity 0005:0002:0001:0002
[ 5526.990334] eth1: Station identity 001f:0002:0009:0030
[ 5526.990345] eth1: Firmware determined as Lucent/Agere 9.48
[ 5526.990354] eth1: Ad-hoc demo mode supported
[ 5526.990361] eth1: IEEE standard IBSS ad-hoc mode supported
[ 5526.990368] eth1: WEP supported, 104-bit key
[ 5526.990376] eth1: WPA-PSK supported
[ 5527.040888] eth1: MAC address 00:02:2d:26:95:6c
[ 5527.041004] eth1: Station name "HERMES I"
[ 5527.042275] eth1: ready
[ 5527.048493] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 5539.026347] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 5548.606257] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 5548.606707] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 5548.783994] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 5548.994266] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 5549.077400] eth1: Hardware identity 0005:0002:0001:0002
[ 5549.077519] eth1: Station identity 001f:0001:0006:000e
[ 5549.077530] eth1: Firmware determined as Lucent/Agere 6.14
[ 5549.082742] eth1: Attempting to download firmware agere_sta_fw.bin
[ 5549.082785] hermes_dld: AUX enable returned 0
[ 5549.083923] hermes_dld: AUX disable returned 0
[ 5549.083932] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 5549.083940] eth1: Read PDA returned 0
[ 5549.087324] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 5549.209754] hermes_dld: AUX enable returned 0
[ 5549.209771] hermes_dld: Enabling volatile, EP 0x000f8000
[ 5549.210850] hermes_dld: PROGRAM_ENABLE returned 0
[ 5549.210858] eth1: Program init returned 0
[ 5549.210868] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 5549.258969] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 5549.262246] eth1: Program returned 0
[ 5549.262256] hermes_dld: Found record 0x0003 at de9bf81c
[ 5549.262278] hermes_dld: Found record 0x0005 at de9bf8a8
[ 5549.262297] hermes_dld: Found record 0x0008 at de9bf8d2
[ 5549.262314] hermes_dld: Found record 0x0007 at de9bf8c4
[ 5549.262332] hermes_dld: Found record 0x0006 at de9bf8b6
[ 5549.262352] hermes_dld: Found record 0x0110 at de9bf99a
[ 5549.262386] hermes_dld: Found record 0x0120 at de9bf9ba
[ 5549.262419] hermes_dld: Found record 0x0130 at de9bf9da
[ 5549.262452] hermes_dld: Found record 0x0140 at de9bf9fa
[ 5549.262466] hermes_dld: Found record 0x0150 at de9bfa02
[ 5549.262478] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 5549.262511] hermes_dld: Found record 0x0101 at de9bf946
[ 5549.262527] hermes_dld: Found record 0x0103 at de9bf95c
[ 5549.262547] hermes_dld: Found record 0x0104 at de9bf96c
[ 5549.262559] hermes_dld: Found record 0x0105 at de9bf972
[ 5549.262571] hermes_dld: Found record 0x0105 at de9bf972
[ 5549.262583] hermes_dld: Found record 0x0105 at de9bf972
[ 5549.262595] hermes_dld: Found record 0x0107 at de9bf97e
[ 5549.262607] hermes_dld: Found record 0x0109 at de9bf98c
[ 5549.262626] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 5549.262889] eth1: Apply PDA returned 0
[ 5549.262955] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 5549.262984] hermes_dld: AUX disable returned 0
[ 5549.273627] eth1: Program end returned 0
[ 5549.273636] eth1: hermes_present returned 1
[ 5549.274449] eth1: Hardware identity 0005:0002:0001:0002
[ 5549.274575] eth1: Station identity 001f:0002:0009:0030
[ 5549.274587] eth1: Firmware determined as Lucent/Agere 9.48
[ 5549.274595] eth1: Ad-hoc demo mode supported
[ 5549.274602] eth1: IEEE standard IBSS ad-hoc mode supported
[ 5549.274609] eth1: WEP supported, 104-bit key
[ 5549.274618] eth1: WPA-PSK supported
[ 5549.314286] eth1: MAC address 00:02:2d:26:95:6c
[ 5549.314404] eth1: Station name "HERMES I"
[ 5549.315259] eth1: ready
[ 5549.320270] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 5550.497592] eth1: Lucent/Agere firmware doesn't support manual roaming
[ 5550.777305] eth1: New link status: Connected (0001)
[ 6809.469178] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 6845.475579] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 6848.596759] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 6855.326095] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 6855.326550] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 6855.333756] orinoco_cs_config: mem = 00010100
[ 6855.333780] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 6855.417190] eth1: Hardware identity 0005:0002:0001:0002
[ 6855.417308] eth1: Station identity 001f:0001:0006:000e
[ 6855.417319] eth1: Firmware determined as Lucent/Agere 6.14
[ 6855.417731] eth1: Attempting to download firmware agere_sta_fw.bin
[ 6855.417763] hermes_dld: AUX enable returned 0
[ 6855.418768] hermes_dld: AUX disable returned 0
[ 6855.418776] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 6855.418784] eth1: Read PDA returned 0
[ 6855.418798] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 6855.644099] hermes_dld: AUX enable returned 0
[ 6855.644117] hermes_dld: Enabling volatile, EP 0x000f8000
[ 6855.645196] hermes_dld: PROGRAM_ENABLE returned 0
[ 6855.645204] eth1: Program init returned 0
[ 6855.645214] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 6855.693417] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 6855.696695] eth1: Program returned 0
[ 6855.696705] hermes_dld: Found record 0x0003 at db5d081c
[ 6855.696727] hermes_dld: Found record 0x0005 at db5d08a8
[ 6855.696746] hermes_dld: Found record 0x0008 at db5d08d2
[ 6855.696763] hermes_dld: Found record 0x0007 at db5d08c4
[ 6855.696781] hermes_dld: Found record 0x0006 at db5d08b6
[ 6855.696800] hermes_dld: Found record 0x0110 at db5d099a
[ 6855.696834] hermes_dld: Found record 0x0120 at db5d09ba
[ 6855.696867] hermes_dld: Found record 0x0130 at db5d09da
[ 6855.696899] hermes_dld: Found record 0x0140 at db5d09fa
[ 6855.696913] hermes_dld: Found record 0x0150 at db5d0a02
[ 6855.696926] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 6855.696959] hermes_dld: Found record 0x0101 at db5d0946
[ 6855.696974] hermes_dld: Found record 0x0103 at db5d095c
[ 6855.696994] hermes_dld: Found record 0x0104 at db5d096c
[ 6855.697006] hermes_dld: Found record 0x0105 at db5d0972
[ 6855.697018] hermes_dld: Found record 0x0105 at db5d0972
[ 6855.697031] hermes_dld: Found record 0x0105 at db5d0972
[ 6855.697043] hermes_dld: Found record 0x0107 at db5d097e
[ 6855.697055] hermes_dld: Found record 0x0109 at db5d098c
[ 6855.697073] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 6855.697289] eth1: Apply PDA returned 0
[ 6855.697354] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 6855.697382] hermes_dld: AUX disable returned 0
[ 6855.708018] eth1: Program end returned 0
[ 6855.708028] eth1: hermes_present returned 1
[ 6855.708846] eth1: Hardware identity 0005:0002:0001:0002
[ 6855.708974] eth1: Station identity 001f:0002:0009:0030
[ 6855.708985] eth1: Firmware determined as Lucent/Agere 9.48
[ 6855.708994] eth1: Ad-hoc demo mode supported
[ 6855.709001] eth1: IEEE standard IBSS ad-hoc mode supported
[ 6855.709008] eth1: WEP supported, 104-bit key
[ 6855.709016] eth1: WPA-PSK supported
[ 6855.761332] eth1: MAC address 00:02:2d:26:95:6c
[ 6855.761448] eth1: Station name "HERMES I"
[ 6855.763034] eth1: ready
[ 6855.767920] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 6857.736999] orinoco_irq_tasklet called
[ 6874.174334] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 6974.787788] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 6977.244642] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 6980.846116] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 6980.846578] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 6980.858892] orinoco_cs_config: mem = 00010100
[ 6980.858917] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 6980.941885] eth1: Hardware identity 0005:0002:0001:0002
[ 6980.942005] eth1: Station identity 001f:0001:0006:000e
[ 6980.942016] eth1: Firmware determined as Lucent/Agere 6.14
[ 6980.947751] eth1: Attempting to download firmware agere_sta_fw.bin
[ 6980.947795] hermes_dld: AUX enable returned 0
[ 6980.948858] hermes_dld: AUX disable returned 0
[ 6980.948867] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 6980.948875] eth1: Read PDA returned 0
[ 6980.949026] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 6981.124174] hermes_dld: AUX enable returned 0
[ 6981.124191] hermes_dld: Enabling volatile, EP 0x000f8000
[ 6981.125282] hermes_dld: PROGRAM_ENABLE returned 0
[ 6981.125290] eth1: Program init returned 0
[ 6981.125301] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 6981.173510] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 6981.176787] eth1: Program returned 0
[ 6981.176797] hermes_dld: Found record 0x0003 at cb5db41c
[ 6981.176819] hermes_dld: Found record 0x0005 at cb5db4a8
[ 6981.176838] hermes_dld: Found record 0x0008 at cb5db4d2
[ 6981.176855] hermes_dld: Found record 0x0007 at cb5db4c4
[ 6981.176873] hermes_dld: Found record 0x0006 at cb5db4b6
[ 6981.176893] hermes_dld: Found record 0x0110 at cb5db59a
[ 6981.176926] hermes_dld: Found record 0x0120 at cb5db5ba
[ 6981.176959] hermes_dld: Found record 0x0130 at cb5db5da
[ 6981.176992] hermes_dld: Found record 0x0140 at cb5db5fa
[ 6981.177005] hermes_dld: Found record 0x0150 at cb5db602
[ 6981.177019] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 6981.177052] hermes_dld: Found record 0x0101 at cb5db546
[ 6981.177067] hermes_dld: Found record 0x0103 at cb5db55c
[ 6981.177087] hermes_dld: Found record 0x0104 at cb5db56c
[ 6981.177099] hermes_dld: Found record 0x0105 at cb5db572
[ 6981.177111] hermes_dld: Found record 0x0105 at cb5db572
[ 6981.177123] hermes_dld: Found record 0x0105 at cb5db572
[ 6981.177136] hermes_dld: Found record 0x0107 at cb5db57e
[ 6981.177148] hermes_dld: Found record 0x0109 at cb5db58c
[ 6981.177166] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 6981.177383] eth1: Apply PDA returned 0
[ 6981.177448] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 6981.177478] hermes_dld: AUX disable returned 0
[ 6981.188120] eth1: Program end returned 0
[ 6981.188130] eth1: hermes_present returned 1
[ 6981.188945] eth1: Hardware identity 0005:0002:0001:0002
[ 6981.189073] eth1: Station identity 001f:0002:0009:0030
[ 6981.189084] eth1: Firmware determined as Lucent/Agere 9.48
[ 6981.189093] eth1: Ad-hoc demo mode supported
[ 6981.189100] eth1: IEEE standard IBSS ad-hoc mode supported
[ 6981.189107] eth1: WEP supported, 104-bit key
[ 6981.189116] eth1: WPA-PSK supported
[ 6981.235504] eth1: MAC address 00:02:2d:26:95:6c
[ 6981.235622] eth1: Station name "HERMES I"
[ 6981.237111] eth1: ready
[ 6981.242087] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 6982.094203] orinoco_irq_tasklet called
[ 6989.363836] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 7294.746774] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 7297.297428] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 7301.789418] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 7301.789871] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 7301.790700] orinoco_cs_config: mem = 00010100
[ 7301.790710] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 7301.879237] eth1: Hardware identity 0005:0002:0001:0002
[ 7301.879365] eth1: Station identity 001f:0001:0006:000e
[ 7301.879378] eth1: Firmware determined as Lucent/Agere 6.14
[ 7301.882473] eth1: Attempting to download firmware agere_sta_fw.bin
[ 7301.882518] hermes_dld: AUX enable returned 0
[ 7301.883633] hermes_dld: AUX disable returned 0
[ 7301.883642] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 7301.883650] eth1: Read PDA returned 0
[ 7301.887122] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 7302.010646] hermes_dld: AUX enable returned 0
[ 7302.010662] hermes_dld: Enabling volatile, EP 0x000f8000
[ 7302.011752] hermes_dld: PROGRAM_ENABLE returned 0
[ 7302.011760] eth1: Program init returned 0
[ 7302.011769] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 7302.059935] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 7302.063209] eth1: Program returned 0
[ 7302.063220] hermes_dld: Found record 0x0003 at da7e941c
[ 7302.063241] hermes_dld: Found record 0x0005 at da7e94a8
[ 7302.063260] hermes_dld: Found record 0x0008 at da7e94d2
[ 7302.063277] hermes_dld: Found record 0x0007 at da7e94c4
[ 7302.063295] hermes_dld: Found record 0x0006 at da7e94b6
[ 7302.063315] hermes_dld: Found record 0x0110 at da7e959a
[ 7302.063349] hermes_dld: Found record 0x0120 at da7e95ba
[ 7302.063382] hermes_dld: Found record 0x0130 at da7e95da
[ 7302.063414] hermes_dld: Found record 0x0140 at da7e95fa
[ 7302.063428] hermes_dld: Found record 0x0150 at da7e9602
[ 7302.063441] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 7302.063474] hermes_dld: Found record 0x0101 at da7e9546
[ 7302.063490] hermes_dld: Found record 0x0103 at da7e955c
[ 7302.063509] hermes_dld: Found record 0x0104 at da7e956c
[ 7302.063522] hermes_dld: Found record 0x0105 at da7e9572
[ 7302.063534] hermes_dld: Found record 0x0105 at da7e9572
[ 7302.063546] hermes_dld: Found record 0x0105 at da7e9572
[ 7302.063558] hermes_dld: Found record 0x0107 at da7e957e
[ 7302.063570] hermes_dld: Found record 0x0109 at da7e958c
[ 7302.063589] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 7302.063803] eth1: Apply PDA returned 0
[ 7302.063869] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 7302.063898] hermes_dld: AUX disable returned 0
[ 7302.074535] eth1: Program end returned 0
[ 7302.074544] eth1: hermes_present returned 1
[ 7302.075360] eth1: Hardware identity 0005:0002:0001:0002
[ 7302.075487] eth1: Station identity 001f:0002:0009:0030
[ 7302.075499] eth1: Firmware determined as Lucent/Agere 9.48
[ 7302.075507] eth1: Ad-hoc demo mode supported
[ 7302.075514] eth1: IEEE standard IBSS ad-hoc mode supported
[ 7302.075521] eth1: WEP supported, 104-bit key
[ 7302.075529] eth1: WPA-PSK supported
[ 7302.123262] eth1: MAC address 00:02:2d:26:95:6c
[ 7302.123380] eth1: Station name "HERMES I"
[ 7302.124728] eth1: ready
[ 7302.129732] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 7303.543710] eth1: Lucent/Agere firmware doesn't support manual roaming
[ 7303.764870] eth1: New link status: Connected (0001)
[ 8305.769395] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot
0
[ 8314.102846] orinoco 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 8317.290790] orinoco_cs 0.15 (David Gibson [off-list ref],
Pavel Roskin [off-list ref], et al)
[ 8322.322634] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted
into slot 0
[ 8322.323093] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 8322.330460] orinoco_cs_config: mem = 00010100
[ 8322.330484] orinoco_cs_config: iobase = 00010100, spacing = 0
[ 8322.412797] eth1: Hardware identity 0005:0002:0001:0002
[ 8322.412914] eth1: Station identity 001f:0001:0006:000e
[ 8322.412926] eth1: Firmware determined as Lucent/Agere 6.14
[ 8322.421875] eth1: Attempting to download firmware agere_sta_fw.bin
[ 8322.421918] hermes_dld: AUX enable returned 0
[ 8322.423056] hermes_dld: AUX disable returned 0
[ 8322.423065] hermes_dld: Actual PDA length 998, Max allowed 1000
[ 8322.423073] eth1: Read PDA returned 0
[ 8322.426865] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[ 8322.549971] hermes_dld: AUX enable returned 0
[ 8322.549988] hermes_dld: Enabling volatile, EP 0x000f8000
[ 8322.551067] hermes_dld: PROGRAM_ENABLE returned 0
[ 8322.551076] eth1: Program init returned 0
[ 8322.551086] hermes_dld: Programming block of length 60416 to address
0x001f0000
[ 8322.599269] hermes_dld: Programming block of length 4096 to address
0x001ef000
[ 8322.602501] eth1: Program returned 0
[ 8322.602510] hermes_dld: Found record 0x0003 at da7e9c1c
[ 8322.602580] hermes_dld: Found record 0x0005 at da7e9ca8
[ 8322.602600] hermes_dld: Found record 0x0008 at da7e9cd2
[ 8322.602617] hermes_dld: Found record 0x0007 at da7e9cc4
[ 8322.602635] hermes_dld: Found record 0x0006 at da7e9cb6
[ 8322.602655] hermes_dld: Found record 0x0110 at da7e9d9a
[ 8322.602689] hermes_dld: Found record 0x0120 at da7e9dba
[ 8322.602722] hermes_dld: Found record 0x0130 at da7e9dda
[ 8322.602755] hermes_dld: Found record 0x0140 at da7e9dfa
[ 8322.602768] hermes_dld: Found record 0x0150 at da7e9e02
[ 8322.602781] hermes_dld: Using default record 0x0160 at dfaaeb60
[ 8322.602815] hermes_dld: Found record 0x0101 at da7e9d46
[ 8322.602830] hermes_dld: Found record 0x0103 at da7e9d5c
[ 8322.602850] hermes_dld: Found record 0x0104 at da7e9d6c
[ 8322.602862] hermes_dld: Found record 0x0105 at da7e9d72
[ 8322.602874] hermes_dld: Found record 0x0105 at da7e9d72
[ 8322.602886] hermes_dld: Found record 0x0105 at da7e9d72
[ 8322.602898] hermes_dld: Found record 0x0107 at da7e9d7e
[ 8322.602911] hermes_dld: Found record 0x0109 at da7e9d8c
[ 8322.602929] hermes_dld: Using default record 0x0161 at dfaaeb80
[ 8322.603145] eth1: Apply PDA returned 0
[ 8322.603210] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[ 8322.603239] hermes_dld: AUX disable returned 0
[ 8322.613880] eth1: Program end returned 0
[ 8322.613889] eth1: hermes_present returned 1
[ 8322.614695] eth1: Hardware identity 0005:0002:0001:0002
[ 8322.614822] eth1: Station identity 001f:0002:0009:0030
[ 8322.614833] eth1: Firmware determined as Lucent/Agere 9.48
[ 8322.614841] eth1: Ad-hoc demo mode supported
[ 8322.614848] eth1: IEEE standard IBSS ad-hoc mode supported
[ 8322.614856] eth1: WEP supported, 104-bit key
[ 8322.614864] eth1: WPA-PSK supported
[ 8322.654749] eth1: MAC address 00:02:2d:26:95:6c
[ 8322.654867] eth1: Station name "HERMES I"
[ 8322.656396] eth1: ready
[ 8322.661285] eth1: orinoco_cs at 0.0, irq 11, io 0x0100-0x013f
[ 8323.978313] eth1: Lucent/Agere firmware doesn't support manual roaming
[ 8324.229756] eth1: New link status: Connected (0001)
[11629.643087] PM: Syncing filesystems ... done.
[11630.186755] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[11630.419902] Freezing user space processes ... (elapsed 0.07 seconds)
done.
[11630.497044] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
[11630.497764] Suspending console(s) (use no_console_suspend to debug)
[11630.506847] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[11630.507372] sd 0:0:0:0: [sda] Stopping disk
[11631.202124] pci 0000:01:00.0: power state changed by ACPI to D3
[11631.216170] e100 0000:00:0a.0: PME# enabled
[11631.216386] e100 0000:00:0a.0: wake-up capability enabled by ACPI
[11631.285918] ALI 5451 0000:00:06.0: PCI INT A disabled
[11631.299262] ALI 5451 0000:00:06.0: power state changed by ACPI to D3
[11632.082428] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[11632.095668] ohci_hcd 0000:00:02.0: PCI INT A disabled
[11632.095774] ohci_hcd 0000:00:02.0: PME# disabled
[11632.125164] ACPI: Preparing to enter system sleep state S3
[11632.125584] Back to C!
[11632.125584] ohci_hcd 0000:00:02.0: restoring config space at offset 0xf
(was 0x500001ff, writing 0x5000010b)
[11632.125584] pci 0000:00:12.0: restoring config space at offset 0xf (was
0x1ff, writing 0x10b)
[11632.125584] pci 0000:01:00.0: restoring config space at offset 0xf (was
0x1ff, writing 0x10b)
[11632.139243] ACPI: Waking up from system sleep state S3
[11632.160038] agpgart-ali 0000:00:00.0: PME# disabled
[11632.160093] pci 0000:00:01.0: setting latency timer to 64
[11632.160127] ohci_hcd 0000:00:02.0: PME# disabled
[11632.172328] ohci_hcd 0000:00:02.0: PCI INT A -> Link[LNKG] -> GSI 11
(level, low) -> IRQ 11
[11632.172360] ohci_hcd 0000:00:02.0: PME# disabled
[11632.227629] usb usb1: root hub lost power or was reset
[11632.239210] pata_ali 0000:00:04.0: restoring config space at offset 0x1
(was 0x2900001, writing 0x2900005)
[11632.239262] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[11632.246377] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[11632.246413] ALI 5451 0000:00:06.0: restoring config space at offset 0xf
(was 0x180201ff, writing 0x1802010b)
[11632.246660] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[11632.246694] ALI 5451 0000:00:06.0: PCI INT A -> Link[LNKH] -> GSI 11
(level, low) -> IRQ 11
[11632.515609] pci 0000:00:07.0: PME# disabled
[11632.515636] ali1535_smbus 0000:00:08.0: enabling device (0000 -> 0001)
[11632.528969] e100 0000:00:0a.0: restoring config space at offset 0xf (was
0x380801ff, writing 0x3808010b)
[11632.529056] e100 0000:00:0a.0: wake-up capability disabled by ACPI
[11632.529070] e100 0000:00:0a.0: PME# disabled
[11632.529147] yenta_cardbus 0000:00:10.0: restoring config space at offset
0x6 (was 0x50200, writing 0xb0050200)
[11632.823109] ata2.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[11632.823119] ata2.00: ACPI cmd ef/03:42:00:00:00:00 filtered out
[11632.829623] ata2.00: configured for UDMA/33
[11633.512307] pci 0000:00:12.0: PME# disabled
[11633.512337] pci 0000:01:00.0: PME# disabled
[11633.517814] sd 0:0:0:0: [sda] Starting disk
[11634.395960] ata1.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[11634.395971] ata1.00: ACPI cmd ef/03:44:00:00:00:00 filtered out
[11634.409588] ata1.00: configured for UDMA/33
[11634.435091] sd 0:0:0:0: [sda] 39070080 512-byte hardware sectors: (20.0
GB/18.6 GiB)
[11634.435219] sd 0:0:0:0: [sda] Write Protect is off
[11634.435228] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[11634.435418] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[11634.689684] eth1: Attempting to download firmware agere_sta_fw.bin
[11634.689715] hermes_dld: AUX enable returned 0
[11634.690745] hermes_dld: AUX disable returned 0
[11634.690752] hermes_dld: Actual PDA length 998, Max allowed 1000
[11634.690758] eth1: Read PDA returned 0
[11634.772931] hermes_dld: AUX enable returned 0
[11634.772938] hermes_dld: Enabling volatile, EP 0x000f8000
[11634.774038] hermes_dld: PROGRAM_ENABLE returned 0
[11634.774043] eth1: Program init returned 0
[11634.774052] hermes_dld: Programming block of length 60416 to address
0x001f0000
[11634.822310] hermes_dld: Programming block of length 4096 to address
0x001ef000
[11634.825591] eth1: Program returned 0
[11634.825601] hermes_dld: Found record 0x0003 at ddeae81c
[11634.825621] hermes_dld: Found record 0x0005 at ddeae8a8
[11634.825639] hermes_dld: Found record 0x0008 at ddeae8d2
[11634.825654] hermes_dld: Found record 0x0007 at ddeae8c4
[11634.825671] hermes_dld: Found record 0x0006 at ddeae8b6
[11634.825688] hermes_dld: Found record 0x0110 at ddeae99a
[11634.825720] hermes_dld: Found record 0x0120 at ddeae9ba
[11634.825752] hermes_dld: Found record 0x0130 at ddeae9da
[11634.825783] hermes_dld: Found record 0x0140 at ddeae9fa
[11634.825795] hermes_dld: Found record 0x0150 at ddeaea02
[11634.825807] hermes_dld: Using default record 0x0160 at dfaaeb60
[11634.825839] hermes_dld: Found record 0x0101 at ddeae946
[11634.825852] hermes_dld: Found record 0x0103 at ddeae95c
[11634.825871] hermes_dld: Found record 0x0104 at ddeae96c
[11634.825882] hermes_dld: Found record 0x0105 at ddeae972
[11634.825893] hermes_dld: Found record 0x0105 at ddeae972
[11634.825904] hermes_dld: Found record 0x0105 at ddeae972
[11634.825914] hermes_dld: Found record 0x0107 at ddeae97e
[11634.825925] hermes_dld: Found record 0x0109 at ddeae98c
[11634.825943] hermes_dld: Using default record 0x0161 at dfaaeb80
[11634.826157] eth1: Apply PDA returned 0
[11634.826220] hermes_dld: PROGRAM_DISABLE returned 0, r0 0x0000, r1 0x0000,
r2 0x0000
[11634.826247] hermes_dld: AUX disable returned 0
[11634.836892] eth1: Program end returned 0
[11634.836899] eth1: hermes_present returned 1
[11634.848626] Restarting tasks ... <6>eth1: New link status: Connected
(0001)
[11634.998438] done.
[11715.652477]
[11715.652498] =======================================================
[11715.652520] [ INFO: possible circular locking dependency detected ]
[11715.652534] 2.6.29-rc2-1avb #11
[11715.652541] -------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>] fb_mmap+0x97/0x170
[11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>] sys_mmap2+0x8e/0xc0
[11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb #11
[11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ? arch_get_unmapped_area_topdown+0x10d/0x170
[11715.653383] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
[11718.835886] Syncing filesystems ... done.
[11718.850067] Freezing user space processes ... (elapsed 0.04 seconds)
done.
[11718.892540] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
[11718.897405] PM: Shrinking memory... -\|/-\|done (63537 pages
freed)
[11728.581385] PM: Freed 254148 kbytes in 9.68 seconds (26.25 MB/s)
[11728.581398] Suspending console(s) (use no_console_suspend to debug)
[11728.788933] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[11728.829518] e100 0000:00:0a.0: PME# enabled
[11728.829949] e100 0000:00:0a.0: wake-up capability enabled by ACPI
[11728.885899] ALI 5451 0000:00:06.0: PCI INT A disabled
[11728.899188] ALI 5451 0000:00:06.0: power state changed by ACPI to D3
[11729.683443] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[11729.683482] ohci_hcd 0000:00:02.0: PCI INT A disabled
[11729.683551] ohci_hcd 0000:00:02.0: PME# disabled
[11729.686408] ACPI: Preparing to enter system sleep state S4
[11729.687501] PM: Saving platform NVS memory
[11729.688022] PM: Creating hibernation image:
[11729.689188] PM: Need to copy 60138 pages
[11729.689188] PM: Restoring platform NVS memory
[11729.689188] ohci_hcd 0000:00:02.0: restoring config space at offset 0x1
(was 0x2900007, writing 0x2900003)
[11729.695297] ACPI: Waking up from system sleep state S4
[11729.708644] agpgart-ali 0000:00:00.0: PME# disabled
[11729.708685] pci 0000:00:01.0: setting latency timer to 64
[11729.708710] ohci_hcd 0000:00:02.0: PME# disabled
[11729.708741] ohci_hcd 0000:00:02.0: PCI INT A -> Link[LNKG] -> GSI 11
(level, low) -> IRQ 11
[11729.708763] ohci_hcd 0000:00:02.0: PME# disabled
[11729.760920] usb usb1: root hub lost power or was reset
[11729.760994] pata_ali 0000:00:04.0: restoring config space at offset 0x1
(was 0x2900001, writing 0x2900005)
[11729.761030] pata_ali 0000:00:04.0: can't derive routing for PCI INT A
[11731.061770] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[11731.061829] ALI 5451 0000:00:06.0: restoring config space at offset 0x1
(was 0xc2900007, writing 0xc2900003)
[11731.061981] ALI 5451 0000:00:06.0: power state changed by ACPI to D0
[11731.062006] ALI 5451 0000:00:06.0: PCI INT A -> Link[LNKH] -> GSI 11
(level, low) -> IRQ 11
[11731.222663] ata1.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[11731.222675] ata1.00: ACPI cmd ef/03:44:00:00:00:00 filtered out
[11731.236136] ata1.00: configured for UDMA/33
[11731.236399] sd 0:0:0:0: [sda] 39070080 512-byte hardware sectors: (20.0
GB/18.6 GiB)
[11731.236487] sd 0:0:0:0: [sda] Write Protect is off
[11731.236496] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[11731.236629] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[11731.352259] pci 0000:00:07.0: PME# disabled
[11731.352283] ali1535_smbus 0000:00:08.0: enabling device (0000 -> 0001)
[11731.365579] e100 0000:00:0a.0: restoring config space at offset 0xf (was
0x38080100, writing 0x3808010b)
[11731.365612] e100 0000:00:0a.0: restoring config space at offset 0x6 (was
0x0, writing 0xf7d00000)
[11731.365626] e100 0000:00:0a.0: restoring config space at offset 0x5 (was
0x1, writing 0xeb41)
[11731.365639] e100 0000:00:0a.0: restoring config space at offset 0x4 (was
0x0, writing 0xf7efd000)
[11731.365652] e100 0000:00:0a.0: restoring config space at offset 0x3 (was
0x0, writing 0x4008)
[11731.365668] e100 0000:00:0a.0: restoring config space at offset 0x1 (was
0x2900000, writing 0x2900007)
[11731.365695] e100 0000:00:0a.0: wake-up capability disabled by ACPI
[11731.365706] e100 0000:00:0a.0: PME# disabled
[11731.365740] yenta_cardbus 0000:00:10.0: restoring config space at offset
0xf (was 0x34001ff, writing 0x5c001ff)
[11731.365779] yenta_cardbus 0000:00:10.0: restoring config space at offset
0x4 (was 0x48201000, writing 0x48100000)
[11731.365793] yenta_cardbus 0000:00:10.0: restoring config space at offset
0x3 (was 0x24008, writing 0x2a808)
[11731.365809] yenta_cardbus 0000:00:10.0: restoring config space at offset
0x1 (was 0x2100003, writing 0x2100007)
[11731.509243] ata2.00: ACPI cmd ef/03:0c:00:00:00:00 filtered out
[11731.509252] ata2.00: ACPI cmd ef/03:42:00:00:00:00 filtered out
[11731.532672] ata2.00: configured for UDMA/33
[11732.076399] yenta_cardbus 0000:00:11.0: restoring config space at offset
0xf (was 0x10001ff, writing 0x58001ff)
[11732.076439] yenta_cardbus 0000:00:11.0: restoring config space at offset
0x4 (was 0x48202000, writing 0x48101000)
[11732.076454] yenta_cardbus 0000:00:11.0: restoring config space at offset
0x3 (was 0x824000, writing 0x82a800)
[11732.076471] yenta_cardbus 0000:00:11.0: restoring config space at offset
0x1 (was 0x4900003, writing 0x4900007)
[11732.212253] yenta_cardbus 0000:00:11.1: restoring config space at offset
0xf (was 0x10002ff, writing 0x58002ff)
[11732.212294] yenta_cardbus 0000:00:11.1: restoring config space at offset
0x4 (was 0x48203000, writing 0x48102000)
[11732.212308] yenta_cardbus 0000:00:11.1: restoring config space at offset
0x3 (was 0x824000, writing 0x82a800)
[11732.212325] yenta_cardbus 0000:00:11.1: restoring config space at offset
0x1 (was 0x4900003, writing 0x4900007)
[11732.348911] pci 0000:00:12.0: PME# disabled
[11732.348930] pci 0000:01:00.0: PME# disabled
[11732.352500] sd 0:0:0:0: [sda] Starting disk
[11732.630082] eth1: Attempting to download firmware agere_sta_fw.bin
[11732.630135] hermes_dld: AUX enable returned 0
[11732.632308] hermes_dld: AUX disable returned 0
[11732.632315] hermes_dld: Actual PDA length 998, Max allowed 1000
[11732.632321] eth1: Read PDA returned 0
[11732.632332] orinoco_cs 0.0: firmware: requesting agere_sta_fw.bin
[11792.632415] eth1: Cannot find firmware agere_sta_fw.bin
[11792.632430] eth1: Error -2 re-initializing firmware
[11792.632444] PM: Device 0.0 failed to restore: error -5
[11792.719661] Restarting tasks ... done.
[11799.239948] toshiba_acpi: Re-enabled hotkeys
On Tue, 27 Jan 2009, Andrey Borzenkov wrote: I do not know if this is new; I usually do not hibernate at all and was
testing another driver actually. I do not remember such issues in 2.6.28
though. Dmesg follows; config attached. [11715.652498] =======================================================
[11715.652520] [ INFO: possible circular locking dependency detected ]
[11715.652534] 2.6.29-rc2-1avb #11
[11715.652541] -------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>] fb_mmap+0x97/0x170
[11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>] sys_mmap2+0x8e/0xc0
[11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb #11
[11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ? arch_get_unmapped_area_topdown+0x10d/0x170
[11715.653383] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Thu, Jan 29, 2009 at 10:10 AM, Geert Uytterhoeven
[off-list ref] wrote: On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all and was
testing another driver actually. I do not remember such issues in 2.6.28
though. Dmesg follows; config attached. quoted [11715.652498] =======================================================
[11715.652520] [ INFO: possible circular locking dependency detected ]
[11715.652534] 2.6.29-rc2-1avb #11
[11715.652541] -------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>] fb_mmap+0x97/0x170
[11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>] sys_mmap2+0x8e/0xc0
[11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb #11
[11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ? arch_get_unmapped_area_topdown+0x10d/0x170
[11715.653383] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
Correct.
As I said in the note there're still some potential deadlocks into
some driver's specific fb_ioctl(), but at least for the common
fb_ioctl() implementation, and for this problem in particular, the
patch avoids the circular locking.
-Andrea
On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all and
was testing another driver actually. I do not remember such issues
in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb
#11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
[ 408.267429] =======================================================
[ 408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469] -------------------------------------------------------
[ 408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb #14
[ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
On 2009-01-30 05:15, Andrey Borzenkov wrote: On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all and
was testing another driver actually. I do not remember such issues
in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb
#11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31 Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
yep! :)
Probably we should simply use an atomic notifier there, instead of blocking.
I'll do some tests and post a new fix.
Thanks,
-Andrea
[ 408.267429] =======================================================
[ 408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469] -------------------------------------------------------
[ 408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb #14
[ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
On 2009-01-30 11:23, Andrea Righi wrote: On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all and
was testing another driver actually. I do not remember such issues
in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb
#11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31 Is this fixed by http://patchwork.kernel.org/patch/3259/ ? No. It just makes stack a bit more deep :)
yep! :)
Probably we should simply use an atomic notifier there, instead of blocking.
I'll do some tests and post a new fix.
No, the solution is no so trivial. Some notifier callbacks can sleep, so
the usage of a blocking notifier is mandatory. It seems we need a more
complicated solution to totally fix it. At least the previous fix avoids
the circular locking of fb_info->lock and mm->mmap_sem due to
copy_from/to_user() called with fb_info->lock held...
-Andrea
Thanks,
-Andrea
quoted [ 408.267429] =======================================================
[ 408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469] -------------------------------------------------------
[ 408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb #14
[ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
--
Andrea Righi
Jabber ID: righiandr@jabber.linux.it
gpg --keyserver pgp.mit.edu --recv-keys 77CEF397
On 31 of January 2009 18:53:23 Andrea Righi wrote: On 2009-01-30 11:23, Andrea Righi wrote: quoted On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all
and was testing another driver actually. I do not remember such
issues in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order)
is: [11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted
2.6.29-rc2-1avb #11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
yep! :)
Probably we should simply use an atomic notifier there, instead of
blocking. I'll do some tests and post a new fix.
No, the solution is no so trivial. Some notifier callbacks can sleep,
so the usage of a blocking notifier is mandatory. It seems we need a
more complicated solution to totally fix it. At least the previous
fix avoids the circular locking of fb_info->lock and mm->mmap_sem due
to copy_from/to_user() called with fb_info->lock held...
Well, this is serious regression that must be fixed before release. It
apparently prevents other notifiers from being called, with the effect
that e.g. firmware is no more cached on suspend and applied later on
resume -> controller non-functional.
*Any* workaround would still be useful.
-Andrea
quoted Thanks,
-Andrea
quoted [ 408.267429]
======================================================= [
408.267448] [ INFO: possible circular locking dependency detected
] [ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469]
------------------------------------------------------- [
408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order)
is: [ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>]
fb_notifier_call_chain+0x11/0x20 [ 408.268209]
[<c0223f08>] register_framebuffer+0x168/0x220 [ 408.268223]
[<c0414ba2>] vesafb_probe+0x542/0x783 [ 408.268250]
[<c02765af>] platform_drv_probe+0xf/0x20 [ 408.268269]
[<c02757c7>] driver_probe_device+0x87/0x1b0 [ 408.268281]
[<c0275988>] __device_attach+0x8/0x10 [ 408.268291]
[<c0274e0b>] bus_for_each_drv+0x5b/0x80 [ 408.268308]
[<c0275a36>] device_attach+0x76/0x80 [ 408.268319]
[<c0274c27>] bus_attach_device+0x47/0x70 [ 408.268331]
[<c02736c3>] device_add+0x323/0x550 [ 408.268342]
[<c0276f85>] platform_device_add+0x175/0x1c0 [ 408.268358]
[<c0414e7d>] vesafb_init+0x9a/0x1ec [ 408.268370]
[<c010111a>] do_one_initcall+0x2a/0x160 [ 408.268382]
[<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>]
fb_notifier_call_chain+0x11/0x20 [ 408.268521]
[<c022459e>] do_fb_ioctl+0x2ae/0x5d0 [ 408.268533]
[<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb
#14 [ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
On 2009-01-30 05:15, Andrey Borzenkov wrote: On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all and
was testing another driver actually. I do not remember such issues
in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order) is:
[11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted 2.6.29-rc2-1avb
#11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31 Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
[ 408.267429] =======================================================
[ 408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469] -------------------------------------------------------
[ 408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb #14
[ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
Anyway, looking at this trace in detail, it seems that in the fbcon
notifier the FB_EVENT_SET_CONSOLE_MAP handler doesn't use fb_info at all.
So, just for this particular case, we could unlock fb_info->lock before
calling the routine that might acquire mm->mmap_sem, and avoid the
circular locking dependency.
Any chance to do a test with the following patch?
Thanks,
-Andrea
---
fbcon: avoid circular locking dependency between fb_info->lock and mm->mmap_sem
In fbcon notifier the handler for FB_EVENT_SET_CONSOLE_MAP doesn't need
to hold fb_info->lock.
Simply unlock it before calling set_con2fb_map(), that could try to
acquire mm->mmap_sem to avoid a circular locking dependency with
fb_mmap() (that acquires mm->mmap_sem -> fb_info-lock).
Reported-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/console/fbcon.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1657b96..81fc2f7 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -3169,9 +3169,15 @@ static int fbcon_event_notify(struct notifier_block *self,
ret = fbcon_fb_unregistered ( info );
break ;
case FB_EVENT_SET_CONSOLE_MAP :
+ /*
+ * XXX : info is not used here , we can unlock it to avoid
+ * circular locking with & current -> mm -> mmap_sem in fb_mmap ().
+ */
+ unlock_fb_info ( info );
con2fb = event -> data ;
ret = set_con2fb_map ( con2fb -> console - 1 ,
con2fb -> framebuffer , 1 );
+ lock_fb_info ( info );
break ;
case FB_EVENT_GET_CONSOLE_MAP :
con2fb = event -> data ;
On Sat, 31 Jan 2009, Andrea Righi wrote: On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: fbcon: avoid circular locking dependency between fb_info->lock and mm->mmap_sem
In fbcon notifier the handler for FB_EVENT_SET_CONSOLE_MAP doesn't need
to hold fb_info->lock.
Simply unlock it before calling set_con2fb_map(), that could try to
acquire mm->mmap_sem to avoid a circular locking dependency with
fb_mmap() (that acquires mm->mmap_sem -> fb_info-lock).
However, set_con2fb_map() accesses the array of fb_info pointers
registered_fb[], which seems to be a bit unsafe now the BKL is no longer held.
quoted hunk Reported-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/console/fbcon.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1657b96..81fc2f7 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -3169,9 +3169,15 @@ static int fbcon_event_notify(struct notifier_block *self,
ret = fbcon_fb_unregistered ( info );
break ;
case FB_EVENT_SET_CONSOLE_MAP :
+ /*
+ * XXX : info is not used here , we can unlock it to avoid
+ * circular locking with & current -> mm -> mmap_sem in fb_mmap ().
+ */
+ unlock_fb_info ( info );
con2fb = event -> data ;
ret = set_con2fb_map ( con2fb -> console - 1 ,
con2fb -> framebuffer , 1 );
+ lock_fb_info ( info );
break ;
case FB_EVENT_GET_CONSOLE_MAP :
con2fb = event -> data ;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On 2009-01-31 18:44, Geert Uytterhoeven wrote: On Sat, 31 Jan 2009, Andrea Righi wrote: quoted On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: fbcon: avoid circular locking dependency between fb_info->lock and mm->mmap_sem
In fbcon notifier the handler for FB_EVENT_SET_CONSOLE_MAP doesn't need
to hold fb_info->lock.
Simply unlock it before calling set_con2fb_map(), that could try to
acquire mm->mmap_sem to avoid a circular locking dependency with
fb_mmap() (that acquires mm->mmap_sem -> fb_info-lock).
However, set_con2fb_map() accesses the array of fb_info pointers
registered_fb[], which seems to be a bit unsafe now the BKL is no longer held.
mmmh.. not sure about that, registered_fb[] was never accessed with
fb_info->lock held, see register/unregister_framebuffer().
But maybe this is another issue, and anyway, the array and also
num_registered_fb don't seem to be protected at all...
-Andrea
On 31 of January 2009 20:09:52 Andrea Righi wrote: On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all
and was testing another driver actually. I do not remember such
issues in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order)
is: [11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted
2.6.29-rc2-1avb #11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
[ 408.267429]
======================================================= [
408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469]
------------------------------------------------------- [
408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb
#14 [ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
Anyway, looking at this trace in detail, it seems that in the fbcon
notifier the FB_EVENT_SET_CONSOLE_MAP handler doesn't use fb_info at
all.
So, just for this particular case, we could unlock fb_info->lock
before calling the routine that might acquire mm->mmap_sem, and avoid
the circular locking dependency.
Any chance to do a test with the following patch?
Step by step ... :)
With both patches applied:
[ 113.949848] =======================================================
[ 113.950054] [ INFO: possible circular locking dependency detected ]
[ 113.950054] 2.6.29-rc3-1avb #16
[ 113.950054] -------------------------------------------------------
[ 113.950054] s2disk/4168 is trying to acquire lock:
[ 113.950054] (&fb_info->lock){--..}, at: [<c0230c56>]
fbcon_event_notify+0x2d6/0x950
[ 113.950054]
[ 113.950054] but task is already holding lock:
[ 113.950054] ((fb_notifier_list).rwsem){----}, at: [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] which lock already depends on the new lock.
[ 113.950054]
[ 113.950054]
[ 113.950054] the existing dependency chain (in reverse order) is:
[ 113.950054]
[ 113.950054] -> #1 ((fb_notifier_list).rwsem){----}:
[ 113.950054] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c03088c9>] down_read+0x49/0x90
[ 113.950054] [<c0138a9a>] __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] -> #0 (&fb_info->lock){--..}:
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c030c403>] notifier_call_chain+0x53/0xa0
[ 113.950054] [<c0138ab4>] __blocking_notifier_call_chain+0x44/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c02246ca>] do_fb_ioctl+0x3da/0x5d0
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] other info that might help us debug this:
[ 113.950054]
[ 113.950054] 1 lock held by s2disk/4168:
[ 113.950054] #0: ((fb_notifier_list).rwsem){----}, at: [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] stack backtrace:
[ 113.950054] Pid: 4168, comm: s2disk Not tainted 2.6.29-rc3-1avb #16
[ 113.950054] Call Trace:
[ 113.950054] [<c0306bb8>] ? printk+0x18/0x20
[ 113.950054] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c0143992>] ? check_noncircular+0x92/0x150
[ 113.950054] [<c01463ce>] ? lock_release_non_nested+0x16e/0x2a0
[ 113.950054] [<c0138a9a>] ? __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c010b9ab>] ? save_stack_trace+0x2b/0x50
[ 113.950054] [<c014185c>] ? save_trace+0x3c/0xa0
[ 113.950054] [<c01418fd>] ? add_lock_to_list+0x3d/0xb0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c0138a9a>] ? __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c030c403>] notifier_call_chain+0x53/0xa0
[ 113.950054] [<c03088e5>] ? down_read+0x65/0x90
[ 113.950054] [<c0138ab4>] __blocking_notifier_call_chain+0x44/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c02246ca>] do_fb_ioctl+0x3da/0x5d0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0209916>] ? copy_to_user+0x36/0x120
[ 113.950054] [<c02248c0>] ? fb_ioctl+0x0/0x20
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c019c762>] ? sys_fstat64+0x22/0x30
[ 113.950054] [<c01a2180>] ? __link_path_walk+0x240/0xd40
[ 113.950054] [<c010339f>] ? sysenter_exit+0xf/0x16
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 117.846986] Syncing filesystems ... done.
In case it helps - suspend to RAM does not exhibit this issue.
quoted hunk Thanks,
-Andrea
---
fbcon: avoid circular locking dependency between fb_info->lock and
mm->mmap_sem
In fbcon notifier the handler for FB_EVENT_SET_CONSOLE_MAP doesn't
need to hold fb_info->lock.
Simply unlock it before calling set_con2fb_map(), that could try to
acquire mm->mmap_sem to avoid a circular locking dependency with
fb_mmap() (that acquires mm->mmap_sem -> fb_info-lock).
Reported-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/console/fbcon.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 1657b96..81fc2f7 100644 --- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -3169,9 +3169,15 @@ static int fbcon_event_notify(struct notifier_block *self, ret = fbcon_fb_unregistered(info);
break;
case FB_EVENT_SET_CONSOLE_MAP:
+ /*
+ * XXX: info is not used here, we can unlock it to avoid
+ * circular locking with ¤t->mm->mmap_sem in fb_mmap().
+ */
+ unlock_fb_info(info);
con2fb = event->data;
ret = set_con2fb_map(con2fb->console - 1,
con2fb->framebuffer, 1);
+ lock_fb_info(info);
break;
case FB_EVENT_GET_CONSOLE_MAP:
con2fb = event->data;
On 2009-02-01 08:15, Andrey Borzenkov wrote: On 31 of January 2009 20:09:52 Andrea Righi wrote: quoted On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all
and was testing another driver actually. I do not remember such
issues in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order)
is: [11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted
2.6.29-rc2-1avb #11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ? _spin_unlock_irqrestore+0x35/0x60
[11715.653254] [<c0140dc5>] ? lock_release_holdtime+0x35/0x210
[11715.653265] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31 Is this fixed by http://patchwork.kernel.org/patch/3259/ ? No. It just makes stack a bit more deep :)
[ 408.267429]
======================================================= [
408.267448] [ INFO: possible circular locking dependency detected ]
[ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469]
------------------------------------------------------- [
408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order) is:
[ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 408.267984] [<c0203881>] kobject_add_varg+0x31/0x50
[ 408.267996] [<c02038fc>] kobject_add+0x2c/0x60
[ 408.268008] [<c0273448>] device_add+0xa8/0x550
[ 408.268041] [<c0273902>] device_register+0x12/0x20
[ 408.268053] [<c02739bb>] device_create_vargs+0xab/0xc0
[ 408.268065] [<c02739f8>] device_create+0x28/0x30
[ 408.268077] [<c026cc6d>] register_con_driver+0xed/0x130
[ 408.268090] [<c026e18b>] take_over_console+0x1b/0x50
[ 408.268102] [<c023052d>] fbcon_takeover+0x5d/0xb0
[ 408.268125] [<c02311a0>] fbcon_event_notify+0x820/0x900
[ 408.268137] [<c030c3b3>] notifier_call_chain+0x53/0xa0
[ 408.268161] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268209] [<c0223f08>] register_framebuffer+0x168/0x220
[ 408.268223] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 408.268250] [<c02765af>] platform_drv_probe+0xf/0x20
[ 408.268269] [<c02757c7>] driver_probe_device+0x87/0x1b0
[ 408.268281] [<c0275988>] __device_attach+0x8/0x10
[ 408.268291] [<c0274e0b>] bus_for_each_drv+0x5b/0x80
[ 408.268308] [<c0275a36>] device_attach+0x76/0x80
[ 408.268319] [<c0274c27>] bus_attach_device+0x47/0x70
[ 408.268331] [<c02736c3>] device_add+0x323/0x550
[ 408.268342] [<c0276f85>] platform_device_add+0x175/0x1c0
[ 408.268358] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 408.268370] [<c010111a>] do_one_initcall+0x2a/0x160
[ 408.268382] [<c04004d5>] kernel_init+0x83/0xd5
[ 408.268411] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 408.268423] [<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 408.268521] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 408.268533] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted 2.6.29-rc3-1avb
#14 [ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31 Anyway, looking at this trace in detail, it seems that in the fbcon
notifier the FB_EVENT_SET_CONSOLE_MAP handler doesn't use fb_info at
all.
So, just for this particular case, we could unlock fb_info->lock
before calling the routine that might acquire mm->mmap_sem, and avoid
the circular locking dependency.
Any chance to do a test with the following patch?
Step by step ... :)
With both patches applied:
[ 113.949848] =======================================================
[ 113.950054] [ INFO: possible circular locking dependency detected ]
[ 113.950054] 2.6.29-rc3-1avb #16
[ 113.950054] -------------------------------------------------------
[ 113.950054] s2disk/4168 is trying to acquire lock:
[ 113.950054] (&fb_info->lock){--..}, at: [<c0230c56>]
fbcon_event_notify+0x2d6/0x950
[ 113.950054]
[ 113.950054] but task is already holding lock:
[ 113.950054] ((fb_notifier_list).rwsem){----}, at: [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] which lock already depends on the new lock.
[ 113.950054]
[ 113.950054]
[ 113.950054] the existing dependency chain (in reverse order) is:
[ 113.950054]
[ 113.950054] -> #1 ((fb_notifier_list).rwsem){----}:
[ 113.950054] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c03088c9>] down_read+0x49/0x90
[ 113.950054] [<c0138a9a>] __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c022459e>] do_fb_ioctl+0x2ae/0x5d0
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] -> #0 (&fb_info->lock){--..}:
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c030c403>] notifier_call_chain+0x53/0xa0
[ 113.950054] [<c0138ab4>] __blocking_notifier_call_chain+0x44/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c02246ca>] do_fb_ioctl+0x3da/0x5d0
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] other info that might help us debug this:
[ 113.950054]
[ 113.950054] 1 lock held by s2disk/4168:
[ 113.950054] #0: ((fb_notifier_list).rwsem){----}, at: [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] stack backtrace:
[ 113.950054] Pid: 4168, comm: s2disk Not tainted 2.6.29-rc3-1avb #16
[ 113.950054] Call Trace:
[ 113.950054] [<c0306bb8>] ? printk+0x18/0x20
[ 113.950054] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c0143992>] ? check_noncircular+0x92/0x150
[ 113.950054] [<c01463ce>] ? lock_release_non_nested+0x16e/0x2a0
[ 113.950054] [<c0138a9a>] ? __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c010b9ab>] ? save_stack_trace+0x2b/0x50
[ 113.950054] [<c014185c>] ? save_trace+0x3c/0xa0
[ 113.950054] [<c01418fd>] ? add_lock_to_list+0x3d/0xb0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c0138a9a>] ? __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054] [<c030c403>] notifier_call_chain+0x53/0xa0
[ 113.950054] [<c03088e5>] ? down_read+0x65/0x90
[ 113.950054] [<c0138ab4>] __blocking_notifier_call_chain+0x44/0x60
[ 113.950054] [<c0138aea>] blocking_notifier_call_chain+0x1a/0x20
[ 113.950054] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 113.950054] [<c02246ca>] do_fb_ioctl+0x3da/0x5d0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0209916>] ? copy_to_user+0x36/0x120
[ 113.950054] [<c02248c0>] ? fb_ioctl+0x0/0x20
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c019c762>] ? sys_fstat64+0x22/0x30
[ 113.950054] [<c01a2180>] ? __link_path_walk+0x240/0xd40
[ 113.950054] [<c010339f>] ? sysenter_exit+0xf/0x16
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 117.846986] Syncing filesystems ... done.
In case it helps - suspend to RAM does not exhibit this issue.
Another attempt... ignore the previous patch and try to apply this one
on top of "fbmem: copy_from/to_user() with mutex held (v3)".
Thanks a lot for the tests!
-Andrea
---
fbmem: fix circular locking dependency pushing down fb_info->lock
Push down fb_info->lock into each framebuffer notifier callback to avoid
a circular locking dependency between fb_info->lock and
fb_notifier_list->rwsem.
Reported-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 ++
drivers/video/backlight/lcd.c | 3 ++
drivers/video/console/fbcon.c | 62 +++++++++++++++++++++++++++++++----
drivers/video/fbmem.c | 7 ----
4 files changed, 61 insertions(+), 14 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 157057c..dd37cbc 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self,
return 0 ;
bd = container_of ( self , struct backlight_device , fb_notif );
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & bd -> ops_lock );
if ( bd -> ops )
if ( ! bd -> ops -> check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self,
backlight_update_status ( bd );
}
mutex_unlock ( & bd -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index b644947..0bb13df 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self,
if ( ! ld -> ops )
return 0 ;
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & ld -> ops_lock );
if ( ! ld -> ops -> check_fb || ld -> ops -> check_fb ( ld , evdata -> info )) {
if ( event == FB_EVENT_BLANK ) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self,
}
}
mutex_unlock ( & ld -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 81fc2f7..7bc2a26 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -3144,57 +3144,105 @@ static int fbcon_event_notify(struct notifier_block *self,
switch ( action ) {
case FB_EVENT_SUSPEND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_suspended ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_RESUME :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_resumed ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_modechanged ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE_ALL :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_set_all_vcs ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_DELETE :
mode = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_mode_deleted ( info , mode );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNBIND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_fb_unbind ( info -> node );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_REGISTERED :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_fb_registered ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNREGISTERED :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_fb_unregistered ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_SET_CONSOLE_MAP :
- /*
- * XXX : info is not used here , we can unlock it to avoid
- * circular locking with & current -> mm -> mmap_sem in fb_mmap ().
- */
- unlock_fb_info ( info );
con2fb = event -> data ;
ret = set_con2fb_map ( con2fb -> console - 1 ,
con2fb -> framebuffer , 1 );
- lock_fb_info ( info );
break ;
case FB_EVENT_GET_CONSOLE_MAP :
con2fb = event -> data ;
con2fb -> framebuffer = con2fb_map [ con2fb -> console - 1 ];
break ;
case FB_EVENT_BLANK :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_fb_blanked ( info , * ( int * ) event -> data );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_NEW_MODELIST :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_new_modelist ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_GET_REQ :
caps = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_get_requirement ( info , caps );
+ unlock_fb_info ( info );
break ;
}
-
done :
return ret ;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..5cdee72 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,12 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return - EINVAL ;
con2fb . framebuffer = -1 ;
event . data = & con2fb ;
-
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP , & event );
- unlock_fb_info ( info );
ret = copy_to_user ( argp , & con2fb , sizeof ( con2fb )) ? - EFAULT : 0 ;
break ; @@ -1109,12 +1105,9 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
break ;
}
event . data = & con2fb ;
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP ,
& event );
- unlock_fb_info ( info );
break ;
case FBIOBLANK :
if ( ! lock_fb_info ( info )) --
1.5.6.3
On 2 of February 2009 01:50:10 Andrea Righi wrote: On 2009-02-01 08:15, Andrey Borzenkov wrote: quoted On 31 of January 2009 20:09:52 Andrea Righi wrote: quoted On 2009-01-30 05:15, Andrey Borzenkov wrote: quoted On 29 of January 2009 12:10:11 Geert Uytterhoeven wrote: quoted On Tue, 27 Jan 2009, Andrey Borzenkov wrote: quoted I do not know if this is new; I usually do not hibernate at all
and was testing another driver actually. I do not remember such
issues in 2.6.28 though. Dmesg follows; config attached.
[11715.652498]
=======================================================
[11715.652520] [ INFO: possible circular locking dependency
detected ] [11715.652534] 2.6.29-rc2-1avb #11
[11715.652541]
-------------------------------------------------------
[11715.652550] s2disk/25519 is trying to acquire lock:
[11715.652562] (&fb_info->lock){--..}, at: [<c0223017>]
fb_mmap+0x97/0x170 [11715.652623]
[11715.652625] but task is already holding lock:
[11715.652632] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0 [11715.652669]
[11715.652671] which lock already depends on the new lock.
[11715.652675]
[11715.652681]
[11715.652683] the existing dependency chain (in reverse order)
is: [11715.652691]
[11715.652693] -> #1 (&mm->mmap_sem){----}:
[11715.652707] [<c0144ecf>] __lock_acquire+0x129f/0x1930
[11715.652730] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.652742] [<c0181e57>] might_fault+0x77/0xa0
[11715.652764] [<c0209325>] copy_from_user+0x35/0x130
[11715.652782] [<c0223ef5>] fb_ioctl+0x1d5/0x3f0
[11715.652797] [<c01a51d0>] vfs_ioctl+0x20/0x80
[11715.652832] [<c01a53e2>] do_vfs_ioctl+0x72/0x570
[11715.652845] [<c01a5919>] sys_ioctl+0x39/0x70
[11715.652857] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.652870] [<ffffffff>] 0xffffffff
[11715.652973]
[11715.652975] -> #0 (&fb_info->lock){--..}:
[11715.652988] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653000] [<c01455bc>] lock_acquire+0x5c/0x80
[11715.653011] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653032] [<c0223017>] fb_mmap+0x97/0x170
[11715.653044] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653067] [<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653079] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653091] [<c0103371>] sysenter_do_call+0x12/0x31
[11715.653102] [<ffffffff>] 0xffffffff
[11715.653116]
[11715.653119] other info that might help us debug this:
[11715.653122]
[11715.653130] 1 lock held by s2disk/25519:
[11715.653137] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[11715.653156]
[11715.653158] stack backtrace:
[11715.653170] Pid: 25519, comm: s2disk Not tainted
2.6.29-rc2-1avb #11 [11715.653179] Call Trace:
[11715.653190] [<c0306248>] ? printk+0x18/0x20
[11715.653202] [<c01437df>] print_circular_bug_tail+0xcf/0xe0
[11715.653213] [<c014503c>] __lock_acquire+0x140c/0x1930
[11715.653224] [<c014328b>] ? trace_hardirqs_on+0xb/0x10
[11715.653242] [<c0309125>] ?
_spin_unlock_irqrestore+0x35/0x60 [11715.653254] [<c0140dc5>]
? lock_release_holdtime+0x35/0x210 [11715.653265] [<c01455bc>]
lock_acquire+0x5c/0x80
[11715.653277] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653287] [<c030761a>] mutex_lock_nested+0xba/0x2f0
[11715.653298] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653309] [<c0223017>] ? fb_mmap+0x97/0x170
[11715.653335] [<c019514d>] ? kmem_cache_alloc+0xad/0x100
[11715.653347] [<c0223017>] fb_mmap+0x97/0x170
[11715.653358] [<c0188996>] mmap_region+0x1d6/0x530
[11715.653371] [<c0186a9d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170 [11715.653383]
[<c0188ec3>] do_mmap_pgoff+0x1d3/0x2f0
[11715.653395] [<c01063bd>] sys_mmap2+0xad/0xc0
[11715.653406] [<c0103371>] sysenter_do_call+0x12/0x31
Is this fixed by http://patchwork.kernel.org/patch/3259/ ?
No. It just makes stack a bit more deep :)
[ 408.267429]
======================================================= [
408.267448] [ INFO: possible circular locking dependency detected
] [ 408.267462] 2.6.29-rc3-1avb #14
[ 408.267469]
------------------------------------------------------- [
408.267478] s2disk/5695 is trying to acquire lock:
[ 408.267487] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 408.267544]
[ 408.267546] but task is already holding lock:
[ 408.267553] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.267591]
[ 408.267593] which lock already depends on the new lock.
[ 408.267596]
[ 408.267603]
[ 408.267604] the existing dependency chain (in reverse order)
is: [ 408.267612]
[ 408.267614] -> #3 (&mm->mmap_sem){----}:
[ 408.267628] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267650] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267661] [<c0182117>] might_fault+0x77/0xa0
[ 408.267683] [<c0209916>] copy_to_user+0x36/0x120
[ 408.267699] [<c01a60f7>] filldir+0x97/0xe0
[ 408.267735] [<c01de339>] sysfs_readdir+0x129/0x220
[ 408.267751] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 408.267763] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 408.267775] [<c010344a>] syscall_call+0x7/0xb
[ 408.267787] [<ffffffff>] 0xffffffff
[ 408.267862]
[ 408.267864] -> #2 (sysfs_mutex){--..}:
[ 408.267877] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.267889] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.267899] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.267921] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 408.267933] [<c01dec80>] create_dir+0x40/0x90
[ 408.267944] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 408.267955] [<c02036bc>]
kobject_add_internal+0xbc/0x1b0 [ 408.267984]
[<c0203881>] kobject_add_varg+0x31/0x50 [ 408.267996]
[<c02038fc>] kobject_add+0x2c/0x60 [ 408.268008]
[<c0273448>] device_add+0xa8/0x550 [ 408.268041]
[<c0273902>] device_register+0x12/0x20 [ 408.268053]
[<c02739bb>] device_create_vargs+0xab/0xc0 [ 408.268065]
[<c02739f8>] device_create+0x28/0x30 [ 408.268077]
[<c026cc6d>] register_con_driver+0xed/0x130 [ 408.268090]
[<c026e18b>] take_over_console+0x1b/0x50 [ 408.268102]
[<c023052d>] fbcon_takeover+0x5d/0xb0 [ 408.268125]
[<c02311a0>] fbcon_event_notify+0x820/0x900 [ 408.268137]
[<c030c3b3>] notifier_call_chain+0x53/0xa0 [ 408.268161]
[<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 408.268184] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268197] [<c0222f81>]
fb_notifier_call_chain+0x11/0x20 [ 408.268209]
[<c0223f08>] register_framebuffer+0x168/0x220 [ 408.268223]
[<c0414ba2>] vesafb_probe+0x542/0x783 [ 408.268250]
[<c02765af>] platform_drv_probe+0xf/0x20 [ 408.268269]
[<c02757c7>] driver_probe_device+0x87/0x1b0 [ 408.268281]
[<c0275988>] __device_attach+0x8/0x10 [ 408.268291]
[<c0274e0b>] bus_for_each_drv+0x5b/0x80 [ 408.268308]
[<c0275a36>] device_attach+0x76/0x80 [ 408.268319]
[<c0274c27>] bus_attach_device+0x47/0x70 [ 408.268331]
[<c02736c3>] device_add+0x323/0x550 [ 408.268342]
[<c0276f85>] platform_device_add+0x175/0x1c0 [ 408.268358]
[<c0414e7d>] vesafb_init+0x9a/0x1ec [ 408.268370]
[<c010111a>] do_one_initcall+0x2a/0x160 [ 408.268382]
[<c04004d5>] kernel_init+0x83/0xd5 [ 408.268411]
[<c0103a77>] kernel_thread_helper+0x7/0x10 [ 408.268423]
[<ffffffff>] 0xffffffff
[ 408.268436]
[ 408.268438] -> #1 ((fb_notifier_list).rwsem){----}:
[ 408.268451] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 408.268463] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268474] [<c0308879>] down_read+0x49/0x90
[ 408.268484] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 408.268497] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 408.268509] [<c0222f81>]
fb_notifier_call_chain+0x11/0x20 [ 408.268521]
[<c022459e>] do_fb_ioctl+0x2ae/0x5d0 [ 408.268533]
[<c02248dd>] fb_ioctl+0x1d/0x20
[ 408.268545] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 408.268558] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 408.268570] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 408.268581] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268592] [<ffffffff>] 0xffffffff
[ 408.268623]
[ 408.268625] -> #0 (&fb_info->lock){--..}:
[ 408.268638] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268649] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268661] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268672] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.268684] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.268706] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.268718] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.268729] [<c0103371>] sysenter_do_call+0x12/0x31
[ 408.268740] [<ffffffff>] 0xffffffff
[ 408.268752]
[ 408.268754] other info that might help us debug this:
[ 408.268758]
[ 408.268767] 1 lock held by s2disk/5695:
[ 408.268773] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 408.268792]
[ 408.268794] stack backtrace:
[ 408.268805] Pid: 5695, comm: s2disk Not tainted
2.6.29-rc3-1avb #14 [ 408.268814] Call Trace:
[ 408.268825] [<c0306b68>] ? printk+0x18/0x20
[ 408.268836] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 408.268847] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 408.268862] [<c01487f0>] ? futex_wait+0x170/0x450
[ 408.268881] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 408.268894] [<c0309a45>] ? _spin_unlock_irqrestore+0x35/0x60
[ 408.268906] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 408.268917] [<c01458fc>] lock_acquire+0x5c/0x80
[ 408.268928] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268939] [<c0307f3a>] mutex_lock_nested+0xba/0x2f0
[ 408.268950] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268961] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 408.268987] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 408.268999] [<c02235e7>] fb_mmap+0x97/0x170
[ 408.269010] [<c0188c76>] mmap_region+0x1d6/0x530
[ 408.269023] [<c0186d7d>] ?
arch_get_unmapped_area_topdown+0x10d/0x170
[ 408.269035] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 408.269047] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 408.269058] [<c0103371>] sysenter_do_call+0x12/0x31
Anyway, looking at this trace in detail, it seems that in the
fbcon notifier the FB_EVENT_SET_CONSOLE_MAP handler doesn't use
fb_info at all.
So, just for this particular case, we could unlock fb_info->lock
before calling the routine that might acquire mm->mmap_sem, and
avoid the circular locking dependency.
Any chance to do a test with the following patch?
Step by step ... :)
With both patches applied:
[ 113.949848]
======================================================= [
113.950054] [ INFO: possible circular locking dependency detected ]
[ 113.950054] 2.6.29-rc3-1avb #16
[ 113.950054]
------------------------------------------------------- [
113.950054] s2disk/4168 is trying to acquire lock:
[ 113.950054] (&fb_info->lock){--..}, at: [<c0230c56>]
fbcon_event_notify+0x2d6/0x950
[ 113.950054]
[ 113.950054] but task is already holding lock:
[ 113.950054] ((fb_notifier_list).rwsem){----}, at: [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] which lock already depends on the new lock.
[ 113.950054]
[ 113.950054]
[ 113.950054] the existing dependency chain (in reverse order) is:
[ 113.950054]
[ 113.950054] -> #1 ((fb_notifier_list).rwsem){----}:
[ 113.950054] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c03088c9>] down_read+0x49/0x90
[ 113.950054] [<c0138a9a>]
__blocking_notifier_call_chain+0x2a/0x60 [ 113.950054]
[<c0138aea>] blocking_notifier_call_chain+0x1a/0x20 [ 113.950054]
[<c0222f81>] fb_notifier_call_chain+0x11/0x20 [ 113.950054]
[<c022459e>] do_fb_ioctl+0x2ae/0x5d0 [ 113.950054]
[<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] -> #0 (&fb_info->lock){--..}:
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c030c403>] notifier_call_chain+0x53/0xa0
[ 113.950054] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60 [ 113.950054]
[<c0138aea>] blocking_notifier_call_chain+0x1a/0x20 [ 113.950054]
[<c0222f81>] fb_notifier_call_chain+0x11/0x20 [ 113.950054]
[<c02246ca>] do_fb_ioctl+0x3da/0x5d0 [ 113.950054]
[<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 113.950054] [<ffffffff>] 0xffffffff
[ 113.950054]
[ 113.950054] other info that might help us debug this:
[ 113.950054]
[ 113.950054] 1 lock held by s2disk/4168:
[ 113.950054] #0: ((fb_notifier_list).rwsem){----}, at:
[<c0138a9a>] __blocking_notifier_call_chain+0x2a/0x60
[ 113.950054]
[ 113.950054] stack backtrace:
[ 113.950054] Pid: 4168, comm: s2disk Not tainted 2.6.29-rc3-1avb
#16 [ 113.950054] Call Trace:
[ 113.950054] [<c0306bb8>] ? printk+0x18/0x20
[ 113.950054] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 113.950054] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c0143992>] ? check_noncircular+0x92/0x150
[ 113.950054] [<c01463ce>] ? lock_release_non_nested+0x16e/0x2a0
[ 113.950054] [<c0138a9a>] ?
__blocking_notifier_call_chain+0x2a/0x60 [ 113.950054]
[<c01458fc>] lock_acquire+0x5c/0x80
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0307f8a>] mutex_lock_nested+0xba/0x2f0
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] ? fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c0230c56>] fbcon_event_notify+0x2d6/0x950
[ 113.950054] [<c010b9ab>] ? save_stack_trace+0x2b/0x50
[ 113.950054] [<c014185c>] ? save_trace+0x3c/0xa0
[ 113.950054] [<c01418fd>] ? add_lock_to_list+0x3d/0xb0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c0138a9a>] ?
__blocking_notifier_call_chain+0x2a/0x60 [ 113.950054]
[<c030c403>] notifier_call_chain+0x53/0xa0 [ 113.950054]
[<c03088e5>] ? down_read+0x65/0x90
[ 113.950054] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60 [ 113.950054]
[<c0138aea>] blocking_notifier_call_chain+0x1a/0x20 [ 113.950054]
[<c0222f81>] fb_notifier_call_chain+0x11/0x20 [ 113.950054]
[<c02246ca>] do_fb_ioctl+0x3da/0x5d0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 113.950054] [<c01462fd>] ? lock_release_non_nested+0x9d/0x2a0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0182131>] ? might_fault+0x91/0xa0
[ 113.950054] [<c01820e6>] ? might_fault+0x46/0xa0
[ 113.950054] [<c0209916>] ? copy_to_user+0x36/0x120
[ 113.950054] [<c02248c0>] ? fb_ioctl+0x0/0x20
[ 113.950054] [<c02248dd>] fb_ioctl+0x1d/0x20
[ 113.950054] [<c01a54b0>] vfs_ioctl+0x20/0x80
[ 113.950054] [<c01a56c2>] do_vfs_ioctl+0x72/0x570
[ 113.950054] [<c019c762>] ? sys_fstat64+0x22/0x30
[ 113.950054] [<c01a2180>] ? __link_path_walk+0x240/0xd40
[ 113.950054] [<c010339f>] ? sysenter_exit+0xf/0x16
[ 113.950054] [<c01a5bf9>] sys_ioctl+0x39/0x70
[ 113.950054] [<c0103371>] sysenter_do_call+0x12/0x31
[ 117.846986] Syncing filesystems ... done.
In case it helps - suspend to RAM does not exhibit this issue.
Another attempt... ignore the previous patch
Actually it was om top of previous patch
and try to apply this
one on top of "fbmem: copy_from/to_user() with mutex held (v3)".
Thanks a lot for the tests!
I hope you do not think I'm doing this on purpose? :)
[ 241.668005] =======================================================
[ 241.668044] [ INFO: possible circular locking dependency detected ]
[ 241.668068] 2.6.29-rc3-1avb #17
[ 241.668080] -------------------------------------------------------
[ 241.668100] s2disk/4219 is trying to acquire lock:
[ 241.668118] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 241.668188]
[ 241.668190] but task is already holding lock:
[ 241.668207] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.668256]
[ 241.668258] which lock already depends on the new lock.
[ 241.668262]
[ 241.668282]
[ 241.668284] the existing dependency chain (in reverse order) is:
[ 241.668305]
[ 241.668307] -> #2 (&mm->mmap_sem){----}:
[ 241.668331] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668362] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668382] [<c0182117>] might_fault+0x77/0xa0
[ 241.668413] [<c0209916>] copy_to_user+0x36/0x120
[ 241.668439] [<c01a60f7>] filldir+0x97/0xe0
[ 241.668482] [<c01de339>] sysfs_readdir+0x129/0x220
[ 241.668508] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 241.668529] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 241.668549] [<c010344a>] syscall_call+0x7/0xb
[ 241.668570] [<ffffffff>] 0xffffffff
[ 241.668650]
[ 241.668653] -> #1 (sysfs_mutex){--..}:
[ 241.668676] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668698] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668718] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.668749] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 241.668771] [<c01dec80>] create_dir+0x40/0x90
[ 241.668792] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 241.668812] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 241.668853] [<c0203881>] kobject_add_varg+0x31/0x50
[ 241.668874] [<c02038fc>] kobject_add+0x2c/0x60
[ 241.668895] [<c0273718>] device_add+0xa8/0x550
[ 241.668938] [<c0273bd2>] device_register+0x12/0x20
[ 241.668960] [<c0273c8b>] device_create_vargs+0xab/0xc0
[ 241.668982] [<c0273cc8>] device_create+0x28/0x30
[ 241.669003] [<c026cf3d>] register_con_driver+0xed/0x130
[ 241.669027] [<c026e45b>] take_over_console+0x1b/0x50
[ 241.669049] [<c02304dd>] fbcon_takeover+0x5d/0xb0
[ 241.669081] [<c0231457>] fbcon_event_notify+0xb27/0xc20
[ 241.669104] [<c030c683>] notifier_call_chain+0x53/0xa0
[ 241.669138] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 241.669218] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 241.669246] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 241.669276] [<c0223f08>] register_framebuffer+0x168/0x220
[ 241.669305] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 241.669347] [<c027687f>] platform_drv_probe+0xf/0x20
[ 241.669378] [<c0275a97>] driver_probe_device+0x87/0x1b0
[ 241.669404] [<c0275c58>] __device_attach+0x8/0x10
[ 241.669429] [<c02750db>] bus_for_each_drv+0x5b/0x80
[ 241.669460] [<c0275d06>] device_attach+0x76/0x80
[ 241.669484] [<c0274ef7>] bus_attach_device+0x47/0x70
[ 241.669511] [<c0273993>] device_add+0x323/0x550
[ 241.669536] [<c0277255>] platform_device_add+0x175/0x1c0
[ 241.669567] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 241.669592] [<c010111a>] do_one_initcall+0x2a/0x160
[ 241.669619] [<c04004d5>] kernel_init+0x83/0xd5
[ 241.669661] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 241.669688] [<ffffffff>] 0xffffffff
[ 241.669737]
[ 241.669739] -> #0 (&fb_info->lock){--..}:
[ 241.669770] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.669797] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.669821] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.669847] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.669872] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.669908] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.669934] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.669959] [<c0103371>] sysenter_do_call+0x12/0x31
[ 241.669984] [<ffffffff>] 0xffffffff
[ 241.670009]
[ 241.670012] other info that might help us debug this:
[ 241.670015]
[ 241.670049] 1 lock held by s2disk/4219:
[ 241.670065] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.670092]
[ 241.670092] stack backtrace:
[ 241.670092] Pid: 4219, comm: s2disk Not tainted 2.6.29-rc3-1avb #17
[ 241.670092] Call Trace:
[ 241.670092] [<c0306e38>] ? printk+0x18/0x20
[ 241.670092] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 241.670092] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.670092] [<c01487f0>] ? futex_wait+0x170/0x450
[ 241.670092] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 241.670092] [<c0309d15>] ? _spin_unlock_irqrestore+0x35/0x60
[ 241.670092] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 241.670092] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 241.670092] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.670092] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.670092] [<c0186cfd>] ? arch_get_unmapped_area_topdown+0x8d/0x170
[ 241.670092] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.670092] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.670092] [<c0103371>] sysenter_do_call+0x12/0x31
[ 244.217754] Syncing filesystems ... done.
[ 244.228175] Freezing user space processes ... (elapsed 0.00 seconds)
done.
quoted hunk -Andrea
---
fbmem: fix circular locking dependency pushing down fb_info->lock
Push down fb_info->lock into each framebuffer notifier callback to
avoid a circular locking dependency between fb_info->lock and
fb_notifier_list->rwsem.
Reported-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 ++
drivers/video/backlight/lcd.c | 3 ++
drivers/video/console/fbcon.c | 62
+++++++++++++++++++++++++++++++---- drivers/video/fbmem.c
| 7 ----
4 files changed, 61 insertions(+), 14 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 157057c..dd37cbc 100644 --- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self, return 0;
bd = container_of(self, struct backlight_device, fb_notif);
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&bd->ops_lock);
if (bd->ops)
if (!bd->ops->check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self, backlight_update_status(bd);
}
mutex_unlock(&bd->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index b644947..0bb13df 100644 --- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops)
return 0;
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&ld->ops_lock);
if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
if (event == FB_EVENT_BLANK) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self, }
}
mutex_unlock(&ld->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 81fc2f7..7bc2a26 100644 --- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -3144,57 +3144,105 @@ static int fbcon_event_notify(struct notifier_block *self,
switch(action) {
case FB_EVENT_SUSPEND:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_suspended(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_RESUME:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_resumed(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_modechanged(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE_ALL:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_set_all_vcs(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_DELETE:
mode = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_mode_deleted(info, mode);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_UNBIND:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_fb_unbind(info->node);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_REGISTERED:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_fb_registered(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_UNREGISTERED:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_fb_unregistered(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_SET_CONSOLE_MAP:
- /*
- * XXX: info is not used here, we can unlock it to avoid
- * circular locking with ¤t->mm->mmap_sem in fb_mmap().
- */
- unlock_fb_info(info);
con2fb = event->data;
ret = set_con2fb_map(con2fb->console - 1,
con2fb->framebuffer, 1);
- lock_fb_info(info);
break;
case FB_EVENT_GET_CONSOLE_MAP:
con2fb = event->data;
con2fb->framebuffer = con2fb_map[con2fb->console - 1];
break;
case FB_EVENT_BLANK:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_fb_blanked(info, *(int *)event->data);
+ unlock_fb_info(info);
break;
case FB_EVENT_NEW_MODELIST:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_new_modelist(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_GET_REQ:
caps = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_get_requirement(info, caps);
+ unlock_fb_info(info);
break;
}
-
done:
return ret;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..5cdee72 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,12 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, return -EINVAL;
con2fb.framebuffer = -1;
event.data = &con2fb;
-
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event);
- unlock_fb_info(info);
ret = copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
break; @@ -1109,12 +1105,9 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, break;
}
event.data = &con2fb;
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP,
&event);
- unlock_fb_info(info);
break;
case FBIOBLANK:
if (!lock_fb_info(info))
On 2009-02-02 18:36, Andrey Borzenkov wrote: I hope you do not think I'm doing this on purpose? :)
LOL!
Don't worry, we'll be able to fix it before linux 3.0.0 (maybe).
[ 241.668005] =======================================================
[ 241.668044] [ INFO: possible circular locking dependency detected ]
[ 241.668068] 2.6.29-rc3-1avb #17
[ 241.668080] -------------------------------------------------------
[ 241.668100] s2disk/4219 is trying to acquire lock:
[ 241.668118] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 241.668188]
[ 241.668190] but task is already holding lock:
[ 241.668207] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.668256]
[ 241.668258] which lock already depends on the new lock.
[ 241.668262]
[ 241.668282]
[ 241.668284] the existing dependency chain (in reverse order) is:
[ 241.668305]
[ 241.668307] -> #2 (&mm->mmap_sem){----}:
[ 241.668331] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668362] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668382] [<c0182117>] might_fault+0x77/0xa0
[ 241.668413] [<c0209916>] copy_to_user+0x36/0x120
[ 241.668439] [<c01a60f7>] filldir+0x97/0xe0
[ 241.668482] [<c01de339>] sysfs_readdir+0x129/0x220
[ 241.668508] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 241.668529] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 241.668549] [<c010344a>] syscall_call+0x7/0xb
[ 241.668570] [<ffffffff>] 0xffffffff
[ 241.668650]
[ 241.668653] -> #1 (sysfs_mutex){--..}:
[ 241.668676] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668698] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668718] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.668749] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 241.668771] [<c01dec80>] create_dir+0x40/0x90
[ 241.668792] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 241.668812] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 241.668853] [<c0203881>] kobject_add_varg+0x31/0x50
[ 241.668874] [<c02038fc>] kobject_add+0x2c/0x60
[ 241.668895] [<c0273718>] device_add+0xa8/0x550
[ 241.668938] [<c0273bd2>] device_register+0x12/0x20
[ 241.668960] [<c0273c8b>] device_create_vargs+0xab/0xc0
[ 241.668982] [<c0273cc8>] device_create+0x28/0x30
[ 241.669003] [<c026cf3d>] register_con_driver+0xed/0x130
[ 241.669027] [<c026e45b>] take_over_console+0x1b/0x50
[ 241.669049] [<c02304dd>] fbcon_takeover+0x5d/0xb0
[ 241.669081] [<c0231457>] fbcon_event_notify+0xb27/0xc20
[ 241.669104] [<c030c683>] notifier_call_chain+0x53/0xa0
[ 241.669138] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 241.669218] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 241.669246] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 241.669276] [<c0223f08>] register_framebuffer+0x168/0x220
[ 241.669305] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 241.669347] [<c027687f>] platform_drv_probe+0xf/0x20
[ 241.669378] [<c0275a97>] driver_probe_device+0x87/0x1b0
[ 241.669404] [<c0275c58>] __device_attach+0x8/0x10
[ 241.669429] [<c02750db>] bus_for_each_drv+0x5b/0x80
[ 241.669460] [<c0275d06>] device_attach+0x76/0x80
[ 241.669484] [<c0274ef7>] bus_attach_device+0x47/0x70
[ 241.669511] [<c0273993>] device_add+0x323/0x550
[ 241.669536] [<c0277255>] platform_device_add+0x175/0x1c0
[ 241.669567] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 241.669592] [<c010111a>] do_one_initcall+0x2a/0x160
[ 241.669619] [<c04004d5>] kernel_init+0x83/0xd5
[ 241.669661] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 241.669688] [<ffffffff>] 0xffffffff
[ 241.669737]
[ 241.669739] -> #0 (&fb_info->lock){--..}:
[ 241.669770] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.669797] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.669821] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.669847] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.669872] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.669908] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.669934] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.669959] [<c0103371>] sysenter_do_call+0x12/0x31
[ 241.669984] [<ffffffff>] 0xffffffff
[ 241.670009]
[ 241.670012] other info that might help us debug this:
[ 241.670015]
[ 241.670049] 1 lock held by s2disk/4219:
[ 241.670065] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.670092]
[ 241.670092] stack backtrace:
[ 241.670092] Pid: 4219, comm: s2disk Not tainted 2.6.29-rc3-1avb #17
[ 241.670092] Call Trace:
[ 241.670092] [<c0306e38>] ? printk+0x18/0x20
[ 241.670092] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 241.670092] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.670092] [<c01487f0>] ? futex_wait+0x170/0x450
[ 241.670092] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 241.670092] [<c0309d15>] ? _spin_unlock_irqrestore+0x35/0x60
[ 241.670092] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 241.670092] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 241.670092] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.670092] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.670092] [<c0186cfd>] ? arch_get_unmapped_area_topdown+0x8d/0x170
[ 241.670092] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.670092] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.670092] [<c0103371>] sysenter_do_call+0x12/0x31
[ 244.217754] Syncing filesystems ... done.
[ 244.228175] Freezing user space processes ... (elapsed 0.00 seconds)
done.
OK, another patch. This one is a cumulative patch against the latest
Linus' git.
Thanks again!
-Andrea
---
fbmem: fix circular locking dependency between fb_info->lock and mm->mmap_sem
Avoid calling copy_from/to_user() with fb_info->lock mutex held in the
framebuffer's ioctl().
fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
deadlock.
Also fix other potential circular locking dependencies (always between
fb_info->lock and mm->mmap_sem) in fbcon that occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held.
NOTE: it doesn't push down the fb_info->lock in each own driver's
specific fb_ioctl() implementation, so there are still some potential
deadlocks elsewhere.
CC: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73 +++++++++++++++++---
drivers/video/fbcmap.c | 20 ++++--
drivers/video/fbmem.c | 128 +++++++++++++++++------------------
include/linux/fb.h | 15 ++++
6 files changed, 160 insertions(+), 82 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 157057c..dd37cbc 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self,
return 0 ;
bd = container_of ( self , struct backlight_device , fb_notif );
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & bd -> ops_lock );
if ( bd -> ops )
if ( ! bd -> ops -> check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self,
backlight_update_status ( bd );
}
mutex_unlock ( & bd -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index b644947..0bb13df 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self,
if ( ! ld -> ops )
return 0 ;
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & ld -> ops_lock );
if ( ! ld -> ops -> check_fb || ld -> ops -> check_fb ( ld , evdata -> info )) {
if ( event == FB_EVENT_BLANK ) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self,
}
}
mutex_unlock ( & ld -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1657b96..2cd500a 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info)
}
}
- if ( ! num_registered_fb )
- unregister_con_driver ( & fb_con );
-
-
if ( primary_device == idx )
primary_device = -1 ;
+ unlock_fb_info ( info );
+
+ if ( ! num_registered_fb )
+ unregister_con_driver ( & fb_con );
+
return 0 ;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered ( struct fb_info * info )
{
- int ret = 0 , i , idx = info -> node ;
+ int ret = 0 , i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
fbcon_select_primary ( info );
+ unlock_fb_info ( info );
if ( info_idx == -1 ) {
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info,
}
}
- static int fbcon_event_notify ( struct notifier_block * self ,
+ static int fbcon_event_notify ( struct notifier_block * self ,
unsigned long action , void * data )
{
struct fb_event * event = data ; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self,
struct fb_videomode * mode ;
struct fb_con2fbmap * con2fb ;
struct fb_blit_caps * caps ;
- int ret = 0 ;
+ int idx , ret = 0 ;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch ( action ) {
case FB_EVENT_SUSPEND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_suspended ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_RESUME :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_resumed ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_modechanged ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE_ALL :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_set_all_vcs ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_DELETE :
mode = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_mode_deleted ( info , mode );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNBIND :
- ret = fbcon_fb_unbind ( info -> node );
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
+ idx = info -> node ;
+ unlock_fb_info ( info );
+ ret = fbcon_fb_unbind ( idx );
break ;
case FB_EVENT_FB_REGISTERED :
ret = fbcon_fb_registered ( info ); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self,
con2fb -> framebuffer = con2fb_map [ con2fb -> console - 1 ];
break ;
case FB_EVENT_BLANK :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_fb_blanked ( info , * ( int * ) event -> data );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_NEW_MODELIST :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_new_modelist ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_GET_REQ :
caps = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_get_requirement ( info , caps );
+ unlock_fb_info ( info );
break ;
}
-
done :
return ret ;
} diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
index 91b78e6..f53b9f1 100644
--- a/drivers/video/fbcmap.c
+++ b/drivers/video/fbcmap.c @@ -250,10 +250,6 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
int rc , size = cmap -> len * sizeof ( u16 );
struct fb_cmap umap ;
- if ( cmap -> start < 0 || ( ! info -> fbops -> fb_setcolreg &&
- ! info -> fbops -> fb_setcmap ))
- return - EINVAL ;
-
memset ( & umap , 0 , sizeof ( struct fb_cmap ));
rc = fb_alloc_cmap ( & umap , cmap -> len , cmap -> transp != NULL );
if ( rc ) @@ -262,11 +258,23 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
copy_from_user ( umap . green , cmap -> green , size ) ||
copy_from_user ( umap . blue , cmap -> blue , size ) ||
( cmap -> transp && copy_from_user ( umap . transp , cmap -> transp , size ))) {
- fb_dealloc_cmap ( & umap );
- return - EFAULT ;
+ rc = - EFAULT ;
+ goto out ;
}
umap . start = cmap -> start ;
+ if ( ! lock_fb_info ( info )) {
+ rc = - ENODEV ;
+ goto out ;
+ }
+ if ( cmap -> start < 0 || ( ! info -> fbops -> fb_setcolreg &&
+ ! info -> fbops -> fb_setcmap )) {
+ rc = - EINVAL ;
+ goto out1 ;
+ }
rc = fb_set_cmap ( & umap , info );
+ out1 :
+ unlock_fb_info ( info );
+ out :
fb_dealloc_cmap ( & umap );
return rc ;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 756efeb..5cdee72 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1013,132 +1013,132 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
struct fb_var_screeninfo var ;
struct fb_fix_screeninfo fix ;
struct fb_con2fbmap con2fb ;
+ struct fb_cmap cmap_from ;
struct fb_cmap_user cmap ;
struct fb_event event ;
void __user * argp = ( void __user * ) arg ;
long ret = 0 ;
- fb = info -> fbops ;
- if ( ! fb )
- return - ENODEV ;
-
switch ( cmd ) {
case FBIOGET_VSCREENINFO :
- ret = copy_to_user ( argp , & info -> var ,
- sizeof ( var )) ? - EFAULT : 0 ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ var = info -> var ;
+ unlock_fb_info ( info );
+
+ ret = copy_to_user ( argp , & var , sizeof ( var )) ? - EFAULT : 0 ;
break ;
case FBIOPUT_VSCREENINFO :
- if ( copy_from_user ( & var , argp , sizeof ( var ))) {
- ret = - EFAULT ;
- break ;
- }
+ if ( copy_from_user ( & var , argp , sizeof ( var )))
+ return - EFAULT ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
acquire_console_sem ();
info -> flags |= FBINFO_MISC_USEREVENT ;
ret = fb_set_var ( info , & var );
info -> flags &= ~ FBINFO_MISC_USEREVENT ;
release_console_sem ();
- if ( ret == 0 && copy_to_user ( argp , & var , sizeof ( var )))
+ unlock_fb_info ( info );
+ if ( ! ret && copy_to_user ( argp , & var , sizeof ( var )))
ret = - EFAULT ;
break ;
case FBIOGET_FSCREENINFO :
- ret = copy_to_user ( argp , & info -> fix ,
- sizeof ( fix )) ? - EFAULT : 0 ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ fix = info -> fix ;
+ unlock_fb_info ( info );
+
+ ret = copy_to_user ( argp , & fix , sizeof ( fix )) ? - EFAULT : 0 ;
break ;
case FBIOPUTCMAP :
if ( copy_from_user ( & cmap , argp , sizeof ( cmap )))
- ret = - EFAULT ;
- else
- ret = fb_set_user_cmap ( & cmap , info );
+ return - EFAULT ;
+ ret = fb_set_user_cmap ( & cmap , info );
break ;
case FBIOGETCMAP :
if ( copy_from_user ( & cmap , argp , sizeof ( cmap )))
- ret = - EFAULT ;
- else
- ret = fb_cmap_to_user ( & info -> cmap , & cmap );
+ return - EFAULT ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ cmap_from = info -> cmap ;
+ unlock_fb_info ( info );
+ ret = fb_cmap_to_user ( & cmap_from , & cmap );
break ;
case FBIOPAN_DISPLAY :
- if ( copy_from_user ( & var , argp , sizeof ( var ))) {
- ret = - EFAULT ;
- break ;
- }
+ if ( copy_from_user ( & var , argp , sizeof ( var )))
+ return - EFAULT ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
acquire_console_sem ();
ret = fb_pan_display ( info , & var );
release_console_sem ();
+ unlock_fb_info ( info );
if ( ret == 0 && copy_to_user ( argp , & var , sizeof ( var )))
- ret = - EFAULT ;
+ return - EFAULT ;
break ;
case FBIO_CURSOR :
ret = - EINVAL ;
break ;
case FBIOGET_CON2FBMAP :
if ( copy_from_user ( & con2fb , argp , sizeof ( con2fb )))
- ret = - EFAULT ;
- else if ( con2fb . console < 1 || con2fb . console > MAX_NR_CONSOLES )
- ret = - EINVAL ;
- else {
- con2fb . framebuffer = -1 ;
- event . info = info ;
- event . data = & con2fb ;
- fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP ,
- & event );
- ret = copy_to_user ( argp , & con2fb ,
- sizeof ( con2fb )) ? - EFAULT : 0 ;
- }
+ return - EFAULT ;
+ if ( con2fb . console < 1 || con2fb . console > MAX_NR_CONSOLES )
+ return - EINVAL ;
+ con2fb . framebuffer = -1 ;
+ event . data = & con2fb ;
+ event . info = info ;
+ fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP , & event );
+
+ ret = copy_to_user ( argp , & con2fb , sizeof ( con2fb )) ? - EFAULT : 0 ;
break ;
case FBIOPUT_CON2FBMAP :
- if ( copy_from_user ( & con2fb , argp , sizeof ( con2fb ))) {
- ret = - EFAULT ;
- break ;
- }
- if ( con2fb . console < 1 || con2fb . console > MAX_NR_CONSOLES ) {
- ret = - EINVAL ;
- break ;
- }
- if ( con2fb . framebuffer < 0 || con2fb . framebuffer >= FB_MAX ) {
- ret = - EINVAL ;
- break ;
- }
+ if ( copy_from_user ( & con2fb , argp , sizeof ( con2fb )))
+ return - EFAULT ;
+ if ( con2fb . console < 1 || con2fb . console > MAX_NR_CONSOLES )
+ return - EINVAL ;
+ if ( con2fb . framebuffer < 0 || con2fb . framebuffer >= FB_MAX )
+ return - EINVAL ;
if ( ! registered_fb [ con2fb . framebuffer ])
request_module ( "fb%d" , con2fb . framebuffer );
if ( ! registered_fb [ con2fb . framebuffer ]) {
ret = - EINVAL ;
break ;
}
- event . info = info ;
event . data = & con2fb ;
+ event . info = info ;
ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP ,
& event );
break ;
case FBIOBLANK :
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
acquire_console_sem ();
info -> flags |= FBINFO_MISC_USEREVENT ;
ret = fb_blank ( info , arg );
info -> flags &= ~ FBINFO_MISC_USEREVENT ;
release_console_sem ();
- break ;;
+ unlock_fb_info ( info );
+ break ;
default :
- if ( fb -> fb_ioctl == NULL )
- ret = - ENOTTY ;
- else
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ fb = info -> fbops ;
+ if ( fb -> fb_ioctl )
ret = fb -> fb_ioctl ( info , cmd , arg );
+ else
+ ret = - ENOTTY ;
+ unlock_fb_info ( info );
}
return ret ;
}
static long fb_ioctl ( struct file * file , unsigned int cmd , unsigned long arg )
- __acquires ( & info -> lock )
- __releases ( & info -> lock )
{
struct inode * inode = file -> f_path . dentry -> d_inode ;
int fbidx = iminor ( inode );
- struct fb_info * info ;
- long ret ;
+ struct fb_info * info = registered_fb [ fbidx ];
- info = registered_fb [ fbidx ];
- mutex_lock ( & info -> lock );
- ret = do_fb_ioctl ( info , cmd , arg );
- mutex_unlock ( & info -> lock );
- return ret ;
+ return do_fb_ioctl ( info , cmd , arg );
}
#ifdef CONFIG_COMPAT @@ -1257,8 +1257,6 @@ static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd,
static long fb_compat_ioctl ( struct file * file , unsigned int cmd ,
unsigned long arg )
- __acquires ( & info -> lock )
- __releases ( & info -> lock )
{
struct inode * inode = file -> f_path . dentry -> d_inode ;
int fbidx = iminor ( inode ); @@ -1266,7 +1264,6 @@ __releases(&info->lock)
struct fb_ops * fb = info -> fbops ;
long ret = - ENOIOCTLCMD ;
- mutex_lock ( & info -> lock );
switch ( cmd ) {
case FBIOGET_VSCREENINFO :
case FBIOPUT_VSCREENINFO : @@ -1292,7 +1289,6 @@ __releases(&info->lock)
ret = fb -> fb_compat_ioctl ( info , cmd , arg );
break ;
}
- mutex_unlock ( & info -> lock );
return ret ;
}
#endif diff --git a/include/linux/fb.h b/include/linux/fb.h
index 818fe21..31527e1 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h @@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX];
extern int num_registered_fb ;
extern struct class * fb_class ;
+ static inline int lock_fb_info ( struct fb_info * info )
+ {
+ mutex_lock ( & info -> lock );
+ if ( ! info -> fbops ) {
+ mutex_unlock ( & info -> lock );
+ return 0 ;
+ }
+ return 1 ;
+ }
+
+ static inline void unlock_fb_info ( struct fb_info * info )
+ {
+ mutex_unlock ( & info -> lock );
+ }
+
static inline void __fb_pad_aligned_buffer ( u8 * dst , u32 d_pitch ,
u8 * src , u32 s_pitch , u32 height )
{
On 3 of February 2009 13:09:38 Andrea Righi wrote: On 2009-02-02 18:36, Andrey Borzenkov wrote: quoted I hope you do not think I'm doing this on purpose? :)
LOL!
Don't worry, we'll be able to fix it before linux 3.0.0 (maybe).
My be earlier.
Tested-by: Andrey Borzenkov <redacted>
This bug causes text mode corruption sometimes so patch should
definitely go into 2.6.29.
quoted hunk quoted [ 241.668005]
======================================================= [
241.668044] [ INFO: possible circular locking dependency detected ]
[ 241.668068] 2.6.29-rc3-1avb #17
[ 241.668080]
------------------------------------------------------- [
241.668100] s2disk/4219 is trying to acquire lock:
[ 241.668118] (&fb_info->lock){--..}, at: [<c02235e7>]
fb_mmap+0x97/0x170
[ 241.668188]
[ 241.668190] but task is already holding lock:
[ 241.668207] (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.668256]
[ 241.668258] which lock already depends on the new lock.
[ 241.668262]
[ 241.668282]
[ 241.668284] the existing dependency chain (in reverse order) is:
[ 241.668305]
[ 241.668307] -> #2 (&mm->mmap_sem){----}:
[ 241.668331] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668362] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668382] [<c0182117>] might_fault+0x77/0xa0
[ 241.668413] [<c0209916>] copy_to_user+0x36/0x120
[ 241.668439] [<c01a60f7>] filldir+0x97/0xe0
[ 241.668482] [<c01de339>] sysfs_readdir+0x129/0x220
[ 241.668508] [<c01a62a6>] vfs_readdir+0x86/0xa0
[ 241.668529] [<c01a63e8>] sys_getdents+0x68/0xc0
[ 241.668549] [<c010344a>] syscall_call+0x7/0xb
[ 241.668570] [<ffffffff>] 0xffffffff
[ 241.668650]
[ 241.668653] -> #1 (sysfs_mutex){--..}:
[ 241.668676] [<c014520f>] __lock_acquire+0x129f/0x1930
[ 241.668698] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.668718] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.668749] [<c01de6cc>] sysfs_addrm_start+0x2c/0xc0
[ 241.668771] [<c01dec80>] create_dir+0x40/0x90
[ 241.668792] [<c01decfb>] sysfs_create_dir+0x2b/0x50
[ 241.668812] [<c02036bc>] kobject_add_internal+0xbc/0x1b0
[ 241.668853] [<c0203881>] kobject_add_varg+0x31/0x50
[ 241.668874] [<c02038fc>] kobject_add+0x2c/0x60
[ 241.668895] [<c0273718>] device_add+0xa8/0x550
[ 241.668938] [<c0273bd2>] device_register+0x12/0x20
[ 241.668960] [<c0273c8b>] device_create_vargs+0xab/0xc0
[ 241.668982] [<c0273cc8>] device_create+0x28/0x30
[ 241.669003] [<c026cf3d>] register_con_driver+0xed/0x130
[ 241.669027] [<c026e45b>] take_over_console+0x1b/0x50
[ 241.669049] [<c02304dd>] fbcon_takeover+0x5d/0xb0
[ 241.669081] [<c0231457>] fbcon_event_notify+0xb27/0xc20
[ 241.669104] [<c030c683>] notifier_call_chain+0x53/0xa0
[ 241.669138] [<c0138ab4>]
__blocking_notifier_call_chain+0x44/0x60
[ 241.669218] [<c0138aea>]
blocking_notifier_call_chain+0x1a/0x20
[ 241.669246] [<c0222f81>] fb_notifier_call_chain+0x11/0x20
[ 241.669276] [<c0223f08>] register_framebuffer+0x168/0x220
[ 241.669305] [<c0414ba2>] vesafb_probe+0x542/0x783
[ 241.669347] [<c027687f>] platform_drv_probe+0xf/0x20
[ 241.669378] [<c0275a97>] driver_probe_device+0x87/0x1b0
[ 241.669404] [<c0275c58>] __device_attach+0x8/0x10
[ 241.669429] [<c02750db>] bus_for_each_drv+0x5b/0x80
[ 241.669460] [<c0275d06>] device_attach+0x76/0x80
[ 241.669484] [<c0274ef7>] bus_attach_device+0x47/0x70
[ 241.669511] [<c0273993>] device_add+0x323/0x550
[ 241.669536] [<c0277255>] platform_device_add+0x175/0x1c0
[ 241.669567] [<c0414e7d>] vesafb_init+0x9a/0x1ec
[ 241.669592] [<c010111a>] do_one_initcall+0x2a/0x160
[ 241.669619] [<c04004d5>] kernel_init+0x83/0xd5
[ 241.669661] [<c0103a77>] kernel_thread_helper+0x7/0x10
[ 241.669688] [<ffffffff>] 0xffffffff
[ 241.669737]
[ 241.669739] -> #0 (&fb_info->lock){--..}:
[ 241.669770] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.669797] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.669821] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.669847] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.669872] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.669908] [<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.669934] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.669959] [<c0103371>] sysenter_do_call+0x12/0x31
[ 241.669984] [<ffffffff>] 0xffffffff
[ 241.670009]
[ 241.670012] other info that might help us debug this:
[ 241.670015]
[ 241.670049] 1 lock held by s2disk/4219:
[ 241.670065] #0: (&mm->mmap_sem){----}, at: [<c010639e>]
sys_mmap2+0x8e/0xc0
[ 241.670092]
[ 241.670092] stack backtrace:
[ 241.670092] Pid: 4219, comm: s2disk Not tainted 2.6.29-rc3-1avb
#17 [ 241.670092] Call Trace:
[ 241.670092] [<c0306e38>] ? printk+0x18/0x20
[ 241.670092] [<c0143b1f>] print_circular_bug_tail+0xcf/0xe0
[ 241.670092] [<c014537c>] __lock_acquire+0x140c/0x1930
[ 241.670092] [<c01487f0>] ? futex_wait+0x170/0x450
[ 241.670092] [<c011826c>] ? try_to_wake_up+0x10c/0x120
[ 241.670092] [<c0309d15>] ? _spin_unlock_irqrestore+0x35/0x60
[ 241.670092] [<c0141105>] ? lock_release_holdtime+0x35/0x210
[ 241.670092] [<c01458fc>] lock_acquire+0x5c/0x80
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c030820a>] mutex_lock_nested+0xba/0x2f0
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c02235e7>] ? fb_mmap+0x97/0x170
[ 241.670092] [<c019542d>] ? kmem_cache_alloc+0xad/0x100
[ 241.670092] [<c02235e7>] fb_mmap+0x97/0x170
[ 241.670092] [<c0188c76>] mmap_region+0x1d6/0x530
[ 241.670092] [<c0186cfd>] ?
arch_get_unmapped_area_topdown+0x8d/0x170 [ 241.670092]
[<c01891a3>] do_mmap_pgoff+0x1d3/0x2f0
[ 241.670092] [<c01063bd>] sys_mmap2+0xad/0xc0
[ 241.670092] [<c0103371>] sysenter_do_call+0x12/0x31
[ 244.217754] Syncing filesystems ... done.
[ 244.228175] Freezing user space processes ... (elapsed 0.00
seconds) done.
OK, another patch. This one is a cumulative patch against the latest
Linus' git.
Thanks again!
-Andrea
---
fbmem: fix circular locking dependency between fb_info->lock and
mm->mmap_sem
Avoid calling copy_from/to_user() with fb_info->lock mutex held in
the framebuffer's ioctl().
fb_mmap() is called under mm->mmap_sem (A) held, that also acquires
fb_info->lock (B); fb_ioctl() takes fb_info->lock (B) and does
copy_from/to_user() that might acquire mm->mmap_sem (A), causing a
deadlock.
Also fix other potential circular locking dependencies (always
between fb_info->lock and mm->mmap_sem) in fbcon that occur calling
the blocking fb_notifier_call_chain() with fb_info->lock held.
NOTE: it doesn't push down the fb_info->lock in each own driver's
specific fb_ioctl() implementation, so there are still some potential
deadlocks elsewhere.
CC: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73 +++++++++++++++++---
drivers/video/fbcmap.c | 20 ++++--
drivers/video/fbmem.c | 128
+++++++++++++++++------------------ include/linux/fb.h
| 15 ++++
6 files changed, 160 insertions(+), 82 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 157057c..dd37cbc 100644 --- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self, return 0;
bd = container_of(self, struct backlight_device, fb_notif);
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&bd->ops_lock);
if (bd->ops)
if (!bd->ops->check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self, backlight_update_status(bd);
}
mutex_unlock(&bd->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index b644947..0bb13df 100644 --- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops)
return 0;
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&ld->ops_lock);
if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
if (event == FB_EVENT_BLANK) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self, }
}
mutex_unlock(&ld->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 1657b96..2cd500a 100644 --- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info) }
}
- if (!num_registered_fb)
- unregister_con_driver(&fb_con);
-
-
if (primary_device == idx)
primary_device = -1;
+ unlock_fb_info(info);
+
+ if (!num_registered_fb)
+ unregister_con_driver(&fb_con);
+
return 0;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered(struct fb_info *info)
{
- int ret = 0, i, idx = info->node;
+ int ret = 0, i, idx;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ idx = info->node;
fbcon_select_primary(info);
+ unlock_fb_info(info);
if (info_idx == -1) {
for (i = first_fb_vc; i <= last_fb_vc; i++) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info, }
}
-static int fbcon_event_notify(struct notifier_block *self,
+static int fbcon_event_notify(struct notifier_block *self,
unsigned long action, void *data)
{
struct fb_event *event = data; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self, struct fb_videomode *mode;
struct fb_con2fbmap *con2fb;
struct fb_blit_caps *caps;
- int ret = 0;
+ int idx, ret = 0;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch(action) {
case FB_EVENT_SUSPEND:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_suspended(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_RESUME:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_resumed(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_modechanged(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE_ALL:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_set_all_vcs(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_DELETE:
mode = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_mode_deleted(info, mode);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_UNBIND:
- ret = fbcon_fb_unbind(info->node);
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
+ idx = info->node;
+ unlock_fb_info(info);
+ ret = fbcon_fb_unbind(idx);
break;
case FB_EVENT_FB_REGISTERED:
ret = fbcon_fb_registered(info); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self, con2fb->framebuffer =
con2fb_map[con2fb->console - 1];
break;
case FB_EVENT_BLANK:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_fb_blanked(info, *(int *)event->data);
+ unlock_fb_info(info);
break;
case FB_EVENT_NEW_MODELIST:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_new_modelist(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_GET_REQ:
caps = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_get_requirement(info, caps);
+ unlock_fb_info(info);
break;
}
-
done:
return ret;
} diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
index 91b78e6..f53b9f1 100644
--- a/drivers/video/fbcmap.c
+++ b/drivers/video/fbcmap.c @@ -250,10 +250,6 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info) int rc, size = cmap->len * sizeof(u16);
struct fb_cmap umap;
- if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
- !info->fbops->fb_setcmap))
- return -EINVAL;
-
memset(&umap, 0, sizeof(struct fb_cmap));
rc = fb_alloc_cmap(&umap, cmap->len, cmap->transp != NULL);
if (rc) @@ -262,11 +258,23 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info) copy_from_user(umap.green, cmap->green, size)
||
copy_from_user(umap.blue, cmap->blue, size) ||
(cmap->transp && copy_from_user(umap.transp, cmap->transp,
size))) { - fb_dealloc_cmap(&umap);
- return -EFAULT;
+ rc = -EFAULT;
+ goto out;
}
umap.start = cmap->start;
+ if (!lock_fb_info(info)) {
+ rc = -ENODEV;
+ goto out;
+ }
+ if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
+ !info->fbops->fb_setcmap)) {
+ rc = -EINVAL;
+ goto out1;
+ }
rc = fb_set_cmap(&umap, info);
+out1:
+ unlock_fb_info(info);
+out:
fb_dealloc_cmap(&umap);
return rc;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 756efeb..5cdee72 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1013,132 +1013,132 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, struct fb_var_screeninfo var;
struct fb_fix_screeninfo fix;
struct fb_con2fbmap con2fb;
+ struct fb_cmap cmap_from;
struct fb_cmap_user cmap;
struct fb_event event;
void __user *argp = (void __user *)arg;
long ret = 0;
- fb = info->fbops;
- if (!fb)
- return -ENODEV;
-
switch (cmd) {
case FBIOGET_VSCREENINFO:
- ret = copy_to_user(argp, &info->var,
- sizeof(var)) ? -EFAULT : 0;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ var = info->var;
+ unlock_fb_info(info);
+
+ ret = copy_to_user(argp, &var, sizeof(var)) ? -EFAULT : 0;
break;
case FBIOPUT_VSCREENINFO:
- if (copy_from_user(&var, argp, sizeof(var))) {
- ret = -EFAULT;
- break;
- }
+ if (copy_from_user(&var, argp, sizeof(var)))
+ return -EFAULT;
+ if (!lock_fb_info(info))
+ return -ENODEV;
acquire_console_sem();
info->flags |= FBINFO_MISC_USEREVENT;
ret = fb_set_var(info, &var);
info->flags &= ~FBINFO_MISC_USEREVENT;
release_console_sem();
- if (ret == 0 && copy_to_user(argp, &var, sizeof(var)))
+ unlock_fb_info(info);
+ if (!ret && copy_to_user(argp, &var, sizeof(var)))
ret = -EFAULT;
break;
case FBIOGET_FSCREENINFO:
- ret = copy_to_user(argp, &info->fix,
- sizeof(fix)) ? -EFAULT : 0;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ fix = info->fix;
+ unlock_fb_info(info);
+
+ ret = copy_to_user(argp, &fix, sizeof(fix)) ? -EFAULT : 0;
break;
case FBIOPUTCMAP:
if (copy_from_user(&cmap, argp, sizeof(cmap)))
- ret = -EFAULT;
- else
- ret = fb_set_user_cmap(&cmap, info);
+ return -EFAULT;
+ ret = fb_set_user_cmap(&cmap, info);
break;
case FBIOGETCMAP:
if (copy_from_user(&cmap, argp, sizeof(cmap)))
- ret = -EFAULT;
- else
- ret = fb_cmap_to_user(&info->cmap, &cmap);
+ return -EFAULT;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ cmap_from = info->cmap;
+ unlock_fb_info(info);
+ ret = fb_cmap_to_user(&cmap_from, &cmap);
break;
case FBIOPAN_DISPLAY:
- if (copy_from_user(&var, argp, sizeof(var))) {
- ret = -EFAULT;
- break;
- }
+ if (copy_from_user(&var, argp, sizeof(var)))
+ return -EFAULT;
+ if (!lock_fb_info(info))
+ return -ENODEV;
acquire_console_sem();
ret = fb_pan_display(info, &var);
release_console_sem();
+ unlock_fb_info(info);
if (ret == 0 && copy_to_user(argp, &var, sizeof(var)))
- ret = -EFAULT;
+ return -EFAULT;
break;
case FBIO_CURSOR:
ret = -EINVAL;
break;
case FBIOGET_CON2FBMAP:
if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
- ret = -EFAULT;
- else if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
- ret = -EINVAL;
- else {
- con2fb.framebuffer = -1;
- event.info = info;
- event.data = &con2fb;
- fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP,
- &event);
- ret = copy_to_user(argp, &con2fb,
- sizeof(con2fb)) ? -EFAULT : 0;
- }
+ return -EFAULT;
+ if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
+ return -EINVAL;
+ con2fb.framebuffer = -1;
+ event.data = &con2fb;
+ event.info = info;
+ fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event);
+
+ ret = copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
break;
case FBIOPUT_CON2FBMAP:
- if (copy_from_user(&con2fb, argp, sizeof(con2fb))) {
- ret = -EFAULT;
- break;
- }
- if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) {
- ret = -EINVAL;
- break;
- }
- if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX) {
- ret = -EINVAL;
- break;
- }
+ if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
+ return -EFAULT;
+ if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
+ return -EINVAL;
+ if (con2fb.framebuffer < 0 || con2fb.framebuffer >= FB_MAX)
+ return -EINVAL;
if (!registered_fb[con2fb.framebuffer])
request_module("fb%d", con2fb.framebuffer);
if (!registered_fb[con2fb.framebuffer]) {
ret = -EINVAL;
break;
}
- event.info = info;
event.data = &con2fb;
+ event.info = info;
ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP,
&event);
break;
case FBIOBLANK:
+ if (!lock_fb_info(info))
+ return -ENODEV;
acquire_console_sem();
info->flags |= FBINFO_MISC_USEREVENT;
ret = fb_blank(info, arg);
info->flags &= ~FBINFO_MISC_USEREVENT;
release_console_sem();
- break;;
+ unlock_fb_info(info);
+ break;
default:
- if (fb->fb_ioctl == NULL)
- ret = -ENOTTY;
- else
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ fb = info->fbops;
+ if (fb->fb_ioctl)
ret = fb->fb_ioctl(info, cmd, arg);
+ else
+ ret = -ENOTTY;
+ unlock_fb_info(info);
}
return ret;
}
static long fb_ioctl(struct file *file, unsigned int cmd, unsigned
long arg) -__acquires(&info->lock)
-__releases(&info->lock)
{
struct inode *inode = file->f_path.dentry->d_inode;
int fbidx = iminor(inode);
- struct fb_info *info;
- long ret;
+ struct fb_info *info = registered_fb[fbidx];
- info = registered_fb[fbidx];
- mutex_lock(&info->lock);
- ret = do_fb_ioctl(info, cmd, arg);
- mutex_unlock(&info->lock);
- return ret;
+ return do_fb_ioctl(info, cmd, arg);
}
#ifdef CONFIG_COMPAT @@ -1257,8 +1257,6 @@ static int fb_get_fscreeninfo(struct fb_info *info, unsigned int cmd,
static long fb_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
-__acquires(&info->lock)
-__releases(&info->lock)
{
struct inode *inode = file->f_path.dentry->d_inode;
int fbidx = iminor(inode); @@ -1266,7 +1264,6 @@ __releases(&info->lock)
struct fb_ops *fb = info->fbops;
long ret = -ENOIOCTLCMD;
- mutex_lock(&info->lock);
switch(cmd) {
case FBIOGET_VSCREENINFO:
case FBIOPUT_VSCREENINFO: @@ -1292,7 +1289,6 @@ __releases(&info->lock)
ret = fb->fb_compat_ioctl(info, cmd, arg);
break;
}
- mutex_unlock(&info->lock);
return ret;
}
#endif diff --git a/include/linux/fb.h b/include/linux/fb.h
index 818fe21..31527e1 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h @@ -960,6 +960,21 @@ extern struct fb_info *registered_fb[FB_MAX];
extern int num_registered_fb ;
extern struct class * fb_class ;
+ static inline int lock_fb_info ( struct fb_info * info )
+ {
+ mutex_lock ( & info -> lock );
+ if ( ! info -> fbops ) {
+ mutex_unlock ( & info -> lock );
+ return 0 ;
+ }
+ return 1 ;
+ }
+
+ static inline void unlock_fb_info ( struct fb_info * info )
+ {
+ mutex_unlock ( & info -> lock );
+ }
+
static inline void __fb_pad_aligned_buffer ( u8 * dst , u32 d_pitch ,
u8 * src , u32 s_pitch , u32 height )
{
Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks can
try to acquire mm->mmap_sem, while fb_mmap() acquires the locks in the
reverse order mm->mmap_sem => fb_info->lock.
Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73 ++++++++++++++++++++++++++++++-----
drivers/video/fbmem.c | 11 +-----
4 files changed, 70 insertions(+), 20 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 157057c..dd37cbc 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self,
return 0 ;
bd = container_of ( self , struct backlight_device , fb_notif );
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & bd -> ops_lock );
if ( bd -> ops )
if ( ! bd -> ops -> check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self,
backlight_update_status ( bd );
}
mutex_unlock ( & bd -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index b644947..0bb13df 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self,
if ( ! ld -> ops )
return 0 ;
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & ld -> ops_lock );
if ( ! ld -> ops -> check_fb || ld -> ops -> check_fb ( ld , evdata -> info )) {
if ( event == FB_EVENT_BLANK ) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self,
}
}
mutex_unlock ( & ld -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1657b96..2cd500a 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info)
}
}
- if ( ! num_registered_fb )
- unregister_con_driver ( & fb_con );
-
-
if ( primary_device == idx )
primary_device = -1 ;
+ unlock_fb_info ( info );
+
+ if ( ! num_registered_fb )
+ unregister_con_driver ( & fb_con );
+
return 0 ;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered ( struct fb_info * info )
{
- int ret = 0 , i , idx = info -> node ;
+ int ret = 0 , i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
fbcon_select_primary ( info );
+ unlock_fb_info ( info );
if ( info_idx == -1 ) {
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info,
}
}
- static int fbcon_event_notify ( struct notifier_block * self ,
+ static int fbcon_event_notify ( struct notifier_block * self ,
unsigned long action , void * data )
{
struct fb_event * event = data ; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self,
struct fb_videomode * mode ;
struct fb_con2fbmap * con2fb ;
struct fb_blit_caps * caps ;
- int ret = 0 ;
+ int idx , ret = 0 ;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch ( action ) {
case FB_EVENT_SUSPEND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_suspended ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_RESUME :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_resumed ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_modechanged ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE_ALL :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_set_all_vcs ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_DELETE :
mode = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_mode_deleted ( info , mode );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNBIND :
- ret = fbcon_fb_unbind ( info -> node );
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
+ idx = info -> node ;
+ unlock_fb_info ( info );
+ ret = fbcon_fb_unbind ( idx );
break ;
case FB_EVENT_FB_REGISTERED :
ret = fbcon_fb_registered ( info ); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self,
con2fb -> framebuffer = con2fb_map [ con2fb -> console - 1 ];
break ;
case FB_EVENT_BLANK :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_fb_blanked ( info , * ( int * ) event -> data );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_NEW_MODELIST :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_new_modelist ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_GET_REQ :
caps = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_get_requirement ( info , caps );
+ unlock_fb_info ( info );
break ;
}
-
done :
return ret ;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..b64f061 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,13 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return - EINVAL ;
con2fb . framebuffer = -1 ;
event . data = & con2fb ;
-
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP , & event );
- unlock_fb_info ( info );
-
ret = copy_to_user ( argp , & con2fb , sizeof ( con2fb )) ? - EFAULT : 0 ;
break ;
case FBIOPUT_CON2FBMAP : @@ -1109,12 +1104,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
break ;
}
event . data = & con2fb ;
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
- ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP ,
- & event );
- unlock_fb_info ( info );
+ ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP , & event );
break ;
case FBIOBLANK :
if ( ! lock_fb_info ( info )) --
1.5.6.3
On Wednesday 04 February 2009, Andrea Righi wrote: Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks can
try to acquire mm->mmap_sem, while fb_mmap() acquires the locks in the
reverse order mm->mmap_sem => fb_info->lock.
Does this fix a Bugzilla bug? If so, then which one?
quoted hunk Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73 ++++++++++++++++++++++++++++++-----
drivers/video/fbmem.c | 11 +-----
4 files changed, 70 insertions(+), 20 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 157057c..dd37cbc 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self,
return 0 ;
bd = container_of ( self , struct backlight_device , fb_notif );
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & bd -> ops_lock );
if ( bd -> ops )
if ( ! bd -> ops -> check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self,
backlight_update_status ( bd );
}
mutex_unlock ( & bd -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index b644947..0bb13df 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self,
if ( ! ld -> ops )
return 0 ;
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & ld -> ops_lock );
if ( ! ld -> ops -> check_fb || ld -> ops -> check_fb ( ld , evdata -> info )) {
if ( event == FB_EVENT_BLANK ) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self,
}
}
mutex_unlock ( & ld -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 1657b96..2cd500a 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info)
}
}
- if ( ! num_registered_fb )
- unregister_con_driver ( & fb_con );
-
-
if ( primary_device == idx )
primary_device = -1 ;
+ unlock_fb_info ( info );
+
+ if ( ! num_registered_fb )
+ unregister_con_driver ( & fb_con );
+
return 0 ;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered ( struct fb_info * info )
{
- int ret = 0 , i , idx = info -> node ;
+ int ret = 0 , i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
fbcon_select_primary ( info );
+ unlock_fb_info ( info );
if ( info_idx == -1 ) {
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info,
}
}
- static int fbcon_event_notify ( struct notifier_block * self ,
+ static int fbcon_event_notify ( struct notifier_block * self ,
unsigned long action , void * data )
{
struct fb_event * event = data ; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self,
struct fb_videomode * mode ;
struct fb_con2fbmap * con2fb ;
struct fb_blit_caps * caps ;
- int ret = 0 ;
+ int idx , ret = 0 ;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch ( action ) {
case FB_EVENT_SUSPEND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_suspended ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_RESUME :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_resumed ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_modechanged ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE_ALL :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_set_all_vcs ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_DELETE :
mode = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_mode_deleted ( info , mode );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNBIND :
- ret = fbcon_fb_unbind ( info -> node );
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
+ idx = info -> node ;
+ unlock_fb_info ( info );
+ ret = fbcon_fb_unbind ( idx );
break ;
case FB_EVENT_FB_REGISTERED :
ret = fbcon_fb_registered ( info ); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self,
con2fb -> framebuffer = con2fb_map [ con2fb -> console - 1 ];
break ;
case FB_EVENT_BLANK :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_fb_blanked ( info , * ( int * ) event -> data );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_NEW_MODELIST :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_new_modelist ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_GET_REQ :
caps = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_get_requirement ( info , caps );
+ unlock_fb_info ( info );
break ;
}
-
done :
return ret ;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..b64f061 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,13 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
return - EINVAL ;
con2fb . framebuffer = -1 ;
event . data = & con2fb ;
-
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP , & event );
- unlock_fb_info ( info );
-
ret = copy_to_user ( argp , & con2fb , sizeof ( con2fb )) ? - EFAULT : 0 ;
break ;
case FBIOPUT_CON2FBMAP : @@ -1109,12 +1104,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
break ;
}
event . data = & con2fb ;
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
- ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP ,
- & event );
- unlock_fb_info ( info );
+ ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP , & event );
break ;
case FBIOBLANK :
if ( ! lock_fb_info ( info ))
--
Everyone knows that debugging is twice as hard as writing a program
in the first place. So if you're as clever as you can be when you write it,
how will you ever debug it? --- Brian Kernighan
On Thursday 05 February 2009, Rafael J. Wysocki wrote: On Wednesday 04 February 2009, Andrea Righi wrote: quoted Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks can
try to acquire mm->mmap_sem, while fb_mmap() acquires the locks in the
reverse order mm->mmap_sem => fb_info->lock.
Does this fix a Bugzilla bug? If so, then which one?
Never mind, found it.
Thanks,
Rafael
On 5 февраля 2009 00:46:23 Andrea Righi wrote: Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks
can try to acquire mm->mmap_sem, while fb_mmap() acquires the locks
in the reverse order mm->mmap_sem => fb_info->lock.
Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
Hmm ... is it in current Linus tree? Because I happened to have this again
in rc8:
[47800.440873] =======================================================
[47800.440950] [ INFO: possible circular locking dependency detected ]
[47800.440981] 2.6.29-rc8-1avb #35
[47800.440999] -------------------------------------------------------
[47800.441026] s2disk/19740 is trying to acquire lock:
[47800.441057] (&fb_info->lock){--..}, at: [<c02175b7>] fb_mmap+0x97/0x170
[47800.441149]
[47800.441152] but task is already holding lock:
[47800.441183] (&mm->mmap_sem){----}, at: [<c0106e2e>] sys_mmap2+0x8e/0xc0
[47800.441260]
[47800.441262] which lock already depends on the new lock.
[47800.441266]
[47800.441307]
[47800.441309] the existing dependency chain (in reverse order) is:
[47800.441345]
[47800.441347] -> #3 (&mm->mmap_sem){----}:
[47800.441426] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.441466] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.441500] [<c0175f97>] might_fault+0x77/0xa0
[47800.441548] [<c01fd746>] copy_to_user+0x36/0x120
[47800.441591] [<c0199eb7>] filldir+0x97/0xe0
[47800.441627] [<c01d2279>] sysfs_readdir+0x129/0x220
[47800.441668] [<c019a066>] vfs_readdir+0x86/0xa0
[47800.441701] [<c019a1a8>] sys_getdents+0x68/0xc0
[47800.441734] [<c010340a>] syscall_call+0x7/0xb
[47800.441770] [<ffffffff>] 0xffffffff
[47800.441839]
[47800.441842] -> #2 (sysfs_mutex){--..}:
[47800.441906] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.441941] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.441974] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c01d260c>] sysfs_addrm_start+0x2c/0xc0
[47800.442012] [<c01d2bc0>] create_dir+0x40/0x90
[47800.442012] [<c01d2c3b>] sysfs_create_dir+0x2b/0x50
[47800.442012] [<c01f74ec>] kobject_add_internal+0xbc/0x1b0
[47800.442012] [<c01f76b1>] kobject_add_varg+0x31/0x50
[47800.442012] [<c01f772c>] kobject_add+0x2c/0x60
[47800.442012] [<c026c598>] device_add+0xa8/0x550
[47800.442012] [<c026ca52>] device_register+0x12/0x20
[47800.442012] [<c026cb0b>] device_create_vargs+0xab/0xc0
[47800.442012] [<c026cb48>] device_create+0x28/0x30
[47800.442012] [<c0265dfd>] register_con_driver+0xed/0x130
[47800.442012] [<c02672eb>] take_over_console+0x1b/0x50
[47800.442012] [<c02244fd>] fbcon_takeover+0x5d/0xb0
[47800.442012] [<c0225170>] fbcon_event_notify+0x820/0x900
[47800.442012] [<c0137183>] notifier_call_chain+0x53/0xa0
[47800.442012] [<c0137444>] __blocking_notifier_call_chain+0x44/0x60
[47800.442012] [<c013747a>] blocking_notifier_call_chain+0x1a/0x20
[47800.442012] [<c0216f51>] fb_notifier_call_chain+0x11/0x20
[47800.442012] [<c0217ed8>] register_framebuffer+0x168/0x220
[47800.442012] [<c047e2f2>] vesafb_probe+0x542/0x783
[47800.442012] [<c026f72f>] platform_drv_probe+0xf/0x20
[47800.442012] [<c026e917>] driver_probe_device+0x87/0x1b0
[47800.442012] [<c026ead8>] __device_attach+0x8/0x10
[47800.442012] [<c026df5b>] bus_for_each_drv+0x5b/0x80
[47800.442012] [<c026eb86>] device_attach+0x76/0x80
[47800.442012] [<c026dd77>] bus_attach_device+0x47/0x70
[47800.442012] [<c026c813>] device_add+0x323/0x550
[47800.442012] [<c0270105>] platform_device_add+0x175/0x1c0
[47800.442012] [<c047e5cd>] vesafb_init+0x9a/0x1ec
[47800.442012] [<c010111a>] do_one_initcall+0x2a/0x160
[47800.442012] [<c04694d5>] kernel_init+0x83/0xd5
[47800.442012] [<c0103a37>] kernel_thread_helper+0x7/0x10
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] -> #1 ((fb_notifier_list).rwsem){----}:
[47800.442012] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c0355fb9>] down_read+0x49/0x90
[47800.442012] [<c013742a>] __blocking_notifier_call_chain+0x2a/0x60
[47800.442012] [<c013747a>] blocking_notifier_call_chain+0x1a/0x20
[47800.442012] [<c0216f51>] fb_notifier_call_chain+0x11/0x20
[47800.442012] [<c021856e>] do_fb_ioctl+0x2ae/0x5d0
[47800.442012] [<c02188ad>] fb_ioctl+0x1d/0x20
[47800.442012] [<c0199270>] vfs_ioctl+0x20/0x80
[47800.442012] [<c0199482>] do_vfs_ioctl+0x72/0x570
[47800.442012] [<c01999b9>] sys_ioctl+0x39/0x70
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] -> #0 (&fb_info->lock){--..}:
[47800.442012] [<c01435ec>] __lock_acquire+0x140c/0x1930
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c02175b7>] fb_mmap+0x97/0x170
[47800.442012] [<c017cbc0>] mmap_region+0x2e0/0x440
[47800.442012] [<c017ceea>] do_mmap_pgoff+0x1ca/0x2f0
[47800.442012] [<c0106e4d>] sys_mmap2+0xad/0xc0
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] other info that might help us debug this:
[47800.442012]
[47800.442012] 1 lock held by s2disk/19740:
[47800.442012] #0: (&mm->mmap_sem){----}, at: [<c0106e2e>]
sys_mmap2+0x8e/0xc0
[47800.442012]
[47800.442012] stack backtrace:
[47800.442012] Pid: 19740, comm: s2disk Not tainted 2.6.29-rc8-1avb #35
[47800.442012] Call Trace:
[47800.442012] [<c0354324>] ? printk+0x18/0x1c
[47800.442012] [<c0141d8f>] print_circular_bug_tail+0xcf/0xe0
[47800.442012] [<c01435ec>] __lock_acquire+0x140c/0x1930
[47800.442012] [<c0132936>] ? add_wait_queue+0x36/0x50
[47800.442012] [<c013f375>] ? lock_release_holdtime+0x35/0x210
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c01892c5>] ? kmem_cache_alloc+0xa5/0x100
[47800.442012] [<c02175b7>] fb_mmap+0x97/0x170
[47800.442012] [<c017cbc0>] mmap_region+0x2e0/0x440
[47800.442012] [<c017ceea>] do_mmap_pgoff+0x1ca/0x2f0
[47800.442012] [<c0106e4d>] sys_mmap2+0xad/0xc0
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47803.041426] Syncing filesystems ... done.
[47803.055587] Freezing user space processes ... (elapsed 0.00 seconds)
done.
[47803.059328] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
quoted hunk ---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73
++++++++++++++++++++++++++++++----- drivers/video/fbmem.c
| 11 +-----
4 files changed, 70 insertions(+), 20 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 157057c..dd37cbc 100644 --- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self, return 0;
bd = container_of(self, struct backlight_device, fb_notif);
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&bd->ops_lock);
if (bd->ops)
if (!bd->ops->check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self, backlight_update_status(bd);
}
mutex_unlock(&bd->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index b644947..0bb13df 100644 --- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops)
return 0;
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&ld->ops_lock);
if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
if (event == FB_EVENT_BLANK) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self, }
}
mutex_unlock(&ld->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 1657b96..2cd500a 100644 --- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info) }
}
- if (!num_registered_fb)
- unregister_con_driver(&fb_con);
-
-
if (primary_device == idx)
primary_device = -1;
+ unlock_fb_info(info);
+
+ if (!num_registered_fb)
+ unregister_con_driver(&fb_con);
+
return 0;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered(struct fb_info *info)
{
- int ret = 0, i, idx = info->node;
+ int ret = 0, i, idx;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ idx = info->node;
fbcon_select_primary(info);
+ unlock_fb_info(info);
if (info_idx == -1) {
for (i = first_fb_vc; i <= last_fb_vc; i++) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info, }
}
-static int fbcon_event_notify(struct notifier_block *self,
+static int fbcon_event_notify(struct notifier_block *self,
unsigned long action, void *data)
{
struct fb_event *event = data; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self, struct fb_videomode *mode;
struct fb_con2fbmap *con2fb;
struct fb_blit_caps *caps;
- int ret = 0;
+ int idx, ret = 0;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch(action) {
case FB_EVENT_SUSPEND:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_suspended(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_RESUME:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_resumed(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_modechanged(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE_ALL:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_set_all_vcs(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_DELETE:
mode = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_mode_deleted(info, mode);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_UNBIND:
- ret = fbcon_fb_unbind(info->node);
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
+ idx = info->node;
+ unlock_fb_info(info);
+ ret = fbcon_fb_unbind(idx);
break;
case FB_EVENT_FB_REGISTERED:
ret = fbcon_fb_registered(info); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self, con2fb->framebuffer =
con2fb_map[con2fb->console - 1];
break;
case FB_EVENT_BLANK:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_fb_blanked(info, *(int *)event->data);
+ unlock_fb_info(info);
break;
case FB_EVENT_NEW_MODELIST:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_new_modelist(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_GET_REQ:
caps = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_get_requirement(info, caps);
+ unlock_fb_info(info);
break;
}
-
done:
return ret;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..b64f061 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,13 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, return -EINVAL;
con2fb.framebuffer = -1;
event.data = &con2fb;
-
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event);
- unlock_fb_info(info);
-
ret = copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
break;
case FBIOPUT_CON2FBMAP: @@ -1109,12 +1104,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, break;
}
event.data = &con2fb;
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
- ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP,
- &event);
- unlock_fb_info(info);
+ ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP, &event);
break;
case FBIOBLANK:
if (!lock_fb_info(info))
On Sunday 22 March 2009, Andrey Borzenkov wrote: On 5 февраля 2009 00:46:23 Andrea Righi wrote: quoted Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks
can try to acquire mm->mmap_sem, while fb_mmap() acquires the locks
in the reverse order mm->mmap_sem => fb_info->lock.
Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
Hmm ... is it in current Linus tree? Because I happened to have this again
in rc8:
It doesn't seems so, at least I don't see it in there.
Thanks,
Rafael
[47800.440873] =======================================================
[47800.440950] [ INFO: possible circular locking dependency detected ]
[47800.440981] 2.6.29-rc8-1avb #35
[47800.440999] -------------------------------------------------------
[47800.441026] s2disk/19740 is trying to acquire lock:
[47800.441057] (&fb_info->lock){--..}, at: [<c02175b7>] fb_mmap+0x97/0x170
[47800.441149]
[47800.441152] but task is already holding lock:
[47800.441183] (&mm->mmap_sem){----}, at: [<c0106e2e>] sys_mmap2+0x8e/0xc0
[47800.441260]
[47800.441262] which lock already depends on the new lock.
[47800.441266]
[47800.441307]
[47800.441309] the existing dependency chain (in reverse order) is:
[47800.441345]
[47800.441347] -> #3 (&mm->mmap_sem){----}:
[47800.441426] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.441466] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.441500] [<c0175f97>] might_fault+0x77/0xa0
[47800.441548] [<c01fd746>] copy_to_user+0x36/0x120
[47800.441591] [<c0199eb7>] filldir+0x97/0xe0
[47800.441627] [<c01d2279>] sysfs_readdir+0x129/0x220
[47800.441668] [<c019a066>] vfs_readdir+0x86/0xa0
[47800.441701] [<c019a1a8>] sys_getdents+0x68/0xc0
[47800.441734] [<c010340a>] syscall_call+0x7/0xb
[47800.441770] [<ffffffff>] 0xffffffff
[47800.441839]
[47800.441842] -> #2 (sysfs_mutex){--..}:
[47800.441906] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.441941] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.441974] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c01d260c>] sysfs_addrm_start+0x2c/0xc0
[47800.442012] [<c01d2bc0>] create_dir+0x40/0x90
[47800.442012] [<c01d2c3b>] sysfs_create_dir+0x2b/0x50
[47800.442012] [<c01f74ec>] kobject_add_internal+0xbc/0x1b0
[47800.442012] [<c01f76b1>] kobject_add_varg+0x31/0x50
[47800.442012] [<c01f772c>] kobject_add+0x2c/0x60
[47800.442012] [<c026c598>] device_add+0xa8/0x550
[47800.442012] [<c026ca52>] device_register+0x12/0x20
[47800.442012] [<c026cb0b>] device_create_vargs+0xab/0xc0
[47800.442012] [<c026cb48>] device_create+0x28/0x30
[47800.442012] [<c0265dfd>] register_con_driver+0xed/0x130
[47800.442012] [<c02672eb>] take_over_console+0x1b/0x50
[47800.442012] [<c02244fd>] fbcon_takeover+0x5d/0xb0
[47800.442012] [<c0225170>] fbcon_event_notify+0x820/0x900
[47800.442012] [<c0137183>] notifier_call_chain+0x53/0xa0
[47800.442012] [<c0137444>] __blocking_notifier_call_chain+0x44/0x60
[47800.442012] [<c013747a>] blocking_notifier_call_chain+0x1a/0x20
[47800.442012] [<c0216f51>] fb_notifier_call_chain+0x11/0x20
[47800.442012] [<c0217ed8>] register_framebuffer+0x168/0x220
[47800.442012] [<c047e2f2>] vesafb_probe+0x542/0x783
[47800.442012] [<c026f72f>] platform_drv_probe+0xf/0x20
[47800.442012] [<c026e917>] driver_probe_device+0x87/0x1b0
[47800.442012] [<c026ead8>] __device_attach+0x8/0x10
[47800.442012] [<c026df5b>] bus_for_each_drv+0x5b/0x80
[47800.442012] [<c026eb86>] device_attach+0x76/0x80
[47800.442012] [<c026dd77>] bus_attach_device+0x47/0x70
[47800.442012] [<c026c813>] device_add+0x323/0x550
[47800.442012] [<c0270105>] platform_device_add+0x175/0x1c0
[47800.442012] [<c047e5cd>] vesafb_init+0x9a/0x1ec
[47800.442012] [<c010111a>] do_one_initcall+0x2a/0x160
[47800.442012] [<c04694d5>] kernel_init+0x83/0xd5
[47800.442012] [<c0103a37>] kernel_thread_helper+0x7/0x10
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] -> #1 ((fb_notifier_list).rwsem){----}:
[47800.442012] [<c014347f>] __lock_acquire+0x129f/0x1930
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c0355fb9>] down_read+0x49/0x90
[47800.442012] [<c013742a>] __blocking_notifier_call_chain+0x2a/0x60
[47800.442012] [<c013747a>] blocking_notifier_call_chain+0x1a/0x20
[47800.442012] [<c0216f51>] fb_notifier_call_chain+0x11/0x20
[47800.442012] [<c021856e>] do_fb_ioctl+0x2ae/0x5d0
[47800.442012] [<c02188ad>] fb_ioctl+0x1d/0x20
[47800.442012] [<c0199270>] vfs_ioctl+0x20/0x80
[47800.442012] [<c0199482>] do_vfs_ioctl+0x72/0x570
[47800.442012] [<c01999b9>] sys_ioctl+0x39/0x70
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] -> #0 (&fb_info->lock){--..}:
[47800.442012] [<c01435ec>] __lock_acquire+0x140c/0x1930
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c02175b7>] fb_mmap+0x97/0x170
[47800.442012] [<c017cbc0>] mmap_region+0x2e0/0x440
[47800.442012] [<c017ceea>] do_mmap_pgoff+0x1ca/0x2f0
[47800.442012] [<c0106e4d>] sys_mmap2+0xad/0xc0
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47800.442012] [<ffffffff>] 0xffffffff
[47800.442012]
[47800.442012] other info that might help us debug this:
[47800.442012]
[47800.442012] 1 lock held by s2disk/19740:
[47800.442012] #0: (&mm->mmap_sem){----}, at: [<c0106e2e>]
sys_mmap2+0x8e/0xc0
[47800.442012]
[47800.442012] stack backtrace:
[47800.442012] Pid: 19740, comm: s2disk Not tainted 2.6.29-rc8-1avb #35
[47800.442012] Call Trace:
[47800.442012] [<c0354324>] ? printk+0x18/0x1c
[47800.442012] [<c0141d8f>] print_circular_bug_tail+0xcf/0xe0
[47800.442012] [<c01435ec>] __lock_acquire+0x140c/0x1930
[47800.442012] [<c0132936>] ? add_wait_queue+0x36/0x50
[47800.442012] [<c013f375>] ? lock_release_holdtime+0x35/0x210
[47800.442012] [<c0143b6c>] lock_acquire+0x5c/0x80
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c03556ba>] mutex_lock_nested+0xba/0x2f0
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c02175b7>] ? fb_mmap+0x97/0x170
[47800.442012] [<c01892c5>] ? kmem_cache_alloc+0xa5/0x100
[47800.442012] [<c02175b7>] fb_mmap+0x97/0x170
[47800.442012] [<c017cbc0>] mmap_region+0x2e0/0x440
[47800.442012] [<c017ceea>] do_mmap_pgoff+0x1ca/0x2f0
[47800.442012] [<c0106e4d>] sys_mmap2+0xad/0xc0
[47800.442012] [<c0103331>] sysenter_do_call+0x12/0x31
[47803.041426] Syncing filesystems ... done.
[47803.055587] Freezing user space processes ... (elapsed 0.00 seconds)
done.
[47803.059328] Freezing remaining freezable tasks ... (elapsed 0.00 seconds)
done.
quoted ---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73
++++++++++++++++++++++++++++++----- drivers/video/fbmem.c
| 11 +-----
4 files changed, 70 insertions(+), 20 deletions(-)
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 157057c..dd37cbc 100644 --- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct notifier_block *self, return 0;
bd = container_of(self, struct backlight_device, fb_notif);
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&bd->ops_lock);
if (bd->ops)
if (!bd->ops->check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct notifier_block *self, backlight_update_status(bd);
}
mutex_unlock(&bd->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index b644947..0bb13df 100644 --- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops)
return 0;
+ if (!lock_fb_info(evdata->info))
+ return -ENODEV;
mutex_lock(&ld->ops_lock);
if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
if (event == FB_EVENT_BLANK) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct notifier_block *self, }
}
mutex_unlock(&ld->ops_lock);
+ unlock_fb_info(evdata->info);
return 0;
}
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 1657b96..2cd500a 100644 --- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct fb_info *info) }
}
- if (!num_registered_fb)
- unregister_con_driver(&fb_con);
-
-
if (primary_device == idx)
primary_device = -1;
+ unlock_fb_info(info);
+
+ if (!num_registered_fb)
+ unregister_con_driver(&fb_con);
+
return 0;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(struct fb_info *info)
static int fbcon_fb_registered(struct fb_info *info)
{
- int ret = 0, i, idx = info->node;
+ int ret = 0, i, idx;
+ if (!lock_fb_info(info))
+ return -ENODEV;
+ idx = info->node;
fbcon_select_primary(info);
+ unlock_fb_info(info);
if (info_idx == -1) {
for (i = first_fb_vc; i <= last_fb_vc; i++) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct fb_info *info, }
}
-static int fbcon_event_notify(struct notifier_block *self,
+static int fbcon_event_notify(struct notifier_block *self,
unsigned long action, void *data)
{
struct fb_event *event = data; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct notifier_block *self, struct fb_videomode *mode;
struct fb_con2fbmap *con2fb;
struct fb_blit_caps *caps;
- int ret = 0;
+ int idx, ret = 0;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct notifier_block *self,
switch(action) {
case FB_EVENT_SUSPEND:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_suspended(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_RESUME:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_resumed(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_modechanged(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_CHANGE_ALL:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_set_all_vcs(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_MODE_DELETE:
mode = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
ret = fbcon_mode_deleted(info, mode);
+ unlock_fb_info(info);
break;
case FB_EVENT_FB_UNBIND:
- ret = fbcon_fb_unbind(info->node);
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
+ idx = info->node;
+ unlock_fb_info(info);
+ ret = fbcon_fb_unbind(idx);
break;
case FB_EVENT_FB_REGISTERED:
ret = fbcon_fb_registered(info); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct notifier_block *self, con2fb->framebuffer =
con2fb_map[con2fb->console - 1];
break;
case FB_EVENT_BLANK:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_fb_blanked(info, *(int *)event->data);
+ unlock_fb_info(info);
break;
case FB_EVENT_NEW_MODELIST:
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_new_modelist(info);
+ unlock_fb_info(info);
break;
case FB_EVENT_GET_REQ:
caps = event->data;
+ if (!lock_fb_info(info)) {
+ ret = -ENODEV;
+ goto done;
+ }
fbcon_get_requirement(info, caps);
+ unlock_fb_info(info);
break;
}
-
done:
return ret;
} diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index cfd9dce..b64f061 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c @@ -1086,13 +1086,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, return -EINVAL;
con2fb.framebuffer = -1;
event.data = &con2fb;
-
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event);
- unlock_fb_info(info);
-
ret = copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
break;
case FBIOPUT_CON2FBMAP: @@ -1109,12 +1104,8 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, break;
}
event.data = &con2fb;
- if (!lock_fb_info(info))
- return -ENODEV;
event.info = info;
- ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP,
- &event);
- unlock_fb_info(info);
+ ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP, &event);
break;
case FBIOBLANK:
if (!lock_fb_info(info))
On Sun, 22 Mar 2009 18:57:19 +0100 "Rafael J. Wysocki" [off-list ref] wrote:
On Sunday 22 March 2009, Andrey Borzenkov wrote: quoted On 5 ______________ 2009 00:46:23 Andrea Righi wrote: quoted Fix this circular locking dependencies in the frame buffer console
driver pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks
can try to acquire mm->mmap_sem, while fb_mmap() acquires the locks
in the reverse order mm->mmap_sem => fb_info->lock.
Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
Hmm ... is it in current Linus tree? Because I happened to have this again
in rc8:
It doesn't seems so, at least I don't see it in there.
I didn't realise that this was needed in mainline.
I would hate to mrege it this late and find that it introduces some nasty
new deadlock which everyone hits. Probably it's more prodent to merge it
into 2.6.29.1 now.
From: Andrea Righi <redacted>
Fix a circular locking dependency in the frame buffer console driver
pushing down the mutex fb_info->lock.
Circular locking dependecies occur calling the blocking
fb_notifier_call_chain() with fb_info->lock held. Notifier callbacks can
try to acquire mm->mmap_sem, while fb_mmap() acquires the locks in the
reverse order mm->mmap_sem => fb_info->lock.
Tested-by: Andrey Borzenkov <redacted>
Signed-off-by: Andrea Righi <redacted>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Krzysztof Helt <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/video/backlight/backlight.c | 3 +
drivers/video/backlight/lcd.c | 3 +
drivers/video/console/fbcon.c | 73 ++++++++++++++++++++++----
drivers/video/fbmem.c | 11 ---
4 files changed, 70 insertions(+), 20 deletions(-)
diff -puN drivers/video/backlight/backlight.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency drivers/video/backlight/backlight.c --- a/drivers/video/backlight/backlight.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency
+++ a/drivers/video/backlight/backlight.c @@ -35,6 +35,8 @@ static int fb_notifier_callback(struct n
return 0 ;
bd = container_of ( self , struct backlight_device , fb_notif );
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & bd -> ops_lock );
if ( bd -> ops )
if ( ! bd -> ops -> check_fb || @@ -47,6 +49,7 @@ static int fb_notifier_callback(struct n
backlight_update_status ( bd );
}
mutex_unlock ( & bd -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff -puN drivers/video/backlight/lcd.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency drivers/video/backlight/lcd.c --- a/drivers/video/backlight/lcd.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency
+++ a/drivers/video/backlight/lcd.c @@ -40,6 +40,8 @@ static int fb_notifier_callback(struct n
if ( ! ld -> ops )
return 0 ;
+ if ( ! lock_fb_info ( evdata -> info ))
+ return - ENODEV ;
mutex_lock ( & ld -> ops_lock );
if ( ! ld -> ops -> check_fb || ld -> ops -> check_fb ( ld , evdata -> info )) {
if ( event == FB_EVENT_BLANK ) { @@ -51,6 +53,7 @@ static int fb_notifier_callback(struct n
}
}
mutex_unlock ( & ld -> ops_lock );
+ unlock_fb_info ( evdata -> info );
return 0 ;
}
diff -puN drivers/video/console/fbcon.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency drivers/video/console/fbcon.c --- a/drivers/video/console/fbcon.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency
+++ a/drivers/video/console/fbcon.c @@ -2954,8 +2954,11 @@ static int fbcon_fb_unbind(int idx)
static int fbcon_fb_unregistered ( struct fb_info * info )
{
- int i , idx = info -> node ;
+ int i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) {
if ( con2fb_map [ i ] == idx )
con2fb_map [ i ] = -1 ; @@ -2979,13 +2982,14 @@ static int fbcon_fb_unregistered(struct
}
}
- if ( ! num_registered_fb )
- unregister_con_driver ( & fb_con );
-
-
if ( primary_device == idx )
primary_device = -1 ;
+ unlock_fb_info ( info );
+
+ if ( ! num_registered_fb )
+ unregister_con_driver ( & fb_con );
+
return 0 ;
}
@@ -3021,9 +3025,13 @@ static inline void fbcon_select_primary(
static int fbcon_fb_registered ( struct fb_info * info )
{
- int ret = 0 , i , idx = info -> node ;
+ int ret = 0 , i , idx ;
+ if ( ! lock_fb_info ( info ))
+ return - ENODEV ;
+ idx = info -> node ;
fbcon_select_primary ( info );
+ unlock_fb_info ( info );
if ( info_idx == -1 ) {
for ( i = first_fb_vc ; i <= last_fb_vc ; i ++ ) { @@ -3124,7 +3132,7 @@ static void fbcon_get_requirement(struct
}
}
- static int fbcon_event_notify ( struct notifier_block * self ,
+ static int fbcon_event_notify ( struct notifier_block * self ,
unsigned long action , void * data )
{
struct fb_event * event = data ; @@ -3132,7 +3140,7 @@ static int fbcon_event_notify(struct not
struct fb_videomode * mode ;
struct fb_con2fbmap * con2fb ;
struct fb_blit_caps * caps ;
- int ret = 0 ;
+ int idx , ret = 0 ;
/*
* ignore all events except driver registration and deregistration @@ -3144,23 +3152,54 @@ static int fbcon_event_notify(struct not
switch ( action ) {
case FB_EVENT_SUSPEND :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_suspended ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_RESUME :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_resumed ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_modechanged ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_CHANGE_ALL :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_set_all_vcs ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_MODE_DELETE :
mode = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
ret = fbcon_mode_deleted ( info , mode );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_FB_UNBIND :
- ret = fbcon_fb_unbind ( info -> node );
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
+ idx = info -> node ;
+ unlock_fb_info ( info );
+ ret = fbcon_fb_unbind ( idx );
break ;
case FB_EVENT_FB_REGISTERED :
ret = fbcon_fb_registered ( info ); @@ -3178,17 +3217,31 @@ static int fbcon_event_notify(struct not
con2fb -> framebuffer = con2fb_map [ con2fb -> console - 1 ];
break ;
case FB_EVENT_BLANK :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_fb_blanked ( info , * ( int * ) event -> data );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_NEW_MODELIST :
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_new_modelist ( info );
+ unlock_fb_info ( info );
break ;
case FB_EVENT_GET_REQ :
caps = event -> data ;
+ if ( ! lock_fb_info ( info )) {
+ ret = - ENODEV ;
+ goto done ;
+ }
fbcon_get_requirement ( info , caps );
+ unlock_fb_info ( info );
break ;
}
-
done :
return ret ;
} diff -puN drivers/video/fbmem.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency drivers/video/fbmem.c --- a/drivers/video/fbmem.c~fbmem-fix-fb_info-lock-and-mm-mmap_sem-circular-locking-dependency
+++ a/drivers/video/fbmem.c @@ -1086,13 +1086,8 @@ static long do_fb_ioctl(struct fb_info *
return - EINVAL ;
con2fb . framebuffer = -1 ;
event . data = & con2fb ;
-
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
fb_notifier_call_chain ( FB_EVENT_GET_CONSOLE_MAP , & event );
- unlock_fb_info ( info );
-
ret = copy_to_user ( argp , & con2fb , sizeof ( con2fb )) ? - EFAULT : 0 ;
break ;
case FBIOPUT_CON2FBMAP : @@ -1109,12 +1104,8 @@ static long do_fb_ioctl(struct fb_info *
break ;
}
event . data = & con2fb ;
- if ( ! lock_fb_info ( info ))
- return - ENODEV ;
event . info = info ;
- ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP ,
- & event );
- unlock_fb_info ( info );
+ ret = fb_notifier_call_chain ( FB_EVENT_SET_CONSOLE_MAP , & event );
break ;
case FBIOBLANK :
if ( ! lock_fb_info ( info )) _
Hi,
The commit 66c1ca breaks fbdev mode switching. The first mode
(selected with mode_option or during boot) is ok but every mode
switch with fbset locks up computer. If the commit is reverted
mode switching works correctly.
I do not understand why. I would be grateful if someone else
can confirm the problem as well.
The commit's details are:
commit 66c1ca019078220dc1bf968f2bb18421100ef147
Author: Andrea Righi [off-list ref]
Date: Tue Mar 31 15:25:18 2009 -0700
fbmem: fix fb_info->lock and mm->mmap_sem circular locking dependency
Regards,
Krzysztof
----------------------------------------------------------------------
Kto lepiej radzi sobie w kuchni?
Odpowiedz i wygraj sprzet AGD! >> http://link.interia.pl/f2103
On Mon, Apr 06, 2009 at 08:47:18PM +0200, Krzysztof Helt wrote: Hi,
The commit 66c1ca breaks fbdev mode switching. The first mode
(selected with mode_option or during boot) is ok but every mode
switch with fbset locks up computer. If the commit is reverted
mode switching works correctly.
I do not understand why. I would be grateful if someone else
can confirm the problem as well.
The commit's details are:
commit 66c1ca019078220dc1bf968f2bb18421100ef147
Author: Andrea Righi [off-list ref]
Date: Tue Mar 31 15:25:18 2009 -0700
fbmem: fix fb_info->lock and mm->mmap_sem circular locking dependency
Regards,
Krzysztof
Any lockdep info or oops? it just locks up the system?
Thanks,
-Andrea
On Mon, 6 Apr 2009, Andrea Righi wrote: On Mon, Apr 06, 2009 at 08:47:18PM +0200, Krzysztof Helt wrote: quoted The commit 66c1ca breaks fbdev mode switching. The first mode
(selected with mode_option or during boot) is ok but every mode
switch with fbset locks up computer. If the commit is reverted
mode switching works correctly.
I do not understand why. I would be grateful if someone else
can confirm the problem as well.
The commit's details are:
commit 66c1ca019078220dc1bf968f2bb18421100ef147
Author: Andrea Righi [off-list ref]
Date: Tue Mar 31 15:25:18 2009 -0700
fbmem: fix fb_info->lock and mm->mmap_sem circular locking dependency
Any lockdep info or oops? it just locks up the system?
# echo d > /proc/sysrq-trigger
[ 187.654947] INFO: lockdep is turned off.
Strange, I do have lockdep enabled:
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_LOCKDEP=y
CONFIG_DEBUG_LOCKDEP=y
# echo w > /proc/sysrq-trigger
[ 243.301997] SysRq : Show Blocked State
[ 243.302007] task PC stack pid father
[ 243.302017] events/0 D 0000000000000000 0 9 2
[ 243.302025] Call Trace:
[ 243.302038] [c0000000060cb680] [c0000000060cb730] 0xc0000000060cb730 (unreliable)
[ 243.302055] [c0000000060cb850] [c00000000001088c] .__switch_to+0xec/0x14c
[ 243.302068] [c0000000060cb8e0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 243.302078] [c0000000060cba10] [c0000000003c459c] .schedule+0x1c/0x3c
[ 243.302087] [c0000000060cba90] [c0000000003c4798] .schedule_timeout+0x40/0x1f8
[ 243.302098] [c0000000060cbb80] [c0000000003c65b4] .__down+0x70/0xc4
[ 243.302110] [c0000000060cbc40] [c000000000073f3c] .down+0x44/0x6c
[ 243.302123] [c0000000060cbcd0] [c0000000000532c0] .acquire_console_sem+0x30/0x64
[ 243.302143] [c0000000060cbd50] [c00000000024511c] .console_callback+0x20/0x19c
[ 243.302156] [c0000000060cbdf0] [c00000000006940c] .worker_thread+0x23c/0x364
[ 243.302165] [c0000000060cbf00] [c00000000006e5d4] .kthread+0x78/0xc4
[ 243.302177] [c0000000060cbf90] [c000000000021450] .kernel_thread+0x54/0x70
[ 243.302184] events/1 D 0000000000000000 0 10 2
[ 243.302192] Call Trace:
[ 243.302199] [c0000000060d3660] [c0000000060d3710] 0xc0000000060d3710 (unreliable)
[ 243.302210] [c0000000060d3830] [c00000000001088c] .__switch_to+0xec/0x14c
[ 243.302220] [c0000000060d38c0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 243.302229] [c0000000060d39f0] [c0000000003c459c] .schedule+0x1c/0x3c
[ 243.302238] [c0000000060d3a70] [c0000000003c4798] .schedule_timeout+0x40/0x1f8
[ 243.302248] [c0000000060d3b60] [c0000000003c65b4] .__down+0x70/0xc4
[ 243.302257] [c0000000060d3c20] [c000000000073f3c] .down+0x44/0x6c
[ 243.302267] [c0000000060d3cb0] [c0000000000532c0] .acquire_console_sem+0x30/0x64
[ 243.302278] [c0000000060d3d30] [c00000000021ac88] .fb_flashcursor+0x44/0x3bc
[ 243.302288] [c0000000060d3df0] [c00000000006940c] .worker_thread+0x23c/0x364
[ 243.302298] [c0000000060d3f00] [c00000000006e5d4] .kthread+0x78/0xc4
[ 243.302307] [c0000000060d3f90] [c000000000021450] .kernel_thread+0x54/0x70
[ 243.302322] ps3fb D 0000000000000000 0 370 2
[ 243.302330] Call Trace:
[ 243.302337] [c0000000061077a0] [c000000006107850] 0xc000000006107850 (unreliable)
[ 243.302348] [c000000006107970] [c00000000001088c] .__switch_to+0xec/0x14c
[ 243.302358] [c000000006107a00] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 243.302367] [c000000006107b30] [c0000000003c459c] .schedule+0x1c/0x3c
[ 243.302376] [c000000006107bb0] [c0000000003c4798] .schedule_timeout+0x40/0x1f8
[ 243.302386] [c000000006107ca0] [c0000000003c65b4] .__down+0x70/0xc4
[ 243.302396] [c000000006107d60] [c000000000073f3c] .down+0x44/0x6c
[ 243.302406] [c000000006107df0] [c0000000000532c0] .acquire_console_sem+0x30/0x64
[ 243.302417] [c000000006107e70] [c000000000228d0c] .ps3fbd+0x4c/0x9c
[ 243.302426] [c000000006107f00] [c00000000006e5d4] .kthread+0x78/0xc4
[ 243.302435] [c000000006107f90] [c000000000021450] .kernel_thread+0x54/0x70
[ 243.302466] fbset D 000000000ff59878 0 2069 2065
[ 243.302474] Call Trace:
[ 243.302481] [c000000006d43040] [c000000006d430f0] 0xc000000006d430f0 (unreliable)
[ 243.302492] [c000000006d43210] [c00000000001088c] .__switch_to+0xec/0x14c
[ 243.302502] [c000000006d432a0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 243.302512] [c000000006d433d0] [c0000000003c587c] .mutex_lock_nested+0x268/0x414
[ 243.302521] [c000000006d434d0] [c000000000214200] .lock_fb_info+0x28/0x64
[ 243.302531] [c000000006d43560] [c0000000002208f8] .fbcon_event_notify+0x144/0x89c
[ 243.302542] [c000000006d436b0] [c000000000074174] .notifier_call_chain+0xac/0x124
[ 243.302552] [c000000006d43760] [c000000000074510] .__blocking_notifier_call_chain+0x70/0xb0
[ 243.302565] [c000000006d43810] [c000000000213bd0] .fb_notifier_call_chain+0x28/0x40
[ 243.302575] [c000000006d43890] [c000000000215dec] .fb_set_var+0x2d4/0x314
[ 243.302583] [c000000006d43a10] [c000000000215f68] .do_fb_ioctl+0x13c/0x4bc
[ 243.302592] [c000000006d43c10] [c0000000002163dc] .fb_compat_ioctl+0xf4/0x834
[ 243.302606] [c000000006d43d50] [c0000000001292c4] .compat_sys_ioctl+0x11c/0x448
[ 243.302616] [c000000006d43e30] [c0000000000074dc] syscall_exit+0x0/0x40
and a bit later:
[ 608.812517] INFO: task events/0:9 blocked for more than 480 seconds.
[ 608.812523] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 608.812529] events/0 D 0000000000000000 0 9 2
[ 608.812538] Call Trace:
[ 608.812550] [c0000000060cb680] [c0000000060cb730] 0xc0000000060cb730 (unreliable)
[ 608.812567] [c0000000060cb850] [c00000000001088c] .__switch_to+0xec/0x14c
[ 608.812580] [c0000000060cb8e0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 608.812590] [c0000000060cba10] [c0000000003c459c] .schedule+0x1c/0x3c
[ 608.812599] [c0000000060cba90] [c0000000003c4798] .schedule_timeout+0x40/0x1f8
[ 608.812610] [c0000000060cbb80] [c0000000003c65b4] .__down+0x70/0xc4
[ 608.812622] [c0000000060cbc40] [c000000000073f3c] .down+0x44/0x6c
[ 608.812635] [c0000000060cbcd0] [c0000000000532c0] .acquire_console_sem+0x30/0x64
[ 608.812647] [c0000000060cbd50] [c00000000024511c] .console_callback+0x20/0x19c
[ 608.812659] [c0000000060cbdf0] [c00000000006940c] .worker_thread+0x23c/0x364
[ 608.812669] [c0000000060cbf00] [c00000000006e5d4] .kthread+0x78/0xc4
[ 608.812681] [c0000000060cbf90] [c000000000021450] .kernel_thread+0x54/0x70
[ 608.812687] INFO: lockdep is turned off.
[ 608.812693] INFO: task events/1:10 blocked for more than 480 seconds.
[ 608.812698] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 608.812703] events/1 D 0000000000000000 0 10 2
[ 608.812711] Call Trace:
[ 608.812718] [c0000000060d3660] [c0000000060d3710] 0xc0000000060d3710 (unreliable)
[ 608.812729] [c0000000060d3830] [c00000000001088c] .__switch_to+0xec/0x14c
[ 608.812738] [c0000000060d38c0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 608.812748] [c0000000060d39f0] [c0000000003c459c] .schedule+0x1c/0x3c
[ 608.812757] [c0000000060d3a70] [c0000000003c4798] .schedule_timeout+0x40/0x1f8
[ 608.812767] [c0000000060d3b60] [c0000000003c65b4] .__down+0x70/0xc4
[ 608.812776] [c0000000060d3c20] [c000000000073f3c] .down+0x44/0x6c
[ 608.812786] [c0000000060d3cb0] [c0000000000532c0] .acquire_console_sem+0x30/0x64
[ 608.812797] [c0000000060d3d30] [c00000000021ac88] .fb_flashcursor+0x44/0x3bc
[ 608.812807] [c0000000060d3df0] [c00000000006940c] .worker_thread+0x23c/0x364
[ 608.812816] [c0000000060d3f00] [c00000000006e5d4] .kthread+0x78/0xc4
[ 608.812826] [c0000000060d3f90] [c000000000021450] .kernel_thread+0x54/0x70
[ 608.812832] INFO: lockdep is turned off.
[ 608.812868] INFO: task fbset:2069 blocked for more than 480 seconds.
[ 608.812872] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 608.812878] fbset D 000000000ff59878 0 2069 2065
[ 608.812886] Call Trace:
[ 608.812893] [c000000006d43040] [c000000006d430f0] 0xc000000006d430f0 (unreliable)
[ 608.812904] [c000000006d43210] [c00000000001088c] .__switch_to+0xec/0x14c
[ 608.812914] [c000000006d432a0] [c0000000003c449c] .__schedule+0x9b8/0xa9c
[ 608.812924] [c000000006d433d0] [c0000000003c587c] .mutex_lock_nested+0x268/0x414
[ 608.812933] [c000000006d434d0] [c000000000214200] .lock_fb_info+0x28/0x64
[ 608.812943] [c000000006d43560] [c0000000002208f8] .fbcon_event_notify+0x144/0x89c
[ 608.812954] [c000000006d436b0] [c000000000074174] .notifier_call_chain+0xac/0x124
[ 608.812964] [c000000006d43760] [c000000000074510] .__blocking_notifier_call_chain+0x70/0xb0
[ 608.812978] [c000000006d43810] [c000000000213bd0] .fb_notifier_call_chain+0x28/0x40
[ 608.812987] [c000000006d43890] [c000000000215dec] .fb_set_var+0x2d4/0x314
[ 608.812996] [c000000006d43a10] [c000000000215f68] .do_fb_ioctl+0x13c/0x4bc
[ 608.813005] [c000000006d43c10] [c0000000002163dc] .fb_compat_ioctl+0xf4/0x834
[ 608.813018] [c000000006d43d50] [c0000000001292c4] .compat_sys_ioctl+0x11c/0x448
[ 608.813028] [c000000006d43e30] [c0000000000074dc] syscall_exit+0x0/0x40
[ 608.813034] INFO: lockdep is turned off.
As evidenced by the compat_sys_ioctl, this is a 32-bit userland on ppc64.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Techsoft Centre Europe
The Corporate Village � Da Vincilaan 7-D1 � B-1935 Zaventem � Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 � RPR Brussels
Fortis � BIC GEBABEBB � IBAN BE41293037680010
On Tue, Apr 07, 2009 at 11:17:00AM +0200, Geert Uytterhoeven wrote: On Mon, 6 Apr 2009, Andrea Righi wrote: quoted On Mon, Apr 06, 2009 at 08:47:18PM +0200, Krzysztof Helt wrote: quoted The commit 66c1ca breaks fbdev mode switching. The first mode
(selected with mode_option or during boot) is ok but every mode
switch with fbset locks up computer. If the commit is reverted
mode switching works correctly.
I do not understand why. I would be grateful if someone else
can confirm the problem as well.
The commit's details are:
commit 66c1ca019078220dc1bf968f2bb18421100ef147
Author: Andrea Righi [off-list ref]
Date: Tue Mar 31 15:25:18 2009 -0700
fbmem: fix fb_info->lock and mm->mmap_sem circular locking dependency
Any lockdep info or oops? it just locks up the system?
# echo d > /proc/sysrq-trigger
[ 187.654947] INFO: lockdep is turned off.
Strange, I do have lockdep enabled:
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_LOCKDEP=y
CONFIG_DEBUG_LOCKDEP=y
Probably because lockdep reported the first lock bug and disabled the
checking for the next lock bugs, to avoid log flooding of follow-up
bugs. Search the first lockdep occurrence in dmesg.
-Andrea