Re: [PATCH v2] selftests/livepatch: fix resource leak in test_klp_syscall init error path

From
Petr Mladek <pmladek@suse.com>
Date
2026-06-09 11:04:22
Also in
linux-kselftest, lkml
Reply to
Rui Qi, 2026-06-04
On Thu 2026-06-04 16:32:08, Rui Qi wrote:
In livepatch_init(), if klp_enable_patch() fails, the previously
created kobject and sysfs file are never cleaned up, causing a
resource leak. Capture the return value and add proper cleanup
on the error path.

Signed-off-by: Rui Qi <redacted>
JFYI, the patch has been committed into livepatching.git,
branch for-7.2-selftests.

Best Regards,
Petr
Thread (9 messages) 9 messages, 4 authors, last reply 2026-06-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help