mirror-linux/drivers
Sagi Grimberg 58f5c8d5ca nvmet: fix a memory leak in controller identify
Simply free an allocated buffer once we copied its content
to the request sgl.

kmemleak complaint:
unreferenced object 0xffff8cd40c388000 (size 4096):
  comm "kworker/2:2H", pid 14739, jiffies 4401313113
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace (crc 0):
    [<ffffffff9e01087a>] kmemleak_alloc+0x4a/0x90
    [<ffffffff9d30324a>] __kmalloc_cache_noprof+0x35a/0x420
    [<ffffffffc180b0e2>] nvmet_execute_identify+0x912/0x9f0 [nvmet]
    [<ffffffffc181a72c>] nvmet_tcp_try_recv_pdu+0x84c/0xc90 [nvmet_tcp]
    [<ffffffffc181ac02>] nvmet_tcp_io_work+0x82/0x8b0 [nvmet_tcp]
    [<ffffffff9cfa7158>] process_one_work+0x178/0x3e0
    [<ffffffff9cfa8e9c>] worker_thread+0x2ec/0x420
    [<ffffffff9cfb2140>] kthread+0xf0/0x120
    [<ffffffff9cee36a4>] ret_from_fork+0x44/0x70
    [<ffffffff9ce7fdda>] ret_from_fork_asm+0x1a/0x30

