linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: neilb@suse.com
Cc: linux-nfs@vger.kernel.org
Subject: [bug report] SUNRPC: simplify auth_unix.
Date: Fri, 21 Dec 2018 12:10:24 +0300	[thread overview]
Message-ID: <20181221091024.GF2735@kadam> (raw)

Hello NeilBrown,

This is a semi-automatic email about new static checker warnings.

The patch 394f319df78e: "SUNRPC: simplify auth_unix." from Dec 3, 
2018, leads to the following Smatch complaint:

    net/sunrpc/auth_unix.c:90 unx_match()
    warn: variable dereferenced before check 'acred->cred' (see line 87)

net/sunrpc/auth_unix.c
    86	
    87		if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred->fsgid))
                                                  ^^^^^^^^^^^
New dereference

    88			return 0;
    89	
    90		if (acred->cred && acred->cred->group_info != NULL)
                    ^^^^^^^^^^^
But the old code checked for NULL

    91			groups = acred->cred->group_info->ngroups;
    92		if (groups > UNX_NGROUPS)

regards,
dan carpenter

             reply	other threads:[~2018-12-21  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  9:10 Dan Carpenter [this message]
2019-01-07  6:53 ` [PATCH] SUNRPC: remove pointless test in unx_match() NeilBrown
2019-02-21 22:39   ` Trond Myklebust

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=20181221091024.GF2735@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.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).