mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	David Sterba <dsterba@suse.com>
Subject: fs/btrfs/qgroup.c:1616:18: warning: array subscript is below array bounds
Date: Tue, 27 Dec 2016 07:12:30 +0800	[thread overview]
Message-ID: <201612270728.rYZIoDyn%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1733 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b4b8664d291ac1998e0f0bcdc96b6397f0fe68b3
commit: 33d1f05ccb698aa92db3e64a639ce523cf18a408 btrfs: Export and move leaf/subtree qgroup helpers to qgroup.c
date:   4 weeks ago
config: x86_64-randconfig-in0-12270518 (attached as .config)
compiler: gcc-4.6 (Debian 4.6.4-7) 4.6.4
reproduce:
        git checkout 33d1f05ccb698aa92db3e64a639ce523cf18a408
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.

All warnings (new ones prefixed by >>):

   fs/btrfs/qgroup.c: In function 'adjust_slots_upwards.isra.13':
>> fs/btrfs/qgroup.c:1616:18: warning: array subscript is below array bounds [-Warray-bounds]
   fs/btrfs/qgroup.c:1617:2: warning: array subscript is below array bounds [-Warray-bounds]

vim +1616 fs/btrfs/qgroup.c

  1600					free_extent_buffer(eb);
  1601					path->nodes[level] = NULL;
  1602					path->slots[level] = 0;
  1603				}
  1604			} else {
  1605				/*
  1606				 * We have a valid slot to walk back down
  1607				 * from. Stop here so caller can process these
  1608				 * new nodes.
  1609				 */
  1610				break;
  1611			}
  1612	
  1613			level++;
  1614		}
  1615	
> 1616		eb = path->nodes[root_level];
  1617		if (path->slots[root_level] >= btrfs_header_nritems(eb))
  1618			return 1;
  1619	
  1620		return 0;
  1621	}
  1622	
  1623	int btrfs_qgroup_trace_subtree(struct btrfs_trans_handle *trans,
  1624				       struct btrfs_root *root,

---
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: 26438 bytes --]

                 reply	other threads:[~2016-12-26 23:13 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=201612270728.rYZIoDyn%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=dsterba@suse.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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

all inboxes | Powered by JetHome®