From: GONG Ruiqi <gongruiqi1@huawei.com>
To: Georgia Garcia <georgia.garcia@canonical.com>,
John Johansen <john.johansen@canonical.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E . Hallyn" <serge@hallyn.com>
Cc: <apparmor@lists.ubuntu.com>,
<linux-security-module@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <lujialin4@huawei.com>,
zhaoyipeng <zhaoyipeng5@huawei.com>
Subject: Re: [PATCH] apparmor: Fix two bugs of aa_setup_dfa_engine's fail handling
Date: Thu, 23 Apr 2026 09:52:29 +0800 [thread overview]
Message-ID: <923f5188-a3b3-45cf-8b28-37f77a34544c@huawei.com> (raw)
In-Reply-To: <1b87ab3652ca165364e1bb86623f2b26a135dae7.camel@canonical.com>
Hi Georgia,
On 4/23/2026 5:51 AM, Georgia Garcia wrote:
> ...
>> @@ -2486,7 +2487,6 @@ static int __init aa_setup_dfa_engine(void)
>>
>> fail:
>> aa_put_pdb(nullpdb);
>> - aa_put_dfa(nulldfa);
>
> This isn't right. aa_dfa_unpack does kref_init(&dfa->count), and later
> we have nullpdb->dfa = aa_get_dfa(nulldfa);
> So the second is put on aa_put_pdb but the first, from the init, does
> need to be put too.
Thanks for the feedback, and yes you're right. I didn't notice there's a
kref_init in aa_dfa_unpack...
I will submit a patch that only contains the first fix.
BR,
Ruiqi
>
>> nullpdb = NULL;
>> nulldfa = NULL;
>> stacksplitdfa = NULL;
>
prev parent reply other threads:[~2026-04-23 1:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 3:51 [PATCH] apparmor: Fix two bugs of aa_setup_dfa_engine's fail handling GONG Ruiqi
2026-04-22 7:03 ` GONG Ruiqi
2026-04-22 21:51 ` Georgia Garcia
2026-04-23 1:52 ` GONG Ruiqi [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=923f5188-a3b3-45cf-8b28-37f77a34544c@huawei.com \
--to=gongruiqi1@huawei.com \
--cc=apparmor@lists.ubuntu.com \
--cc=georgia.garcia@canonical.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=lujialin4@huawei.com \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=zhaoyipeng5@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox