android_kernel_motorola_sm6375/drivers/hv
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Miaoqian Lin fe595759c2 Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj
[ Upstream commit 8bc69f86328e87a0ffa79438430cc82f3aa6a194 ]

kobject_init_and_add() takes reference even when it fails.
According to the doc of kobject_init_and_add():

   If this function returns an error, kobject_put() must be called to
   properly clean up the memory associated with the object.

Fix memory leak by calling kobject_put().

Fixes: c2e5df616e ("vmbus: add per-channel sysfs info")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Juan Vazquez <juvazq@linux.microsoft.com>
Link: https://lore.kernel.org/r/20220203173008.43480-1-linmq006@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-23 12:00:00 +01:00
..
channel.c
channel_mgmt.c Drivers: hv: vmbus: Increase wait time for VMbus unload 2021-05-14 09:44:22 +02:00
connection.c
hv.c Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected 2020-11-24 13:29:23 +01:00
hv_balloon.c hv_balloon: disable warning when floor reached 2020-11-18 19:20:17 +01:00
hv_fcopy.c
hv_kvp.c
hv_snapshot.c
hv_trace.c
hv_trace.h
hv_trace_balloon.h
hv_util.c hv_utils: Fix passing zero to 'PTR_ERR' warning 2021-07-14 16:53:16 +02:00
hv_utils_transport.c
hv_utils_transport.h
hyperv_vmbus.h hyperv/vmbus: include linux/bitops.h 2021-11-17 09:48:20 +01:00
Kconfig
Makefile
ring_buffer.c
vmbus_drv.c Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj 2022-02-23 12:00:00 +01:00