* fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
@ 2021-04-18 22:33 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-04-18 22:33 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 7839 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shyam Prasad N <sprasad@microsoft.com>
CC: Steve French <stfrench@microsoft.com>
CC: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
CC: Pavel Shilovsky <pshilov@microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5ffe04ccd69ae56af304ff7f98fbdaa4478ed47e
commit: 4e456b30f78c429b183db420e23b26cde7e03a78 cifs: On cifs_reconnect, resolve the hostname again.
date: 11 days ago
:::::: branch date: 2 hours ago
:::::: commit date: 11 days ago
config: i386-randconfig-m021-20210419 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
Old smatch warnings:
fs/cifs/connect.c:2568 generic_ip_connect() error: we previously assumed 'socket' could be null (see line 2556)
fs/cifs/connect.c:3509 cifs_mount() error: we previously assumed 'tcon' could be null (see line 3470)
vim +/cifs_sb +375 fs/cifs/connect.c
121d947d4fe15b Samuel Cabrero 2020-11-30 322
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 323 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 @324 if (cifs_sb && cifs_sb->origin_fullpath)
93d5cb517db39e Paulo Alcantara 2018-11-14 325 /*
93d5cb517db39e Paulo Alcantara 2018-11-14 326 * Set up next DFS target server (if any) for reconnect. If DFS
93d5cb517db39e Paulo Alcantara 2018-11-14 327 * feature is disabled, then we will retry last server we
93d5cb517db39e Paulo Alcantara 2018-11-14 328 * connected to before.
93d5cb517db39e Paulo Alcantara 2018-11-14 329 */
7d397a034d5c45 Paulo Alcantara 2020-07-21 330 reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
4e456b30f78c42 Shyam Prasad N 2021-03-31 331 else {
4e456b30f78c42 Shyam Prasad N 2021-03-31 332 #endif
4e456b30f78c42 Shyam Prasad N 2021-03-31 333 /*
4e456b30f78c42 Shyam Prasad N 2021-03-31 334 * Resolve the hostname again to make sure that IP address is up-to-date.
4e456b30f78c42 Shyam Prasad N 2021-03-31 335 */
4e456b30f78c42 Shyam Prasad N 2021-03-31 336 rc = reconn_set_ipaddr_from_hostname(server);
4e456b30f78c42 Shyam Prasad N 2021-03-31 337 if (rc) {
4e456b30f78c42 Shyam Prasad N 2021-03-31 338 cifs_dbg(FYI, "%s: failed to resolve hostname: %d\n",
4e456b30f78c42 Shyam Prasad N 2021-03-31 339 __func__, rc);
4e456b30f78c42 Shyam Prasad N 2021-03-31 340 }
4e456b30f78c42 Shyam Prasad N 2021-03-31 341
4e456b30f78c42 Shyam Prasad N 2021-03-31 342 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 343 }
93d5cb517db39e Paulo Alcantara 2018-11-14 344 #endif
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 345
4e456b30f78c42 Shyam Prasad N 2021-03-31 346
121d947d4fe15b Samuel Cabrero 2020-11-30 347 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 348 }
121d947d4fe15b Samuel Cabrero 2020-11-30 349 #endif
121d947d4fe15b Samuel Cabrero 2020-11-30 350
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 351 if (cifs_rdma_enabled(server))
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 352 rc = smbd_reconnect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 353 else
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 354 rc = generic_ip_connect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 355 if (rc) {
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 356 cifs_dbg(FYI, "reconnect error %d\n", rc);
4afe260bab5029 Federico Sauter 2015-03-17 357 mutex_unlock(&server->srv_mutex);
0cb766ae629c70 Steve French 2005-04-28 358 msleep(3000);
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 atomic_inc(&tcpSesReconnectCount);
335b7b62ffb69d Pavel Shilovsky 2019-01-16 361 set_credits(server, 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 spin_lock(&GlobalMid_Lock);
469ee614aaa367 Jeff Layton 2008-10-16 363 if (server->tcpStatus != CifsExiting)
fd88ce9313e9f9 Steve French 2011-04-12 364 server->tcpStatus = CifsNeedNegotiate;
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 spin_unlock(&GlobalMid_Lock);
121d947d4fe15b Samuel Cabrero 2020-11-30 366 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 367 server->use_swn_dstaddr = false;
121d947d4fe15b Samuel Cabrero 2020-11-30 368 #endif
73e216a8a42c0e Jeff Layton 2013-09-05 369 mutex_unlock(&server->srv_mutex);
4afe260bab5029 Federico Sauter 2015-03-17 370 }
7fdbaa1b8daa10 Jeff Layton 2011-06-10 371 } while (server->tcpStatus == CifsNeedReconnect);
2b84a36c5529da Jeff Layton 2011-01-11 372
93d5cb517db39e Paulo Alcantara 2018-11-14 373 #ifdef CONFIG_CIFS_DFS_UPCALL
93d5cb517db39e Paulo Alcantara 2018-11-14 374 if (tgt_it) {
93d5cb517db39e Paulo Alcantara 2018-11-14 @375 rc = dfs_cache_noreq_update_tgthint(cifs_sb->origin_fullpath + 1,
93d5cb517db39e Paulo Alcantara 2018-11-14 376 tgt_it);
93d5cb517db39e Paulo Alcantara 2018-11-14 377 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 378 cifs_server_dbg(VFS, "%s: failed to update DFS target hint: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 379 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 380 }
93d5cb517db39e Paulo Alcantara 2018-11-14 381 rc = dfs_cache_update_vol(cifs_sb->origin_fullpath, server);
93d5cb517db39e Paulo Alcantara 2018-11-14 382 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 383 cifs_server_dbg(VFS, "%s: failed to update vol info in DFS cache: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 384 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 385 }
93d5cb517db39e Paulo Alcantara 2018-11-14 386 dfs_cache_free_tgts(&tgt_list);
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 387)
23324407143dd9 Paulo Alcantara 2018-11-20 388 }
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 389)
bacd704a95ad0b Paulo Alcantara (SUSE 2020-02-20 390) cifs_put_tcp_super(sb);
93d5cb517db39e Paulo Alcantara 2018-11-14 391 #endif
b8c600120fc87d Sachin Prabhu 2016-10-20 392 if (server->tcpStatus == CifsNeedNegotiate)
b8c600120fc87d Sachin Prabhu 2016-10-20 393 mod_delayed_work(cifsiod_wq, &server->echo, 0);
b8c600120fc87d Sachin Prabhu 2016-10-20 394
e2e87519bd72e2 Stefan Metzmacher 2020-02-24 395 wake_up(&server->response_q);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 return rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 398
:::::: The code at line 375 was first introduced by commit
:::::: 93d5cb517db39e8af8d1292f9e785e4983b7f708 cifs: Add support for failover in cifs_reconnect()
:::::: TO: Paulo Alcantara <palcantara@suse.de>
:::::: CC: Steve French <stfrench@microsoft.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31489 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
@ 2021-04-21 2:36 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-04-21 2:36 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 7841 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shyam Prasad N <sprasad@microsoft.com>
CC: Steve French <stfrench@microsoft.com>
CC: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
CC: Pavel Shilovsky <pshilov@microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1fe5501ba1abf2b7e78295df73675423bd6899a0
commit: 4e456b30f78c429b183db420e23b26cde7e03a78 cifs: On cifs_reconnect, resolve the hostname again.
date: 13 days ago
:::::: branch date: 5 hours ago
:::::: commit date: 13 days ago
config: x86_64-randconfig-m031-20210420 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
Old smatch warnings:
fs/cifs/connect.c:2568 generic_ip_connect() error: we previously assumed 'socket' could be null (see line 2556)
fs/cifs/connect.c:3509 cifs_mount() error: we previously assumed 'tcon' could be null (see line 3470)
vim +/cifs_sb +375 fs/cifs/connect.c
121d947d4fe15b Samuel Cabrero 2020-11-30 322
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 323 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 @324 if (cifs_sb && cifs_sb->origin_fullpath)
93d5cb517db39e Paulo Alcantara 2018-11-14 325 /*
93d5cb517db39e Paulo Alcantara 2018-11-14 326 * Set up next DFS target server (if any) for reconnect. If DFS
93d5cb517db39e Paulo Alcantara 2018-11-14 327 * feature is disabled, then we will retry last server we
93d5cb517db39e Paulo Alcantara 2018-11-14 328 * connected to before.
93d5cb517db39e Paulo Alcantara 2018-11-14 329 */
7d397a034d5c45 Paulo Alcantara 2020-07-21 330 reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
4e456b30f78c42 Shyam Prasad N 2021-03-31 331 else {
4e456b30f78c42 Shyam Prasad N 2021-03-31 332 #endif
4e456b30f78c42 Shyam Prasad N 2021-03-31 333 /*
4e456b30f78c42 Shyam Prasad N 2021-03-31 334 * Resolve the hostname again to make sure that IP address is up-to-date.
4e456b30f78c42 Shyam Prasad N 2021-03-31 335 */
4e456b30f78c42 Shyam Prasad N 2021-03-31 336 rc = reconn_set_ipaddr_from_hostname(server);
4e456b30f78c42 Shyam Prasad N 2021-03-31 337 if (rc) {
4e456b30f78c42 Shyam Prasad N 2021-03-31 338 cifs_dbg(FYI, "%s: failed to resolve hostname: %d\n",
4e456b30f78c42 Shyam Prasad N 2021-03-31 339 __func__, rc);
4e456b30f78c42 Shyam Prasad N 2021-03-31 340 }
4e456b30f78c42 Shyam Prasad N 2021-03-31 341
4e456b30f78c42 Shyam Prasad N 2021-03-31 342 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 343 }
93d5cb517db39e Paulo Alcantara 2018-11-14 344 #endif
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 345
4e456b30f78c42 Shyam Prasad N 2021-03-31 346
121d947d4fe15b Samuel Cabrero 2020-11-30 347 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 348 }
121d947d4fe15b Samuel Cabrero 2020-11-30 349 #endif
121d947d4fe15b Samuel Cabrero 2020-11-30 350
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 351 if (cifs_rdma_enabled(server))
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 352 rc = smbd_reconnect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 353 else
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 354 rc = generic_ip_connect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 355 if (rc) {
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 356 cifs_dbg(FYI, "reconnect error %d\n", rc);
4afe260bab5029 Federico Sauter 2015-03-17 357 mutex_unlock(&server->srv_mutex);
0cb766ae629c70 Steve French 2005-04-28 358 msleep(3000);
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 atomic_inc(&tcpSesReconnectCount);
335b7b62ffb69d Pavel Shilovsky 2019-01-16 361 set_credits(server, 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 spin_lock(&GlobalMid_Lock);
469ee614aaa367 Jeff Layton 2008-10-16 363 if (server->tcpStatus != CifsExiting)
fd88ce9313e9f9 Steve French 2011-04-12 364 server->tcpStatus = CifsNeedNegotiate;
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 spin_unlock(&GlobalMid_Lock);
121d947d4fe15b Samuel Cabrero 2020-11-30 366 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 367 server->use_swn_dstaddr = false;
121d947d4fe15b Samuel Cabrero 2020-11-30 368 #endif
73e216a8a42c0e Jeff Layton 2013-09-05 369 mutex_unlock(&server->srv_mutex);
4afe260bab5029 Federico Sauter 2015-03-17 370 }
7fdbaa1b8daa10 Jeff Layton 2011-06-10 371 } while (server->tcpStatus == CifsNeedReconnect);
2b84a36c5529da Jeff Layton 2011-01-11 372
93d5cb517db39e Paulo Alcantara 2018-11-14 373 #ifdef CONFIG_CIFS_DFS_UPCALL
93d5cb517db39e Paulo Alcantara 2018-11-14 374 if (tgt_it) {
93d5cb517db39e Paulo Alcantara 2018-11-14 @375 rc = dfs_cache_noreq_update_tgthint(cifs_sb->origin_fullpath + 1,
93d5cb517db39e Paulo Alcantara 2018-11-14 376 tgt_it);
93d5cb517db39e Paulo Alcantara 2018-11-14 377 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 378 cifs_server_dbg(VFS, "%s: failed to update DFS target hint: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 379 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 380 }
93d5cb517db39e Paulo Alcantara 2018-11-14 381 rc = dfs_cache_update_vol(cifs_sb->origin_fullpath, server);
93d5cb517db39e Paulo Alcantara 2018-11-14 382 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 383 cifs_server_dbg(VFS, "%s: failed to update vol info in DFS cache: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 384 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 385 }
93d5cb517db39e Paulo Alcantara 2018-11-14 386 dfs_cache_free_tgts(&tgt_list);
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 387)
23324407143dd9 Paulo Alcantara 2018-11-20 388 }
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 389)
bacd704a95ad0b Paulo Alcantara (SUSE 2020-02-20 390) cifs_put_tcp_super(sb);
93d5cb517db39e Paulo Alcantara 2018-11-14 391 #endif
b8c600120fc87d Sachin Prabhu 2016-10-20 392 if (server->tcpStatus == CifsNeedNegotiate)
b8c600120fc87d Sachin Prabhu 2016-10-20 393 mod_delayed_work(cifsiod_wq, &server->echo, 0);
b8c600120fc87d Sachin Prabhu 2016-10-20 394
e2e87519bd72e2 Stefan Metzmacher 2020-02-24 395 wake_up(&server->response_q);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 return rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 398
:::::: The code at line 375 was first introduced by commit
:::::: 93d5cb517db39e8af8d1292f9e785e4983b7f708 cifs: Add support for failover in cifs_reconnect()
:::::: TO: Paulo Alcantara <palcantara@suse.de>
:::::: CC: Steve French <stfrench@microsoft.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31275 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
@ 2021-05-01 17:29 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-05-01 17:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 7842 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Shyam Prasad N <sprasad@microsoft.com>
CC: Steve French <stfrench@microsoft.com>
CC: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
CC: Pavel Shilovsky <pshilov@microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9f67672a817ec046f7554a885f0fe0d60e1bf99f
commit: 4e456b30f78c429b183db420e23b26cde7e03a78 cifs: On cifs_reconnect, resolve the hostname again.
date: 3 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 3 weeks ago
config: x86_64-randconfig-m031-20210501 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324)
Old smatch warnings:
fs/cifs/connect.c:2568 generic_ip_connect() error: we previously assumed 'socket' could be null (see line 2556)
fs/cifs/connect.c:3509 cifs_mount() error: we previously assumed 'tcon' could be null (see line 3470)
vim +/cifs_sb +375 fs/cifs/connect.c
121d947d4fe15b Samuel Cabrero 2020-11-30 322
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 323 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 @324 if (cifs_sb && cifs_sb->origin_fullpath)
93d5cb517db39e Paulo Alcantara 2018-11-14 325 /*
93d5cb517db39e Paulo Alcantara 2018-11-14 326 * Set up next DFS target server (if any) for reconnect. If DFS
93d5cb517db39e Paulo Alcantara 2018-11-14 327 * feature is disabled, then we will retry last server we
93d5cb517db39e Paulo Alcantara 2018-11-14 328 * connected to before.
93d5cb517db39e Paulo Alcantara 2018-11-14 329 */
7d397a034d5c45 Paulo Alcantara 2020-07-21 330 reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
4e456b30f78c42 Shyam Prasad N 2021-03-31 331 else {
4e456b30f78c42 Shyam Prasad N 2021-03-31 332 #endif
4e456b30f78c42 Shyam Prasad N 2021-03-31 333 /*
4e456b30f78c42 Shyam Prasad N 2021-03-31 334 * Resolve the hostname again to make sure that IP address is up-to-date.
4e456b30f78c42 Shyam Prasad N 2021-03-31 335 */
4e456b30f78c42 Shyam Prasad N 2021-03-31 336 rc = reconn_set_ipaddr_from_hostname(server);
4e456b30f78c42 Shyam Prasad N 2021-03-31 337 if (rc) {
4e456b30f78c42 Shyam Prasad N 2021-03-31 338 cifs_dbg(FYI, "%s: failed to resolve hostname: %d\n",
4e456b30f78c42 Shyam Prasad N 2021-03-31 339 __func__, rc);
4e456b30f78c42 Shyam Prasad N 2021-03-31 340 }
4e456b30f78c42 Shyam Prasad N 2021-03-31 341
4e456b30f78c42 Shyam Prasad N 2021-03-31 342 #ifdef CONFIG_CIFS_DFS_UPCALL
4e456b30f78c42 Shyam Prasad N 2021-03-31 343 }
93d5cb517db39e Paulo Alcantara 2018-11-14 344 #endif
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 345
4e456b30f78c42 Shyam Prasad N 2021-03-31 346
121d947d4fe15b Samuel Cabrero 2020-11-30 347 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 348 }
121d947d4fe15b Samuel Cabrero 2020-11-30 349 #endif
121d947d4fe15b Samuel Cabrero 2020-11-30 350
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 351 if (cifs_rdma_enabled(server))
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 352 rc = smbd_reconnect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 353 else
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 354 rc = generic_ip_connect(server);
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 355 if (rc) {
aaa3aef34d3ab9 Paulo Alcantara 2020-05-19 356 cifs_dbg(FYI, "reconnect error %d\n", rc);
4afe260bab5029 Federico Sauter 2015-03-17 357 mutex_unlock(&server->srv_mutex);
0cb766ae629c70 Steve French 2005-04-28 358 msleep(3000);
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 atomic_inc(&tcpSesReconnectCount);
335b7b62ffb69d Pavel Shilovsky 2019-01-16 361 set_credits(server, 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 spin_lock(&GlobalMid_Lock);
469ee614aaa367 Jeff Layton 2008-10-16 363 if (server->tcpStatus != CifsExiting)
fd88ce9313e9f9 Steve French 2011-04-12 364 server->tcpStatus = CifsNeedNegotiate;
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 spin_unlock(&GlobalMid_Lock);
121d947d4fe15b Samuel Cabrero 2020-11-30 366 #ifdef CONFIG_CIFS_SWN_UPCALL
121d947d4fe15b Samuel Cabrero 2020-11-30 367 server->use_swn_dstaddr = false;
121d947d4fe15b Samuel Cabrero 2020-11-30 368 #endif
73e216a8a42c0e Jeff Layton 2013-09-05 369 mutex_unlock(&server->srv_mutex);
4afe260bab5029 Federico Sauter 2015-03-17 370 }
7fdbaa1b8daa10 Jeff Layton 2011-06-10 371 } while (server->tcpStatus == CifsNeedReconnect);
2b84a36c5529da Jeff Layton 2011-01-11 372
93d5cb517db39e Paulo Alcantara 2018-11-14 373 #ifdef CONFIG_CIFS_DFS_UPCALL
93d5cb517db39e Paulo Alcantara 2018-11-14 374 if (tgt_it) {
93d5cb517db39e Paulo Alcantara 2018-11-14 @375 rc = dfs_cache_noreq_update_tgthint(cifs_sb->origin_fullpath + 1,
93d5cb517db39e Paulo Alcantara 2018-11-14 376 tgt_it);
93d5cb517db39e Paulo Alcantara 2018-11-14 377 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 378 cifs_server_dbg(VFS, "%s: failed to update DFS target hint: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 379 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 380 }
93d5cb517db39e Paulo Alcantara 2018-11-14 381 rc = dfs_cache_update_vol(cifs_sb->origin_fullpath, server);
93d5cb517db39e Paulo Alcantara 2018-11-14 382 if (rc) {
afe6f65353b644 Ronnie Sahlberg 2019-08-28 383 cifs_server_dbg(VFS, "%s: failed to update vol info in DFS cache: rc = %d\n",
93d5cb517db39e Paulo Alcantara 2018-11-14 384 __func__, rc);
93d5cb517db39e Paulo Alcantara 2018-11-14 385 }
93d5cb517db39e Paulo Alcantara 2018-11-14 386 dfs_cache_free_tgts(&tgt_list);
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 387)
23324407143dd9 Paulo Alcantara 2018-11-20 388 }
8354d88efdab72 Paulo Alcantara (SUSE 2019-11-22 389)
bacd704a95ad0b Paulo Alcantara (SUSE 2020-02-20 390) cifs_put_tcp_super(sb);
93d5cb517db39e Paulo Alcantara 2018-11-14 391 #endif
b8c600120fc87d Sachin Prabhu 2016-10-20 392 if (server->tcpStatus == CifsNeedNegotiate)
b8c600120fc87d Sachin Prabhu 2016-10-20 393 mod_delayed_work(cifsiod_wq, &server->echo, 0);
b8c600120fc87d Sachin Prabhu 2016-10-20 394
e2e87519bd72e2 Stefan Metzmacher 2020-02-24 395 wake_up(&server->response_q);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 return rc;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 398
:::::: The code at line 375 was first introduced by commit
:::::: 93d5cb517db39e8af8d1292f9e785e4983b7f708 cifs: Add support for failover in cifs_reconnect()
:::::: TO: Paulo Alcantara <palcantara@suse.de>
:::::: CC: Steve French <stfrench@microsoft.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34130 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-01 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-01 17:29 fs/cifs/connect.c:375 cifs_reconnect() error: we previously assumed 'cifs_sb' could be null (see line 324) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-04-21 2:36 kernel test robot
2021-04-18 22:33 kernel test robot
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.