From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [dhowells-fs:notifications-pipe-prep 4/10] lib/iov_iter.c:962:34: warning: 'i_head' may be used uninitialized in this function
Date: Thu, 24 Oct 2019 01:52:57 +0800 [thread overview]
Message-ID: <201910240156.RKRHmQuM%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git notifications-pipe-prep
head: 48045df7b3191f476ef0095ec30d6fcbe4411940
commit: 2b988693eb16961453719e63b7a96e83cacd7fd2 [4/10] pipe: Use head and tail pointers for the ring, not cursor and length
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2b988693eb16961453719e63b7a96e83cacd7fd2
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
lib/iov_iter.c: In function 'iov_iter_zero':
>> lib/iov_iter.c:962:34: warning: 'i_head' may be used uninitialized in this function [-Wmaybe-uninitialized]
memzero_page(pipe->bufs[i_head & p_mask].page, off, chunk);
~~~~~~~^~~~~~~~
lib/iov_iter.c:949:15: note: 'i_head' was declared here
unsigned int i_head;
^~~~~~
vim +/i_head +962 lib/iov_iter.c
944
945 static size_t pipe_zero(size_t bytes, struct iov_iter *i)
946 {
947 struct pipe_inode_info *pipe = i->pipe;
948 unsigned int p_mask = pipe->ring_size - 1;
949 unsigned int i_head;
950 size_t n, off;
951 int idx;
952
953 if (!sanity(i))
954 return 0;
955
956 bytes = n = push_pipe(i, bytes, &idx, &off);
957 if (unlikely(!n))
958 return 0;
959
960 do {
961 size_t chunk = min_t(size_t, n, PAGE_SIZE - off);
> 962 memzero_page(pipe->bufs[i_head & p_mask].page, off, chunk);
963 i->head = i_head;
964 i->iov_offset = off + chunk;
965 n -= chunk;
966 off = 0;
967 i_head++;
968 } while (n);
969 i->count -= bytes;
970 return bytes;
971 }
972
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59095 bytes --]
reply other threads:[~2019-10-23 17:52 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=201910240156.RKRHmQuM%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.