Patch "staging: greybus: audio_helper: remove unused and wrong debugfs usage" has been added to the 5.19-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

    staging: greybus: audio_helper: remove unused and wrong debugfs usage

to the 5.19-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:
     staging-greybus-audio_helper-remove-unused-and-wrong-debugfs-usage.patch
and it can be found in the queue-5.19 subdirectory.

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


>From d517cdeb904ddc0cbebcc959d43596426cac40b0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Sep 2022 16:37:15 +0200
Subject: staging: greybus: audio_helper: remove unused and wrong debugfs usage

From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

commit d517cdeb904ddc0cbebcc959d43596426cac40b0 upstream.

In the greybus audio_helper code, the debugfs file for the dapm has the
potential to be removed and memory will be leaked.  There is also the
very real potential for this code to remove ALL debugfs entries from the
system, and it seems like this is what will really happen if this code
ever runs.  This all is very wrong as the greybus audio driver did not
create this debugfs file, the sound core did and controls the lifespan
of it.

So remove all of the debugfs logic from the audio_helper code as there's
no way it could be correct.  If this really is needed, it can come back
with a fixup for the incorrect usage of the debugfs_lookup() call which
is what caused this to be noticed at all.

Cc: Johan Hovold <johan@xxxxxxxxxx>
Cc: Alex Elder <elder@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20220902143715.320500-1-gregkh@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/greybus/audio_helper.c |   11 -----------
 1 file changed, 11 deletions(-)

--- a/drivers/staging/greybus/audio_helper.c
+++ b/drivers/staging/greybus/audio_helper.c
@@ -3,7 +3,6 @@
  * Greybus Audio Sound SoC helper APIs
  */
 
-#include <linux/debugfs.h>
 #include <sound/core.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
