From: Al Viro <viro@zeniv.linux.org.uk>
To: " Zhongjun Tan" <hbut_tan@163.com>
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: Fri, 16 Apr 2021 13:36:01 +0000 [thread overview]
Message-ID: <YHmSwVpR2oq2yqUG@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <20210416095303.530-1-hbut_tan@163.com>
On Fri, Apr 16, 2021 at 05:53:03PM +0800, Zhongjun 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...
next prev parent reply other threads:[~2021-04-16 13:36 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 [this message]
2021-04-19 2:58 ` Zhongjun Tan
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=YHmSwVpR2oq2yqUG@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=casey@schaufler-ca.com \
--cc=hbut_tan@163.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 \
/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).