From: Zhongjun Tan <hbut_tan@163.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: casey@schaufler-ca.com, jmorris@namei.org, serge@hallyn.com,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Zhongjun Tan <tanzhongjun@yulong.com>
Subject: Re: [PATCH] lsm:fix a missing-check bug in smack_sb_eat_lsm_opts()
Date: Mon, 19 Apr 2021 10:58:21 +0800 [thread overview]
Message-ID: <20210419105821.00001082.hbut_tan@163.com> (raw)
In-Reply-To: <YHmSwVpR2oq2yqUG@zeniv-ca.linux.org.uk>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB18030, Size: 719 bytes --]
On Fri, 16 Apr 2021 13:36:01 +0000
Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Fri, Apr 16, 2021 at 05:53:03PM +0800, 02Zhongjun Tan wrote:
>
> > @@ -710,13 +711,14 @@ static int smack_sb_eat_lsm_opts(char
> > *options, void **mnt_opts) token = match_opt_prefix(from, len,
> > &arg); if (token != Opt_error) {
> > arg = kmemdup_nul(arg, from + len - arg,
> > GFP_KERNEL);
> > + if (!arg) {
> > + rc = -ENOMEM;
> > + goto free_mnt_opts;
> > rc = smack_add_opt(token, arg, mnt_opts);
>
> if (arg)
> rc = smack_add_opt(token, arg,
> mnt_opts); else
> rc = -ENOMEM;
>
> and no other changes are needed anywhere...
update patch v3 , just four codes and no other changes are needed.
prev parent reply other threads:[~2021-04-19 2:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 9:53 [PATCH] lsm:fix a missing-check bug in smack_sb_eat_lsm_opts() Zhongjun Tan
2021-04-16 13:36 ` Al Viro
2021-04-19 2:58 ` Zhongjun Tan [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=20210419105821.00001082.hbut_tan@163.com \
--to=hbut_tan@163.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=tanzhongjun@yulong.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).