Patch "kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup()

to the 5.15-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:
     kernel-irq-irqdomain.c-fix-memory-leak-with-using-debugfs_lookup.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From d83d7ed260283560700d4034a80baad46620481b Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Feb 2023 16:15:54 +0100
Subject: kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup()

From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

commit d83d7ed260283560700d4034a80baad46620481b 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: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxx>
Reviewed-by: Marc Zyngier <maz@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20230202151554.2310273-1-gregkh@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 kernel/irq/irqdomain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1913,7 +1913,7 @@ static void debugfs_add_domain_dir(struc
 
 static void debugfs_remove_domain_dir(struct irq_domain *d)
 {
-	debugfs_remove(debugfs_lookup(d->name, domain_dir));
+	debugfs_lookup_and_remove(d->name, domain_dir);
 }
 
 void __init irq_domain_debugfs_init(struct dentry *root)


Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are

queue-5.15/iio-imu-fxos8700-fix-map-label-of-channel-type-to-magn-sensor.patch
queue-5.15/riscv-disable-generation-of-unwind-tables.patch
queue-5.15/iio-imu-fxos8700-fix-incomplete-accel-and-magn-channels-readback.patch
queue-5.15/usb-gadget-f_uac2-fix-incorrect-increment-of-bnumendpoints.patch
queue-5.15/usb-dwc3-qcom-enable-vbus-override-when-in-otg-dr-mo.patch
queue-5.15/fbcon-check-font-dimension-limits.patch
queue-5.15/iio-imu-fxos8700-fix-failed-initialization-odr-mode-assignment.patch
queue-5.15/kernel-irq-irqdomain.c-fix-memory-leak-with-using-debugfs_lookup.patch
queue-5.15/iio-hid-fix-the-retval-in-gyro_3d_capture_sample.patch
queue-5.15/nvmem-qcom-spmi-sdam-fix-module-autoloading.patch
queue-5.15/vc_screen-move-load-of-struct-vc_data-pointer-in-vcs.patch
queue-5.15/watchdog-diag288_wdt-do-not-use-stack-buffers-for-hardware-data.patch
queue-5.15/net-qrtr-free-memory-on-error-path-in-radix_tree_insert.patch
queue-5.15/iio-imu-fxos8700-remove-definition-fxos8700_ctrl_odr_min.patch
queue-5.15/iio-imu-fxos8700-fix-imu-data-bits-returned-to-user-space.patch
queue-5.15/iio-imu-fxos8700-fix-incorrect-odr-mode-readback.patch
queue-5.15/iio-adc-twl6030-enable-measurements-of-vusb-vbat-and-others.patch
queue-5.15/x86-debug-fix-stack-recursion-caused-by-wrongly-ordered-dr7-accesses.patch
queue-5.15/efi-accept-version-2-of-memory-attributes-table.patch
queue-5.15/alsa-hda-realtek-add-acer-predator-ph315-54.patch
queue-5.15/firewire-fix-memory-leak-for-payload-of-request-subaction-to-iec-61883-1-fcp-region.patch
queue-5.15/iio-adc-berlin2-adc-add-missing-of_node_put-in-error-path.patch
queue-5.15/iio-imu-fxos8700-fix-accel-measurement-range-selection.patch
queue-5.15/mm-hugetlb-proc-check-for-hugetlb-shared-pmd-in-proc-pid-smaps.patch
queue-5.15/iio-hid-fix-the-retval-in-accel_3d_capture_sample.patch
queue-5.15/iio-imu-fxos8700-fix-swapped-accel-and-magn-channels-readback.patch
queue-5.15/watchdog-diag288_wdt-fix-__diag288-inline-assembly.patch
queue-5.15/parisc-wire-up-ptrace_getregs-ptrace_setregs-for-compat-case.patch
queue-5.15/parisc-fix-return-code-of-pdc_iodc_print.patch
queue-5.15/iio-imu-fxos8700-fix-magn-sensor-scale-and-unit.patch
queue-5.15/usb-gadget-f_fs-fix-unbalanced-spinlock-in-__ffs_ep0.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux