CC: [email protected]
TO: Steve French <[email protected]>

tree:   git://github.com/smfrench/smb3-kernel.git for-next
head:   28711a66701e3aefc5748dcde38dba1e2e79de34
commit: 96d182ec82a22fab8dd0c9287630b7f64a7408e7 [15/18] cifs: check reconnects 
for channels of active tcons too
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-c001-20211118 (attached as .config)
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
        # 
https://github.com/smfrench/smb3-kernel/commit/96d182ec82a22fab8dd0c9287630b7f64a7408e7
        git remote add smfrench-smb3 git://github.com/smfrench/smb3-kernel.git
        git fetch --no-tags smfrench-smb3 for-next
        git checkout 96d182ec82a22fab8dd0c9287630b7f64a7408e7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
                                                       ^
   fs/cifs/smb2pdu.c:247:2: note: Taking false branch
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:76:2: note: expanded from macro 'cifs_dbg'
           if ((type) & ONCE)                                              \
           ^
   fs/cifs/smb2pdu.c:247:2: note: Left side of '&&' is true
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^
   fs/cifs/cifs_debug.h:64:6: note: expanded from macro 'cifs_dbg_func'
           if ((type) & FYI && cifsFYI & CIFS_INFO) {                      \
               ^
   fs/cifs/smb2pdu.c:247:2: note: Assuming the condition is false
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/cifs/cifs_debug.h:64:22: note: expanded from macro 'cifs_dbg_func'
           if ((type) & FYI && cifsFYI & CIFS_INFO) {                      \
                               ^~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2pdu.c:247:2: note: Taking false branch
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^
   fs/cifs/cifs_debug.h:64:2: note: expanded from macro 'cifs_dbg_func'
           if ((type) & FYI && cifsFYI & CIFS_INFO) {                      \
           ^
   fs/cifs/smb2pdu.c:247:2: note: Taking false branch
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^
   fs/cifs/cifs_debug.h:67:9: note: expanded from macro 'cifs_dbg_func'
           } else if ((type) & VFS) {                                      \
                  ^
   fs/cifs/smb2pdu.c:247:2: note: Left side of '&&' is false
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^
   fs/cifs/cifs_debug.h:69:28: note: expanded from macro 'cifs_dbg_func'
           } else if ((type) & NOISY && (NOISY != 0)) {                    \
                                     ^
   fs/cifs/smb2pdu.c:247:2: note: Loop condition is false.  Exiting loop
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:79:3: note: expanded from macro 'cifs_dbg'
                   cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__);   \
                   ^
   fs/cifs/cifs_debug.h:62:52: note: expanded from macro 'cifs_dbg_func'
   #define cifs_dbg_func(ratefunc, type, fmt, ...)                         \
                                                                           ^
   fs/cifs/smb2pdu.c:247:2: note: Loop condition is false.  Exiting loop
           cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
           ^
   fs/cifs/cifs_debug.h:74:38: note: expanded from macro 'cifs_dbg'
   #define cifs_dbg(type, fmt, ...)                                        \
                                                                           ^
   fs/cifs/smb2pdu.c:260:6: note: Assuming field 'tcpStatus' is not equal to 
CifsNeedReconnect
           if (server->tcpStatus == CifsNeedReconnect) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2pdu.c:260:2: note: Taking false branch
           if (server->tcpStatus == CifsNeedReconnect) {
           ^
   fs/cifs/smb2pdu.c:272:6: note: Assuming the condition is true
           if (!cifs_chan_needs_reconnect(ses, server)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2pdu.c:272:2: note: Taking true branch
           if (!cifs_chan_needs_reconnect(ses, server)) {
           ^
   fs/cifs/smb2pdu.c:276:7: note: Assuming field 'need_reconnect' is false
                   if (tcon->need_reconnect)
                       ^~~~~~~~~~~~~~~~~~~~
   fs/cifs/smb2pdu.c:276:3: note: Taking false branch
                   if (tcon->need_reconnect)
                   ^
   fs/cifs/smb2pdu.c:279:3: note: Control jumps to line 331
                   goto out;
                   ^
   fs/cifs/smb2pdu.c:331:2: note: No cases match in the switch statement. 
Control jumps to line 343
           switch (smb2_command) {
           ^
   fs/cifs/smb2pdu.c:345:2: note: Undefined or garbage value returned to caller
           return rc;
           ^      ~~
   fs/cifs/smb2pdu.c:596:3: warning: Value stored to 'pneg_ctxt' is never read 
[clang-analyzer-deadcode.DeadStores]
                   pneg_ctxt += ctxt_len;
                   ^            ~~~~~~~~
   fs/cifs/smb2pdu.c:596:3: note: Value stored to 'pneg_ctxt' is never read
                   pneg_ctxt += ctxt_len;
                   ^            ~~~~~~~~
>> fs/cifs/smb2pdu.c:3811:19: warning: Although the value stored to 
>> 'ses_selected' is used in the enclosing expression, the value is never 
>> actually read from 'ses_selected' [clang-analyzer-deadcode.DeadStores]
                   tcon_selected = ses_selected = false;
                                   ^              ~~~~~
   fs/cifs/smb2pdu.c:3811:19: note: Although the value stored to 'ses_selected' 
is used in the enclosing expression, the value is never actually read from 
'ses_selected'
                   tcon_selected = ses_selected = false;
                                   ^              ~~~~~
>> fs/cifs/smb2pdu.c:3836:4: warning: Value stored to 'ses_selected' is never 
>> read [clang-analyzer-deadcode.DeadStores]
                           ses_selected = ses_exist = true;
                           ^              ~~~~~~~~~~~~~~~~
   fs/cifs/smb2pdu.c:3836:4: note: Value stored to 'ses_selected' is never read
                           ses_selected = ses_exist = true;
                           ^              ~~~~~~~~~~~~~~~~
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   7 warnings generated.
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:580:27: warning: 2nd function 
call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
           num_links = is_min ? 1 : amdgpu_xgmi_get_num_links(adev, peer_adev);
                                    ^                               ~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:570:61: note: 'peer_adev' 
declared without an initial value
           struct amdgpu_device *adev = (struct amdgpu_device *)dst, *peer_adev;
                                                                      ^~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:573:6: note: Assuming field 
'asic_type' is equal to CHIP_ALDEBARAN
           if (adev->asic_type != CHIP_ALDEBARAN)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:573:2: note: Taking false branch
           if (adev->asic_type != CHIP_ALDEBARAN)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:576:6: note: Assuming 'src' is 
null
           if (src)
               ^~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:576:2: note: Taking false branch
           if (src)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:580:14: note: Assuming 'is_min' 
is false
           num_links = is_min ? 1 : amdgpu_xgmi_get_num_links(adev, peer_adev);
                       ^~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:580:14: note: '?' condition is 
false
   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:580:27: note: 2nd function call 
argument is an uninitialized value
           num_links = is_min ? 1 : amdgpu_xgmi_get_num_links(adev, peer_adev);
                                    ^                               ~~~~~~~~~
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   Suppressed 6 warnings (6 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   4 warnings generated.
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   6 warnings generated.
   drivers/gpu/drm/drm_file.c:587:30: warning: Use of memory after it is freed 
[clang-analyzer-unix.Malloc]
                           file_priv->event_space += e->event->length;
                                                     ^~~~~~~~
   drivers/gpu/drm/drm_file.c:577:6: note: Assuming 'ret' is 0
           if (ret)
               ^~~
   drivers/gpu/drm/drm_file.c:577:2: note: Taking false branch
           if (ret)
           ^
   drivers/gpu/drm/drm_file.c:580:2: note: Loop condition is true.  Entering 
loop body
           for (;;) {
           ^
   drivers/gpu/drm/drm_file.c:584:7: note: Assuming the condition is true
                   if (!list_empty(&file_priv->event_list)) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_file.c:584:3: note: Taking true branch
                   if (!list_empty(&file_priv->event_list)) {
                   ^
   drivers/gpu/drm/drm_file.c:592:7: note: 'e' is not equal to NULL
                   if (e == NULL) {
                       ^
   drivers/gpu/drm/drm_file.c:592:3: note: Taking false branch
                   if (e == NULL) {
                   ^
   drivers/gpu/drm/drm_file.c:611:8: note: Assuming the condition is false
                           if (length > count - ret) {
                               ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_file.c:611:4: note: Taking false branch
                           if (length > count - ret) {
                           ^
   drivers/gpu/drm/drm_file.c:622:8: note: Assuming the condition is false
                           if (copy_to_user(buffer + ret, e->event, length)) {
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_file.c:622:4: note: Taking false branch

vim +3811 fs/cifs/smb2pdu.c

9094fad1ed90ca Pavel Shilovsky  2012-07-12  3784  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3785  void 
smb2_reconnect_server(struct work_struct *work)
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3786  {
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3787        struct TCP_Server_Info 
*server = container_of(work,
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3788                                
        struct TCP_Server_Info, reconnect.work);
96d182ec82a22f Shyam Prasad N   2021-10-30  3789        struct TCP_Server_Info 
*pserver;
96d182ec82a22f Shyam Prasad N   2021-10-30  3790        struct cifs_ses *ses, 
*ses2;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3791        struct cifs_tcon *tcon, 
*tcon2;
96d182ec82a22f Shyam Prasad N   2021-10-30  3792        struct list_head 
tmp_list, tmp_ses_list;
96d182ec82a22f Shyam Prasad N   2021-10-30  3793        bool tcon_exist = 
false, ses_exist = false;
96d182ec82a22f Shyam Prasad N   2021-10-30  3794        bool tcon_selected = 
false, ses_selected = false;
18ea43113f5b74 Germano Percossi 2017-04-07  3795        int rc;
96d182ec82a22f Shyam Prasad N   2021-10-30  3796        bool resched = false;
18ea43113f5b74 Germano Percossi 2017-04-07  3797  
96d182ec82a22f Shyam Prasad N   2021-10-30  3798        /* If server is a 
channel, select the primary channel */
96d182ec82a22f Shyam Prasad N   2021-10-30  3799        pserver = 
CIFS_SERVER_IS_CHAN(server) ? server->primary_server : server;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3800  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3801        /* Prevent simultaneous 
reconnects that can corrupt tcon->rlist list */
96d182ec82a22f Shyam Prasad N   2021-10-30  3802        
mutex_lock(&pserver->reconnect_mutex);
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3803  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3804        
INIT_LIST_HEAD(&tmp_list);
96d182ec82a22f Shyam Prasad N   2021-10-30  3805        
INIT_LIST_HEAD(&tmp_ses_list);
96d182ec82a22f Shyam Prasad N   2021-10-30  3806        cifs_dbg(FYI, 
"Reconnecting tcons and channels\n");
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3807  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3808        
spin_lock(&cifs_tcp_ses_lock);
96d182ec82a22f Shyam Prasad N   2021-10-30  3809        
list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) {
96d182ec82a22f Shyam Prasad N   2021-10-30  3810  
96d182ec82a22f Shyam Prasad N   2021-10-30 @3811                tcon_selected = 
ses_selected = false;
96d182ec82a22f Shyam Prasad N   2021-10-30  3812  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3813                
list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
96a988ffeb90db Pavel Shilovsky  2016-11-29  3814                        if 
(tcon->need_reconnect || tcon->need_reopen_files) {
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3815                                
tcon->tc_count++;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3816                                
list_add_tail(&tcon->rlist, &tmp_list);
96d182ec82a22f Shyam Prasad N   2021-10-30  3817                                
tcon_selected = tcon_exist = true;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3818                        }
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3819                }
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3820                /*
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3821                 * IPC has the 
same lifetime as its session and uses its
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3822                 * refcount.
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3823                 */
b327a717e50698 Aurelien Aptel   2018-01-24  3824                if 
(ses->tcon_ipc && ses->tcon_ipc->need_reconnect) {
b327a717e50698 Aurelien Aptel   2018-01-24  3825                        
list_add_tail(&ses->tcon_ipc->rlist, &tmp_list);
96d182ec82a22f Shyam Prasad N   2021-10-30  3826                        
tcon_selected = tcon_exist = true;
96d182ec82a22f Shyam Prasad N   2021-10-30  3827                        
ses->ses_count++;
96d182ec82a22f Shyam Prasad N   2021-10-30  3828                }
96d182ec82a22f Shyam Prasad N   2021-10-30  3829                /*
96d182ec82a22f Shyam Prasad N   2021-10-30  3830                 * handle the 
case where channel needs to reconnect
96d182ec82a22f Shyam Prasad N   2021-10-30  3831                 * binding 
session, but tcon is healthy (some other channel
96d182ec82a22f Shyam Prasad N   2021-10-30  3832                 * is active)
96d182ec82a22f Shyam Prasad N   2021-10-30  3833                 */
96d182ec82a22f Shyam Prasad N   2021-10-30  3834                if 
(!tcon_selected && cifs_chan_needs_reconnect(ses, server)) {
96d182ec82a22f Shyam Prasad N   2021-10-30  3835                        
list_add_tail(&ses->rlist, &tmp_ses_list);
96d182ec82a22f Shyam Prasad N   2021-10-30 @3836                        
ses_selected = ses_exist = true;
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3837                        
ses->ses_count++;
b327a717e50698 Aurelien Aptel   2018-01-24  3838                }
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3839        }
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3840        /*
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3841         * Get the reference to 
server struct to be sure that the last call of
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3842         * cifs_put_tcon() in 
the loop below won't release the server pointer.
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3843         */
96d182ec82a22f Shyam Prasad N   2021-10-30  3844        if (tcon_exist || 
ses_exist)
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3845                
server->srv_count++;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3846  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3847        
spin_unlock(&cifs_tcp_ses_lock);
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3848  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3849        
list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) {
352d96f3acc6e0 Aurelien Aptel   2020-05-31  3850                rc = 
smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server);
18ea43113f5b74 Germano Percossi 2017-04-07  3851                if (!rc)
96a988ffeb90db Pavel Shilovsky  2016-11-29  3852                        
cifs_reopen_persistent_handles(tcon);
18ea43113f5b74 Germano Percossi 2017-04-07  3853                else
18ea43113f5b74 Germano Percossi 2017-04-07  3854                        resched 
= true;
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3855                
list_del_init(&tcon->rlist);
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3856                if (tcon->ipc)
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3857                        
cifs_put_smb_ses(tcon->ses);
0ff2b018b02f89 Ronnie Sahlberg  2019-06-05  3858                else
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3859                        
cifs_put_tcon(tcon);
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3860        }
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3861  
96d182ec82a22f Shyam Prasad N   2021-10-30  3862        if (!ses_exist)
96d182ec82a22f Shyam Prasad N   2021-10-30  3863                goto done;
96d182ec82a22f Shyam Prasad N   2021-10-30  3864  
96d182ec82a22f Shyam Prasad N   2021-10-30  3865        /* allocate a dummy 
tcon struct used for reconnect */
96d182ec82a22f Shyam Prasad N   2021-10-30  3866        tcon = 
kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL);
96d182ec82a22f Shyam Prasad N   2021-10-30  3867        if (!tcon) {
96d182ec82a22f Shyam Prasad N   2021-10-30  3868                resched = true;
96d182ec82a22f Shyam Prasad N   2021-10-30  3869                
list_del_init(&ses->rlist);
96d182ec82a22f Shyam Prasad N   2021-10-30  3870                
cifs_put_smb_ses(ses);
96d182ec82a22f Shyam Prasad N   2021-10-30  3871                goto done;
96d182ec82a22f Shyam Prasad N   2021-10-30  3872        }
96d182ec82a22f Shyam Prasad N   2021-10-30  3873  
96d182ec82a22f Shyam Prasad N   2021-10-30  3874        tcon->tidStatus = 
CifsGood;
96d182ec82a22f Shyam Prasad N   2021-10-30  3875        tcon->retry = false;
96d182ec82a22f Shyam Prasad N   2021-10-30  3876        tcon->need_reconnect = 
false;
96d182ec82a22f Shyam Prasad N   2021-10-30  3877  
96d182ec82a22f Shyam Prasad N   2021-10-30  3878        /* now reconnect 
sessions for necessary channels */
96d182ec82a22f Shyam Prasad N   2021-10-30  3879        
list_for_each_entry_safe(ses, ses2, &tmp_ses_list, rlist) {
96d182ec82a22f Shyam Prasad N   2021-10-30  3880                tcon->ses = ses;
96d182ec82a22f Shyam Prasad N   2021-10-30  3881                rc = 
smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server);
96d182ec82a22f Shyam Prasad N   2021-10-30  3882                if (rc)
96d182ec82a22f Shyam Prasad N   2021-10-30  3883                        resched 
= true;
96d182ec82a22f Shyam Prasad N   2021-10-30  3884                
list_del_init(&ses->rlist);
96d182ec82a22f Shyam Prasad N   2021-10-30  3885                
cifs_put_smb_ses(ses);
96d182ec82a22f Shyam Prasad N   2021-10-30  3886        }
96d182ec82a22f Shyam Prasad N   2021-10-30  3887        kfree(tcon);
96d182ec82a22f Shyam Prasad N   2021-10-30  3888  
96d182ec82a22f Shyam Prasad N   2021-10-30  3889  done:
96d182ec82a22f Shyam Prasad N   2021-10-30  3890        cifs_dbg(FYI, 
"Reconnecting tcons and channels finished\n");
18ea43113f5b74 Germano Percossi 2017-04-07  3891        if (resched)
18ea43113f5b74 Germano Percossi 2017-04-07  3892                
queue_delayed_work(cifsiod_wq, &server->reconnect, 2 * HZ);
96d182ec82a22f Shyam Prasad N   2021-10-30  3893        
mutex_unlock(&pserver->reconnect_mutex);
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3894  
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3895        /* now we can safely 
release srv struct */
96d182ec82a22f Shyam Prasad N   2021-10-30  3896        if (tcon_exist || 
ses_exist)
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3897                
cifs_put_tcp_session(server, 1);
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3898  }
53e0e11efe9289 Pavel Shilovsky  2016-11-04  3899  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to