linux-stable/drivers/hv
Vitaly Kuznetsov adcde069a8 Drivers: hv: vmbus: avoid double kfree for device_obj
On driver shutdown device_obj is being freed twice:
1) In vmbus_free_channels()
2) vmbus_device_release() (which is being triggered by device_unregister() in
   vmbus_device_unregister().
This double kfree leads to the following sporadic crash on driver unload:

[   23.469876] general protection fault: 0000 [#1] SMP
[   23.470036] Modules linked in: hv_vmbus(-)
[   23.470036] CPU: 2 PID: 213 Comm: rmmod Not tainted 3.19.0-rc5_bug923184+ #488
[   23.470036] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  05/23/2012
[   23.470036] task: ffff880036ef1cb0 ti: ffff880036ce8000 task.ti: ffff880036ce8000
[   23.470036] RIP: 0010:[<ffffffff811d2e1b>]  [<ffffffff811d2e1b>] __kmalloc_node_track_caller+0xdb/0x1e0
[   23.470036] RSP: 0018:ffff880036cebcc8  EFLAGS: 00010246
...

When this crash does not happen on driver unload the similar one is expected if
we try to load hv_vmbus again.

Remove kfree from vmbus_free_channels() as freeing it from
vmbus_device_release() seems right.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 19:29:05 -08:00
..
channel.c Drivers: hv: rename sc_lock to the more generic lock 2015-01-25 09:18:00 -08:00
channel_mgmt.c Drivers: hv: vmbus: avoid double kfree for device_obj 2015-03-01 19:29:05 -08:00
connection.c Drivers: hv: vmbus: Use get_cpu() to get the current CPU 2015-01-12 05:04:10 -08:00
hv.c Drivers: hv: vmbus: Implement a clockevent device 2015-01-25 09:17:57 -08:00
hv_balloon.c Drivers: hv: hv_balloon: Don't post pressure status from interrupt context 2015-01-25 09:17:57 -08:00
hv_fcopy.c hv: hv_fcopy: drop the obsolete message on transfer failure 2015-01-25 09:17:58 -08:00
hv_kvp.c Drivers: hv: kvp,vss: Fast propagation of userspace communication failure 2014-11-26 19:00:32 -08:00
hv_snapshot.c Drivers: hv: kvp,vss: Fast propagation of userspace communication failure 2014-11-26 19:00:32 -08:00
hv_util.c Drivers: hv: util: Fix a bug in the KVP code 2014-07-09 14:34:35 -07:00
hyperv_vmbus.h Drivers: hv: vmbus: Implement a clockevent device 2015-01-25 09:17:57 -08:00
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: Implement the file copy service 2014-02-18 10:53:48 -08:00
ring_buffer.c Drivers: hv: vmbus: Enable interrupt driven flow control 2014-09-23 23:31:22 -07:00
vmbus_drv.c Drivers: hv: vmbus: rename channel work queues 2015-03-01 19:29:05 -08:00