Skip to content
Commit 3339028d authored by Yaxiong Tian's avatar Yaxiong Tian Committed by Greg Kroah-Hartman
Browse files

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: default avatarYaxiong Tian <tianyaxiong@kylinos.cn>
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69b6596c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment