lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAO6TR8X8GKoO5aaxcy8Hq+68a0S+ZXyLxY1D22Xs_9WJsQigaw@mail.gmail.com>
Date:	Wed, 10 Feb 2016 20:13:09 -0700
From:	Jeff Merkey <linux.mdb@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Subject: [BUG REPORT] use of unreachable() masks uninitialized variables warnings

Hi,

I noticed that the use of the function -- unreachable() -- inside of
the BUG() macro in arch/x86/include/asm/bug.h causes compiler output
to be suspect based on review of assembly output for quite a few
areas.

if as a test, you remove the call to unreachable() in the BUG() macro,
it seems to generate a large number of build warnings about the use of
uninitialized variables that are apparently masked by the compiler
since it believes this code is going to halt, even in the cases where
the BUG() macro is used conditionally, as in an if (condition) then
BUG() (which the compiler does not seem to understand).

This seems to indicate that the use of these built in macros telling
the compiler to create a bunch of infinite jump labels is masking
quite a few bugs lurking around in the regular code since gcc
apparently just throws out the checks for uninitialized variables in
any function if it sees this macro anywhere in the function.

Here are the sources of several bugs I have seen recently in ext4 I am
pretty sure with a null bh.  One good check is to set the BUG() macro
NOT TO call unreachable() as a build test since the compiler will
ignore uninitialized variables in a function if someone calls BUG()
even conditionally, and never report them during build.


The following are from v4.4.1 with a BUG() macro with the call to
unreachable() removed:

arch/x86/kernel/apic/x2apic_uv_x.c: In function ‘boot_pnode_to_blade’:
arch/x86/kernel/apic/x2apic_uv_x.c:443:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
arch/x86/kernel/apic/x2apic_uv_x.c: In function ‘uv_acpi_madt_oem_check’:
arch/x86/kernel/apic/x2apic_uv_x.c:201:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
arch/x86/kvm/x86.c: In function ‘emulator_cmpxchg_emulated’:
arch/x86/kvm/x86.c:4562:5: warning: ‘exchanged’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  if (!exchanged)
     ^
In file included from kernel/locking/qspinlock.c:470:0:
kernel/locking/qspinlock_paravirt.h: In function ‘pv_unhash’:
kernel/locking/qspinlock_paravirt.h:144:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
kernel/locking/qspinlock_paravirt.h: In function ‘pv_hash’:
kernel/locking/qspinlock_paravirt.h:121:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
kernel/sched/core.c: In function ‘pick_next_task’:
kernel/sched/core.c:3064:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
kernel/seccomp.c: In function ‘seccomp_phase1’:
kernel/seccomp.c:672:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
mm/mmap.c: In function ‘vma_adjust’:
mm/mmap.c:661:15: warning: ‘rb_parent’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
  __vma_link_rb(mm, vma, rb_link, rb_parent);
               ^
mm/mmap.c:692:29: note: ‘rb_parent’ was declared here
  struct rb_node **rb_link, *rb_parent;
                             ^
mm/mmap.c:661:15: warning: ‘rb_link’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
  __vma_link_rb(mm, vma, rb_link, rb_parent);
               ^
mm/mmap.c:692:19: note: ‘rb_link’ was declared here
  struct rb_node **rb_link, *rb_parent;
                   ^
mm/mmap.c:660:17: warning: ‘prev’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
  __vma_link_list(mm, vma, prev, rb_parent);
                 ^
mm/mmap.c:691:25: note: ‘prev’ was declared here
  struct vm_area_struct *prev;
                         ^
mm/hugetlb.c: In function ‘__vma_reservation_common’:
mm/hugetlb.c:1815:3: warning: ‘ret’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
   return ret < 0 ? ret : 0;
   ^
mm/mempolicy.c: In function ‘mempolicy_slab_node’:
mm/mempolicy.c:1731:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
mm/memcontrol.c: In function ‘mem_cgroup_read_u64’:
mm/memcontrol.c:2892:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from mm/memcontrol.c:34:0:
mm/memcontrol.c: In function ‘mem_cgroup_reset’:
include/linux/page_counter.h:49:21: warning: ‘counter’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  counter->watermark = page_counter_read(counter);
                     ^
mm/memcontrol.c:3038:23: note: ‘counter’ was declared here
  struct page_counter *counter;
                       ^
mm/memcontrol.c: In function ‘__mem_cgroup_usage_unregister_event’:
mm/memcontrol.c:3511:6: warning: ‘usage’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   if (new->entries[j].threshold <= usage) {
      ^
mm/memcontrol.c:3506:35: warning: ‘thresholds’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  for (i = 0, j = 0; i < thresholds->primary->size; i++) {
                                   ^
mm/memcontrol.c: In function ‘__mem_cgroup_usage_register_event’:
mm/memcontrol.c:3423:6: warning: ‘usage’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   if (new->entries[i].threshold <= usage) {
      ^
mm/memcontrol.c:3392:16: warning: ‘thresholds’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  if (thresholds->primary)
                ^
In file included from ./arch/x86/include/asm/atomic.h:4:0,
                 from include/linux/atomic.h:4,
                 from include/linux/page_counter.h:4,
                 from mm/memcontrol.c:34:
mm/memcontrol.c: In function ‘mem_cgroup_read_u64’:
include/linux/compiler.h:207:26: warning: ‘counter’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  case 8: *(__u64 *)res = *(volatile __u64 *)p; break;  \
                          ^
mm/memcontrol.c:2858:23: note: ‘counter’ was declared here
  struct page_counter *counter;
                       ^
mm/hugetlb_cgroup.c: In function ‘hugetlb_cgroup_read_u64’:
mm/hugetlb_cgroup.c:268:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/btrfs/inode.c: In function ‘run_delalloc_nocow’:
fs/btrfs/inode.c:1384:6: warning: ‘extent_end’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   if (extent_end <= start) {
      ^
In file included from include/linux/sched.h:17:0,
                 from fs/btrfs/volumes.c:18:
fs/btrfs/volumes.c: In function ‘__btrfs_alloc_chunk’:
include/linux/kernel.h:725:24: warning: ‘max_chunk_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  _min1 < _min2 ? _min1 : _min2; })
                        ^
fs/btrfs/volumes.c:4507:6: note: ‘max_chunk_size’ was declared here
  u64 max_chunk_size;
      ^
fs/btrfs/volumes.c:4599:29: warning: ‘max_stripe_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   ret = find_free_dev_extent(trans, device,
                             ^
fs/btrfs/delayed-inode.c: In function ‘__btrfs_add_delayed_item’:
fs/btrfs/delayed-inode.c:407:18: warning: ‘root’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  struct rb_root *root;
                  ^
fs/btrfs/backref.c: In function ‘__add_delayed_refs’:
fs/btrfs/backref.c:649:33: warning: ‘sgn’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   *total_refs += (node->ref_mod * sgn);
                                 ^
fs/btrfs/acl.c: In function ‘btrfs_get_acl’:
fs/btrfs/acl.c:49:25: warning: ‘name’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
  size = __btrfs_getxattr(inode, name, "", 0);
                         ^
fs/ceph/locks.c: In function ‘ceph_lock_wait_for_completion’:
fs/ceph/locks.c:140:40: warning: ‘lock_type’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  intr_req->r_args.filelock_change.rule = lock_type;
                                        ^
In file included from fs/ext4/file.c:30:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/fsync.c:32:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/inode.c:41:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/ext4/inode.c: In function ‘ext4_map_blocks’:
fs/ext4/inode.c:548:5: warning: ‘retval’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
  if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) {
     ^
In file included from fs/ext4/super.c:48:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/extents.c:43:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/ext4/extents.c: In function ‘ext4_ext_put_gap_in_cache’:
fs/ext4/extents.c:2306:14: warning: ‘lblock’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  ext4_lblk_t lblock;
              ^
fs/ext4/extents.c:2305:14: warning: ‘len’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
  ext4_lblk_t len;
              ^
In file included from fs/ext4/ext4_jbd2.c:5:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/mballoc.c:24:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/move_extent.c:19:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/indirect.c:23:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
In file included from fs/ext4/inline.c:17:0:
fs/ext4/ext4_jbd2.h: In function ‘ext4_inode_journal_mode’:
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/ext4/acl.c: In function ‘ext4_get_acl’:
fs/ext4/acl.c:160:9: warning: ‘name_index’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  retval = ext4_xattr_get(inode, name_index, "", NULL, 0);
         ^
fs/nfs/filelayout/filelayout.c: In function ‘filelayout_get_dserver_offset’:
fs/nfs/filelayout/filelayout.c:86:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
fs/nfs/flexfilelayout/flexfilelayoutdev.c: In function
‘nfs4_ff_find_or_create_ds_client’:
fs/nfs/flexfilelayout/flexfilelayoutdev.c:493:1: warning: control
reaches end of non-void function [-Wreturn-type]
 }
 ^
In file included from include/linux/sunrpc/svcsock.h:13:0,
                 from include/linux/sunrpc/svcauth_gss.h:16,
                 from fs/nfsd/nfs4state.c:42:
include/linux/sunrpc/svc_xprt.h: In function ‘svc_addr_len’:
include/linux/sunrpc/svc_xprt.h:174:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
fs/notify/fanotify/fanotify.c: In function ‘fanotify_handle_event’:
fs/notify/fanotify/fanotify.c:143:32: warning: ‘marks_ignored_mask’
may be used uninitialized in this function [-Wmaybe-uninitialized]
      !(marks_mask & FS_ISDIR & ~marks_ignored_mask))
                                ^
fs/notify/fanotify/fanotify.c:106:20: note: ‘marks_ignored_mask’ was
declared here
  __u32 marks_mask, marks_ignored_mask;
                    ^
fs/notify/fanotify/fanotify.c:143:30: warning: ‘marks_mask’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
      !(marks_mask & FS_ISDIR & ~marks_ignored_mask))
                              ^
fs/notify/fanotify/fanotify.c:106:8: note: ‘marks_mask’ was declared here
  __u32 marks_mask, marks_ignored_mask;
        ^
fs/quota/kqid.c: In function ‘qid_eq’:
fs/quota/kqid.c:26:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/quota/kqid.c: In function ‘qid_lt’:
fs/quota/kqid.c:52:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/quota/kqid.c: In function ‘from_kqid’:
fs/quota/kqid.c:79:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/quota/kqid.c: In function ‘from_kqid_munged’:
fs/quota/kqid.c:112:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/quota/kqid.c: In function ‘qid_valid’:
fs/quota/kqid.c:131:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
fs/udf/inode.c: In function ‘udf_setsize’:
fs/udf/inode.c:641:15: warning: ‘adsize’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   epos.offset -= adsize;
               ^
fs/udf/inode.c:608:6: note: ‘adsize’ was declared here
  int adsize;
      ^
fs/udf/truncate.c: In function ‘udf_truncate_tail_extent’:
fs/udf/truncate.c:105:16: warning: ‘adsize’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
    epos.offset -= adsize;
                ^
fs/udf/truncate.c: In function ‘udf_truncate_extents’:
fs/udf/truncate.c:229:14: warning: ‘adsize’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  epos.offset -= adsize;
              ^
fs/xfs/xfs_acl.c: In function ‘xfs_get_acl’:
fs/xfs/xfs_acl.c:156:8: warning: ‘ea_name’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
  error = xfs_attr_get(ip, ea_name, (unsigned char *)xfs_acl,
        ^
fs/posix_acl.c: In function ‘acl_by_type’:
fs/posix_acl.c:34:1: warning: control reaches end of non-void function
[-Wreturn-type]
 }
 ^
In file included from include/linux/async_tx.h:20:0,
                 from crypto/async_tx/async_pq.c:27:
include/linux/dmaengine.h: In function ‘dma_maxpq’:
include/linux/dmaengine.h:955:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
block/cfq-iosched.c: In function ‘cfq_async_queue_prio’:
block/cfq-iosched.c:3775:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
drivers/ata/pata_atiixp.c: In function ‘atiixp_set_dmamode’:
drivers/ata/pata_atiixp.c:195:24: warning: ‘wanted_pio’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   atiixp_set_pio_timing(ap, adev, wanted_pio);
                        ^
drivers/gpu/drm/gma500/psb_irq.c: In function ‘psb_pipestat’:
drivers/gpu/drm/gma500/psb_irq.c:47:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/gma500/psb_irq.c: In function ‘mid_pipe_event’:
drivers/gpu/drm/gma500/psb_irq.c:59:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/gma500/psb_irq.c: In function ‘mid_pipeconf’:
drivers/gpu/drm/gma500/psb_irq.c:83:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/i915_sysfs.c: In function ‘gt_rp_mhz_show’:
drivers/gpu/drm/i915/i915_sysfs.c:492:17: warning: ‘val’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  return snprintf(buf, PAGE_SIZE, "%d\n", val);
                 ^
In file included from drivers/gpu/drm/i915/i915_trace.h:10:0,
                 from drivers/gpu/drm/i915/i915_drv.h:2636,
                 from drivers/gpu/drm/i915/intel_runtime_pm.c:32:
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_dport_to_phy’:
drivers/gpu/drm/i915/intel_drv.h:837:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_dport_to_channel’:
drivers/gpu/drm/i915/intel_drv.h:823:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/i915_cmd_parser.c: In function ‘i915_cmd_parser_init_ring’:
drivers/gpu/drm/i915/i915_cmd_parser.c:563:2: warning:
‘cmd_table_count’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
  for (i = 0; i < cmd_table_count; i++) {
  ^
drivers/gpu/drm/i915/i915_cmd_parser.c:691:6: note: ‘cmd_table_count’
was declared here
  int cmd_table_count;
      ^
drivers/gpu/drm/i915/i915_cmd_parser.c:690:35: warning: ‘cmd_tables’
may be used uninitialized in this function [-Wmaybe-uninitialized]
  const struct drm_i915_cmd_table *cmd_tables;
                                   ^
In file included from include/linux/list.h:8:0,
                 from include/linux/agp_backend.h:33,
                 from include/drm/drmP.h:35,
                 from drivers/gpu/drm/i915/i915_gem_context.c:88:
drivers/gpu/drm/i915/i915_gem_context.c: In function ‘i915_gem_context_init’:
include/linux/kernel.h:63:30: warning: ‘ret’ may be used uninitialized
in this function [-Wmaybe-uninitialized]
 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
                              ^
drivers/gpu/drm/i915/i915_gem_context.c:111:6: note: ‘ret’ was declared here
  int ret;
      ^
In file included from drivers/gpu/drm/i915/intel_display.c:36:0:
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_pipe_to_channel’:
drivers/gpu/drm/i915/intel_drv.h:851:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/intel_display.c: In function ‘ironlake_check_fdi_lanes’:
drivers/gpu/drm/i915/intel_display.c:6564:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/intel_display.c: In function ‘vlv_wait_port_ready’:
drivers/gpu/drm/i915/intel_display.c:1841:6: warning: ‘dpll_reg’ may
be used uninitialized in this function [-Wmaybe-uninitialized]
  int dpll_reg;
      ^
drivers/gpu/drm/i915/intel_display.c:1861:36: warning: ‘port_mask’ may
be used uninitialized in this function [-Wmaybe-uninitialized]
  if (wait_for((I915_READ(dpll_reg) & port_mask) == expected_mask, 1000))
                                    ^
drivers/gpu/drm/i915/intel_ddi.c: In function ‘intel_prepare_ddi’:
drivers/gpu/drm/i915/intel_ddi.c:441:30: warning: ‘ddi_translations’
may be used uninitialized in this function [-Wmaybe-uninitialized]
  const struct ddi_buf_trans *ddi_translations;
                              ^
drivers/gpu/drm/i915/intel_ddi.c:435:6: warning: ‘size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
      size;
      ^
In file included from drivers/gpu/drm/i915/intel_dp.c:38:0:
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_pipe_to_channel’:
drivers/gpu/drm/i915/intel_drv.h:851:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_dport_to_channel’:
drivers/gpu/drm/i915/intel_drv.h:823:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
In file included from drivers/gpu/drm/i915/intel_hdmi.c:37:0:
drivers/gpu/drm/i915/intel_drv.h: In function ‘vlv_dport_to_channel’:
drivers/gpu/drm/i915/intel_drv.h:823:1: warning: control reaches end
of non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c: In function ‘read_pll_ref’:
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:118:5: warning: ‘M’ may
be used uninitialized in this function [-Wmaybe-uninitialized]
  if (M)
     ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:58:12: note: ‘M’ was
declared here
  int P, N, M, id;
            ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:119:15: warning: ‘N’
may be used uninitialized in this function [-Wmaybe-uninitialized]
   return (ref * N / M) >> P;
               ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:58:9: note: ‘N’ was declared here
  int P, N, M, id;
         ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:119:3: warning: ‘P’ may
be used uninitialized in this function [-Wmaybe-uninitialized]
   return (ref * N / M) >> P;
   ^
drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.c:58:6: note: ‘P’ was declared here
  int P, N, M, id;
      ^
drivers/gpu/drm/radeon/ni.c: In function ‘ni_init_microcode’:
drivers/gpu/drm/radeon/ni.c:812:6: warning: ‘mc_req_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   if (rdev->mc_fw->size != mc_req_size) {
      ^
drivers/gpu/drm/radeon/ni.c:799:5: warning: ‘rlc_req_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  if (rdev->rlc_fw->size != rlc_req_size) {
     ^
drivers/gpu/drm/radeon/ni.c:788:5: warning: ‘me_req_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  if (rdev->me_fw->size != me_req_size) {
     ^
drivers/gpu/drm/radeon/ni.c:776:5: warning: ‘pfp_req_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  if (rdev->pfp_fw->size != pfp_req_size) {
     ^
drivers/gpu/drm/radeon/ni.c:795:10: warning: ‘rlc_chip_name’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", rlc_chip_name);
          ^
drivers/gpu/drm/radeon/ni.c:821:11: warning: ‘chip_name’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
           ^
drivers/gpu/drm/radeon/si.c: In function ‘si_init’:
drivers/gpu/drm/radeon/si.c:1830:42: warning: ‘mc2_req_size’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   if ((rdev->mc_fw->size != mc_req_size) &&
                                          ^
drivers/gpu/drm/radeon/si.c:1652:23: note: ‘mc2_req_size’ was declared here
  size_t smc_req_size, mc2_req_size;
                       ^
drivers/gpu/drm/radeon/si.c:1862:13: warning: ‘smc_req_size’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   } else if (rdev->smc_fw->size != smc_req_size) {
             ^
drivers/gpu/drm/radeon/si.c:1652:9: note: ‘smc_req_size’ was declared here
  size_t smc_req_size, mc2_req_size;
         ^
drivers/gpu/drm/radeon/si.c:1830:6: warning: ‘mc_req_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   if ((rdev->mc_fw->size != mc_req_size) &&
      ^
drivers/gpu/drm/radeon/si.c:1651:63: note: ‘mc_req_size’ was declared here
  size_t pfp_req_size, me_req_size, ce_req_size, rlc_req_size, mc_req_size;
                                                               ^
drivers/gpu/drm/radeon/si.c:1850:10: warning: ‘new_chip_name’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", new_chip_name);
          ^
drivers/gpu/drm/radeon/si.c:1650:14: note: ‘new_chip_name’ was declared here
  const char *new_chip_name;
              ^
drivers/gpu/drm/radeon/si.c:1853:11: warning: ‘chip_name’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
   snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
           ^
drivers/gpu/drm/radeon/si.c:1649:14: note: ‘chip_name’ was declared here
  const char *chip_name;
              ^
drivers/gpu/drm/radeon/cik.c: In function ‘cik_init_microcode’:
drivers/gpu/drm/radeon/cik.c:2295:12: warning: ‘num_fw’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  } else if (new_fw < num_fw) {
            ^
drivers/gpu/drm/radeon/cik.c:2186:6: warning: ‘rlc_req_size’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   if (rdev->rlc_fw->size != rlc_req_size) {
      ^
drivers/gpu/drm/radeon/cik.c:2262:11: warning: ‘new_chip_name’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", new_chip_name);
           ^
drivers/gpu/drm/radeon/cik.c:2265:12: warning: ‘chip_name’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
    snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);
            ^
drivers/gpu/drm/radeon/rv770_smc.c: In function ‘rv770_load_smc_ucode’:
drivers/gpu/drm/radeon/rv770_smc.c:489:6: warning: ‘ucode_size’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  u16 ucode_size;
      ^
drivers/gpu/drm/radeon/rv770_smc.c:384:70: warning: ‘int_vect’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   tmp = (src[i] << 24) | (src[i + 1] << 16) | (src[i + 2] << 8) | src[i + 3];
                                                                      ^
drivers/gpu/drm/radeon/rv770_smc.c:484:12: note: ‘int_vect’ was declared here
  const u8 *int_vect;
            ^
drivers/gpu/drm/radeon/si_smc.c: In function ‘si_load_smc_ucode’:
drivers/gpu/drm/radeon/si_smc.c:215:6: warning: ‘ucode_size’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  u32 ucode_size;
      ^
drivers/gpu/drm/drm_crtc.c: In function ‘drm_crtc_index’:
drivers/gpu/drm/drm_crtc.c:755:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/drm_crtc.c: In function ‘drm_connector_index’:
drivers/gpu/drm/drm_crtc.c:1007:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/gpu/drm/drm_crtc.c: In function ‘drm_plane_index’:
drivers/gpu/drm/drm_crtc.c:1299:1: warning: control reaches end of
non-void function [-Wreturn-type]
 }
 ^
drivers/iommu/dmar.c: In function ‘dmar_msi_reg’:
drivers/iommu/dmar.c:1510:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
drivers/md/raid0.c: In function ‘find_zone’:
drivers/md/raid0.c:298:1: warning: control reaches end of non-void
function [-Wreturn-type]
 }
 ^
  CC [M]  drivers/md/raid1.o
  CC [M]  drivers/md/raid10.o
  CC [M]  drivers/md/raid5.o
In file included from ./arch/x86/include/asm/bug.h:48:0,
                 from include/linux/bug.h:4,
                 from include/linux/thread_info.h:11,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:59,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from include/linux/blkdev.h:4,
                 from drivers/md/raid5.c:46:
drivers/md/raid5.c: In function ‘raid_run_ops’:
include/asm-generic/bug.h:55:35: warning: ‘target’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                   ^
drivers/md/raid5.c:1383:6: note: ‘target’ was declared here
  int target;
      ^
drivers/media/common/saa7146/saa7146_fops.c: In function ‘fops_write’:
drivers/media/common/saa7146/saa7146_fops.c:425:1: warning: control
reaches end of non-void function [-Wreturn-type]
 }
 ^
drivers/media/common/saa7146/saa7146_fops.c: In function ‘fops_read’:
drivers/media/common/saa7146/saa7146_fops.c:402:1: warning: control
reaches end of non-void function [-Wreturn-type]
 }
 ^
drivers/media/common/saa7146/saa7146_fops.c: In function ‘fops_mmap’:
drivers/media/common/saa7146/saa7146_fops.c:318:6: warning: ‘q’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  res = videobuf_mmap_mapper(q, vma);
      ^
drivers/media/firewire/firedtv-avc.c: In function ‘avc_tuner_dsd’:
drivers/media/firewire/firedtv-avc.c:591:6: warning: ‘pos’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
  int pos, ret;
      ^
drivers/media/pci/pt1/va1j5jf8007s.c: In function ‘va1j5jf8007s_read_status’:
drivers/media/pci/pt1/va1j5jf8007s.c:143:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
drivers/media/pci/pt1/va1j5jf8007s.c: In function ‘va1j5jf8007s_tune’:
drivers/media/pci/pt1/va1j5jf8007s.c:508:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
  CC [M]  drivers/media/pci/pt1/va1j5jf8007t.o
drivers/media/pci/pt1/va1j5jf8007t.c: In function ‘va1j5jf8007t_read_status’:
drivers/media/pci/pt1/va1j5jf8007t.c:127:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
drivers/media/pci/pt1/va1j5jf8007t.c: In function ‘va1j5jf8007t_tune’:
drivers/media/pci/pt1/va1j5jf8007t.c:354:1: warning: control reaches
end of non-void function [-Wreturn-type]
 }
 ^
drivers/media/pci/saa7164/saa7164-encoder.c: In function ‘saa7164_s_frequency’:
drivers/media/pci/saa7164/saa7164-encoder.c:403:5: warning: ‘tsport’
may be used uninitialized in this function [-Wmaybe-uninitialized]
  fe = tsport->dvb.frontend;
     ^

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