selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@parisplace.org>,
	peter enderborg <peter.enderborg@sony.com>,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Ondrej Mosnacek <omosnace@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	selinux@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] selinux: Fix error return code in policydb_read()
Date: Fri, 18 Jan 2019 16:28:07 -0500	[thread overview]
Message-ID: <CAHC9VhSbtqhiMQdNJ_6yeX5+ggwVNyGYXe-E=bMj2V2z2MmAsA@mail.gmail.com> (raw)
In-Reply-To: <1547821427-157169-1-git-send-email-weiyongjun1@huawei.com>

On Fri, Jan 18, 2019 at 9:18 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> Fix to return a negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 31696241e96e ("selinux: convert to kvmalloc")

Unfortunately this commit isn't to be found in any of the SELinux
branches, or Linus' master branch; based on the subject line I'm
guessing the original patch is in a -next branch somewhere.  Please
find whoever pushed this patch to linux-next and have them apply the
fix.

Thank you.

> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  security/selinux/ss/policydb.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
> index 6b576e5..ef616dd 100644
> --- a/security/selinux/ss/policydb.c
> +++ b/security/selinux/ss/policydb.c
> @@ -2490,6 +2490,7 @@ int policydb_read(struct policydb *p, void *fp)
>         if (rc)
>                 goto bad;
>
> +       rc = -ENOMEM;
>         p->type_attr_map_array = kvcalloc(p->p_types.nprim,
>                                           sizeof(*p->type_attr_map_array),
>                                           GFP_KERNEL);
>
>
>

-- 
paul moore
www.paul-moore.com

  reply	other threads:[~2019-01-18 21:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 14:23 [PATCH -next] selinux: Fix error return code in policydb_read() Wei Yongjun
2019-01-18 21:28 ` Paul Moore [this message]
2019-01-19  0:21   ` Stephen Rothwell
2019-01-20 20:04     ` Stephen Rothwell
2019-01-22 17:39       ` Paul Moore
2019-01-25 21:59         ` Paul Moore
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29  7:30 [PATCH -next] selinux: fix " Wei Yongjun
2020-04-29 13:07 ` Dan Carpenter
2020-04-29 13:32   ` Ondrej Mosnacek
2020-04-29 13:47     ` Dan Carpenter
2020-05-01 19:08     ` Paul Moore
2020-05-01 19:52       ` Ondrej Mosnacek
2020-05-01 16:46   ` Paul Moore
2020-05-04 19:17     ` Dan Carpenter
2020-05-01 19:04 ` Paul Moore
2016-09-10  7:43 [PATCH -next] SELinux: " Wei Yongjun
2016-09-13 21:19 ` Paul Moore

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='CAHC9VhSbtqhiMQdNJ_6yeX5+ggwVNyGYXe-E=bMj2V2z2MmAsA@mail.gmail.com' \
    --to=paul@paul-moore.com \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@parisplace.org \
    --cc=kent.overstreet@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=omosnace@redhat.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=peter.enderborg@sony.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=weiyongjun1@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;
as well as URLs for NNTP newsgroup(s).