]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mailbox: mailbox-test: free channels on probe error
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 10 Apr 2026 12:53:00 +0000 (14:53 +0200)
committerJassi Brar <jassisinghbrar@gmail.com>
Mon, 13 Apr 2026 01:39:02 +0000 (20:39 -0500)
commitc02053a9055d5fdfd32432287cca8958db1d5bc5
tree039d74644ea00b92673021f43631e48ef19f7349
parent0bd75b7abafb3ed199df830c539c57ef9b62c2a2
mailbox: mailbox-test: free channels on probe error

On probe error, free the previously obtained channels. This not only
prevents a leak, but also UAF scenarios because the client structure
will be removed nonetheless because it was allocated with devm.

Link: https://sashiko.dev/#/patchset/20260327151217.5327-2-wsa%2Brenesas%40sang-engineering.com
Fixes: 8ea4484d0c2b ("mailbox: Add generic mechanism for testing Mailbox Controllers")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
drivers/mailbox/mailbox-test.c