android_kernel_motorola_sm6375/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Li Zetao 07b60f7452 ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()
[ Upstream commit 1e591ea072df7211f64542a09482b5f81cb3ad27 ]

There is a memory leaks problem reported by kmemleak:

unreferenced object 0xffff888102007a00 (size 128):
  comm "ubirsvol", pid 32090, jiffies 4298464136 (age 2361.231s)
  hex dump (first 32 bytes):
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
  backtrace:
[<ffffffff8176cecd>] __kmalloc+0x4d/0x150
[<ffffffffa02a9a36>] ubi_eba_create_table+0x76/0x170 [ubi]
[<ffffffffa029764e>] ubi_resize_volume+0x1be/0xbc0 [ubi]
[<ffffffffa02a3321>] ubi_cdev_ioctl+0x701/0x1850 [ubi]
[<ffffffff81975d2d>] __x64_sys_ioctl+0x11d/0x170
[<ffffffff83c142a5>] do_syscall_64+0x35/0x80
[<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

This is due to a mismatch between create and destroy interfaces, and
in detail that "new_eba_tbl" created by ubi_eba_create_table() but
destroyed by kfree(), while will causing "new_eba_tbl->entries" not
freed.

Fix it by replacing kfree(new_eba_tbl) with
ubi_eba_destroy_table(new_eba_tbl)

Fixes: 799dca34ac ("UBI: hide EBA internals")
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:44:09 +01:00
..
accessibility
acpi ACPI: video: Fix Lenovo Ideapad Z570 DMI match 2023-03-11 16:43:56 +01:00
amba
android binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0 2022-12-08 11:23:01 +01:00
ata ata: libata: Fix sata_down_spd_limit() when no link speed is reported 2023-02-22 12:50:24 +01:00
atm
auxdisplay
base driver core: Fix test_async_probe_init saves device in wrong array 2023-02-06 07:52:40 +01:00
bcma
block rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails 2023-03-11 16:44:04 +01:00
bluetooth Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave() 2023-01-18 11:41:16 +01:00
bus bus: sunxi-rsb: Fix error handling in sunxi_rsb_init() 2023-02-22 12:50:23 +01:00
cdrom
char ipmi_ssif: Rename idle state and check 2023-03-11 16:43:58 +01:00
clk clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() 2023-03-11 16:43:51 +01:00
clocksource clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled 2023-01-18 11:40:56 +01:00
connector
counter counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2023-01-18 11:41:24 +01:00
cpufreq cpufreq: armada-37xx: stop using 0 as NULL pointer 2023-02-06 07:52:41 +01:00
cpuidle cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:40:53 +01:00
crypto crypto: crypto4xx - Call dma_unmap_page when done 2023-03-11 16:43:42 +01:00
dax
dca
devfreq PM/devfreq: governor: Add a private governor_data for governor 2023-01-18 11:41:52 +01:00
dio drivers: dio: fix possible memory leak in dio_init() 2023-01-18 11:41:21 +01:00
dma dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size 2023-03-03 11:41:48 +01:00
dma-buf
edac EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info 2023-02-06 07:52:44 +01:00
eisa
extcon
firewire firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region 2023-02-22 12:50:22 +01:00
firmware firmware: coreboot: framebuffer: Ignore reserved pixel color bits 2023-03-11 16:43:58 +01:00
fpga fpga: stratix10-soc: Fix return value check in s10_ops_write_init() 2023-02-22 12:50:28 +01:00
fsi WRITE is "data source", not destination... 2023-02-22 12:50:23 +01:00
gnss
gpio gpio: vf610: connect GPIO label to dev name 2023-03-11 16:43:47 +01:00
gpu drm/radeon: Fix eDP for single-display iMac11,2 2023-03-11 16:44:07 +01:00
greybus
hid HID: Add Mapping for System Microphone Mute 2023-03-11 16:43:56 +01:00
hsi HSI: omap_ssi_core: Fix error handling in ssi_init() 2023-01-18 11:41:28 +01:00
hv Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() 2022-12-08 11:22:58 +01:00
hwmon hwmon: (coretemp) Simplify platform device handling 2023-03-11 16:43:57 +01:00
hwspinlock
hwtracing
i2c i2c: rk3x: fix a bunch of kernel-doc warnings 2023-02-22 12:50:25 +01:00
i3c
ide
idle
iio iio:adc:twl6030: Enable measurement of VAC 2023-02-22 12:50:30 +01:00
infiniband IB/hfi1: Assign npages earlier 2023-03-03 11:41:48 +01:00
input Input: ads7846 - don't check penirq immediately for 7845 2023-03-11 16:43:51 +01:00
interconnect
iommu iommu/amd: Pass gfp flags to iommu_map_page() in amd_iommu_map() 2023-02-22 12:50:42 +01:00
ipack
irqchip irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts 2023-03-11 16:43:43 +01:00
isdn mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave() 2023-01-18 11:41:32 +01:00
leds
lightnvm
macintosh macintosh/macio-adb: check the return value of ioremap() 2023-01-18 11:41:29 +01:00
mailbox mailbox: zynq-ipi: fix error handling while device_register() fails 2023-01-18 11:41:33 +01:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2023-01-18 11:41:25 +01:00
md dm flakey: don't corrupt the zero page 2023-03-11 16:44:04 +01:00
media media: ipu3-cio2: Fix PM runtime usage_count in driver unbind 2023-03-11 16:44:05 +01:00
memory memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe() 2023-02-06 07:52:34 +01:00
memstick
message
mfd mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() 2023-03-11 16:43:50 +01:00
misc misc: fastrpc: Fix use-after-free race condition for maps 2023-01-24 07:18:00 +01:00
mmc mmc: mmc_spi: fix error handling in mmc_spi_probe() 2023-02-22 12:50:39 +01:00
mtd ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume() 2023-03-11 16:44:09 +01:00
mux
net wifi: ath9k: use proper statements in conditionals 2023-03-11 16:44:07 +01:00
nfc nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() 2023-01-18 11:42:04 +01:00
ntb
nubus
nvdimm
nvme nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association 2023-02-22 12:50:35 +01:00
nvmem nvmem: core: fix cell removal on error 2023-02-22 12:50:28 +01:00
of of: overlay: fix null pointer dereferencing in find_dup_cset_node_entry() and find_dup_cset_prop() 2023-01-18 11:41:14 +01:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-03-11 16:43:41 +01:00
oprofile
parisc parisc: led: Fix potential null-ptr-deref in start_task() 2023-01-18 11:41:50 +01:00
parport parport_pc: Avoid FIFO port location truncation 2022-11-25 17:42:14 +01:00
pci PCI: Avoid FLR for AMD FCH AHCI adapters 2023-03-11 16:44:07 +01:00
pcmcia
perf perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init() 2023-01-18 11:40:50 +01:00
phy phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on() 2023-02-06 07:52:37 +01:00
pinctrl pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-03-11 16:43:57 +01:00
platform platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK 2023-02-06 07:52:42 +01:00
pnp PNP: fix name memory leak in pnp_alloc_dev() 2023-01-18 11:40:54 +01:00
power power: supply: fix null pointer dereferencing in power_supply_get_battery_info 2023-01-18 11:41:28 +01:00
powercap powercap: fix possible name leak in powercap_register_zone() 2023-03-11 16:43:40 +01:00
pps
ps3
ptp
pwm pwm: stm32-lp: fix the check on arr and cmp registers update 2023-03-11 16:44:08 +01:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2023-01-18 11:40:59 +01:00
ras
regulator regulator: s5m8767: Bounds check id indexing into arrays 2023-03-11 16:43:57 +01:00
remoteproc remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers 2023-03-11 16:43:52 +01:00
reset
rpmsg rpmsg: glink: Avoid infinite loop on intent for missing channel 2023-03-11 16:43:53 +01:00
rtc rtc: pm8xxx: fix set-alarm race 2023-03-11 16:43:58 +01:00
s390 treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-03-11 16:43:42 +01:00
sbus
scsi scsi: ses: Fix slab-out-of-bounds in ses_intf_remove() 2023-03-11 16:44:06 +01:00
sfi
sh
siox siox: fix possible memory leak in siox_device_add() 2022-11-25 17:42:14 +01:00
slimbus slimbus: stream: correct presence rate frequencies 2022-11-25 17:42:17 +01:00
soc ARM: ux500: do not directly dereference __iomem 2023-01-18 11:41:46 +01:00
soundwire
spi spi: synquacer: Fix timeout handling in synquacer_spi_transfer_one() 2023-03-11 16:43:47 +01:00
spmi
ssb
staging treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-03-11 16:43:42 +01:00
target scsi: target: core: Fix warning on RT kernels 2023-02-22 12:50:25 +01:00
tc
tee tee: optee: fix possible memory leak in optee_register_device() 2022-12-08 11:22:57 +01:00
thermal thermal: intel: powerclamp: Fix cur_state for multi package system 2023-03-11 16:44:04 +01:00
thunderbolt
tty treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-03-11 16:43:42 +01:00
uio uio: uio_dmem_genirq: Fix deadlock between irq config and handling 2023-01-18 11:41:22 +01:00
usb treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-03-11 16:43:42 +01:00
vfio vfio: platform: Do not pass return buffer to ACPI _RST method 2023-01-18 11:41:22 +01:00
vhost vhost: fix range used in translate_desc() 2023-01-18 11:41:57 +01:00
video fbdev: smscufx: fix error handling code in ufx_usb_probe 2023-02-22 12:50:29 +01:00
virt
virtio
visorbus
vlynq
vme vme: Fix error not catched in fake_init() 2023-01-18 11:41:26 +01:00
w1 w1: fix WARNING after calling w1_process() 2023-02-06 07:52:40 +01:00
watchdog watchdog: diag288_wdt: fix __diag288() inline assembly 2023-02-22 12:50:27 +01:00
xen fix "direction" argument of iov_iter_kvec() 2023-02-22 12:50:23 +01:00
zorro
Kconfig
Makefile