1. 16 12月, 2016 22 次提交
  2. 15 12月, 2016 18 次提交
    • M
      vsock/virtio: fix src/dst cid format · f83f12d6
      Michael S. Tsirkin 提交于
      These fields are 64 bit, using le32_to_cpu and friends
      on these will not do the right thing.
      Fix this up.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f83f12d6
    • M
      vsock/virtio: mark an internal function static · 819483d8
      Michael S. Tsirkin 提交于
      virtio_transport_alloc_pkt is only used locally, make it static.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      819483d8
    • M
      vsock/virtio: add a missing __le annotation · 6c7efafd
      Michael S. Tsirkin 提交于
      guest cid is read from config space, therefore it's in little endian
      format and is treated as such, annotate it accordingly.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      6c7efafd
    • M
      vhost: add missing __user annotations · 72952cc0
      Michael S. Tsirkin 提交于
      Several vhost functions were missing __user annotations
      on pointers, causing sparse warnings. Fix this up.
      
      sparse also warns about vhost_process_iotlb_msg which
      is local and should be static. Fix that up as well.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      72952cc0
    • M
      vhost: make interval tree static inline · 2f952c01
      Michael S. Tsirkin 提交于
      vhost_umem_interval_tree is only used locally within vhost.c, mark it
      static. As some functions generated go unused, this triggers warnings
      unless we also mark it inline.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2f952c01
    • M
      drm/virtio: annotate virtio_gpu_queue_ctrl_buffer_locked · 3373755a
      Michael S. Tsirkin 提交于
      virtio_gpu_queue_ctrl_buffer_locked is called with ctrlq.qlock taken, it
      releases and acquires this lock.  This causes a sparse warning.  Add
      appropriate annotations for sparse context checking.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      3373755a
    • M
      drm/virtio: fix lock context imbalance · f862e60f
      Michael S. Tsirkin 提交于
      When virtio_gpu_free_vbufs exits due to list empty, it does not
      drop the free_vbufs lock that it took.
      list empty is not expected to happen anyway, but it can't hurt to fix
      this and drop the lock.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f862e60f
    • M
      drm/virtio: fix endianness in primary_plane_update · 8854a56f
      Michael S. Tsirkin 提交于
      virtio_gpu_cmd_transfer_to_host_2d expects x and y
      parameters in LE, but virtio_gpu_primary_plane_update
      passes in the CPU format instead.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      8854a56f
    • M
      virtio_console: drop unused config fields · 7328fa64
      Michael S. Tsirkin 提交于
      struct ports_device includes a config field including the whole
      virtio_console_config, but only max_nr_ports in there is ever updated or
      used. The rest is unused and in fact does not even mirror the
      device config. Drop everything except max_nr_ports,
      saving some memory.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NJason Wang <jasowang@redhat.com>
      7328fa64
    • G
      virtio_ring: fix complaint by sparse · c60923cb
      Gonglei 提交于
       # make C=2 CF="-D__CHECK_ENDIAN__" ./drivers/virtio/
      
      drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
      drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
      drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
      drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
      drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
      drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
      drivers/virtio/virtio_ring.c:423:19: warning: incorrect type in assignment (different base types)
      drivers/virtio/virtio_ring.c:423:19:    expected unsigned int [unsigned] [assigned] i
      drivers/virtio/virtio_ring.c:423:19:    got restricted __virtio16 [usertype] next
      drivers/virtio/virtio_ring.c:604:39: warning: incorrect type in initializer (different base types)
      drivers/virtio/virtio_ring.c:604:39:    expected unsigned short [unsigned] [usertype] nextflag
      drivers/virtio/virtio_ring.c:604:39:    got restricted __virtio16
      drivers/virtio/virtio_ring.c:612:33: warning: restricted __virtio16 degrades to integer
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c60923cb
    • G
      virtio_pci_modern: fix complaint by sparse · 61bd405f
      Gonglei 提交于
      drivers/virtio/virtio_pci_modern.c:66:40: warning: incorrect type in argument 2 (different base types)
      drivers/virtio/virtio_pci_modern.c:66:40:    expected unsigned int [noderef] [usertype] <asn:2>*addr
      drivers/virtio/virtio_pci_modern.c:66:40:    got restricted __le32 [noderef] [usertype] <asn:2>*lo
      drivers/virtio/virtio_pci_modern.c:67:33: warning: incorrect type in argument 2 (different base types)
      drivers/virtio/virtio_pci_modern.c:67:33:    expected unsigned int [noderef] [usertype] <asn:2>*addr
      drivers/virtio/virtio_pci_modern.c:67:33:    got restricted __le32 [noderef] [usertype] <asn:2>*hi
      drivers/virtio/virtio_pci_modern.c:150:32: warning: incorrect type in argument 2 (different base types)
      drivers/virtio/virtio_pci_modern.c:150:32:    expected unsigned int [noderef] [usertype] <asn:2>*addr
      drivers/virtio/virtio_pci_modern.c:150:32:    got restricted __le32 [noderef] <asn:2>*<noident>
      drivers/virtio/virtio_pci_modern.c:151:39: warning: incorrect type in argument 1 (different base types)
      drivers/virtio/virtio_pci_modern.c:151:39:    expected unsigned int [noderef] [usertype] <asn:2>*addr
      drivers/virtio/virtio_pci_modern.c:151:39:    got restricted __le32 [noderef] <asn:2>*<noident>
      drivers/virtio/virtio_pci_modern.c:152:32: warning: incorrect type in argument 2 (different base types)
      drivers/virtio/virtio_pci_modern.c:152:32:    expected unsigned int [noderef] [usertype] <asn:2>*addr
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      61bd405f
    • L
      Merge branch 'akpm' (patches from Andrew) · a57cb1c1
      Linus Torvalds 提交于
      Merge more updates from Andrew Morton:
      
       - a few misc things
      
       - kexec updates
      
       - DMA-mapping updates to better support networking DMA operations
      
       - IPC updates
      
       - various MM changes to improve DAX fault handling
      
       - lots of radix-tree changes, mainly to the test suite. All leading up
         to reimplementing the IDA/IDR code to be a wrapper layer over the
         radix-tree. However the final trigger-pulling patch is held off for
         4.11.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits)
        radix tree test suite: delete unused rcupdate.c
        radix tree test suite: add new tag check
        radix-tree: ensure counts are initialised
        radix tree test suite: cache recently freed objects
        radix tree test suite: add some more functionality
        idr: reduce the number of bits per level from 8 to 6
        rxrpc: abstract away knowledge of IDR internals
        tpm: use idr_find(), not idr_find_slowpath()
        idr: add ida_is_empty
        radix tree test suite: check multiorder iteration
        radix-tree: fix replacement for multiorder entries
        radix-tree: add radix_tree_split_preload()
        radix-tree: add radix_tree_split
        radix-tree: add radix_tree_join
        radix-tree: delete radix_tree_range_tag_if_tagged()
        radix-tree: delete radix_tree_locate_item()
        radix-tree: improve multiorder iterators
        btrfs: fix race in btrfs_free_dummy_fs_info()
        radix-tree: improve dump output
        radix-tree: make radix_tree_find_next_bit more useful
        ...
      a57cb1c1
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · cf1b3341
      Linus Torvalds 提交于
      Pull block IO fixes from Jens Axboe:
       "A few fixes that I collected as post-merge.
      
        I was going to wait a bit with sending this out, but the O_DIRECT fix
        should really go in sooner rather than later"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: Fix failed allocation path when mapping queues
        blk-mq: Avoid memory reclaim when remapping queues
        block_dev: don't update file access position for sync direct IO
        nvme/pci: Log PCI_STATUS when the controller dies
        block_dev: don't test bdev->bd_contains when it is not stable
      cf1b3341
    • L
      Merge branch 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block · 80eabba7
      Linus Torvalds 提交于
      Pull fs meta data unmap optimization from Jens Axboe:
       "A series from Jan Kara, providing a more efficient way for unmapping
        meta data from in the buffer cache than doing it block-by-block.
      
        Provide a general helper that existing callers can use"
      
      * 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block:
        fs: Remove unmap_underlying_metadata
        fs: Add helper to clean bdev aliases under a bh and use it
        ext2: Use clean_bdev_aliases() instead of iteration
        ext4: Use clean_bdev_aliases() instead of iteration
        direct-io: Use clean_bdev_aliases() instead of handmade iteration
        fs: Provide function to unmap metadata for a range of blocks
      80eabba7
    • L
      docs: add back 'Documentation/Changes' file (as symlink) · 852d21ae
      Linus Torvalds 提交于
      Jaegeuk Kim reports that the debian kernel package build gets confused
      by the lack of Documentation/Changes file.  We also refer to that path
      name in ver_linux and various how-to files and Kconfig files.
      
      The file got renamed away in commit 186128f7 ("docs-rst: add
      documents to development-process"), and as Jaegeuk Kim points out, the
      commit message for that change says "use symlinks instead of renames",
      but then the commit itself actually does renames after all.
      
      Maybe we should do the other files too, but for now this just adds the
      minimal symlink back to the historical name, so that people looking for
      Documentation/Changes will actually find what they are looking for, and
      the debian scripts continue to work.
      Reported-by: NJaegeuk Kim <jaegeuk@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      852d21ae
    • M
      radix tree test suite: delete unused rcupdate.c · e1e14ab8
      Matthew Wilcox 提交于
      This file was used to implement call_rcu() before liburcu implemented
      that function.  It hasn't even been compiled since before the test suite
      was added to the kernel.  Remove it to reduce confusion.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-5-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1e14ab8
    • M
      radix tree test suite: add new tag check · 092bc0b2
      Matthew Wilcox 提交于
      We have a check that setting a tag on a single entry at root succeeds,
      but we were missing a check that clearing a tag on that same entry also
      succeeds.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-4-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      092bc0b2
    • M
      radix-tree: ensure counts are initialised · e8de4340
      Matthew Wilcox 提交于
      radix_tree_join() was freeing nodes with a non-zero ->exceptional count,
      and radix_tree_split() wasn't zeroing ->exceptional when it allocated
      the new node.  Fix this by making all callers of radix_tree_node_alloc()
      pass in the new counts (and some other always-initialised fields), which
      will prevent the problem recurring if in future we decide to do
      something similar.
      
      Link: http://lkml.kernel.org/r/1481667692-14500-3-git-send-email-mawilcox@linuxonhyperv.comSigned-off-by: NMatthew Wilcox <mawilcox@microsoft.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8de4340