1. 25 Feb, 2017 1 commit
    • Josh Poimboeuf's avatar
      objtool: Prevent GCC from merging annotate_unreachable() · 3d1e2360
      Josh Poimboeuf authored
      0-day bot reported some new objtool warnings which were caused by the
      new annotate_unreachable() macro:
      
        fs/afs/flock.o: warning: objtool: afs_do_unlk()+0x0: duplicate frame pointer save
        fs/afs/flock.o: warning: objtool: afs_do_unlk()+0x0: frame pointer state mismatch
        fs/btrfs/delayed-inode.o: warning: objtool: btrfs_delete_delayed_dir_index()+0x0: duplicate frame pointer save
        fs/btrfs/delayed-inode.o: warning: objtool: btrfs_delete_delayed_dir_index()+0x0: frame pointer state mismatch
        fs/dlm/lock.o: warning: objtool: _grant_lock()+0x0: duplicate frame pointer save
        fs/dlm/lock.o: warning: objtool: _grant_lock()+0x0: frame pointer state mismatch
        fs/ocfs2/alloc.o: warning: objtool: ocfs2_mv_path()+0x0: duplicate frame pointer save
        fs/ocfs2/alloc.o: warning: objtool: ocfs2_mv_path()+0x0: frame pointer state mismatch
      
      It turns out that, for older versions of GCC, if a function has multiple
      BUG() incantations, GCC will sometimes merge the corresponding
      annotate_unreachable() inline asm statements into a single block.  That
      has the undesirable effect of removing one of the entries in the
      __unreachable section, confusing objtool greatly.
      
      A workaround for this issue is to ensure that each instance of the
      inline asm statement uses a different label, so that GCC sees the
      statements are unique and leaves them alone.  The inline asm ‘%=’ token
      could be used for that, but unfortunately older versions of GCC don't
      support it.  So I implemented a poor man's version of it with the
      __LINE__ macro.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: d1091c7f ("objtool: Improve detection of BUG() and other dead ends")
      Link: http://lkml.kernel.org/r/0c14b00baf9f68d1b0221ddb6c88b925181c8be8.1487997036.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3d1e2360
  2. 24 Feb, 2017 1 commit
    • Josh Poimboeuf's avatar
      objtool: Improve detection of BUG() and other dead ends · d1091c7f
      Josh Poimboeuf authored
      The BUG() macro's use of __builtin_unreachable() via the unreachable()
      macro tells gcc that the instruction is a dead end, and that it's safe
      to assume the current code path will not execute past the previous
      instruction.
      
      On x86, the BUG() macro is implemented with the 'ud2' instruction.  When
      objtool's branch analysis sees that instruction, it knows the current
      code path has come to a dead end.
      
      Peter Zijlstra has been working on a patch to change the WARN macros to
      use 'ud2'.  That patch will break objtool's assumption that 'ud2' is
      always a dead end.
      
      Generally it's best for objtool to avoid making those kinds of
      assumptions anyway.  The more ignorant it is of kernel code internals,
      the better.
      
      So create a more generic way for objtool to detect dead ends by adding
      an annotation to the unreachable() macro.  The annotation stores a
      pointer to the end of the unreachable code path in an '__unreachable'
      section.  Objtool can read that section to find the dead ends.
      Tested-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/41a6d33971462ebd944a1c60ad4bf5be86c17b77.1487712920.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d1091c7f
  3. 20 Feb, 2017 1 commit
  4. 19 Feb, 2017 11 commits
  5. 18 Feb, 2017 1 commit
  6. 17 Feb, 2017 19 commits
  7. 16 Feb, 2017 6 commits
    • Linus Torvalds's avatar
      Revert "nohz: Fix collision between tick and other hrtimers" · 558e8e27
      Linus Torvalds authored
      This reverts commit 24b91e36 and commit
      7bdb59f1 ("tick/nohz: Fix possible missing clock reprog after tick
      soft restart") that depends on it,
      
      Pavel reports that it causes occasional boot hangs for him that seem to
      depend on just how the machine was booted.  In particular, his machine
      hangs at around the PCI fixups of the EHCI USB host controller, but only
      hangs from cold boot, not from a warm boot.
      
      Thomas Gleixner suspecs it's a CPU hotplug interaction, particularly
      since Pavel also saw suspend/resume issues that seem to be related.
      We're reverting for now while trying to figure out the root cause.
      Reported-bisected-and-tested-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Wanpeng Li <wanpeng.li@hotmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: stable@kernel.org  # reverted commits were marked for stable
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      558e8e27
    • Linus Torvalds's avatar
      Merge tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 4695daef
      Linus Torvalds authored
      Pull media fix from Mauro Carvalho Chehab:
       "A regression fix that makes the Siano driver to work again after the
        CONFIG_VMAP_STACK change"
      
      * tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] siano: make it work again with CONFIG_VMAP_STACK
      4695daef
    • Miklos Szeredi's avatar
      vfs: fix uninitialized flags in splice_to_pipe() · 5a81e6a1
      Miklos Szeredi authored
      Flags (PIPE_BUF_FLAG_PACKET, PIPE_BUF_FLAG_GIFT) could remain on the
      unused part of the pipe ring buffer.  Previously splice_to_pipe() left
      the flags value alone, which could result in incorrect behavior.
      
      Uninitialized flags appears to have been there from the introduction of
      the splice syscall.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Cc: <stable@vger.kernel.org> # 2.6.17+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5a81e6a1
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 58f6eaee
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "Fix a use after free bug introduced in 4.2 and using an uninitialized
        value introduced in 4.9"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix uninitialized flags in pipe_buffer
        fuse: fix use after free issue in fuse_dev_do_read()
      58f6eaee
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · aa6fba55
      Linus Torvalds authored
      Pull PCI fix from Bjorn Helgaas:
       "Add back pcie_pme_remove() so we free the IRQ when removing PCIe port
        devices; previously the leaked IRQ caused an MSI BUG_ON"
      
      * tag 'pci-v4.10-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/PME: Restore pcie_pme_driver.remove
      aa6fba55
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 3c7a9f32
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) In order to avoid problems in the future, make cgroup bpf overriding
          explicit using BPF_F_ALLOW_OVERRIDE. From Alexei Staovoitov.
      
       2) LLC sets skb->sk without proper skb->destructor and this explodes,
          fix from Eric Dumazet.
      
       3) Make sure when we have an ipv4 mapped source address, the
          destination is either also an ipv4 mapped address or
          ipv6_addr_any(). Fix from Jonathan T. Leighton.
      
       4) Avoid packet loss in fec driver by programming the multicast filter
          more intelligently. From Rui Sousa.
      
       5) Handle multiple threads invoking fanout_add(), fix from Eric
          Dumazet.
      
       6) Since we can invoke the TCP input path in process context, without
          BH being disabled, we have to accomodate that in the locking of the
          TCP probe. Also from Eric Dumazet.
      
       7) Fix erroneous emission of NETEVENT_DELAY_PROBE_TIME_UPDATE when we
          aren't even updating that sysctl value. From Marcus Huewe.
      
       8) Fix endian bugs in ibmvnic driver, from Thomas Falcon.
      
      [ This is the second version of the pull that reverts the nested
        rhashtable changes that looked a bit too scary for this late in the
        release  - Linus ]
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        rhashtable: Revert nested table changes.
        ibmvnic: Fix endian errors in error reporting output
        ibmvnic: Fix endian error when requesting device capabilities
        net: neigh: Fix netevent NETEVENT_DELAY_PROBE_TIME_UPDATE notification
        net: xilinx_emaclite: fix freezes due to unordered I/O
        net: xilinx_emaclite: fix receive buffer overflow
        bpf: kernel header files need to be copied into the tools directory
        tcp: tcp_probe: use spin_lock_bh()
        uapi: fix linux/if_pppol2tp.h userspace compilation errors
        packet: fix races in fanout_add()
        ibmvnic: Fix initial MTU settings
        net: ethernet: ti: cpsw: fix cpsw assignment in resume
        kcm: fix a null pointer dereference in kcm_sendmsg()
        net: fec: fix multicast filtering hardware setup
        ipv6: Handle IPv4-mapped src to in6addr_any dst.
        ipv6: Inhibit IPv4-mapped src address on the wire.
        net/mlx5e: Disable preemption when doing TC statistics upcall
        rhashtable: Add nested tables
        tipc: Fix tipc_sk_reinit race conditions
        gfs2: Use rhashtable walk interface in glock_hash_walk
        ...
      3c7a9f32