kernel-ark/arch/um/drivers
Richard Weinberger 4756227734 um: call free_irq() only on enabled channels
When I use OpenSUSE-11.2 on UML (> 2.6.25)
I get lots of such errors:

Registering fd 1 twice
Irqs : 3, 3
Ids : 0x09cb41a0, 0x09cb4120
------------[ cut here ]------------
WARNING: at kernel/irq/manage.c:896 __free_irq+0x79/0x11a()
Trying to free already-free IRQ 3
Modules linked in:
09dadc6c:  [<081b2edb>] dump_stack+0x1c/0x20
09dadc84:  [<080716da>] warn_slowpath_common+0x49/0x77
09dadc9c:  [<08071772>] warn_slowpath_fmt+0x26/0x2a
09dadcb4:  [<08094e08>] __free_irq+0x79/0x11a
09dadce4:  [<08094ed6>] free_irq+0x2d/0x49
09dadcf4:  [<0805b4bc>] close_one_chan+0x70/0x9c
09dadd0c:  [<0805b833>] close_chan+0x17/0x22
09dadd1c:  [<0805bdda>] enable_chan+0x70/0x7c
09dadd3c:  [<0805cbb7>] line_open+0x34/0x9f
09dadd54:  [<0805b21e>] con_open+0x13/0x35
09dadd6c:  [<0814dc89>] tty_open+0x285/0x384
09dadda0:  [<080b754e>] chrdev_open+0xe0/0xf9
09daddc0:  [<080b3fb2>] __dentry_open+0xf3/0x1e2
09dadde4:  [<080b4142>] nameidata_to_filp+0x35/0x49
09daddfc:  [<080bd270>] do_last+0x409/0x50e
09dade28:  [<080bea04>] do_filp_open+0x175/0x446
09dadecc:  [<080b3d89>] do_sys_open+0x4a/0x128
09dadf04:  [<080b3ea2>] sys_open+0x19/0x21
09dadf28:  [<0805ab5a>] handle_syscall+0x7a/0x98
09dadf78:  [<08068441>] userspace+0x2c9/0x370
09dadfe0:  [<08058bb3>] fork_handler+0x53/0x5b
09dadffc:  [<00766564>] 0x766564

---[ end trace 9ebc1094aaf4bded ]---

This patch fixes the issue.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-09 20:45:04 -07:00
..
chan_kern.c um: call free_irq() only on enabled channels 2010-08-09 20:45:04 -07:00
chan_user.c
cow_sys.h
cow_user.c
cow.h
daemon_kern.c
daemon_user.c
daemon.h
fd.c
harddog_kern.c uml: Pushdown the bkl from harddog_kern ioctl 2010-05-22 17:44:21 +02:00
harddog_user.c
hostaudio_kern.c sound: push BKL into open functions 2010-07-12 17:41:05 +02:00
line.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
Makefile
mcast_kern.c
mcast_user.c
mcast.h
mconsole_kern.c Switch may_open() and break_lease() to passing O_... 2010-03-03 13:00:21 -05:00
mconsole_user.c
mmapper_kern.c um/mmapper: Remove BKL usage 2010-05-17 05:27:03 +02:00
net_kern.c arch/um/drivers: remove duplicate structure field initialization 2010-07-21 11:16:09 -07:00
net_user.c
null.c
pcap_kern.c
pcap_user.c
pcap_user.h uml: remove useless comments 2009-04-01 08:59:17 -07:00
port_kern.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
port_user.c
port.h uml: remove useless comments 2009-04-01 08:59:17 -07:00
pty.c
random.c um: Remove BKL from random 2009-10-14 15:35:51 +02:00
slip_common.c
slip_common.h
slip_kern.c UML: Fix some apparent bitrot 2009-06-25 11:22:13 -07:00
slip_user.c
slip.h
slirp_kern.c UML: Fix some apparent bitrot 2009-06-25 11:22:13 -07:00
slirp_user.c
slirp.h
ssl.c
ssl.h uml: remove useless comments 2009-04-01 08:59:17 -07:00
stderr_console.c
stdio_console.c
stdio_console.h uml: remove useless comments 2009-04-01 08:59:17 -07:00
tty.c
ubd_kern.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ubd_user.c
vde_kern.c
vde_user.c
vde.h
xterm_kern.c
xterm.c
xterm.h uml: remove useless comments 2009-04-01 08:59:17 -07:00