linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Teigland <teigland@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 11347/11453] fs/dlm/debug_fs.c:1031:50: warning: '_queued_asts' directive output may be truncated writing 12 bytes into a region of size between 8 and 72
Date: Tue, 22 Aug 2023 00:39:47 +0800	[thread overview]
Message-ID: <202308220024.7HnE6uda-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   47d9bb711707d15b19fad18c8e2b4b027a264a3a
commit: abb75a2a7ad1155be577117b0fa88a9b7f97f338 [11347/11453] Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm.git
config: loongarch-randconfig-r032-20230821 (https://download.01.org/0day-ci/archive/20230822/202308220024.7HnE6uda-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220024.7HnE6uda-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308220024.7HnE6uda-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/dlm/debug_fs.c: In function 'dlm_create_debug_file':
   fs/dlm/debug_fs.c:1020:58: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
    1020 |         snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_waiters", ls->ls_name);
         |                                                          ^
   fs/dlm/debug_fs.c:1020:9: note: 'snprintf' output between 9 and 73 bytes into a destination of size 72
    1020 |         snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_waiters", ls->ls_name);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/dlm/debug_fs.c:1031:50: warning: '_queued_asts' directive output may be truncated writing 12 bytes into a region of size between 8 and 72 [-Wformat-truncation=]
    1031 |         snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_queued_asts", ls->ls_name);
         |                                                  ^~~~~~~~~~~~
   fs/dlm/debug_fs.c:1031:9: note: 'snprintf' output between 13 and 77 bytes into a destination of size 72
    1031 |         snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_queued_asts", ls->ls_name);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/_queued_asts +1031 fs/dlm/debug_fs.c

5b2f981fde8b0d Alexander Aring    2021-05-21   973  
a48f9721e6db74 Greg Kroah-Hartman 2019-06-12   974  void dlm_create_debug_file(struct dlm_ls *ls)
e7fd41792fc0ee David Teigland     2006-01-18   975  {
5de6319b183930 David Teigland     2006-07-25   976  	char name[DLM_LOCKSPACE_LEN + 8];
5de6319b183930 David Teigland     2006-07-25   977  
d022509d1c54be David Teigland     2008-12-16   978  	/* format 1 */
d022509d1c54be David Teigland     2008-12-16   979  
5de6319b183930 David Teigland     2006-07-25   980  	ls->ls_debug_rsb_dentry = debugfs_create_file(ls->ls_name,
e7fd41792fc0ee David Teigland     2006-01-18   981  						      S_IFREG | S_IRUGO,
e7fd41792fc0ee David Teigland     2006-01-18   982  						      dlm_root,
e7fd41792fc0ee David Teigland     2006-01-18   983  						      ls,
892c4467e335e9 David Teigland     2009-01-07   984  						      &format1_fops);
d022509d1c54be David Teigland     2008-12-16   985  
d022509d1c54be David Teigland     2008-12-16   986  	/* format 2 */
5de6319b183930 David Teigland     2006-07-25   987  
5de6319b183930 David Teigland     2006-07-25   988  	memset(name, 0, sizeof(name));
d022509d1c54be David Teigland     2008-12-16   989  	snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_locks", ls->ls_name);
5de6319b183930 David Teigland     2006-07-25   990  
d022509d1c54be David Teigland     2008-12-16   991  	ls->ls_debug_locks_dentry = debugfs_create_file(name,
5054e79de99984 Alexander Aring    2021-11-02   992  							0644,
5de6319b183930 David Teigland     2006-07-25   993  							dlm_root,
5de6319b183930 David Teigland     2006-07-25   994  							ls,
892c4467e335e9 David Teigland     2009-01-07   995  							&format2_fops);
d022509d1c54be David Teigland     2008-12-16   996  
d022509d1c54be David Teigland     2008-12-16   997  	/* format 3 */
5de6319b183930 David Teigland     2006-07-25   998  
9dd592d70be0db David Teigland     2007-05-29   999  	memset(name, 0, sizeof(name));
d022509d1c54be David Teigland     2008-12-16  1000  	snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_all", ls->ls_name);
9dd592d70be0db David Teigland     2007-05-29  1001  
d022509d1c54be David Teigland     2008-12-16  1002  	ls->ls_debug_all_dentry = debugfs_create_file(name,
9dd592d70be0db David Teigland     2007-05-29  1003  						      S_IFREG | S_IRUGO,
9dd592d70be0db David Teigland     2007-05-29  1004  						      dlm_root,
9dd592d70be0db David Teigland     2007-05-29  1005  						      ls,
892c4467e335e9 David Teigland     2009-01-07  1006  						      &format3_fops);
d022509d1c54be David Teigland     2008-12-16  1007  
c04fecb4d9f775 David Teigland     2012-05-10  1008  	/* format 4 */
c04fecb4d9f775 David Teigland     2012-05-10  1009  
c04fecb4d9f775 David Teigland     2012-05-10  1010  	memset(name, 0, sizeof(name));
c04fecb4d9f775 David Teigland     2012-05-10  1011  	snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_toss", ls->ls_name);
c04fecb4d9f775 David Teigland     2012-05-10  1012  
c04fecb4d9f775 David Teigland     2012-05-10  1013  	ls->ls_debug_toss_dentry = debugfs_create_file(name,
c04fecb4d9f775 David Teigland     2012-05-10  1014  						       S_IFREG | S_IRUGO,
c04fecb4d9f775 David Teigland     2012-05-10  1015  						       dlm_root,
c04fecb4d9f775 David Teigland     2012-05-10  1016  						       ls,
c04fecb4d9f775 David Teigland     2012-05-10  1017  						       &format4_fops);
c04fecb4d9f775 David Teigland     2012-05-10  1018  
d022509d1c54be David Teigland     2008-12-16  1019  	memset(name, 0, sizeof(name));
d022509d1c54be David Teigland     2008-12-16  1020  	snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_waiters", ls->ls_name);
d022509d1c54be David Teigland     2008-12-16  1021  
d022509d1c54be David Teigland     2008-12-16  1022  	ls->ls_debug_waiters_dentry = debugfs_create_file(name,
63eab2b00bcff6 Alexander Aring    2021-11-02  1023  							  0644,
d022509d1c54be David Teigland     2008-12-16  1024  							  dlm_root,
d022509d1c54be David Teigland     2008-12-16  1025  							  ls,
d022509d1c54be David Teigland     2008-12-16  1026  							  &waiters_fops);
541adb0d4d10b4 Alexander Aring    2023-08-01  1027  
541adb0d4d10b4 Alexander Aring    2023-08-01  1028  	/* format 5 */
541adb0d4d10b4 Alexander Aring    2023-08-01  1029  
541adb0d4d10b4 Alexander Aring    2023-08-01  1030  	memset(name, 0, sizeof(name));
541adb0d4d10b4 Alexander Aring    2023-08-01 @1031  	snprintf(name, DLM_LOCKSPACE_LEN + 8, "%s_queued_asts", ls->ls_name);
541adb0d4d10b4 Alexander Aring    2023-08-01  1032  
541adb0d4d10b4 Alexander Aring    2023-08-01  1033  	ls->ls_debug_queued_asts_dentry = debugfs_create_file(name,
541adb0d4d10b4 Alexander Aring    2023-08-01  1034  							      0644,
541adb0d4d10b4 Alexander Aring    2023-08-01  1035  							      dlm_root,
541adb0d4d10b4 Alexander Aring    2023-08-01  1036  							      ls,
541adb0d4d10b4 Alexander Aring    2023-08-01  1037  							      &format5_fops);
e7fd41792fc0ee David Teigland     2006-01-18  1038  }
e7fd41792fc0ee David Teigland     2006-01-18  1039  

:::::: The code at line 1031 was first introduced by commit
:::::: 541adb0d4d10b4daf15f4b6b73c5d6b855d23eb5 fs: dlm: debugfs for queued callbacks

:::::: TO: Alexander Aring <aahringo@redhat.com>
:::::: CC: David Teigland <teigland@redhat.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


                 reply	other threads:[~2023-08-21 16:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308220024.7HnE6uda-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).