tmp_suning_uos_patched/drivers/misc
Dongdong Deng 4dacd5c073 kgdbts: prevent re-entry to kgdbts before it unregisters
The "kgdb_connected" variable of debug_core just indicates whether or
not kgdbts is connected to the debug_core.  It does not completely
prevent a script from trying invoke kgdbts again and possibly crashing
the system (see Call Trace below).

The configured variable in kgtbts can be used instead of
kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
also be removed because there is no possible way to build kgdbts as a
kernel module that you could unload with rmmod.

Call Trace:
-----------------------------------------------------------------
root:/$ echo kgdbts=V1S1000 > /sys/module/kgdbts/parameters/kgdbts
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
------------[ cut here ]------------
WARNING: at kernel/debug/debug_core.c:1002
kgdb_unregister_io_module+0xec/0x100()
Hardware name: Moon Creek platform
Modules linked in:
Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
Call Trace:
 [<c103b1ed>] warn_slowpath_common+0x6d/0xa0
 [<c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
 [<c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
 [<c10544e0>] ? param_attr_store+0x0/0x20
 [<c103b235>] warn_slowpath_null+0x15/0x20
 [<c1079fdc>] kgdb_unregister_io_module+0xec/0x100
 [<c124e4ea>] cleanup_kgdbts+0x1a/0x20
 [<c124eced>] param_set_kgdbts_var+0x6d/0xb0
 [<c124ec80>] ? param_set_kgdbts_var+0x0/0xb0
 [<c10544f7>] param_attr_store+0x17/0x20
 [<c105457c>] module_attr_store+0x2c/0x40
 [<c111fe84>] sysfs_write_file+0x94/0xf0
 [<c10d42f6>] vfs_write+0x96/0x130
 [<c111fdf0>] ? sysfs_write_file+0x0/0xf0
 [<c10d44d6>] sys_write+0x46/0xd0
 [<c13bf329>] system_call_done+0x0/0x4
---[ end trace 4eb028c6ee43154c ]---
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
-----------------------------------------------------------------

[jason.wessel@windriver.com: remove cleanup_kgdbts() ]
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2010-10-29 13:14:41 -05:00
..
c2port sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
cb710 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
eeprom i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
ibmasm fs: do not assign default i_ino in new_inode 2010-10-25 21:26:11 -04:00
iwmc3200top net/wireless: use generic_file_llseek in debugfs 2010-09-16 10:33:08 +02:00
sgi-gru llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
sgi-xp sgi-xp: incoming XPC channel messages can come in after the channel's partition structures have been torn down 2010-10-26 16:52:03 -07:00
ad525x_dpot-i2c.c drivers/misc/ad525x_dpot.c: new features 2010-10-26 16:52:14 -07:00
ad525x_dpot-spi.c drivers/misc/ad525x_dpot.c: new features 2010-10-26 16:52:14 -07:00
ad525x_dpot.c drivers/misc/ad525x_dpot.c: new features 2010-10-26 16:52:14 -07:00
ad525x_dpot.h ad525x_dpot: use correct rdac channel for ad5251/ad5252 2010-10-26 16:52:14 -07:00
apds990x.c drivers/misc: driver for APDS990X ALS and proximity sensors 2010-10-26 16:52:14 -07:00
apds9802als.c drivers/misc/apds9802als.c: add runtime PM support 2010-10-26 16:52:15 -07:00
arm-charlcd.c ARM: 6214/2: driver for the character LCD found in ARM refdesigns 2010-07-26 10:48:28 +01:00
atmel_pwm.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
atmel_tclib.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
atmel-ssc.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
bh1770glc.c drivers/misc: driver for bh1770glc / sfh7770 ALS and proximity sensor 2010-10-26 16:52:14 -07:00
bh1780gli.c i2c: Remove obsolete cleanup for clientdata 2010-09-30 14:14:22 +02:00
bmp085.c drivers/misc: support for the pressure sensor BMP085 from Bosch Sensortec 2010-08-09 20:45:05 -07:00
cs5535-mfgpt.c cs5535-mfgpt: reuse timers that have never been set up 2010-08-11 08:59:20 -07:00
ds1682.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
enclosure.c [SCSI] enclosure: fix error path - actually return ERR_PTR() on error 2010-07-27 12:03:48 -05:00
ep93xx_pwm.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
hmc6352.c hmc6352: add driver for the HMC6352 compass 2010-08-09 20:45:10 -07:00
hpilo.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2010-10-22 19:36:42 -07:00
hpilo.h hpilo: fix pointer warning in ilo_ccb_setup 2010-08-09 20:45:05 -07:00
ics932s401.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
ioc4.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
isl29003.c
isl29020.c drivers/misc/isl29020.c: ambient light sensor 2010-10-26 16:52:15 -07:00
Kconfig misc devices: do not enable by default 2010-10-26 16:52:16 -07:00
kgdbts.c kgdbts: prevent re-entry to kgdbts before it unregisters 2010-10-29 13:14:41 -05:00
lkdtm.c lkdtm: prefix enum constants 2010-10-26 16:52:14 -07:00
Makefile drivers/misc/apds9802als.c: ALS drivers for the apds9802als 2010-10-26 16:52:15 -07:00
pch_phub.c pch_phub: fix build warnings 2010-10-22 10:16:42 -07:00
phantom.c drivers/misc/phantom.c: add missing warning messages in phantom_probe() 2010-10-26 16:52:14 -07:00
ti_dac7512.c
tifm_7xx1.c
tifm_core.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
tsl2550.c
vmw_balloon.c vmware balloon: rename module 2010-09-22 17:22:38 -07:00