From: Luis Chamberlain <mcgrof@kernel.org>
To: Fidal Palamparambil <rootuserhere@gmail.com>
Cc: linux-modules@vger.kernel.org, petr.pavlu@suse.com,
da.gomez@kernel.org, samitolvanen@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kprobe_event_gen_test : Fix error handling and resource cleanup
Date: Sat, 6 Sep 2025 18:23:03 -0700 [thread overview]
Message-ID: <aLzed3HeWD3T1WIM@bombadil.infradead.org> (raw)
In-Reply-To: <20250906131559.200-1-rootuserhere@gmail.com>
On Sat, Sep 06, 2025 at 05:15:59PM +0400, Fidal Palamparambil wrote:
> From: Fidal palamparambil <rootuserhere@gmail.com>
>
> This commit addresses several issues in the kprobe event generation test module:
>
> 1. Fixed NULL pointer management in error paths where trace_event_file pointers
> were not properly set to NULL after errors, potentially causing double-free
> or use-after-free issues.
>
> 2. Added comprehensive cleanup for the kprobe event when kretprobe initialization
> fails in kprobe_event_gen_test_init(). Previously, a failed kretprobe creation
> would leave the kprobe event dangling.
>
> 3. Enhanced error handling consistency between kprobe and kretprobe test functions,
> ensuring both follow the same pattern for resource cleanup.
>
> 4. Fixed the error handling flow in test_gen_kprobe_cmd() and test_gen_kretprobe_cmd()
> to properly set trace_event_file pointers to NULL when errors occur after
> event creation but before successful completion.
>
> The changes ensure proper resource management and prevent potential memory
> corruption or leaks during module initialization and cleanup.
>
> Signed-off-by: Fidal palamparambil <rootuserhere@gmail.com>
Please just stop.
Luis
prev parent reply other threads:[~2025-09-07 1:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-06 13:15 [PATCH] kprobe_event_gen_test : Fix error handling and resource cleanup Fidal Palamparambil
2025-09-06 15:55 ` Markus Elfring
2025-09-07 1:23 ` Luis Chamberlain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aLzed3HeWD3T1WIM@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=da.gomez@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rootuserhere@gmail.com \
--cc=samitolvanen@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.