1. 10 4月, 2016 4 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 9ef11ceb
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Stale SKB data pointer access across pskb_may_pull() calls in L2TP,
          from Haishuang Yan.
      
       2) Fix multicast frame handling in mac80211 AP code, from Felix
          Fietkau.
      
       3) mac80211 station hashtable insert errors not handled properly, fix
          from Johannes Berg.
      
       4) Fix TX descriptor count limit handling in e1000, from Alexander
          Duyck.
      
       5) Revert a buggy netdev refcount fix in netpoll, from Bjorn Helgaas.
      
       6) Must assign rtnl_link_ops of the device before registering it, fix
          in ip6_tunnel from Thadeu Lima de Souza Cascardo.
      
       7) Memory leak fix in tc action net exit, from WANG Cong.
      
       8) Add missing AF_KCM entries to name tables, from Dexuan Cui.
      
       9) Fix regression in GRE handling of csums wrt.  FOU, from Alexander
          Duyck.
      
      10) Fix memory allocation alignment and congestion map corruption in
          RDS, from Shamir Rabinovitch.
      
      11) Fix default qdisc regression in tuntap driver, from Jason Wang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
        bridge, netem: mark mailing lists as moderated
        tuntap: restore default qdisc
        mpls: find_outdev: check for err ptr in addition to NULL check
        ipv6: Count in extension headers in skb->network_header
        RDS: fix congestion map corruption for PAGE_SIZE > 4k
        RDS: memory allocated must be align to 8
        GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
        net: add the AF_KCM entries to family name tables
        MAINTAINERS: intel-wired-lan list is moderated
        lib/test_bpf: Add additional BPF_ADD tests
        lib/test_bpf: Add test to check for result of 32-bit add that overflows
        lib/test_bpf: Add tests for unsigned BPF_JGT
        lib/test_bpf: Fix JMP_JSET tests
        VSOCK: Detach QP check should filter out non matching QPs.
        stmmac: fix adjust link call in case of a switch is attached
        af_packet: tone down the Tx-ring unsupported spew.
        net_sched: fix a memory leak in tc action
        samples/bpf: Enable powerpc support
        samples/bpf: Use llc in PATH, rather than a hardcoded value
        samples/bpf: Fix build breakage with map_perf_test_user.c
        ...
      9ef11ceb
    • L
      Merge branch 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 839a3f76
      Linus Torvalds 提交于
      Pull btrfs fixes from Chris Mason:
       "These are bug fixes, including a really old fsync bug, and a few trace
        points to help us track down problems in the quota code"
      
      * 'for-linus-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix file/data loss caused by fsync after rename and new inode
        btrfs: Reset IO error counters before start of device replacing
        btrfs: Add qgroup tracing
        Btrfs: don't use src fd for printk
        btrfs: fallback to vmalloc in btrfs_compare_tree
        btrfs: handle non-fatal errors in btrfs_qgroup_inherit()
        btrfs: Output more info for enospc_debug mount option
        Btrfs: fix invalid reference in replace_path
        Btrfs: Improve FL_KEEP_SIZE handling in fallocate
      839a3f76
    • L
      Merge tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 67592126
      Linus Torvalds 提交于
      Pull orangefs fixes from Mike Marshall:
       "Orangefs cleanups and a strncpy vulnerability fix.
      
        Cleanups:
         - remove an unused variable from orangefs_readdir.
         - clean up printk wrapper used for ofs "gossip" debugging.
         - clean up truncate ctime and mtime setting in inode.c
         - remove a useless null check found by coccinelle.
         - optimize some memcpy/memset boilerplate code.
         - remove some useless sanity checks from xattr.c
      
        Fix:
         - fix a potential strncpy vulnerability"
      
      * tag 'for-linus-4.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: remove unused variable
        orangefs: Add KERN_<LEVEL> to gossip_<level> macros
        orangefs: strncpy -> strscpy
        orangefs: clean up truncate ctime and mtime setting
        Orangefs: fix ifnullfree.cocci warnings
        Orangefs: optimize boilerplate code.
        Orangefs: xattr.c cleanup
      67592126
    • L
      Merge tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 1a59c539
      Linus Torvalds 提交于
      Pull IOMMU fixes from Joerg Roedel:
      
       - compile-time fixes (warnings and failures)
      
       - a bug in iommu core code which could cause the group->domain pointer
         to be falsly cleared
      
       - fix in scatterlist handling of the ARM common DMA-API code
      
       - stall detection fix for the Rockchip IOMMU driver
      
      * tag 'iommu-fixes-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Silence an uninitialized variable warning
        iommu/rockchip: Fix "is stall active" check
        iommu: Don't overwrite domain pointer when there is no default_domain
        iommu/dma: Restore scatterlist offsets correctly
        iommu: provide of_xlate pointer unconditionally
      1a59c539
  2. 09 4月, 2016 11 次提交
    • D
      Merge tag 'mac80211-for-davem-2016-04-06' of... · 30d237a6
      David S. Miller 提交于
      Merge tag 'mac80211-for-davem-2016-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      For the current RC series, we have the following fixes:
       * TDLS fixes from Arik and Ilan
       * rhashtable fixes from Ben and myself
       * documentation fixes from Luis
       * U-APSD fixes from Emmanuel
       * a TXQ fix from Felix
       * and a compiler warning suppression from Jeff
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30d237a6
    • S
      bridge, netem: mark mailing lists as moderated · 3430284f
      stephen hemminger 提交于
      I moderate these (lightly loaded) lists to block spam.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3430284f
    • J
      tuntap: restore default qdisc · 016adb72
      Jason Wang 提交于
      After commit f84bb1ea ("net: fix IFF_NO_QUEUE for drivers using
      alloc_netdev"), default qdisc was changed to noqueue because
      tuntap does not set tx_queue_len during .setup(). This patch restores
      default qdisc by setting tx_queue_len in tun_setup().
      
      Fixes: f84bb1ea ("net: fix IFF_NO_QUEUE for drivers using alloc_netdev")
      Cc: Phil Sutter <phil@nwl.cc>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NPhil Sutter <phil@nwl.cc>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      016adb72
    • M
      orangefs: remove unused variable · e56f4981
      Martin Brandenburg 提交于
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      e56f4981
    • J
      orangefs: Add KERN_<LEVEL> to gossip_<level> macros · 1917a693
      Joe Perches 提交于
      Emit the logging messages at the appropriate levels.
      
      Miscellanea:
      
      o Change format to fmt
      o Use the more common ##__VA_ARGS__
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      1917a693
    • M
      orangefs: strncpy -> strscpy · 2eacea74
      Martin Brandenburg 提交于
      It would have been possible for a rogue client-core to send in a symlink
      target which is not NUL terminated. This returns EIO if the client-core
      gives us corrupt data.
      
      Leave debugfs and superblock code as is for now.
      
      Other dcache.c and namei.c strncpy instances are safe because
      ORANGEFS_NAME_MAX = NAME_MAX + 1; there is always enough space for a
      name plus a NUL byte.
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      2eacea74
    • M
      orangefs: clean up truncate ctime and mtime setting · f83140c1
      Martin Brandenburg 提交于
      The ctime and mtime are always updated on a successful ftruncate and
      only updated on a successful truncate where the size changed.
      
      We handle the ``if the size changed'' bit.
      
      This matches FUSE's behavior.
      Signed-off-by: NMartin Brandenburg <martin@omnibond.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      f83140c1
    • K
      Orangefs: fix ifnullfree.cocci warnings · 2fa37fd7
      kbuild test robot 提交于
      fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
      
       NULL check before some freeing functions is not needed.
      
       Based on checkpatch warning
       "kfree(NULL) is safe this check is probably not required"
       and kfreeaddr.cocci by Julia Lawall.
      
      Generated by: scripts/coccinelle/free/ifnullfree.cocci
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      2fa37fd7
    • M
      Orangefs: optimize boilerplate code. · a9bb3ba8
      Mike Marshall 提交于
      Suggested by David Binderman <dcb314@hotmail.com>
      The former can potentially be a performance win over the latter.
      
      memcpy(d, s, len);
      memset(d+len, c, size-len);
      
      memset(d, c, size);
      memcpy(d, s, len);
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      a9bb3ba8
    • M
      Orangefs: xattr.c cleanup · 2d09a2ca
      Mike Marshall 提交于
      1. It is nonsense to test for negative size_t, suggested by
         David Binderman <dcb314@hotmail.com>
      
      2. By the time Orangefs gets called, the vfs has ensured that
         name != NULL, and that buffer and size are sane.
      Signed-off-by: NMike Marshall <hubcap@omnibond.com>
      2d09a2ca
    • R
      mpls: find_outdev: check for err ptr in addition to NULL check · 94a57f1f
      Roopa Prabhu 提交于
      find_outdev calls inet{,6}_fib_lookup_dev() or dev_get_by_index() to
      find the output device. In case of an error, inet{,6}_fib_lookup_dev()
      returns error pointer and dev_get_by_index() returns NULL. But the function
      only checks for NULL and thus can end up calling dev_put on an ERR_PTR.
      This patch adds an additional check for err ptr after the NULL check.
      
      Before: Trying to add an mpls route with no oif from user, no available
      path to 10.1.1.8 and no default route:
      $ip -f mpls route add 100 as 200 via inet 10.1.1.8
      [  822.337195] BUG: unable to handle kernel NULL pointer dereference at
      00000000000003a3
      [  822.340033] IP: [<ffffffff8148781e>] mpls_nh_assign_dev+0x10b/0x182
      [  822.340033] PGD 1db38067 PUD 1de9e067 PMD 0
      [  822.340033] Oops: 0000 [#1] SMP
      [  822.340033] Modules linked in:
      [  822.340033] CPU: 0 PID: 11148 Comm: ip Not tainted 4.5.0-rc7+ #54
      [  822.340033] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
      BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org
      04/01/2014
      [  822.340033] task: ffff88001db82580 ti: ffff88001dad4000 task.ti:
      ffff88001dad4000
      [  822.340033] RIP: 0010:[<ffffffff8148781e>]  [<ffffffff8148781e>]
      mpls_nh_assign_dev+0x10b/0x182
      [  822.340033] RSP: 0018:ffff88001dad7a88  EFLAGS: 00010282
      [  822.340033] RAX: ffffffffffffff9b RBX: ffffffffffffff9b RCX:
      0000000000000002
      [  822.340033] RDX: 00000000ffffff9b RSI: 0000000000000008 RDI:
      0000000000000000
      [  822.340033] RBP: ffff88001ddc9ea0 R08: ffff88001e9f1768 R09:
      0000000000000000
      [  822.340033] R10: ffff88001d9c1100 R11: ffff88001e3c89f0 R12:
      ffffffff8187e0c0
      [  822.340033] R13: ffffffff8187e0c0 R14: ffff88001ddc9e80 R15:
      0000000000000004
      [  822.340033] FS:  00007ff9ed798700(0000) GS:ffff88001fc00000(0000)
      knlGS:0000000000000000
      [  822.340033] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  822.340033] CR2: 00000000000003a3 CR3: 000000001de89000 CR4:
      00000000000006f0
      [  822.340033] Stack:
      [  822.340033]  0000000000000000 0000000100000000 0000000000000000
      0000000000000000
      [  822.340033]  0000000000000000 0801010a00000000 0000000000000000
      0000000000000000
      [  822.340033]  0000000000000004 ffffffff8148749b ffffffff8187e0c0
      000000000000001c
      [  822.340033] Call Trace:
      [  822.340033]  [<ffffffff8148749b>] ? mpls_rt_alloc+0x2b/0x3e
      [  822.340033]  [<ffffffff81488e66>] ? mpls_rtm_newroute+0x358/0x3e2
      [  822.340033]  [<ffffffff810e7bbc>] ? get_page+0x5/0xa
      [  822.340033]  [<ffffffff813b7d94>] ? rtnetlink_rcv_msg+0x17e/0x191
      [  822.340033]  [<ffffffff8111794e>] ? __kmalloc_track_caller+0x8c/0x9e
      [  822.340033]  [<ffffffff813c9393>] ?
      rht_key_hashfn.isra.20.constprop.57+0x14/0x1f
      [  822.340033]  [<ffffffff813b7c16>] ? __rtnl_unlock+0xc/0xc
      [  822.340033]  [<ffffffff813cb794>] ? netlink_rcv_skb+0x36/0x82
      [  822.340033]  [<ffffffff813b4507>] ? rtnetlink_rcv+0x1f/0x28
      [  822.340033]  [<ffffffff813cb2b1>] ? netlink_unicast+0x106/0x189
      [  822.340033]  [<ffffffff813cb5b3>] ? netlink_sendmsg+0x27f/0x2c8
      [  822.340033]  [<ffffffff81392ede>] ? sock_sendmsg_nosec+0x10/0x1b
      [  822.340033]  [<ffffffff81393df1>] ? ___sys_sendmsg+0x182/0x1e3
      [  822.340033]  [<ffffffff810e4f35>] ?
      __alloc_pages_nodemask+0x11c/0x1e4
      [  822.340033]  [<ffffffff8110619c>] ? PageAnon+0x5/0xd
      [  822.340033]  [<ffffffff811062fe>] ? __page_set_anon_rmap+0x45/0x52
      [  822.340033]  [<ffffffff810e7bbc>] ? get_page+0x5/0xa
      [  822.340033]  [<ffffffff810e85ab>] ? __lru_cache_add+0x1a/0x3a
      [  822.340033]  [<ffffffff81087ea9>] ? current_kernel_time64+0x9/0x30
      [  822.340033]  [<ffffffff813940c4>] ? __sys_sendmsg+0x3c/0x5a
      [  822.340033]  [<ffffffff8148f597>] ?
      entry_SYSCALL_64_fastpath+0x12/0x6a
      [  822.340033] Code: 83 08 04 00 00 65 ff 00 48 8b 3c 24 e8 40 7c f2 ff
      eb 13 48 c7 c3 9f ff ff ff eb 0f 89 ce e8 f1 ae f1 ff 48 89 c3 48 85 db
      74 15 <48> 8b 83 08 04 00 00 65 ff 08 48 81 fb 00 f0 ff ff 76 0d eb 07
      [  822.340033] RIP  [<ffffffff8148781e>] mpls_nh_assign_dev+0x10b/0x182
      [  822.340033]  RSP <ffff88001dad7a88>
      [  822.340033] CR2: 00000000000003a3
      [  822.435363] ---[ end trace 98cc65e6f6b8bf11 ]---
      
      After patch:
      $ip -f mpls route add 100 as 200 via inet 10.1.1.8
      RTNETLINK answers: Network is unreachable
      Signed-off-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94a57f1f
  3. 08 4月, 2016 9 次提交
    • J
      ipv6: Count in extension headers in skb->network_header · 3ba3458f
      Jakub Sitnicki 提交于
      When sending a UDPv6 message longer than MTU, account for the length
      of fragmentable IPv6 extension headers in skb->network_header offset.
      Same as we do in alloc_new_skb path in __ip6_append_data().
      
      This ensures that later on __ip6_make_skb() will make space in
      headroom for fragmentable extension headers:
      
      	/* move skb->data to ip header from ext header */
      	if (skb->data < skb_network_header(skb))
      		__skb_pull(skb, skb_network_offset(skb));
      
      Prevents a splat due to skb_under_panic:
      
      skbuff: skb_under_panic: text:ffffffff8143397b len:2126 put:14 \
      head:ffff880005bacf50 data:ffff880005bacf4a tail:0x48 end:0xc0 dev:lo
      ------------[ cut here ]------------
      kernel BUG at net/core/skbuff.c:104!
      invalid opcode: 0000 [#1] KASAN
      CPU: 0 PID: 160 Comm: reproducer Not tainted 4.6.0-rc2 #65
      [...]
      Call Trace:
       [<ffffffff813eb7b9>] skb_push+0x79/0x80
       [<ffffffff8143397b>] eth_header+0x2b/0x100
       [<ffffffff8141e0d0>] neigh_resolve_output+0x210/0x310
       [<ffffffff814eab77>] ip6_finish_output2+0x4a7/0x7c0
       [<ffffffff814efe3a>] ip6_output+0x16a/0x280
       [<ffffffff815440c1>] ip6_local_out+0xb1/0xf0
       [<ffffffff814f1115>] ip6_send_skb+0x45/0xd0
       [<ffffffff81518836>] udp_v6_send_skb+0x246/0x5d0
       [<ffffffff8151985e>] udpv6_sendmsg+0xa6e/0x1090
      [...]
      Reported-by: NJi Jianwen <jiji@redhat.com>
      Signed-off-by: NJakub Sitnicki <jkbs@redhat.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ba3458f
    • B
      Revert "ib_srpt: Convert to percpu_ida tag allocation" · 3c968887
      Bart Van Assche 提交于
      This reverts commit 0fd10721.
      
      That patch causes the ib_srpt driver to crash as soon as the first SCSI
      command is received:
      
        kernel BUG at drivers/infiniband/ulp/srpt/ib_srpt.c:1439!
        invalid opcode: 0000 [#1] SMP
        Workqueue: target_completion target_complete_ok_work [target_core_mod]
        RIP: srpt_queue_response+0x437/0x4a0 [ib_srpt]
        Call Trace:
          srpt_queue_data_in+0x9/0x10 [ib_srpt]
          target_complete_ok_work+0x152/0x2b0 [target_core_mod]
          process_one_work+0x197/0x480
          worker_thread+0x49/0x490
          kthread+0xea/0x100
          ret_from_fork+0x22/0x40
      
      Aside from the crash, the shortcomings of that patch are as follows:
      
       - It makes the ib_srpt driver use I/O contexts allocated by
         transport_alloc_session_tags() but it does not initialize these I/O
         contexts properly.  All the initializations performed by
         srpt_alloc_ioctx() are skipped.
      
       - It swaps the order of the send ioctx allocation and the transition to
         RTR mode which is wrong.
      
       - The amount of memory that is needed for I/O contexts is doubled.
      
       - srpt_rdma_ch.free_list is no longer used but is not removed.
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c968887
    • L
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 93061f39
      Linus Torvalds 提交于
      Pull ext4 bugfixes from Ted Ts'o:
       "These changes contains a fix for overlayfs interacting with some
        (badly behaved) dentry code in various file systems.  These have been
        reviewed by Al and the respective file system mtinainers and are going
        through the ext4 tree for convenience.
      
        This also has a few ext4 encryption bug fixes that were discovered in
        Android testing (yes, we will need to get these sync'ed up with the
        fs/crypto code; I'll take care of that).  It also has some bug fixes
        and a change to ignore the legacy quota options to allow for xfstests
        regression testing of ext4's internal quota feature and to be more
        consistent with how xfs handles this case"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: ignore quota mount options if the quota feature is enabled
        ext4 crypto: fix some error handling
        ext4: avoid calling dquot_get_next_id() if quota is not enabled
        ext4: retry block allocation for failed DIO and DAX writes
        ext4: add lockdep annotations for i_data_sem
        ext4: allow readdir()'s of large empty directories to be interrupted
        btrfs: fix crash/invalid memory access on fsync when using overlayfs
        ext4 crypto: use dget_parent() in ext4_d_revalidate()
        ext4: use file_dentry()
        ext4: use dget_parent() in ext4_file_open()
        nfs: use file_dentry()
        fs: add file_dentry()
        ext4 crypto: don't let data integrity writebacks fail with ENOMEM
        ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()
      93061f39
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 1c915b3a
      Linus Torvalds 提交于
      Pull Ceph fix from Sage Weil:
       "This just fixes a few remaining memory allocations in RBD to use
        GFP_NOIO instead of GFP_ATOMIC"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        rbd: use GFP_NOIO consistently for request allocations
      1c915b3a
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · d3436a1d
      Linus Torvalds 提交于
      Pull virtio/qemu fixes from Michael S Tsirkin:
       "A couple of fixes for virtio and for the new QEMU fw cfg driver"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit
        MAINTAINERS: add entry for QEMU
        firmware: qemu_fw_cfg.c: hold ACPI global lock during device access
        virtio: virtio 1.0 cs04 spec compliance for reset
        qemu_fw_cfg: don't leak kobj on init error
      d3436a1d
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 741f37b8
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This is mostly amdgpu/radeon fixes, and imx related fixes.
      
        There is also one one TTM fix, one nouveau fix, and one hdlcd fix.
      
        The AMD ones are some fixes for power management after suspend/resume
        one some GPUs, and some vblank fixes.
      
        The IMX ones are for more stricter plane checks and some cleanups.
      
        I'm off until Monday, so therre might be some fixes early next week if
        anyone missed me"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (34 commits)
        drm/nouveau/tegra: acquire and enable reference clock if needed
        drm/amdgpu: total vram size also reduces pin size
        drm/amd/powerplay: add uvd/vce dpm enabling flag default.
        drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI.
        drm/amdgpu: save and restore the firwmware cache part when suspend resume
        drm/amdgpu: save and restore UVD context with suspend and resume
        drm/ttm: use phys_addr_t for ttm_bus_placement
        drm: ARM HDLCD - fix an error code
        drm: ARM HDLCD - get rid of devm_clk_put()
        drm/radeon: Only call drm_vblank_on/off between drm_vblank_init/cleanup
        drm/amdgpu: fence wait old rcu slot
        drm/amdgpu: fix leaking fence in the pageflip code
        drm/amdgpu: print vram type rather than just DDR
        drm/amdgpu/gmc: use proper register for vram type on Fiji
        drm/amdgpu/gmc: move vram type fetching into sw_init
        drm/amdgpu: Set vblank_disable_allowed = true
        drm/radeon: Set vblank_disable_allowed = true
        drm/amd/powerplay: Need to change boot to performance state in resume.
        drm/amd/powerplay: add new Fiji function for not setting same ps.
        drm/amdgpu: check dpm state before pm system fs initialized.
        ...
      741f37b8
    • S
      RDS: fix congestion map corruption for PAGE_SIZE > 4k · 579ba855
      shamir rabinovitch 提交于
      When PAGE_SIZE > 4k single page can contain 2 RDS fragments. If
      'rds_ib_cong_recv' ignore the RDS fragment offset in to the page it
      then read the data fragment as far congestion map update and lead to
      corruption of the RDS connection far congestion map.
      Signed-off-by: NShamir Rabinovitch <shamir.rabinovitch@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      579ba855
    • S
      RDS: memory allocated must be align to 8 · e98499ac
      shamir rabinovitch 提交于
      Fix issue in 'rds_ib_cong_recv' when accessing unaligned memory
      allocated by 'rds_page_remainder_alloc' using uint64_t pointer.
      Signed-off-by: NShamir Rabinovitch <shamir.rabinovitch@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e98499ac
    • A
      GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU · a0ca153f
      Alexander Duyck 提交于
      This patch fixes an issue I found in which we were dropping frames if we
      had enabled checksums on GRE headers that were encapsulated by either FOU
      or GUE.  Without this patch I was barely able to get 1 Gb/s of throughput.
      With this patch applied I am now at least getting around 6 Gb/s.
      
      The issue is due to the fact that with FOU or GUE applied we do not provide
      a transport offset pointing to the GRE header, nor do we offload it in
      software as the GRE header is completely skipped by GSO and treated like a
      VXLAN or GENEVE type header.  As such we need to prevent the stack from
      generating it and also prevent GRE from generating it via any interface we
      create.
      
      Fixes: c3483384 ("gro: Allow tunnel stacking in the case of FOU/GUE")
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0ca153f
  4. 07 4月, 2016 16 次提交
    • D
      iommu/vt-d: Silence an uninitialized variable warning · 0b74ecdf
      Dan Carpenter 提交于
      My static checker complains that "dma_alias" is uninitialized unless we
      are dealing with a pci device.  This is true but harmless.  Anyway, we
      can flip the condition around to silence the warning.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      0b74ecdf
    • J
      iommu/rockchip: Fix "is stall active" check · fbedd9b9
      John Keeping 提交于
      Since commit cd6438c5 ("iommu/rockchip: Reconstruct to support multi
      slaves") rk_iommu_is_stall_active() always returns false because the
      bitwise AND operates on the boolean flag promoted to an integer and a
      value that is either zero or BIT(2).
      
      Explicitly convert the right-hand value to a boolean so that both sides
      are guaranteed to be either zero or one.
      
      rk_iommu_is_paging_enabled() does not suffer from the same problem since
      RK_MMU_STATUS_PAGING_ENABLED is BIT(0), but let's apply the same change
      for consistency and to make it clear that it's correct without needing
      to lookup the value.
      
      Fixes: cd6438c5 ("iommu/rockchip: Reconstruct to support multi slaves")
      Signed-off-by: NJohn Keeping <john@metanate.com>
      Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
      Tested-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      fbedd9b9
    • J
      iommu: Don't overwrite domain pointer when there is no default_domain · eebb8034
      Joerg Roedel 提交于
      IOMMU drivers that do not support default domains, but make
      use of the the group->domain pointer can get that pointer
      overwritten with NULL on device add/remove.
      
      Make sure this can't happen by only overwriting the domain
      pointer when it is NULL.
      
      Cc: stable@vger.kernel.org # v4.4+
      Fixes: 1228236d ('iommu: Move default domain allocation to iommu_group_get_for_dev()')
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      eebb8034
    • S
      virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit · c00bbcf8
      Stefan Hajnoczi 提交于
      The VIRTIO 1.0 specification added the DEVICE_NEEDS_RESET device status
      bit in "VIRTIO-98: Add DEVICE_NEEDS_RESET".  This patch defines the
      device status bit in the uapi header file so that both the kernel and
      userspace applications can use it.
      
      The bit is currently unused by the virtio guest drivers and vhost.
      According to the spec "a good implementation will try to recover by
      issuing a reset".  This is not attempted here because it requires
      auditing the virtio drivers to ensure there are no resource leaks or
      crashes if the device needs to be reset mid-operation.
      
      See "2.1 Device Status Field" in the VIRTIO 1.0 specification for
      details.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c00bbcf8
    • M
      MAINTAINERS: add entry for QEMU · eeca9a67
      Michael S. Tsirkin 提交于
      Gabriel merged support for QEMU FW CFG interface, but there's apparently
      no official maintainer. It's also possible that this will grow more
      interfaces in future.  I'll happily co-maintain it and handle pull
      requests together with the rest of the PV stuff I maintain.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Gabriel Somlo <somlo@cmu.edu>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NGabriel Somlo <somlo@cmu.edu>
      eeca9a67
    • G
      firmware: qemu_fw_cfg.c: hold ACPI global lock during device access · def7ac80
      Gabriel Somlo 提交于
      Allowing for the future possibility of implementing AML-based
      (i.e., firmware-triggered) access to the QEMU fw_cfg device,
      acquire the global ACPI lock when accessing the device on behalf
      of the guest-side sysfs driver, to prevent any potential race
      conditions.
      Suggested-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      def7ac80
    • M
      virtio: virtio 1.0 cs04 spec compliance for reset · 05dbcb43
      Michael S. Tsirkin 提交于
      The spec says: after writing 0 to device_status, the driver MUST wait
      for a read of device_status to return 0 before reinitializing the
      device.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NJason Wang <jasowang@redhat.com>
      05dbcb43
    • M
      qemu_fw_cfg: don't leak kobj on init error · e8aabc64
      Michael S. Tsirkin 提交于
      If platform_driver_register fails, we should
      cleanup fw_cfg_top_ko before exiting.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NGabriel Somlo <somlo@cmu.edu>
      e8aabc64
    • F
      Btrfs: fix file/data loss caused by fsync after rename and new inode · 56f23fdb
      Filipe Manana 提交于
      If we rename an inode A (be it a file or a directory), create a new
      inode B with the old name of inode A and under the same parent directory,
      fsync inode B and then power fail, at log tree replay time we end up
      removing inode A completely. If inode A is a directory then all its files
      are gone too.
      
      Example scenarios where this happens:
      This is reproducible with the following steps, taken from a couple of
      test cases written for fstests which are going to be submitted upstream
      soon:
      
         # Scenario 1
      
         mkfs.btrfs -f /dev/sdc
         mount /dev/sdc /mnt
         mkdir -p /mnt/a/x
         echo "hello" > /mnt/a/x/foo
         echo "world" > /mnt/a/x/bar
         sync
         mv /mnt/a/x /mnt/a/y
         mkdir /mnt/a/x
         xfs_io -c fsync /mnt/a/x
         <power failure happens>
      
         The next time the fs is mounted, log tree replay happens and
         the directory "y" does not exist nor do the files "foo" and
         "bar" exist anywhere (neither in "y" nor in "x", nor the root
         nor anywhere).
      
         # Scenario 2
      
         mkfs.btrfs -f /dev/sdc
         mount /dev/sdc /mnt
         mkdir /mnt/a
         echo "hello" > /mnt/a/foo
         sync
         mv /mnt/a/foo /mnt/a/bar
         echo "world" > /mnt/a/foo
         xfs_io -c fsync /mnt/a/foo
         <power failure happens>
      
         The next time the fs is mounted, log tree replay happens and the
         file "bar" does not exists anymore. A file with the name "foo"
         exists and it matches the second file we created.
      
      Another related problem that does not involve file/data loss is when a
      new inode is created with the name of a deleted snapshot and we fsync it:
      
         mkfs.btrfs -f /dev/sdc
         mount /dev/sdc /mnt
         mkdir /mnt/testdir
         btrfs subvolume snapshot /mnt /mnt/testdir/snap
         btrfs subvolume delete /mnt/testdir/snap
         rmdir /mnt/testdir
         mkdir /mnt/testdir
         xfs_io -c fsync /mnt/testdir # or fsync some file inside /mnt/testdir
         <power failure>
      
         The next time the fs is mounted the log replay procedure fails because
         it attempts to delete the snapshot entry (which has dir item key type
         of BTRFS_ROOT_ITEM_KEY) as if it were a regular (non-root) entry,
         resulting in the following error that causes mount to fail:
      
         [52174.510532] BTRFS info (device dm-0): failed to delete reference to snap, inode 257 parent 257
         [52174.512570] ------------[ cut here ]------------
         [52174.513278] WARNING: CPU: 12 PID: 28024 at fs/btrfs/inode.c:3986 __btrfs_unlink_inode+0x178/0x351 [btrfs]()
         [52174.514681] BTRFS: Transaction aborted (error -2)
         [52174.515630] Modules linked in: btrfs dm_flakey dm_mod overlay crc32c_generic ppdev xor raid6_pq acpi_cpufreq parport_pc tpm_tis sg parport tpm evdev i2c_piix4 proc
         [52174.521568] CPU: 12 PID: 28024 Comm: mount Tainted: G        W       4.5.0-rc6-btrfs-next-27+ #1
         [52174.522805] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014
         [52174.524053]  0000000000000000 ffff8801df2a7710 ffffffff81264e93 ffff8801df2a7758
         [52174.524053]  0000000000000009 ffff8801df2a7748 ffffffff81051618 ffffffffa03591cd
         [52174.524053]  00000000fffffffe ffff88015e6e5000 ffff88016dbc3c88 ffff88016dbc3c88
         [52174.524053] Call Trace:
         [52174.524053]  [<ffffffff81264e93>] dump_stack+0x67/0x90
         [52174.524053]  [<ffffffff81051618>] warn_slowpath_common+0x99/0xb2
         [52174.524053]  [<ffffffffa03591cd>] ? __btrfs_unlink_inode+0x178/0x351 [btrfs]
         [52174.524053]  [<ffffffff81051679>] warn_slowpath_fmt+0x48/0x50
         [52174.524053]  [<ffffffffa03591cd>] __btrfs_unlink_inode+0x178/0x351 [btrfs]
         [52174.524053]  [<ffffffff8118f5e9>] ? iput+0xb0/0x284
         [52174.524053]  [<ffffffffa0359fe8>] btrfs_unlink_inode+0x1c/0x3d [btrfs]
         [52174.524053]  [<ffffffffa038631e>] check_item_in_log+0x1fe/0x29b [btrfs]
         [52174.524053]  [<ffffffffa0386522>] replay_dir_deletes+0x167/0x1cf [btrfs]
         [52174.524053]  [<ffffffffa038739e>] fixup_inode_link_count+0x289/0x2aa [btrfs]
         [52174.524053]  [<ffffffffa038748a>] fixup_inode_link_counts+0xcb/0x105 [btrfs]
         [52174.524053]  [<ffffffffa038a5ec>] btrfs_recover_log_trees+0x258/0x32c [btrfs]
         [52174.524053]  [<ffffffffa03885b2>] ? replay_one_extent+0x511/0x511 [btrfs]
         [52174.524053]  [<ffffffffa034f288>] open_ctree+0x1dd4/0x21b9 [btrfs]
         [52174.524053]  [<ffffffffa032b753>] btrfs_mount+0x97e/0xaed [btrfs]
         [52174.524053]  [<ffffffff8108e1b7>] ? trace_hardirqs_on+0xd/0xf
         [52174.524053]  [<ffffffff8117bafa>] mount_fs+0x67/0x131
         [52174.524053]  [<ffffffff81193003>] vfs_kern_mount+0x6c/0xde
         [52174.524053]  [<ffffffffa032af81>] btrfs_mount+0x1ac/0xaed [btrfs]
         [52174.524053]  [<ffffffff8108e1b7>] ? trace_hardirqs_on+0xd/0xf
         [52174.524053]  [<ffffffff8108c262>] ? lockdep_init_map+0xb9/0x1b3
         [52174.524053]  [<ffffffff8117bafa>] mount_fs+0x67/0x131
         [52174.524053]  [<ffffffff81193003>] vfs_kern_mount+0x6c/0xde
         [52174.524053]  [<ffffffff8119590f>] do_mount+0x8a6/0x9e8
         [52174.524053]  [<ffffffff811358dd>] ? strndup_user+0x3f/0x59
         [52174.524053]  [<ffffffff81195c65>] SyS_mount+0x77/0x9f
         [52174.524053]  [<ffffffff814935d7>] entry_SYSCALL_64_fastpath+0x12/0x6b
         [52174.561288] ---[ end trace 6b53049efb1a3ea6 ]---
      
      Fix this by forcing a transaction commit when such cases happen.
      This means we check in the commit root of the subvolume tree if there
      was any other inode with the same reference when the inode we are
      fsync'ing is a new inode (created in the current transaction).
      
      Test cases for fstests, covering all the scenarios given above, were
      submitted upstream for fstests:
      
        * fstests: generic test for fsync after renaming directory
          https://patchwork.kernel.org/patch/8694281/
      
        * fstests: generic test for fsync after renaming file
          https://patchwork.kernel.org/patch/8694301/
      
        * fstests: add btrfs test for fsync after snapshot deletion
          https://patchwork.kernel.org/patch/8670671/
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NFilipe Manana <fdmanana@suse.com>
      Signed-off-by: NChris Mason <clm@fb.com>
      56f23fdb
    • C
      Merge branch 'misc-4.6' of... · 7f671526
      Chris Mason 提交于
      Merge branch 'misc-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6
      7f671526
    • D
      Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · fd8c61eb
      Dave Airlie 提交于
      Lots of misc bug fixes for radeon and amdgpu and one for ttm.
      - fix vram info fetching on Fiji and unposted boards
      - additional vblank fixes from the conversion to drm_vblank_on/off
      - UVD dGPU suspend and resume fixes
      - lots of powerplay fixes
      - fix a fence leak in the pageflip code
      - ttm fix for platforms where CPU is 32 bit, but physical addresses are >32bits
      
      * 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux: (21 commits)
        drm/amdgpu: total vram size also reduces pin size
        drm/amd/powerplay: add uvd/vce dpm enabling flag default.
        drm/amd/powerplay: fix issue that resume back, dpm can't work on FIJI.
        drm/amdgpu: save and restore the firwmware cache part when suspend resume
        drm/amdgpu: save and restore UVD context with suspend and resume
        drm/ttm: use phys_addr_t for ttm_bus_placement
        drm/radeon: Only call drm_vblank_on/off between drm_vblank_init/cleanup
        drm/amdgpu: fence wait old rcu slot
        drm/amdgpu: fix leaking fence in the pageflip code
        drm/amdgpu: print vram type rather than just DDR
        drm/amdgpu/gmc: use proper register for vram type on Fiji
        drm/amdgpu/gmc: move vram type fetching into sw_init
        drm/amdgpu: Set vblank_disable_allowed = true
        drm/radeon: Set vblank_disable_allowed = true
        drm/amd/powerplay: Need to change boot to performance state in resume.
        drm/amd/powerplay: add new Fiji function for not setting same ps.
        drm/amdgpu: check dpm state before pm system fs initialized.
        drm/amd/powerplay: notify amdgpu whether dpm is enabled or not.
        drm/amdgpu: Not support disable dpm in powerplay.
        drm/amdgpu: add an cgs interface to notify amdgpu the dpm state.
        ...
      fd8c61eb
    • D
      net: add the AF_KCM entries to family name tables · 0a1a37b6
      Dexuan Cui 提交于
      This is for the recent kcm driver, which introduces AF_KCM(41) in
      b7ac4eb(kcm: Kernel Connection Multiplexor module).
      Signed-off-by: NDexuan Cui <decui@microsoft.com>
      Cc: Signed-off-by: Tom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a1a37b6
    • J
      MAINTAINERS: intel-wired-lan list is moderated · eff471b1
      Jiri Benc 提交于
      I got the following message:
      
      > Your mail to 'Intel-wired-lan' with the subject
      >
      >     [PATCH net-next] net: intel: remove dead links
      >
      > Is being held until the list moderator can review it for approval.
      >
      > The reason it is being held:
      >
      >     Post by non-member to a members-only list
      
      Mark the list as moderated.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Acked-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eff471b1
    • N
      lib/test_bpf: Add additional BPF_ADD tests · 9c94f6c8
      Naveen N. Rao 提交于
      Some of these tests proved useful with the powerpc eBPF JIT port due to
      sign-extended 16-bit immediate loads. Though some of these aspects get
      covered in other tests, it is better to have explicit tests so as to
      quickly tag the precise problem.
      
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c94f6c8
    • N
      lib/test_bpf: Add test to check for result of 32-bit add that overflows · b64b50ea
      Naveen N. Rao 提交于
      BPF_ALU32 and BPF_ALU64 tests for adding two 32-bit values that results in
      32-bit overflow.
      
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b64b50ea
    • N
      lib/test_bpf: Add tests for unsigned BPF_JGT · c7395d6b
      Naveen N. Rao 提交于
      Unsigned Jump-if-Greater-Than.
      
      Cc: Alexei Starovoitov <ast@fb.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7395d6b