From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Ian Bridges <icb@fastmail.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Namjae Jeon <linkinjeon@kernel.org>
Subject: [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc'
Date: Thu, 26 Nov 2026 09:01:07 +0300 [thread overview]
Message-ID: <20261126042013.QSoDDLPw-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/smb.git ksmbd-for-next
head: f9208b7a49196e36c0434637ab83e001f5800a1d
commit: f9208b7a49196e36c0434637ab83e001f5800a1d [48/48] ksmbd: use the security descriptor codec in callers
config: sparc-randconfig-2200-20261126 (https://download.01.org/0day-ci/archive/20261126/20261126042013.QSoDDLPw-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 13.5.0
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/20261126042013.QSoDDLPw-lkp@intel.com/
smatch warnings:
fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc'
vim +/rc +793 fs/smb/server/smbacl.c
1923c1065fe94c fs/smb/server/smbacl.c Christian Brauner 2026-09-01 768 int parse_sec_desc(const struct mnt_idmap *idmap, struct smb_ntsd *pntsd,
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 769 int acl_len, struct smb_fattr *fattr, struct ksmbd_sd **psd)
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 770 {
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 771 int rc = 0;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 772 const struct smb_sid *owner_sid_ptr = NULL, *group_sid_ptr = NULL;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 773 struct ksmbd_sd *sd __free(kvfree) = NULL;
548e9ad317393b fs/cifsd/smbacl.c Namjae Jeon 2021-03-21 774 int pntsd_type;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 775
64b39f4a2fd293 fs/cifsd/smbacl.c Namjae Jeon 2021-03-30 776 if (!pntsd)
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 777 return -EIO;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 778
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 779 if (acl_len < (int)sizeof(struct smb_ntsd))
8f77150c15f877 fs/ksmbd/smbacl.c Hyunchul Lee 2021-09-24 780 return -EINVAL;
8f77150c15f877 fs/ksmbd/smbacl.c Hyunchul Lee 2021-09-24 781
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 782 /* Refuse an SD from a client if the decoder left a part out */
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 783 rc = ksmbd_sd_decode((u8 *)pntsd, acl_len, &sd);
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 784 if (rc == -EBADMSG || (!rc && sd->part_dropped))
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 785 rc = -EINVAL;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 786 if (rc)
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 787 return rc;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 788
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 789 pntsd_type = sd->control;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 790 if (sd->dacl == KSMBD_ACL_ABSENT) {
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 791 ksmbd_debug(SMB, "DACL_PRESENT in DACL type is not set\n");
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 792 *psd = no_free_ptr(sd);
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 @793 return rc;
This works but "return 0;" would be more readable.
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 794 }
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 795
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 796 /* The stored SD keeps only the Control bits set below and no SACL */
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 797 sd->control = 0;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-11-26 6:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:01 Dan Carpenter [this message]
2026-11-26 12:35 ` [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc' Namjae Jeon
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=20261126042013.QSoDDLPw-lkp@intel.com \
--to=error27@gmail.com \
--cc=icb@fastmail.org \
--cc=linkinjeon@kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/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