Skip to content

Commit

Permalink
thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
Browse files Browse the repository at this point in the history
commit 596a512 upstream.

The memory allocated in tb_queue_dp_bandwidth_request() needs to be
released once the request is handled to avoid leaking it.

Fixes: 6ce3563 ("thunderbolt: Add support for DisplayPort bandwidth allocation mode")
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
westeri authored and gregkh committed Aug 16, 2023
1 parent 69304c8 commit 0752bb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/thunderbolt/tb.c
Expand Up @@ -1810,6 +1810,8 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)

pm_runtime_mark_last_busy(&tb->dev);
pm_runtime_put_autosuspend(&tb->dev);

kfree(ev);
}

static void tb_queue_dp_bandwidth_request(struct tb *tb, u64 route, u8 port)
Expand Down

0 comments on commit 0752bb3

Please sign in to comment.