]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Drivers: hv: Free msginfo when the buffer fails to decrypt
authorRoman Kisel <romank@linux.microsoft.com>
Wed, 8 Oct 2025 23:34:16 +0000 (16:34 -0700)
committerWei Liu <wei.liu@kernel.org>
Sat, 15 Nov 2025 06:18:15 +0000 (06:18 +0000)
commit510164539f16062e842a9de762616b5008616fa1
tree3831e7096ecd87621adcec483bdae827348a9b8e
parent0a4534bdf29a5b7f5a355c267d28dad9c40ba252
Drivers: hv: Free msginfo when the buffer fails to decrypt

The early failure path in __vmbus_establish_gpadl() doesn't deallocate
msginfo if the buffer fails to decrypt.

Fix the leak by breaking out the cleanup code into a separate function
and calling it where required.

Fixes: d4dccf353db80 ("Drivers: hv: vmbus: Mark vmbus ring buffer visible to host in Isolation VM")
Reported-by: Michael Kelley <mkhlinux@outlook.com>
Closes: https://lore.kernel.org/linux-hyperv/SN6PR02MB41573796F9787F67E0E97049D472A@SN6PR02MB4157.namprd02.prod.outlook.com
Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/channel.c