mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
thunderbolt: Fix for v6.6-rc7
This includes a single commit that fixes a memory leak when DisplayPort bandwidth allocation request is being handled by the driver. This has been in linux-next with no reported issues. -----BEGIN PGP SIGNATURE----- iQJUBAABCgA+FiEEVTdhRGBbNzLrSUBaAP2fSd+ZWKAFAmUulYsgHG1pa2Eud2Vz dGVyYmVyZ0BsaW51eC5pbnRlbC5jb20ACgkQAP2fSd+ZWKA6RA/+NZ2xVqKwHVrT mnTj04uDFTPxNAmYvu2mBzNY3mQoILbimai7epHsohyVs4R8Y+gyZqYtJEN+b6gH 2QJ8CLrydJ/YcKAiTnVg1ZT1HYlXJHbMbt2J1+rovC4hkmkHh5FWWRony6Ouilgv sK6LGYEBxRhyOsoma4pvE6Q51ntmLHSW9o/kjMkffdLoQ8QhOjymc5OT4uDk3Jad C8Fee0egkc6YfdCM2bQX3K0Nrs1yAxW7aWzfjgUeM5TYADhhOZx5n9vTXFSW312a C5DP2Kn8MkhXgILMk5Ye4fHmY5foCAyiJRAnl9p/bQSKrPN99PbgBxGdXZcw6lhf hUQk2jZVJDCCR0e2bMQLi4+qmyJj/zUJ7HCoyX5OdVBzQbRHjhD8G+ZlX8MpWoTr 0J0St4/GzrEfZ/VaxT3ZW2GzrM0IFnrTJQaXFkQZiiBfsqvThOVpfrOqWSK/J8Nh vdpKf9waF/mb5/C5pIe1d2jowX4aTolpV62wlQpKdAy6MbDOGyrVfFNHHuCPECha UQCvaEXf72AuyCIQtxi1+dkjiBULF39p2K6h9mj2IaI6W+XCdF4tdGVubQB6DA3E 2z/437fD8WPecsP5lz8iDhJlE7ThrPp+yy49/ugnzhmfqlxQM1RUbiQt4XzDLozR ibaaFGQ5aX333vkI+dqJe12cOY7Rq9E= =+UeU -----END PGP SIGNATURE----- Merge tag 'thunderbolt-for-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v6.6-rc7 This includes a single commit that fixes a memory leak when DisplayPort bandwidth allocation request is being handled by the driver. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Call tb_switch_put() once DisplayPort bandwidth request is finished
This commit is contained in:
commit
8b695369a6
@ -1907,14 +1907,14 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
|
||||
in = &sw->ports[ev->port];
|
||||
if (!tb_port_is_dpin(in)) {
|
||||
tb_port_warn(in, "bandwidth request to non-DP IN adapter\n");
|
||||
goto unlock;
|
||||
goto put_sw;
|
||||
}
|
||||
|
||||
tb_port_dbg(in, "handling bandwidth allocation request\n");
|
||||
|
||||
if (!usb4_dp_port_bandwidth_mode_enabled(in)) {
|
||||
tb_port_warn(in, "bandwidth allocation mode not enabled\n");
|
||||
goto unlock;
|
||||
goto put_sw;
|
||||
}
|
||||
|
||||
ret = usb4_dp_port_requested_bandwidth(in);
|
||||
@ -1923,7 +1923,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
|
||||
tb_port_dbg(in, "no bandwidth request active\n");
|
||||
else
|
||||
tb_port_warn(in, "failed to read requested bandwidth\n");
|
||||
goto unlock;
|
||||
goto put_sw;
|
||||
}
|
||||
requested_bw = ret;
|
||||
|
||||
@ -1932,7 +1932,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
|
||||
tunnel = tb_find_tunnel(tb, TB_TUNNEL_DP, in, NULL);
|
||||
if (!tunnel) {
|
||||
tb_port_warn(in, "failed to find tunnel\n");
|
||||
goto unlock;
|
||||
goto put_sw;
|
||||
}
|
||||
|
||||
out = tunnel->dst_port;
|
||||
@ -1959,6 +1959,8 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
|
||||
tb_recalc_estimated_bandwidth(tb);
|
||||
}
|
||||
|
||||
put_sw:
|
||||
tb_switch_put(sw);
|
||||
unlock:
|
||||
mutex_unlock(&tb->lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user