@@ -116,10 +115,6 @@ int gbaudio_dapm_free_controls(struct sn
 {
 	int i;
 	struct snd_soc_dapm_widget *w, *next_w;
-#ifdef CONFIG_DEBUG_FS
-	struct dentry *parent = dapm->debugfs_dapm;
-	struct dentry *debugfs_w = NULL;
-#endif
 
 	mutex_lock(&dapm->card->dapm_mutex);
 	for (i = 0; i < num; i++) {
@@ -139,12 +134,6 @@ int gbaudio_dapm_free_controls(struct sn
 			continue;
 		}
 		widget++;
-#ifdef CONFIG_DEBUG_FS
-		if (!parent)
-			debugfs_w = debugfs_lookup(w->name, parent);
-		debugfs_remove(debugfs_w);
-		debugfs_w = NULL;
-#endif
 		gbaudio_dapm_free_widget(w);
 	}
 	mutex_unlock(&dapm->card->dapm_mutex);


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

queue-5.19/drm-nouveau-kms-nv140-disable-interlacing.patch
queue-5.19/i2c-designware-fix-handling-of-real-but-unexpected-device-interrupts.patch
queue-5.19/net-thunderbolt-enable-dma-paths-only-after-rings-are-enabled.patch
queue-5.19/riscv-always-honor-the-config_cmdline_force-when-parsing-dtb.patch
queue-5.19/btrfs-fix-missed-extent-on-fsync-after-dropping-extent-maps.patch
queue-5.19/nvme-multipath-fix-possible-hang-in-live-ns-resize-with-ana-access.patch
queue-5.19/fs-dlm-handle-ebusy-first-in-lock-arg-validation.patch
queue-5.19/tracing-fix-reading-strings-from-synthetic-events.patch
queue-5.19/io_uring-correct-pinned_vm-accounting.patch
queue-5.19/kvm-nvmx-unconditionally-purge-queued-injected-events-on-nested-exit.patch
queue-5.19/iio-pressure-dps310-refactor-startup-procedure.patch
queue-5.19/revert-drm-amdgpu-use-dirty-framebuffer-helper.patch
queue-5.19/parisc-fbdev-stifb-align-graphics-memory-size-to-4mb.patch
queue-5.19/ext4-update-state-fc_regions_size-after-successful-memory-allocation.patch
queue-5.19/alsa-rawmidi-drop-register_mutex-in-snd_rawmidi_free.patch
queue-5.19/riscv-vdso-fix-null-deference-in-vdso_join_timens-when-vfork.patch
queue-5.19/tracing-add-ioctl-to-force-ring-buffer-waiters-to-wake-up.patch
queue-5.19/serial-stm32-deassert-transmit-enable-on-rs485_config.patch
queue-5.19/mtd-rawnand-atmel-unmap-streaming-dma-mappings.patch
queue-5.19/ext4-fix-null-ptr-deref-in-ext4_write_info.patch
queue-5.19/nfsd-protect-against-send-buffer-overflow-in-nfsv2-read.patch
queue-5.19/drm-i915-gt-use-i915_vm_put-on-ppgtt_create-error-paths.patch
queue-5.19/drm-virtio-unlock-reservations-on-dma_resv_reserve_fences-error.patch
queue-5.19/ring-buffer-have-the-shortest_full-queue-be-the-shortest-not-longest.patch
queue-5.19/clocksource-drivers-arm_arch_timer-fix-cntpct_lo-and-cntvct_lo-value.patch
queue-5.19/hwrng-core-let-sleep-be-interrupted-when-unregistering-hwrng.patch
queue-5.19/thunderbolt-explicitly-enable-lane-adapter-hotplug-events-at-startup.patch
queue-5.19/fs-dlm-fix-race-between-test_bit-and-queue_work.patch
queue-5.19/riscv-allow-prot_write-only-mmap.patch
queue-5.19/iio-dac-ad5593r-fix-i2c-read-protocol-requirements.patch
queue-5.19/ring-buffer-add-ring_buffer_wake_waiters.patch
queue-5.19/kvm-vmx-drop-bits-31-16-when-shoving-exception-error-code-into-vmcs.patch
queue-5.19/asoc-wcd9335-fix-order-of-slimbus-unprepare-disable.patch
queue-5.19/io_uring-net-don-t-update-msg_name-if-not-provided.patch
queue-5.19/nfsd-protect-against-send-buffer-overflow-in-nfsv3-read.patch
queue-5.19/tracing-move-duplicate-code-of-trace_kprobe-eprobe.c-into-header.patch
queue-5.19/jbd2-fix-potential-buffer-head-reference-count-leak.patch
queue-5.19/fs-dlm-fix-invalid-derefence-of-sb_lvbptr.patch
queue-5.19/io_uring-rw-fix-unexpected-link-breakage.patch
queue-5.19/riscv-pass-mno-relax-only-on-lld-15.0.0.patch
queue-5.19/arm64-dts-qcom-sdm845-mtp-correct-adc-settle-time.patch
queue-5.19/f2fs-increase-the-limit-for-reserve_root.patch
queue-5.19/alsa-oss-fix-potential-deadlock-at-unregistration.patch
queue-5.19/serial-8250-request-full-16550a-feature-probing-for-oxsemi-pcie-devices.patch
queue-5.19/powerpc-boot-explicitly-disable-usage-of-spe-instructions.patch
queue-5.19/tracing-add-fault-name-injection-to-kernel-probes.patch
queue-5.19/serial-8250-let-drivers-request-full-16550a-feature-probing.patch
queue-5.19/kvm-nvmx-don-t-propagate-vmcs12-s-perf_global_ctrl-settings-to-vmcs02.patch
queue-5.19/mm-hugetlb-fix-races-when-looking-up-a-cont-pte-pmd-size-hugetlb-page.patch
queue-5.19/f2fs-fix-to-do-sanity-check-on-destination-blkaddr-during-recovery.patch
queue-5.19/btrfs-fix-alignment-of-vma-for-memory-mapped-files-on-thp.patch
queue-5.19/ext4-fix-miss-release-buffer-head-in-ext4_fc_write_inode.patch
queue-5.19/platform-chrome-cros_ec_proto-update-version-on-get_next_event-failure.patch
queue-5.19/alsa-usb-audio-fix-potential-memory-leaks.patch
queue-5.19/btf-export-bpf_dynptr-definition.patch
queue-5.19/scsi-lpfc-rework-mib-rx-monitor-debug-info-logic.patch
queue-5.19/ext4-ext4_read_bh_lock-should-submit-io-if-the-buffer-isn-t-uptodate.patch
queue-5.19/xen-gntdev-accommodate-vma-splitting.patch
queue-5.19/ext4-place-buffer-head-allocation-before-handle-start.patch
queue-5.19/ring-buffer-fix-race-between-reset-page-and-reading-page.patch
queue-5.19/fbdev-smscufx-fix-use-after-free-in-ufx_ops_open.patch
queue-5.19/jbd2-fix-potential-use-after-free-in-jbd2_fc_wait_bufs.patch
queue-5.19/tracing-wake-up-ring-buffer-waiters-on-closing-of-the-file.patch
queue-5.19/blk-throttle-fix-that-io-throttle-can-only-work-for-single-bio.patch
queue-5.19/ftrace-still-disable-enabled-records-marked-as-disabled.patch
queue-5.19/tracing-disable-interrupt-or-preemption-before-acquiring-arch_spinlock_t.patch
queue-5.19/arm64-errata-add-cortex-a55-to-the-repeat-tlbi-list.patch
queue-5.19/media-cedrus-set-the-platform-driver-data-earlier.patch
queue-5.19/xhci-dbc-fix-memory-leak-in-xhci_alloc_dbc.patch
queue-5.19/can-kvaser_usb_leaf-fix-overread-with-an-invalid-command.patch
queue-5.19/iio-pressure-dps310-reset-chip-after-timeout.patch
queue-5.19/drm-virtio-check-whether-transferred-2d-bo-is-shmem.patch
queue-5.19/mm-damon-validate-if-the-pmd-entry-is-present-before-accessing.patch
queue-5.19/riscv-make-vm_write-imply-vm_read.patch
queue-5.19/tracing-do-not-free-snapshot-if-tracer-is-on-cmdline.patch
queue-5.19/asoc-wcd934x-fix-order-of-slimbus-unprepare-disable.patch
queue-5.19/scsi-qedf-populate-sysfs-attributes-for-vport.patch
queue-5.19/riscv-topology-fix-default-topology-reporting.patch
queue-5.19/risc-v-make-port-i-o-string-accessors-actually-work.patch
queue-5.19/efi-libstub-drop-pointless-get_memory_map-call.patch
queue-5.19/can-kvaser_usb_leaf-fix-can-state-after-restart.patch
queue-5.19/slimbus-qcom-ngd-use-correct-error-in-message-of-pdr_add_lookup-failure.patch
queue-5.19/rpmsg-char-avoid-double-destroy-of-default-endpoint.patch
queue-5.19/hid-multitouch-add-memory-barriers.patch
queue-5.19/ksmbd-fix-incorrect-handling-of-iterate_dir.patch
queue-5.19/tracing-wake-up-waiters-when-tracing-is-disabled.patch
queue-5.19/mmc-renesas_sdhi-fix-rounding-errors.patch
queue-5.19/can-kvaser_usb-fix-use-of-uninitialized-completion.patch
queue-5.19/alsa-hda-realtek-add-quirk-for-asus-gv601r-laptop.patch
queue-5.19/io_uring-net-fix-fast_iov-assignment-in-io_setup_async_msg.patch
queue-5.19/f2fs-complete-checkpoints-during-remount.patch
queue-5.19/staging-greybus-audio_helper-remove-unused-and-wrong-debugfs-usage.patch
queue-5.19/alsa-hda-realtek-correct-pin-configs-for-asus-g533z.patch
queue-5.19/arm64-topology-move-store_cpu_topology-to-shared-code.patch
queue-5.19/ring-buffer-allow-splice-to-read-previous-partially-read-pages.patch
queue-5.19/alsa-hda-realtek-remove-alc289_fixup_dual_spk-for-dell-5530.patch
queue-5.19/alsa-hda-realtek-add-intel-reference-ssid-to-support-headset-keys.patch
queue-5.19/ext4-fix-dir-corruption-when-ext4_dx_add_entry-fails.patch
queue-5.19/media-cedrus-fix-endless-loop-in-cedrus_h265_skip_bits.patch
queue-5.19/risc-v-re-enable-counter-access-from-userspace.patch
queue-5.19/ksmbd-fix-user-namespace-mapping.patch
queue-5.19/dmaengine-qcom-adm-fix-wrong-sizeof-config-in-slave_config.patch
queue-5.19/f2fs-flush-pending-checkpoints-when-freezing-super.patch
queue-5.19/btrfs-fix-race-between-quota-enable-and-quota-rescan-ioctl.patch
queue-5.19/ext2-add-sanity-checks-for-group-and-filesystem-size.patch
queue-5.19/ext4-fix-potential-memory-leak-in-ext4_fc_record_modified_inode.patch
queue-5.19/cpufreq-qcom-cpufreq-hw-fix-uninitialized-throttled_freq-warning.patch
queue-5.19/ext4-unconditionally-enable-the-i_version-counter.patch
queue-5.19/btrfs-set-generation-before-calling-btrfs_clean_tree_block-in-btrfs_init_new_buffer.patch
queue-5.19/nvmem-core-fix-memleak-in-nvmem_register.patch
queue-5.19/um-cpuinfo-fix-a-warning-for-config_cpumask_offstack.patch
queue-5.19/ksmbd-fix-wrong-return-value-and-message-length-check-in-smb2_ioctl.patch
queue-5.19/iio-ltc2497-fix-reading-conversion-results.patch
queue-5.19/cifs-fix-the-error-length-of-validate_negotiate_info-message.patch
queue-5.19/mm-mmap-undo-mmap-when-arch_validate_flags-fails.patch
queue-5.19/arm64-mte-move-register-initialization-to-c.patch
queue-5.19/cifs-destage-dirty-pages-before-re-reading-them-for-cache-none.patch
queue-5.19/mm-uffd-fix-warning-without-pte_marker_uffd_wp-compiled-in.patch
queue-5.19/serial-cpm_uart-don-t-request-irq-too-early-for-console-port.patch
queue-5.19/hwmon-gsc-hwmon-call-of_node_get-before-of_find_xxx-api.patch
queue-5.19/ext4-make-ext4_lazyinit_thread-freezable.patch
queue-5.19/nfsd-protect-against-send-buffer-overflow-in-nfsv3-readdir.patch
queue-5.19/btrfs-enhance-unsupported-compat-ro-flags-handling.patch
queue-5.19/ext4-fix-potential-memory-leak-in-ext4_fc_record_regions.patch
queue-5.19/kvm-x86-emulator-fix-handing-of-pop-ss-to-correctly-set-interruptibility.patch
queue-5.19/regulator-qcom_rpm-fix-circular-deferral-regression.patch
queue-5.19/ext4-fix-i_version-handling-in-ext4.patch
queue-5.19/jbd2-add-miss-release-buffer-head-in-fc_do_one_pass.patch
queue-5.19/f2fs-fix-to-do-sanity-check-on-summary-info.patch
queue-5.19/fs-record-i_dirty_time-even-if-inode-already-has-i_dirty_inode.patch
queue-5.19/ring-buffer-check-pending-waiters-when-doing-wake-ups-as-well.patch
queue-5.19/blk-wbt-call-rq_qos_add-after-wb_normal-is-initialized.patch
queue-5.19/mmc-sdhci-tegra-use-actual-clock-rate-for-sw-tuning-correction.patch
queue-5.19/drm-virtio-unlock-reservations-on-virtio_gpu_object_shmem_init-error.patch
queue-5.19/smb3-do-not-log-confusing-message-when-server-returns-no-network-interfaces.patch
queue-5.19/slimbus-qcom-ngd-cleanup-in-probe-error-path.patch
queue-5.19/pinctrl-rockchip-add-pinmux_ops.gpio_set_direction-callback.patch
queue-5.19/quota-check-next-prev-free-block-number-after-reading-from-quota-file.patch
queue-5.19/usb-add-quirks-for-lenovo-onelink-dock.patch
queue-5.19/gpio-rockchip-request-gpio-mux-to-pinctrl-when-setting-direction.patch
queue-5.19/drm-udl-restore-display-mode-on-resume.patch
queue-5.19/xen-gntdev-prevent-leaking-grants.patch
queue-5.19/parisc-fix-userspace-graphics-card-breakage-due-to-pgtable-special-bit.patch
queue-5.19/pci-sanitise-firmware-bar-assignments-behind-a-pci-pci-bridge.patch
queue-5.19/drm-nouveau-fix-a-use-after-free-in-nouveau_gem_prime_import_sg_table.patch
queue-5.19/iio-adc-ad7923-fix-channel-readings-for-some-variants.patch
queue-5.19/mmc-sdhci-sprd-fix-minimum-clock-limit.patch
queue-5.19/drm-virtio-use-appropriate-atomic-state-in-virtio_gpu_plane_cleanup_fb.patch
queue-5.19/ext4-don-t-increase-iversion-counter-for-ea_inodes.patch
queue-5.19/dmaengine-mxs-use-platform_driver_register.patch
queue-5.19/ksmbd-fix-endless-loop-when-encryption-for-response-fails.patch
queue-5.19/ext4-avoid-crash-when-inline-data-creation-follows-dio-write.patch
queue-5.19/can-kvaser_usb_leaf-fix-tx-queue-out-of-sync-after-restart.patch
queue-5.19/io_uring-af_unix-defer-registered-files-gc-to-io_uring-release.patch
queue-5.19/hv_netvsc-fix-race-between-vf-offering-and-vf-association-message-from-host.patch
queue-5.19/dmaengine-qcom-adm-fix-wrong-calling-convention-for-prep_slave_sg.patch
queue-5.19/alsa-usb-audio-fix-null-dererence-at-error-path.patch
queue-5.19/mmc-core-add-sd-card-quirk-for-broken-discard.patch
queue-5.19/powerpc-kconfig-fix-non-existing-config_ppc_fsl_booke.patch
queue-5.19/jbd2-wake-up-journal-waiters-in-fifo-order-not-lifo.patch
queue-5.19/ext4-fix-check-for-block-being-out-of-directory-size.patch
queue-5.19/ftrace-properly-unset-ftrace_hash_fl_mod.patch
queue-5.19/powercap-intel_rapl-use-standard-energy-unit-for-spr-dram-rapl-domain.patch
queue-5.19/usb-gadget-uvc-fix-argument-to-sizeof-in-uvc_register_video.patch
queue-5.19/livepatch-fix-race-between-fork-and-klp-transition.patch
queue-5.19/f2fs-fix-wrong-continue-condition-in-gc.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