This is a note to let you know that I've just added the patch titled HV: hv_balloon: fix memory leak with using debugfs_lookup() to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: hv-hv_balloon-fix-memory-leak-with-using-debugfs_lookup.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6dfb0771429a63db8561d44147f2bb76f93e1c86 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Thu, 2 Feb 2023 15:09:18 +0100 Subject: HV: hv_balloon: fix memory leak with using debugfs_lookup() From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> commit 6dfb0771429a63db8561d44147f2bb76f93e1c86 upstream. When calling debugfs_lookup() the result must have dput() called on it, otherwise the memory will leak over time. To make things simpler, just call debugfs_lookup_and_remove() instead which handles all of the logic at once. Cc: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu@xxxxxxxxxx> Cc: Dexuan Cui <decui@xxxxxxxxxxxxx> Fixes: d180e0a1be6c ("Drivers: hv: Create debugfs file with hyper-v balloon usage information") Cc: stable <stable@xxxxxxxxxx> Reviewed-by: Michael Kelley <mikelley@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230202140918.2289522-1-gregkh@xxxxxxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -1911,7 +1911,7 @@ static void hv_balloon_debugfs_init(str static void hv_balloon_debugfs_exit(struct hv_dynmem_device *b) { - debugfs_remove(debugfs_lookup("hv-balloon", NULL)); + debugfs_lookup_and_remove("hv-balloon", NULL); } #else Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-6.1/iio-imu-fxos8700-fix-map-label-of-channel-type-to-magn-sensor.patch queue-6.1/riscv-disable-generation-of-unwind-tables.patch queue-6.1/iio-imx8qxp-adc-fix-irq-flood-when-call-imx8qxp_adc_read_raw.patch queue-6.1/iio-imu-fxos8700-fix-incomplete-accel-and-magn-channels-readback.patch queue-6.1/hv_netvsc-fix-missed-pagebuf-entries-in-netvsc_dma_map-unmap.patch queue-6.1/usb-gadget-f_uac2-fix-incorrect-increment-of-bnumendpoints.patch queue-6.1/alsa-hda-realtek-fix-mute-micmute-leds-speaker-don-t-work-for-a-hp-platform.patch queue-6.1/usb-dwc3-qcom-enable-vbus-override-when-in-otg-dr-mo.patch queue-6.1/fbcon-check-font-dimension-limits.patch queue-6.1/iio-imu-fxos8700-fix-failed-initialization-odr-mode-assignment.patch queue-6.1/kernel-irq-irqdomain.c-fix-memory-leak-with-using-debugfs_lookup.patch queue-6.1/can-isotp-split-tx-timer-into-transmission-and-timeout.patch queue-6.1/iio-hid-fix-the-retval-in-gyro_3d_capture_sample.patch queue-6.1/nvmem-qcom-spmi-sdam-fix-module-autoloading.patch queue-6.1/vc_screen-move-load-of-struct-vc_data-pointer-in-vcs.patch queue-6.1/watchdog-diag288_wdt-do-not-use-stack-buffers-for-hardware-data.patch queue-6.1/nvmem-brcm_nvram-add-check-for-kzalloc.patch queue-6.1/net-qrtr-free-memory-on-error-path-in-radix_tree_insert.patch queue-6.1/iio-imu-fxos8700-remove-definition-fxos8700_ctrl_odr_min.patch queue-6.1/iio-imu-fxos8700-fix-imu-data-bits-returned-to-user-space.patch queue-6.1/iio-imu-fxos8700-fix-incorrect-odr-mode-readback.patch queue-6.1/revert-mm-kmemleak-alloc-gray-object-for-reserved-region-with-direct-map.patch queue-6.1/iio-adc-twl6030-enable-measurements-of-vusb-vbat-and-others.patch queue-6.1/x86-debug-fix-stack-recursion-caused-by-wrongly-ordered-dr7-accesses.patch queue-6.1/efi-accept-version-2-of-memory-attributes-table.patch queue-6.1/usb-typec-ucsi-don-t-attempt-to-resume-the-ports-before-they-exist.patch queue-6.1/can-isotp-handle-wait_event_interruptible-return-values.patch queue-6.1/alsa-hda-realtek-add-acer-predator-ph315-54.patch queue-6.1/asoc-codecs-wsa883x-correct-playback-min-max-rates.patch queue-6.1/parisc-replace-hardcoded-value-with-priv_user-constant-in-ptrace.c.patch queue-6.1/rtc-efi-enable-set-get-wakeup-services-as-optional.patch queue-6.1/firewire-fix-memory-leak-for-payload-of-request-subaction-to-iec-61883-1-fcp-region.patch queue-6.1/asoc-sof-keep-prepare-unprepare-widgets-in-sink-path.patch queue-6.1/iio-light-cm32181-fix-pm-support-on-system-with-2-i2c-resources.patch queue-6.1/mm-multi-gen-lru-fix-crash-during-cgroup-migration.patch queue-6.1/mm-memcg-fix-null-pointer-in-mem_cgroup_track_foreign_dirty_slowpath.patch queue-6.1/iio-adc-berlin2-adc-add-missing-of_node_put-in-error-path.patch queue-6.1/iio-imu-fxos8700-fix-accel-measurement-range-selection.patch queue-6.1/iio-adc-xilinx-ams-fix-devm_krealloc-return-value-check.patch queue-6.1/asoc-sof-sof-audio-unprepare-when-swidget-use_count-0.patch queue-6.1/mm-hugetlb-proc-check-for-hugetlb-shared-pmd-in-proc-pid-smaps.patch queue-6.1/iio-hid-fix-the-retval-in-accel_3d_capture_sample.patch queue-6.1/nvmem-sunxi_sid-always-use-32-bit-mmio-reads.patch queue-6.1/iio-imu-fxos8700-fix-swapped-accel-and-magn-channels-readback.patch queue-6.1/watchdog-diag288_wdt-fix-__diag288-inline-assembly.patch queue-6.1/parisc-wire-up-ptrace_getregs-ptrace_setregs-for-compat-case.patch queue-6.1/cgroup-cpuset-fix-wrong-check-in-update_parent_subparts_cpumask.patch queue-6.1/parisc-fix-return-code-of-pdc_iodc_print.patch queue-6.1/iio-imu-fxos8700-fix-magn-sensor-scale-and-unit.patch queue-6.1/usb-gadget-f_fs-fix-unbalanced-spinlock-in-__ffs_ep0.patch queue-6.1/arm-dts-imx7d-smegw01-fix-usb-host-over-current-polarity.patch queue-6.1/usb-gadget-udc-do-not-clear-gadget-driver.bus.patch queue-6.1/asoc-sof-sof-audio-skip-prepare-unprepare-if-swidget-is-null.patch queue-6.1/hv-hv_balloon-fix-memory-leak-with-using-debugfs_lookup.patch