linux/drivers/misc/mic
Ashutosh Dixit f38e87e8c8 misc: mic: Fix crash when MIC reset is invoked in RESET_FAILED state
This patch fixes the following crash seen when MIC reset is invoked in
RESET_FAILED state due to device_del being called a second time on an
already deleted device:

[<ffffffff813b2295>] device_del+0x45/0x1d0
[<ffffffff813b243e>] device_unregister+0x1e/0x60
[<ffffffffa040f1c2>] scif_unregister_device+0x12/0x20 [scif_bus]
[<ffffffffa042f75a>] cosm_stop+0xaa/0xe0 [mic_cosm]
[<ffffffffa042f844>] cosm_reset_trigger_work+0x14/0x20 [mic_cosm]

The fix consists in realizing that because cosm_reset changes the
state to MIC_RESETTING, cosm_stop needs the previous state, before it
changed to MIC_RESETTING, to decide whether a hw_ops->stop had
previously been issued. This is now provided in a new cosm_device
member cdev->prev_state.

Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 22:53:40 -08:00
..
bus misc: mic: Fix crash when MIC reset is invoked in RESET_FAILED state 2016-02-07 22:53:40 -08:00
card virtio: make find_vqs() checkpatch.pl-friendly 2016-01-12 20:47:06 +02:00
common misc: mic: Remove COSM functionality from the MIC card driver 2015-10-04 12:46:06 +01:00
cosm misc: mic: Fix crash when MIC reset is invoked in RESET_FAILED state 2016-02-07 22:53:40 -08:00
cosm_client misc: mic: COSM client driver 2015-10-04 12:46:06 +01:00
host misc: mic: Remove COSM functionality from the MIC host driver 2015-10-04 12:46:06 +01:00
scif misc: mic: fix incorrect use of error codes in SCIF DMA driver 2016-02-07 21:25:50 -08:00
Kconfig misc: mic: Fix SCIF build failure with IOMMU_SUPPORT disabled 2015-10-05 04:37:28 +01:00
Makefile misc: mic: Update MIC host daemon with COSM changes 2015-10-04 12:54:54 +01:00