Fixes: 84909f7dec ("nvmet: use kzalloc instead of ZERO_PAGE in nvme_execute_identify_ns_nvm()")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2025-01-24 07:34:56 -08:00
..
accel Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
accessibility
acpi ACPI: EC: Enable EC support on LoongArch by default 2024-12-18 20:23:59 +01:00
amba ARM: 9415/1: amba: Add dev_is_amba() function and export it for modules 2024-11-12 16:41:45 +00:00
android Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
ata block: simplify tag allocation policy selection 2025-01-06 07:37:41 -07:00
atm Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
auxdisplay Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
base - Have the Automatic IBRS setting check on AMD does not falsely fire in 2024-12-08 11:38:56 -08:00
bcma Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
block nbd: fix partial sending 2025-01-13 07:46:20 -07:00
bluetooth Bluetooth: btmtk: avoid UAF in btmtk_process_coredump 2024-12-12 09:25:28 -05:00
bus Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
cache
cdrom block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
cdx module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
char Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
clk Two reverts and two EN7581 driver fixes: 2024-12-10 18:21:40 -08:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2024-12-09 18:42:42 +00:00
comedi
connector
counter module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
cpufreq cpufreq/amd-pstate: Use boost numerator for upper bound of frequencies 2024-12-10 10:17:43 -06:00
cpuidle Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
crypto crypto: hisilicon/debugfs - fix the struct pointer incorrectly offset problem 2024-12-10 13:40:25 +08:00
cxl cxl/region: Fix region creation for greater than x2 switches 2024-12-10 14:50:34 -07:00
dax module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dca
devfreq Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
dio
dma module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00
dma-buf Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
dpll
edac EDAC/amd64: Simplify ECC check on unified memory controllers 2024-12-11 21:47:33 +01:00
eisa
extcon Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
firewire firewire updates for v6.13 2024-11-25 17:12:54 -08:00
firmware soc: fixes for 6.13, part 2 2024-12-21 15:45:06 -08:00
fpga module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
gnss
gpio gpio: idio-16: Actually make use of the GPIO_IDIO_16 symbol namespace 2024-12-10 11:38:57 +01:00
gpu amd-drm-fixes-6.13-2024-12-18: 2024-12-20 16:21:44 +10:00
greybus
hid hid-for-linus-2024120501 2024-12-05 10:06:47 -08:00
hsi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hte Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hv Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hwmon hwmon: (tmp513) Fix interpretation of values of Temperature Result and Limit Registers 2024-12-16 15:58:25 -08:00
hwspinlock Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hwtracing Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
i2c i2c: riic: Always round-up when calculating bus period 2024-12-12 12:54:02 +01:00
i3c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
idle intel_idle: add Granite Rapids Xeon D support 2024-11-11 15:48:50 +01:00
iio 24 hotfixes. 17 are cc:stable. 15 are MM and 9 are non-MM. 2024-12-08 11:26:13 -08:00
infiniband module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
input Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
interconnect
iommu iommu/vt-d: Avoid draining PRQ in sva mm release path 2024-12-13 15:54:27 +01:00
ipack
irqchip irqchip/gic-v3: Work around insecure GIC integrations 2024-12-13 18:15:29 +01:00
isdn
leds module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
macintosh Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
mailbox TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
mcb module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
md md/md-bitmap: move bitmap_{start, end}write to md upper layer 2025-01-13 08:56:11 -08:00
media [GIT PULL for 6.13-rc4] media fixes 2024-12-21 10:56:34 -08:00
memory Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
memstick block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
message scsi: message: fusion: Constify struct pci_device_id 2024-11-20 21:38:24 -05:00
mfd module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
misc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
mmc block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
most
mtd block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
mux
net Including fixes from can and netfilter. 2024-12-19 09:19:11 -08:00
nfc
ntb
nubus
nvdimm module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
nvme nvmet: fix a memory leak in controller identify 2025-01-24 07:34:56 -08:00
nvmem Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
of Devicetree fixes for 6.13, part 1: 2024-12-22 08:40:23 -08:00
opp Additional power management updates for 6.13-rc1 2024-11-27 14:40:33 -08:00
parisc Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
parport Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
pci PCI: hookup irq_get_affinity callback 2024-12-23 08:17:23 -07:00
pcmcia Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
peci module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
perf module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
phy Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
pinctrl module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
platform ACPI fix for 6.13-rc4 2024-12-21 10:42:35 -08:00
pmdomain pmdomain core: 2024-12-06 11:24:00 -08:00
pnp
power power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
powercap module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pps Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ps3 ps3: Correct some typos in comments 2024-11-15 00:32:29 +11:00
ptp ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init() 2024-12-06 17:38:11 -08:00
pwm pwm: Fix regression in pwm-stm32 driver when converting to new waveform support 2024-12-19 08:50:05 -08:00
rapidio
ras
regulator regulator: rename regulator-uv-survival-time-ms according to DT binding 2024-12-19 11:15:24 +00:00
remoteproc remoteproc: qcom: wcss: Remove double assignment in q6v5_wcss_probe() 2024-11-15 20:36:27 -08:00
reset module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
rpmsg Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
rtc module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
s390 block: remove BLK_MQ_F_SHOULD_MERGE 2024-12-23 08:17:23 -07:00
sbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
scsi block: add a queue_limits_commit_update_frozen helper 2025-01-10 07:29:23 -07:00
sh sh updates for v6.13 2024-11-30 14:45:29 -08:00
siox
slimbus Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
soundwire module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
spi spi: rockchip-sfc: Fix error in remove progress 2024-12-18 16:02:08 +00:00
spmi Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ssb
staging staging: gpib: Fix allyesconfig build failures 2024-12-21 11:30:13 -08:00
target block: remove bio_add_pc_page 2025-01-04 15:27:35 -07:00
tc TC: Fix the wrong format specifier 2024-11-12 15:48:08 +01:00
tee Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
thermal thermal/thresholds: Fix boundaries and detection routine 2024-12-18 14:51:31 +01:00
thunderbolt thunderbolt: Improve redrive mode handling 2024-12-16 09:59:38 +02:00
tty Serial driver fixes for 6.13-rc3 2024-12-14 09:31:19 -08:00
ufs block: remove BLK_MQ_F_NO_SCHED 2025-01-06 07:37:41 -07:00
uio Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
usb usb-storage: fix queue freeze vs limits lock order 2025-01-10 07:29:24 -07:00
vdpa vdpa/mlx5: Fix suboptimal range on iotlb iteration 2024-11-12 18:05:05 -05:00
vfio VFIO fixes for v6.13-rc3 2024-12-11 13:48:25 -08:00
vhost mm: page_frag: avoid caller accessing 'page_frag_cache' directly 2024-11-11 10:56:27 -08:00
video Merge tag 'drm-misc-fixes-2024-12-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes 2024-12-20 07:13:45 +10:00
virt arm64 fixes for 6.13-rc2: 2024-12-06 13:47:55 -08:00
virtio virtio: hookup irq_get_affinity callback 2024-12-23 08:17:23 -07:00
w1 Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
watchdog linux-watchdog 6.13-rc1 tag 2024-12-05 10:03:43 -08:00
xen module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
zorro
Kconfig
Makefile