* [cifs:for-next 9/10] fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
@ 2020-07-03 4:18 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-07-03 4:18 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5072 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-cifs(a)vger.kernel.org
CC: samba-technical(a)lists.samba.org
TO: Paul Aurich <paul@darkrain42.org>
CC: Steve French <stfrench@microsoft.com>
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 211c3acc991c97873768d28b6bfef339e8ba0a49
commit: 001d62cb0d3f18e93acc340510c69745a2586907 [9/10] cifs: Fix leak when handling lease break for cached root fid
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: i386-randconfig-m021-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
smatch warnings:
fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git remote update cifs
git checkout 001d62cb0d3f18e93acc340510c69745a2586907
vim +/cifs_tcp_ses_lock +636 fs/cifs/smb2misc.c
933d4b36576c95 Pavel Shilovsky 2013-09-05 591
933d4b36576c95 Pavel Shilovsky 2013-09-05 592 static bool
933d4b36576c95 Pavel Shilovsky 2013-09-05 593 smb2_is_valid_lease_break(char *buffer)
933d4b36576c95 Pavel Shilovsky 2013-09-05 594 {
933d4b36576c95 Pavel Shilovsky 2013-09-05 595 struct smb2_lease_break *rsp = (struct smb2_lease_break *)buffer;
933d4b36576c95 Pavel Shilovsky 2013-09-05 596 struct list_head *tmp, *tmp1, *tmp2;
933d4b36576c95 Pavel Shilovsky 2013-09-05 597 struct TCP_Server_Info *server;
933d4b36576c95 Pavel Shilovsky 2013-09-05 598 struct cifs_ses *ses;
933d4b36576c95 Pavel Shilovsky 2013-09-05 599 struct cifs_tcon *tcon;
933d4b36576c95 Pavel Shilovsky 2013-09-05 600
933d4b36576c95 Pavel Shilovsky 2013-09-05 601 cifs_dbg(FYI, "Checking for lease break\n");
933d4b36576c95 Pavel Shilovsky 2013-09-05 602
933d4b36576c95 Pavel Shilovsky 2013-09-05 603 /* look up tcon based on tid & uid */
933d4b36576c95 Pavel Shilovsky 2013-09-05 604 spin_lock(&cifs_tcp_ses_lock);
933d4b36576c95 Pavel Shilovsky 2013-09-05 605 list_for_each(tmp, &cifs_tcp_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 606 server = list_entry(tmp, struct TCP_Server_Info, tcp_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 607
933d4b36576c95 Pavel Shilovsky 2013-09-05 608 list_for_each(tmp1, &server->smb_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 609 ses = list_entry(tmp1, struct cifs_ses, smb_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 610
933d4b36576c95 Pavel Shilovsky 2013-09-05 611 list_for_each(tmp2, &ses->tcon_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 612 tcon = list_entry(tmp2, struct cifs_tcon,
933d4b36576c95 Pavel Shilovsky 2013-09-05 613 tcon_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 614 cifs_stats_inc(
933d4b36576c95 Pavel Shilovsky 2013-09-05 615 &tcon->stats.cifs_stats.num_oplock_brks);
001d62cb0d3f18 Paul Aurich 2020-07-02 616 if (smb2_tcon_has_lease(tcon, rsp)) {
233839b1df65a2 Pavel Shilovsky 2012-09-19 617 return true;
233839b1df65a2 Pavel Shilovsky 2012-09-19 618 }
a93864d93977b9 Ronnie Sahlberg 2018-06-14 619
a93864d93977b9 Ronnie Sahlberg 2018-06-14 620 if (tcon->crfid.is_valid &&
a93864d93977b9 Ronnie Sahlberg 2018-06-14 621 !memcmp(rsp->LeaseKey,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 622 tcon->crfid.fid->lease_key,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 623 SMB2_LEASE_KEY_SIZE)) {
a93864d93977b9 Ronnie Sahlberg 2018-06-14 624 INIT_WORK(&tcon->crfid.lease_break,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 625 smb2_cached_lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 626 queue_work(cifsiod_wq,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 627 &tcon->crfid.lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 628 spin_unlock(&cifs_tcp_ses_lock);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 629 return true;
a93864d93977b9 Ronnie Sahlberg 2018-06-14 630 }
0822f51426b51b Pavel Shilovsky 2012-09-19 631 }
0822f51426b51b Pavel Shilovsky 2012-09-19 632 }
933d4b36576c95 Pavel Shilovsky 2013-09-05 633 }
0822f51426b51b Pavel Shilovsky 2012-09-19 634 spin_unlock(&cifs_tcp_ses_lock);
f96637be081141 Joe Perches 2013-05-04 635 cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
0822f51426b51b Pavel Shilovsky 2012-09-19 @636 return false;
0822f51426b51b Pavel Shilovsky 2012-09-19 637 }
0822f51426b51b Pavel Shilovsky 2012-09-19 638
:::::: The code at line 636 was first introduced by commit
:::::: 0822f51426b51bd599b3a7e972b14aacaa045a92 CIFS: Add SMB2.1 lease break support
:::::: TO: Pavel Shilovsky <pshilovsky@samba.org>
:::::: CC: Steve French <smfrench@gmail.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: 34783 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [cifs:for-next 9/10] fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
@ 2020-07-07 13:49 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-07-07 13:49 UTC (permalink / raw)
To: kbuild, Paul Aurich
Cc: lkp, kbuild-all, linux-cifs, samba-technical, Steve French
[-- Attachment #1: Type: text/plain, Size: 4518 bytes --]
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 211c3acc991c97873768d28b6bfef339e8ba0a49
commit: 001d62cb0d3f18e93acc340510c69745a2586907 [9/10] cifs: Fix leak when handling lease break for cached root fid
config: i386-randconfig-m021-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
smatch warnings:
fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git remote update cifs
git checkout 001d62cb0d3f18e93acc340510c69745a2586907
vim +/cifs_tcp_ses_lock +636 fs/cifs/smb2misc.c
933d4b36576c95 Pavel Shilovsky 2013-09-05 592 static bool
933d4b36576c95 Pavel Shilovsky 2013-09-05 593 smb2_is_valid_lease_break(char *buffer)
933d4b36576c95 Pavel Shilovsky 2013-09-05 594 {
933d4b36576c95 Pavel Shilovsky 2013-09-05 595 struct smb2_lease_break *rsp = (struct smb2_lease_break *)buffer;
933d4b36576c95 Pavel Shilovsky 2013-09-05 596 struct list_head *tmp, *tmp1, *tmp2;
933d4b36576c95 Pavel Shilovsky 2013-09-05 597 struct TCP_Server_Info *server;
933d4b36576c95 Pavel Shilovsky 2013-09-05 598 struct cifs_ses *ses;
933d4b36576c95 Pavel Shilovsky 2013-09-05 599 struct cifs_tcon *tcon;
933d4b36576c95 Pavel Shilovsky 2013-09-05 600
933d4b36576c95 Pavel Shilovsky 2013-09-05 601 cifs_dbg(FYI, "Checking for lease break\n");
933d4b36576c95 Pavel Shilovsky 2013-09-05 602
933d4b36576c95 Pavel Shilovsky 2013-09-05 603 /* look up tcon based on tid & uid */
933d4b36576c95 Pavel Shilovsky 2013-09-05 604 spin_lock(&cifs_tcp_ses_lock);
933d4b36576c95 Pavel Shilovsky 2013-09-05 605 list_for_each(tmp, &cifs_tcp_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 606 server = list_entry(tmp, struct TCP_Server_Info, tcp_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 607
933d4b36576c95 Pavel Shilovsky 2013-09-05 608 list_for_each(tmp1, &server->smb_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 609 ses = list_entry(tmp1, struct cifs_ses, smb_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 610
933d4b36576c95 Pavel Shilovsky 2013-09-05 611 list_for_each(tmp2, &ses->tcon_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 612 tcon = list_entry(tmp2, struct cifs_tcon,
933d4b36576c95 Pavel Shilovsky 2013-09-05 613 tcon_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 614 cifs_stats_inc(
933d4b36576c95 Pavel Shilovsky 2013-09-05 615 &tcon->stats.cifs_stats.num_oplock_brks);
001d62cb0d3f18 Paul Aurich 2020-07-02 616 if (smb2_tcon_has_lease(tcon, rsp)) {
233839b1df65a2 Pavel Shilovsky 2012-09-19 617 return true;
^^^^^^^^^^^
Holding the lock?
233839b1df65a2 Pavel Shilovsky 2012-09-19 618 }
a93864d93977b9 Ronnie Sahlberg 2018-06-14 619
a93864d93977b9 Ronnie Sahlberg 2018-06-14 620 if (tcon->crfid.is_valid &&
a93864d93977b9 Ronnie Sahlberg 2018-06-14 621 !memcmp(rsp->LeaseKey,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 622 tcon->crfid.fid->lease_key,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 623 SMB2_LEASE_KEY_SIZE)) {
a93864d93977b9 Ronnie Sahlberg 2018-06-14 624 INIT_WORK(&tcon->crfid.lease_break,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 625 smb2_cached_lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 626 queue_work(cifsiod_wq,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 627 &tcon->crfid.lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 628 spin_unlock(&cifs_tcp_ses_lock);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 629 return true;
a93864d93977b9 Ronnie Sahlberg 2018-06-14 630 }
0822f51426b51b Pavel Shilovsky 2012-09-19 631 }
0822f51426b51b Pavel Shilovsky 2012-09-19 632 }
933d4b36576c95 Pavel Shilovsky 2013-09-05 633 }
0822f51426b51b Pavel Shilovsky 2012-09-19 634 spin_unlock(&cifs_tcp_ses_lock);
f96637be081141 Joe Perches 2013-05-04 635 cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
0822f51426b51b Pavel Shilovsky 2012-09-19 @636 return false;
0822f51426b51b Pavel Shilovsky 2012-09-19 637 }
---
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: 34783 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [cifs:for-next 9/10] fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
@ 2020-07-07 13:49 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-07-07 13:49 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4591 bytes --]
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 211c3acc991c97873768d28b6bfef339e8ba0a49
commit: 001d62cb0d3f18e93acc340510c69745a2586907 [9/10] cifs: Fix leak when handling lease break for cached root fid
config: i386-randconfig-m021-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
smatch warnings:
fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git remote update cifs
git checkout 001d62cb0d3f18e93acc340510c69745a2586907
vim +/cifs_tcp_ses_lock +636 fs/cifs/smb2misc.c
933d4b36576c95 Pavel Shilovsky 2013-09-05 592 static bool
933d4b36576c95 Pavel Shilovsky 2013-09-05 593 smb2_is_valid_lease_break(char *buffer)
933d4b36576c95 Pavel Shilovsky 2013-09-05 594 {
933d4b36576c95 Pavel Shilovsky 2013-09-05 595 struct smb2_lease_break *rsp = (struct smb2_lease_break *)buffer;
933d4b36576c95 Pavel Shilovsky 2013-09-05 596 struct list_head *tmp, *tmp1, *tmp2;
933d4b36576c95 Pavel Shilovsky 2013-09-05 597 struct TCP_Server_Info *server;
933d4b36576c95 Pavel Shilovsky 2013-09-05 598 struct cifs_ses *ses;
933d4b36576c95 Pavel Shilovsky 2013-09-05 599 struct cifs_tcon *tcon;
933d4b36576c95 Pavel Shilovsky 2013-09-05 600
933d4b36576c95 Pavel Shilovsky 2013-09-05 601 cifs_dbg(FYI, "Checking for lease break\n");
933d4b36576c95 Pavel Shilovsky 2013-09-05 602
933d4b36576c95 Pavel Shilovsky 2013-09-05 603 /* look up tcon based on tid & uid */
933d4b36576c95 Pavel Shilovsky 2013-09-05 604 spin_lock(&cifs_tcp_ses_lock);
933d4b36576c95 Pavel Shilovsky 2013-09-05 605 list_for_each(tmp, &cifs_tcp_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 606 server = list_entry(tmp, struct TCP_Server_Info, tcp_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 607
933d4b36576c95 Pavel Shilovsky 2013-09-05 608 list_for_each(tmp1, &server->smb_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 609 ses = list_entry(tmp1, struct cifs_ses, smb_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 610
933d4b36576c95 Pavel Shilovsky 2013-09-05 611 list_for_each(tmp2, &ses->tcon_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 612 tcon = list_entry(tmp2, struct cifs_tcon,
933d4b36576c95 Pavel Shilovsky 2013-09-05 613 tcon_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 614 cifs_stats_inc(
933d4b36576c95 Pavel Shilovsky 2013-09-05 615 &tcon->stats.cifs_stats.num_oplock_brks);
001d62cb0d3f18 Paul Aurich 2020-07-02 616 if (smb2_tcon_has_lease(tcon, rsp)) {
233839b1df65a2 Pavel Shilovsky 2012-09-19 617 return true;
^^^^^^^^^^^
Holding the lock?
233839b1df65a2 Pavel Shilovsky 2012-09-19 618 }
a93864d93977b9 Ronnie Sahlberg 2018-06-14 619
a93864d93977b9 Ronnie Sahlberg 2018-06-14 620 if (tcon->crfid.is_valid &&
a93864d93977b9 Ronnie Sahlberg 2018-06-14 621 !memcmp(rsp->LeaseKey,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 622 tcon->crfid.fid->lease_key,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 623 SMB2_LEASE_KEY_SIZE)) {
a93864d93977b9 Ronnie Sahlberg 2018-06-14 624 INIT_WORK(&tcon->crfid.lease_break,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 625 smb2_cached_lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 626 queue_work(cifsiod_wq,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 627 &tcon->crfid.lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 628 spin_unlock(&cifs_tcp_ses_lock);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 629 return true;
a93864d93977b9 Ronnie Sahlberg 2018-06-14 630 }
0822f51426b51b Pavel Shilovsky 2012-09-19 631 }
0822f51426b51b Pavel Shilovsky 2012-09-19 632 }
933d4b36576c95 Pavel Shilovsky 2013-09-05 633 }
0822f51426b51b Pavel Shilovsky 2012-09-19 634 spin_unlock(&cifs_tcp_ses_lock);
f96637be081141 Joe Perches 2013-05-04 635 cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
0822f51426b51b Pavel Shilovsky 2012-09-19 @636 return false;
0822f51426b51b Pavel Shilovsky 2012-09-19 637 }
---
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: 34783 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [cifs:for-next 9/10] fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
@ 2020-07-07 13:49 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-07-07 13:49 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4591 bytes --]
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 211c3acc991c97873768d28b6bfef339e8ba0a49
commit: 001d62cb0d3f18e93acc340510c69745a2586907 [9/10] cifs: Fix leak when handling lease break for cached root fid
config: i386-randconfig-m021-20200703 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 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>
smatch warnings:
fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock'.
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git remote update cifs
git checkout 001d62cb0d3f18e93acc340510c69745a2586907
vim +/cifs_tcp_ses_lock +636 fs/cifs/smb2misc.c
933d4b36576c95 Pavel Shilovsky 2013-09-05 592 static bool
933d4b36576c95 Pavel Shilovsky 2013-09-05 593 smb2_is_valid_lease_break(char *buffer)
933d4b36576c95 Pavel Shilovsky 2013-09-05 594 {
933d4b36576c95 Pavel Shilovsky 2013-09-05 595 struct smb2_lease_break *rsp = (struct smb2_lease_break *)buffer;
933d4b36576c95 Pavel Shilovsky 2013-09-05 596 struct list_head *tmp, *tmp1, *tmp2;
933d4b36576c95 Pavel Shilovsky 2013-09-05 597 struct TCP_Server_Info *server;
933d4b36576c95 Pavel Shilovsky 2013-09-05 598 struct cifs_ses *ses;
933d4b36576c95 Pavel Shilovsky 2013-09-05 599 struct cifs_tcon *tcon;
933d4b36576c95 Pavel Shilovsky 2013-09-05 600
933d4b36576c95 Pavel Shilovsky 2013-09-05 601 cifs_dbg(FYI, "Checking for lease break\n");
933d4b36576c95 Pavel Shilovsky 2013-09-05 602
933d4b36576c95 Pavel Shilovsky 2013-09-05 603 /* look up tcon based on tid & uid */
933d4b36576c95 Pavel Shilovsky 2013-09-05 604 spin_lock(&cifs_tcp_ses_lock);
933d4b36576c95 Pavel Shilovsky 2013-09-05 605 list_for_each(tmp, &cifs_tcp_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 606 server = list_entry(tmp, struct TCP_Server_Info, tcp_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 607
933d4b36576c95 Pavel Shilovsky 2013-09-05 608 list_for_each(tmp1, &server->smb_ses_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 609 ses = list_entry(tmp1, struct cifs_ses, smb_ses_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 610
933d4b36576c95 Pavel Shilovsky 2013-09-05 611 list_for_each(tmp2, &ses->tcon_list) {
933d4b36576c95 Pavel Shilovsky 2013-09-05 612 tcon = list_entry(tmp2, struct cifs_tcon,
933d4b36576c95 Pavel Shilovsky 2013-09-05 613 tcon_list);
933d4b36576c95 Pavel Shilovsky 2013-09-05 614 cifs_stats_inc(
933d4b36576c95 Pavel Shilovsky 2013-09-05 615 &tcon->stats.cifs_stats.num_oplock_brks);
001d62cb0d3f18 Paul Aurich 2020-07-02 616 if (smb2_tcon_has_lease(tcon, rsp)) {
233839b1df65a2 Pavel Shilovsky 2012-09-19 617 return true;
^^^^^^^^^^^
Holding the lock?
233839b1df65a2 Pavel Shilovsky 2012-09-19 618 }
a93864d93977b9 Ronnie Sahlberg 2018-06-14 619
a93864d93977b9 Ronnie Sahlberg 2018-06-14 620 if (tcon->crfid.is_valid &&
a93864d93977b9 Ronnie Sahlberg 2018-06-14 621 !memcmp(rsp->LeaseKey,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 622 tcon->crfid.fid->lease_key,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 623 SMB2_LEASE_KEY_SIZE)) {
a93864d93977b9 Ronnie Sahlberg 2018-06-14 624 INIT_WORK(&tcon->crfid.lease_break,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 625 smb2_cached_lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 626 queue_work(cifsiod_wq,
a93864d93977b9 Ronnie Sahlberg 2018-06-14 627 &tcon->crfid.lease_break);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 628 spin_unlock(&cifs_tcp_ses_lock);
a93864d93977b9 Ronnie Sahlberg 2018-06-14 629 return true;
a93864d93977b9 Ronnie Sahlberg 2018-06-14 630 }
0822f51426b51b Pavel Shilovsky 2012-09-19 631 }
0822f51426b51b Pavel Shilovsky 2012-09-19 632 }
933d4b36576c95 Pavel Shilovsky 2013-09-05 633 }
0822f51426b51b Pavel Shilovsky 2012-09-19 634 spin_unlock(&cifs_tcp_ses_lock);
f96637be081141 Joe Perches 2013-05-04 635 cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
0822f51426b51b Pavel Shilovsky 2012-09-19 @636 return false;
0822f51426b51b Pavel Shilovsky 2012-09-19 637 }
---
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: 34783 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-07 13:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 4:18 [cifs:for-next 9/10] fs/cifs/smb2misc.c:636 smb2_is_valid_lease_break() warn: inconsistent returns 'cifs_tcp_ses_lock' kernel test robot
2020-07-07 13:49 Dan Carpenter
2020-07-07 13:49 ` Dan Carpenter
2020-07-07 13:49 ` Dan Carpenter
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.