thunderbolt: Fix memory leak in margining_port_remove()
commit ac43c912 upstream. The dentry returned by debugfs_lookup() needs to be released by calling dput() which is missing in margining_port_remove(). Fix this by calling debugfs_lookup_and_remove() that combines both and avoids the memory leak. Fixes: d0f1e0c2 ("thunderbolt: Add support for receiver lane margining") Cc: stable@vger.kernel.org Signed-off-by:Yaxiong Tian <tianyaxiong@kylinos.cn> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please register or sign in to comment