CC: kbuild-...@lists.01.org In-Reply-To: <20200630023003.1858066-1-p...@darkrain42.org> References: <20200630023003.1858066-1-p...@darkrain42.org> TO: Paul Aurich <p...@darkrain42.org>
Hi Paul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on cifs/for-next] [also build test WARNING on v5.8-rc3 next-20200629] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Paul-Aurich/cifs-Fix-leak-when-handling-lease-break-for-cached-root-fid/20200630-103420 base: git://git.samba.org/sfrench/cifs-2.6.git for-next :::::: branch date: 8 hours ago :::::: commit date: 8 hours ago config: i386-randconfig-c003-20200630 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> Reported-by: Julia Lawall <julia.law...@lip6.fr> coccinelle warnings: (new ones prefixed by >>) >> fs/cifs/smb2misc.c:618:5-11: preceding lock on line 605 # https://github.com/0day-ci/linux/commit/7a32ab08f9e865fa52cfb802786e6fd39df45ea3 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 7a32ab08f9e865fa52cfb802786e6fd39df45ea3 vim +618 fs/cifs/smb2misc.c 933d4b36576c95 Pavel Shilovsky 2013-09-05 592 933d4b36576c95 Pavel Shilovsky 2013-09-05 593 static bool 933d4b36576c95 Pavel Shilovsky 2013-09-05 594 smb2_is_valid_lease_break(char *buffer) 933d4b36576c95 Pavel Shilovsky 2013-09-05 595 { 933d4b36576c95 Pavel Shilovsky 2013-09-05 596 struct smb2_lease_break *rsp = (struct smb2_lease_break *)buffer; 933d4b36576c95 Pavel Shilovsky 2013-09-05 597 struct list_head *tmp, *tmp1, *tmp2; 933d4b36576c95 Pavel Shilovsky 2013-09-05 598 struct TCP_Server_Info *server; 933d4b36576c95 Pavel Shilovsky 2013-09-05 599 struct cifs_ses *ses; 933d4b36576c95 Pavel Shilovsky 2013-09-05 600 struct cifs_tcon *tcon; 933d4b36576c95 Pavel Shilovsky 2013-09-05 601 933d4b36576c95 Pavel Shilovsky 2013-09-05 602 cifs_dbg(FYI, "Checking for lease break\n"); 933d4b36576c95 Pavel Shilovsky 2013-09-05 603 933d4b36576c95 Pavel Shilovsky 2013-09-05 604 /* look up tcon based on tid & uid */ 933d4b36576c95 Pavel Shilovsky 2013-09-05 @605 spin_lock(&cifs_tcp_ses_lock); 933d4b36576c95 Pavel Shilovsky 2013-09-05 606 list_for_each(tmp, &cifs_tcp_ses_list) { 933d4b36576c95 Pavel Shilovsky 2013-09-05 607 server = list_entry(tmp, struct TCP_Server_Info, tcp_ses_list); 933d4b36576c95 Pavel Shilovsky 2013-09-05 608 933d4b36576c95 Pavel Shilovsky 2013-09-05 609 list_for_each(tmp1, &server->smb_ses_list) { 933d4b36576c95 Pavel Shilovsky 2013-09-05 610 ses = list_entry(tmp1, struct cifs_ses, smb_ses_list); 933d4b36576c95 Pavel Shilovsky 2013-09-05 611 933d4b36576c95 Pavel Shilovsky 2013-09-05 612 list_for_each(tmp2, &ses->tcon_list) { 933d4b36576c95 Pavel Shilovsky 2013-09-05 613 tcon = list_entry(tmp2, struct cifs_tcon, 933d4b36576c95 Pavel Shilovsky 2013-09-05 614 tcon_list); 933d4b36576c95 Pavel Shilovsky 2013-09-05 615 cifs_stats_inc( 933d4b36576c95 Pavel Shilovsky 2013-09-05 616 &tcon->stats.cifs_stats.num_oplock_brks); 7a32ab08f9e865 Paul Aurich 2020-06-29 617 if (smb2_tcon_has_lease(tcon, rsp)) { 233839b1df65a2 Pavel Shilovsky 2012-09-19 @618 return true; 233839b1df65a2 Pavel Shilovsky 2012-09-19 619 } a93864d93977b9 Ronnie Sahlberg 2018-06-14 620 a93864d93977b9 Ronnie Sahlberg 2018-06-14 621 if (tcon->crfid.is_valid && a93864d93977b9 Ronnie Sahlberg 2018-06-14 622 !memcmp(rsp->LeaseKey, a93864d93977b9 Ronnie Sahlberg 2018-06-14 623 tcon->crfid.fid->lease_key, a93864d93977b9 Ronnie Sahlberg 2018-06-14 624 SMB2_LEASE_KEY_SIZE)) { a93864d93977b9 Ronnie Sahlberg 2018-06-14 625 INIT_WORK(&tcon->crfid.lease_break, a93864d93977b9 Ronnie Sahlberg 2018-06-14 626 smb2_cached_lease_break); a93864d93977b9 Ronnie Sahlberg 2018-06-14 627 queue_work(cifsiod_wq, a93864d93977b9 Ronnie Sahlberg 2018-06-14 628 &tcon->crfid.lease_break); a93864d93977b9 Ronnie Sahlberg 2018-06-14 629 spin_unlock(&cifs_tcp_ses_lock); d6ac9c584a6902 Paul Aurich 2020-06-26 630 kfree(lw); a93864d93977b9 Ronnie Sahlberg 2018-06-14 631 return true; a93864d93977b9 Ronnie Sahlberg 2018-06-14 632 } 0822f51426b51b Pavel Shilovsky 2012-09-19 633 } 0822f51426b51b Pavel Shilovsky 2012-09-19 634 } 933d4b36576c95 Pavel Shilovsky 2013-09-05 635 } 0822f51426b51b Pavel Shilovsky 2012-09-19 636 spin_unlock(&cifs_tcp_ses_lock); f96637be081141 Joe Perches 2013-05-04 637 cifs_dbg(FYI, "Can not process lease break - no lease matched\n"); 0822f51426b51b Pavel Shilovsky 2012-09-19 638 return false; 0822f51426b51b Pavel Shilovsky 2012-09-19 639 } 0822f51426b51b Pavel Shilovsky 2012-09-19 640 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org