linux/drivers/s390/char
Michael Holzheu 3f7cb51fac [S390] vmur: Invalid allocation sequence for vmur class
The vmur class is allocated after the CCW driver is registered
and it is destroyed before the CCW driver is unregistered.
This is not the correct sequence, because the vmur class can be used
via driver core callbacks that are triggered during the CCW driver
deregistration. For Example:

1. vmur device is online
2. vmur module is unloaded

This leads to the following function call stack:

    <4> [<0000000000387286>] device_destroy+0x36/0x5c
    <4> [<000003e000209714>] ur_set_offline_force+0x9c/0x10c [vmur]
    <4> [<000003e00020a928>] ur_remove+0x64/0xbc [vmur]
    <4> [<00000000003e4d2e>] ccw_device_remove+0x42/0x1ac
    <4> [<000000000038a1aa>] __device_release_driver+0x9a/0xe4
    <4> [<000000000038a2da>] driver_detach+0xe6/0xec
    <4> [<0000000000388ee4>] bus_remove_driver+0xc0/0x108
    <4> [<000003e00020ad5a>] ur_exit+0x52/0x84 [vmur]

In device_destroy() the vmur class is used. Since it is already freed,
this can lead to a kernel panic.

To fix the problem, the vmur class has to be allocated before the CCW
driver is registered and destroyed after the CCW driver has ben unregistered.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-09-11 10:29:49 +02:00
..
con3215.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
con3270.c [S390] 3270 console: convert from bootmem to slab 2009-06-22 12:08:17 +02:00
ctrlchar.c
ctrlchar.h
defkeymap.c Build fix for drivers/s390/char/defkeymap.c 2008-03-04 08:01:26 -08:00
defkeymap.map
fs3270.c [S390] pm: con3270 power management callbacks. 2009-06-16 10:31:20 +02:00
Kconfig [S390] add call home support 2009-09-11 10:29:49 +02:00
keyboard.c unicode diacritics support 2007-10-17 08:42:52 -07:00
keyboard.h unicode diacritics support 2007-10-17 08:42:52 -07:00
Makefile [S390] add call home support 2009-09-11 10:29:49 +02:00
monreader.c [S390] proper use of device register 2009-09-11 10:29:45 +02:00
monwriter.c [S390] pm: monwriter power management callbacks. 2009-06-16 10:31:21 +02:00
raw3270.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
raw3270.h [S390] pm: con3270 power management callbacks. 2009-06-16 10:31:20 +02:00
sclp_async.c [S390] add call home support 2009-09-11 10:29:49 +02:00
sclp_cmd.c [S390] pm: memory hotplug power management callbacks 2009-06-16 10:31:20 +02:00
sclp_con.c [S390] Use del_timer instead of del_timer_sync 2009-06-22 12:08:19 +02:00
sclp_config.c [S390] convert sclp printks to pr_xxx macros. 2008-12-25 13:39:24 +01:00
sclp_cpi_sys.c [S390] convert sclp printks to pr_xxx macros. 2008-12-25 13:39:24 +01:00
sclp_cpi_sys.h [S390] sclp: sysfs interface for SCLP cpi 2008-01-26 14:11:08 +01:00
sclp_cpi.c [S390] sclp: sysfs interface for SCLP cpi 2008-01-26 14:11:08 +01:00
sclp_quiesce.c [S390] Cleanup sclp printk messages. 2008-07-14 10:02:19 +02:00
sclp_rw.c [S390] pm: power management support for SCLP drivers. 2009-06-16 10:31:16 +02:00
sclp_rw.h [S390] sclp: fix compile error for !SCLP_CONSOLE 2009-07-07 16:37:50 +02:00
sclp_sdias.c [S390] convert sclp printks to pr_xxx macros. 2008-12-25 13:39:24 +01:00
sclp_tty.c [S390] sclp_tty: Fix scheduling while atomic bug. 2008-07-14 10:02:25 +02:00
sclp_tty.h [S390] sclp_tty: remove ioctl interface. 2008-07-14 10:02:25 +02:00
sclp_vt220.c [S390] vt220 console: convert from bootmem to slab 2009-06-22 12:08:18 +02:00
sclp.c [S390] pm: power management support for SCLP drivers. 2009-06-16 10:31:16 +02:00
sclp.h [S390] add call home support 2009-09-11 10:29:49 +02:00
tape_34xx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-06-16 12:57:37 -07:00
tape_3590.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-06-16 12:57:37 -07:00
tape_3590.h [S390] tape: New read configuration data. 2007-05-04 18:48:26 +02:00
tape_block.c block: Do away with the notion of hardsect_size 2009-05-22 23:22:54 +02:00
tape_char.c [S390] tape message cleanup 2009-03-26 15:24:25 +01:00
tape_class.c device create: s390: convert device_create_drvdata to device_create 2008-10-16 09:24:44 -07:00
tape_class.h [S390] tape: duplicate sysfs filename when setting tape device online 2008-04-17 07:46:59 +02:00
tape_core.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
tape_proc.c [S390] tape message cleanup 2009-03-26 15:24:25 +01:00
tape_std.c [S390] tape: use init_timer_on_stack() rather than init_timer() 2009-09-11 10:29:46 +02:00
tape_std.h
tape.h [S390] pm: tape power management callbacks 2009-06-16 10:31:16 +02:00
tty3270.c [S390] 3270: lock dependency fixes 2009-06-12 10:27:33 +02:00
tty3270.h [S390] Get rid of a bunch of sparse warnings again. 2007-10-12 16:13:06 +02:00
vmcp.c [S390] convert vmcp printks to pr_xxx macros. 2008-12-25 13:39:18 +01:00
vmcp.h [S390] vmcp cleanup 2007-07-17 13:36:19 +02:00
vmlogrdr.c [S390] proper use of device register 2009-09-11 10:29:45 +02:00
vmur.c [S390] vmur: Invalid allocation sequence for vmur class 2009-09-11 10:29:49 +02:00
vmur.h [S390] vmur: Use wait queue instead of mutex to serialize open 2008-04-17 07:46:59 +02:00
vmwatchdog.c [S390] improve suspend/resume error messages 2009-07-07 16:37:53 +02:00
zcore.c [S390] Use csum_partial in checksum.h 2009-03-26 15:24:27 +01:00