Re: [PATCH v2] selftests/livepatch: fix resource leak in test_klp_syscall init error path
Petr Mladek <[email protected]> Tue, 9 Jun 2026 13:04:17 +0200
| Newsgroups | org.kernel.vger.live-patching,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> JFYI, the patch has been committed into livepatching.git, branch for-7.2-selftests. Best Regards, Petr