All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 13403/13588] fs/smb/client/smb2ops.c:3128 get_smb2_acl_by_path() error: uninitialized symbol 'rc'.
Date: Fri, 10 Oct 2025 03:08:44 +0800	[thread overview]
Message-ID: <202510100324.hSCnBCWb-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Markus Elfring <elfring@users.sourceforge.net>
CC: Steve French <stfrench@microsoft.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0b2f041c47acb45db82b4e847af6e17eb66cd32d
commit: e3699346828bf78aaacdae52356c69c1ab0f8cd6 [13403/13588] smb: client: Simplify a return statement in get_smb2_acl_by_path()
:::::: branch date: 7 hours ago
:::::: commit date: 19 hours ago
config: i386-randconfig-141-20251009 (https://download.01.org/0day-ci/archive/20251010/202510100324.hSCnBCWb-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)

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/202510100324.hSCnBCWb-lkp@intel.com/

New smatch warnings:
fs/smb/client/smb2ops.c:3128 get_smb2_acl_by_path() error: uninitialized symbol 'rc'.

Old smatch warnings:
fs/smb/client/smb2ops.c:2233 smb3_enum_snapshots() warn: potential user controlled sizeof overflow 'snapshot_in.snapshot_array_size + 12' '0-u32max + 12'
fs/smb/client/smb2ops.c:2235 smb3_enum_snapshots() warn: potential user controlled sizeof overflow 'snapshot_in.snapshot_array_size + 12' '0-u32max + 12'

vim +/rc +3128 fs/smb/client/smb2ops.c

2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3104  
3651487607ae77 fs/smb/client/smb2ops.c ChenXiaoSong       2024-08-22  3105  static struct smb_ntsd *
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3106  get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3107  		     const char *path, u32 *pacllen, u32 info)
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3108  {
3651487607ae77 fs/smb/client/smb2ops.c ChenXiaoSong       2024-08-22  3109  	struct smb_ntsd *pntsd = NULL;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3110  	u8 oplock = SMB2_OPLOCK_LEVEL_NONE;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3111  	unsigned int xid;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3112  	int rc;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3113  	struct cifs_tcon *tcon;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3114  	struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3115  	struct cifs_fid fid;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3116  	struct cifs_open_parms oparms;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3117  	__le16 *utf16_path;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3118  
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3119  	cifs_dbg(FYI, "get smb3 acl for path %s\n", path);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3120  	if (IS_ERR(tlink))
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3121  		return ERR_CAST(tlink);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3122  
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3123  	tcon = tlink_tcon(tlink);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3124  	xid = get_xid();
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3125  
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3126  	utf16_path = cifs_convert_path_to_utf16(path, cifs_sb);
cfe89091644c44 fs/cifs/smb2ops.c       Steve French       2018-05-19  3127  	if (!utf16_path) {
cfe89091644c44 fs/cifs/smb2ops.c       Steve French       2018-05-19 @3128  		free_xid(xid);
e3699346828bf7 fs/smb/client/smb2ops.c Markus Elfring     2025-10-08  3129  		return ERR_PTR(-ENOMEM);
cfe89091644c44 fs/cifs/smb2ops.c       Steve French       2018-05-19  3130  	}
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3131  
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3132  	oparms = (struct cifs_open_parms) {
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3133  		.tcon = tcon,
fddc6ccc487e5d fs/cifs/smb2ops.c       Shyam Prasad N     2023-03-17  3134  		.path = path,
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3135  		.desired_access = READ_CONTROL,
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3136  		.disposition = FILE_OPEN,
3c3317daef0afa fs/cifs/smb2ops.c       Steve French       2020-10-21  3137  		/*
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3138  		 * When querying an ACL, even if the file is a symlink
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3139  		 * we want to open the source not the target, and so
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3140  		 * the protocol requires that the client specify this
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3141  		 * flag when opening a reparse point
3c3317daef0afa fs/cifs/smb2ops.c       Steve French       2020-10-21  3142  		 */
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3143  		.create_options = cifs_create_options(cifs_sb, 0) |
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3144  				  OPEN_REPARSE_POINT,
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3145  		.fid = &fid,
de036dcaca65cf fs/cifs/smb2ops.c       Volker Lendecke    2023-01-11  3146  	};
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3147  
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3148  	if (info & SACL_SECINFO)
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3149  		oparms.desired_access |= SYSTEM_SECURITY;
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3150  
69dda3059e7a4d fs/cifs/smb2ops.c       Aurelien Aptel     2020-03-02  3151  	rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, NULL,
69dda3059e7a4d fs/cifs/smb2ops.c       Aurelien Aptel     2020-03-02  3152  		       NULL);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3153  	kfree(utf16_path);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3154  	if (!rc) {
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3155  		rc = SMB2_query_acl(xid, tlink_tcon(tlink), fid.persistent_fid,
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3156  				    fid.volatile_fid, (void **)&pntsd, pacllen,
3970acf7ddb9aa fs/cifs/smb2ops.c       Boris Protopopov   2020-12-18  3157  				    info);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3158  		SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3159  	}
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3160  
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3161  	cifs_put_tlink(tlink);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3162  	free_xid(xid);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3163  
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3164  	cifs_dbg(FYI, "%s: rc = %d ACL len %d\n", __func__, rc, *pacllen);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3165  	if (rc)
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3166  		return ERR_PTR(rc);
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3167  	return pntsd;
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3168  }
2f1afe25997fc2 fs/cifs/smb2ops.c       Shirish Pargaonkar 2017-06-22  3169  

:::::: The code at line 3128 was first introduced by commit
:::::: cfe89091644c441a1ade6dae6d2e47b715648615 smb3: fix various xid leaks

:::::: TO: Steve French <stfrench@microsoft.com>
:::::: CC: Steve French <stfrench@microsoft.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-10-09 19:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202510100324.hSCnBCWb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --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 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.