]> git.baikalelectronics.ru Git - kernel.git/commit
staging: greybus: audio_helper: remove unused and wrong debugfs usage
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Sep 2022 14:37:15 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Sep 2022 07:53:26 +0000 (09:53 +0200)
commit1876733727bfdc31188da56b0e640407d28fce6b
treed7d5002e178220273842d4c1d268df71a78fd012
parent0a7c1c8fcb80df12816b26d49e55562c61b5093c
staging: greybus: audio_helper: remove unused and wrong debugfs usage

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@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20220902143715.320500-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/audio_helper.c