* [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc'
@ 2026-11-26 6:01 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-11-26 3:21 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Ian Bridges <icb@fastmail.org>
CC: Namjae Jeon <linkinjeon@kernel.org>
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
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
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
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 766
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 767 /* Convert CIFS ACL to POSIX form */
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;
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;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 798 sd->sacl = KSMBD_ACL_ABSENT;
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 799 sd->sacl_len = 0;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 800
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 801 if (sd->owner) {
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 802 owner_sid_ptr = sd->owner;
4d7ca4090184c1 fs/ksmbd/smbacl.c Christian Brauner 2023-01-13 803 rc = sid_to_id(idmap, owner_sid_ptr, SIDOWNER, fattr);
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 804 if (rc) {
fbe0bb2b75eb3c fs/smb/server/smbacl.c Namjae Jeon 2026-07-01 805 ksmbd_debug(SMB, "Owner SID has no Unix uid mapping\n");
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 806 owner_sid_ptr = NULL;
fbe0bb2b75eb3c fs/smb/server/smbacl.c Namjae Jeon 2026-07-01 807 rc = 0;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 808 }
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 809 }
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 810
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 811 if (sd->group) {
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 812 group_sid_ptr = sd->group;
4d7ca4090184c1 fs/ksmbd/smbacl.c Christian Brauner 2023-01-13 813 rc = sid_to_id(idmap, group_sid_ptr, SIDUNIX_GROUP, fattr);
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 814 if (rc) {
fbe0bb2b75eb3c fs/smb/server/smbacl.c Namjae Jeon 2026-07-01 815 ksmbd_debug(SMB, "Group SID has no Unix gid mapping\n");
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 816 group_sid_ptr = NULL;
fbe0bb2b75eb3c fs/smb/server/smbacl.c Namjae Jeon 2026-07-01 817 rc = 0;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 818 }
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 819 }
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 820
070fb21e5912b6 fs/cifsd/smbacl.c Namjae Jeon 2021-05-26 821 if ((pntsd_type & (DACL_AUTO_INHERITED | DACL_AUTO_INHERIT_REQ)) ==
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 822 (DACL_AUTO_INHERITED | DACL_AUTO_INHERIT_REQ))
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 823 sd->control |= DACL_AUTO_INHERITED;
e2f34481b24db2 fs/cifsd/smbacl.c Namjae Jeon 2021-03-16 824 if (pntsd_type & DACL_PROTECTED)
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 825 sd->control |= DACL_PROTECTED;
d6e13e19063db2 fs/smb/server/smbacl.c Namjae Jeon 2025-02-18 826
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 827 rc = parse_dacl(idmap, sd, owner_sid_ptr, group_sid_ptr, fattr);
c61dc7b1b4a323 fs/smb/server/smbacl.c Namjae Jeon 2026-08-25 828 if (rc)
c61dc7b1b4a323 fs/smb/server/smbacl.c Namjae Jeon 2026-08-25 829 return rc;
fda9522ed6afae fs/smb/server/smbacl.c Asim Viladi Oglu Manizada 2026-03-25 830
f9208b7a49196e fs/smb/server/smbacl.c Ian Bridges 2026-11-26 831 *psd = no_free_ptr(sd);
fda9522ed6afae fs/smb/server/smbacl.c Asim Viladi Oglu Manizada 2026-03-25 832 return 0;
fda9522ed6afae fs/smb/server/smbacl.c Asim Viladi Oglu Manizada 2026-03-25 833 }
fda9522ed6afae fs/smb/server/smbacl.c Asim Viladi Oglu Manizada 2026-03-25 834
:::::: The code at line 793 was first introduced by commit
:::::: e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 cifsd: add server-side procedures for SMB3
:::::: TO: Namjae Jeon <namjae.jeon@samsung.com>
:::::: CC: Steve French <stfrench@microsoft.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc'
@ 2026-11-26 6:01 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2026-11-26 6:01 UTC (permalink / raw)
To: oe-kbuild, Ian Bridges; +Cc: lkp, oe-kbuild-all, Namjae Jeon
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc'
2026-11-26 6:01 ` Dan Carpenter
(?)
@ 2026-11-26 12:35 ` Namjae Jeon
-1 siblings, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2026-11-26 12:35 UTC (permalink / raw)
To: Dan Carpenter; +Cc: oe-kbuild, Ian Bridges, lkp, oe-kbuild-all
On Thu, Nov 26, 2026 at 3:01 PM Dan Carpenter <error27@gmail.com> wrote:
>
> 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'
I will fix it.
Thanks for the report.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-26 12:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 3:21 [linkinjeon-smb:ksmbd-for-next 48/48] fs/smb/server/smbacl.c:793 parse_sec_desc() warn: missing error code? 'rc' kernel test robot
2026-11-26 6:01 ` Dan Carpenter
2026-11-26 12:35 ` Namjae Jeon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.