* [cifs:for-next 17/18] fs/cifs/dfs_cache.c:1433:1: warning: the frame size of 1120 bytes is larger than 1024 bytes
@ 2021-06-14 17:17 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-14 17:17 UTC (permalink / raw)
To: Paulo Alcantara; +Cc: kbuild-all, linux-cifs, samba-technical, Steve French
[-- Attachment #1: Type: text/plain, Size: 7093 bytes --]
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 93223fc8b35a801dbd2b3423c20035e8427d3271
commit: d01a3530e1ec321e74b0a4ca99e343bcb6c0dda6 [17/18] cifs: avoid starvation when refreshing dfs cache
config: mips-nlm_xlp_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git fetch --no-tags cifs for-next
git checkout d01a3530e1ec321e74b0a4ca99e343bcb6c0dda6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
fs/cifs/dfs_cache.c: In function 'refresh_cache':
>> fs/cifs/dfs_cache.c:1433:1: warning: the frame size of 1120 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1433 | }
| ^
vim +1433 fs/cifs/dfs_cache.c
345c1a4a9e09dc Paulo Alcantara (SUSE 2019-12-04 1366)
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1367 static void refresh_cache(struct cifs_ses **sessions)
5072010ccf0592 Paulo Alcantara (SUSE 2019-03-19 1368) {
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1369 int i;
5072010ccf0592 Paulo Alcantara (SUSE 2019-03-19 1370) struct cifs_ses *ses;
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1371 unsigned int xid;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1372 struct {
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1373 char *path;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1374 struct cifs_ses *ses;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1375 } referrals[CACHE_MAX_ENTRIES];
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1376 int count = 0;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1377 struct cache_entry *ce;
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1378
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1379 /*
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1380 * Refresh all cached entries. Get all new referrals outside critical section to avoid
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1381 * starvation while performing SMB2 IOCTL on broken or slow connections.
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1382
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1383 * The cache entries may cover more paths than the active mounts
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1384 * (e.g. domain-based DFS referrals or multi tier DFS setups).
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1385 */
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1386 down_read(&htable_rw_lock);
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1387 for (i = 0; i < CACHE_HTABLE_SIZE; i++) {
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1388 struct hlist_head *l = &cache_htable[i];
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1389
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1390 hlist_for_each_entry(ce, l, hlist) {
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1391 if (count == ARRAY_SIZE(referrals))
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1392 goto out_unlock;
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1393 if (hlist_unhashed(&ce->hlist) || !cache_entry_expired(ce))
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1394 continue;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1395 referrals[count].path = kstrdup(ce->path, GFP_ATOMIC);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1396 referrals[count++].ses = find_ipc_from_server_path(sessions, ce->path);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1397 }
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1398 }
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1399
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1400 out_unlock:
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1401 up_read(&htable_rw_lock);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1402
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1403 for (i = 0; i < count; i++) {
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1404 char *path = referrals[i].path;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1405 struct dfs_info3_param *refs = NULL;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1406 int numrefs = 0;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1407 int rc = 0;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1408
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1409 ses = referrals[i].ses;
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1410 if (!path || IS_ERR(ses))
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1411 goto next_referral;
742d8de0186e9f Paulo Alcantara (SUSE 2019-12-04 1412)
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1413 xid = get_xid();
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1414 rc = get_dfs_referral(xid, ses, path, &refs, &numrefs);
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 1415 free_xid(xid);
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1416
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1417 if (!rc) {
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1418 down_write(&htable_rw_lock);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1419 ce = lookup_cache_entry(path);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1420 /*
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1421 * We need to re-check it because other tasks might have it deleted or
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1422 * updated.
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1423 */
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1424 if (!IS_ERR(ce) && cache_entry_expired(ce))
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1425 update_cache_entry_locked(ce, refs, numrefs);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1426 up_write(&htable_rw_lock);
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1427 }
5072010ccf0592 Paulo Alcantara (SUSE 2019-03-19 1428)
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1429 next_referral:
d01a3530e1ec32 Paulo Alcantara 2021-06-08 1430 kfree(path);
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1431 free_dfs_info_array(refs, numrefs);
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1432 }
c3d785fa5c7bdb Paulo Alcantara 2021-06-04 @1433 }
54be1f6c1c3749 Paulo Alcantara 2018-11-14 1434
:::::: The code at line 1433 was first introduced by commit
:::::: c3d785fa5c7bdbe69cb8b223cf84396d873202ea cifs: keep referral server sessions alive
:::::: TO: Paulo Alcantara <pc@cjr.nz>
:::::: CC: Steve French <stfrench@microsoft.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21848 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-14 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 17:17 [cifs:for-next 17/18] fs/cifs/dfs_cache.c:1433:1: warning: the frame size of 1120 bytes is larger than 1024 bytes kernel test robot
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).