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
..
Kconfig [S390] add call home support 2009-09-11 10:29:49 +02:00
Makefile [S390] add call home support 2009-09-11 10:29:49 +02:00
con3215.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
con3270.c
ctrlchar.c
ctrlchar.h
defkeymap.c
defkeymap.map
fs3270.c
keyboard.c
keyboard.h
monreader.c [S390] proper use of device register 2009-09-11 10:29:45 +02:00
monwriter.c
raw3270.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
raw3270.h
sclp.c
sclp.h [S390] add call home support 2009-09-11 10:29:49 +02:00
sclp_async.c [S390] add call home support 2009-09-11 10:29:49 +02:00
sclp_cmd.c
sclp_con.c
sclp_config.c
sclp_cpi.c
sclp_cpi_sys.c
sclp_cpi_sys.h
sclp_quiesce.c
sclp_rw.c
sclp_rw.h [S390] sclp: fix compile error for !SCLP_CONSOLE 2009-07-07 16:37:50 +02:00
sclp_sdias.c
sclp_tty.c
sclp_tty.h
sclp_vt220.c
tape.h
tape_34xx.c
tape_3590.c
tape_3590.h
tape_block.c
tape_char.c
tape_class.c
tape_class.h
tape_core.c [S390] driver_data access 2009-06-22 12:08:23 +02:00
tape_proc.c
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
tty3270.c
tty3270.h
vmcp.c
vmcp.h
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
vmwatchdog.c [S390] improve suspend/resume error messages 2009-07-07 16:37:53 +02:00
zcore.c