1. 22 2月, 2017 2 次提交
  2. 20 2月, 2017 6 次提交
  3. 19 2月, 2017 1 次提交
  4. 18 2月, 2017 5 次提交
    • J
      PM / QoS: Fix memory leak on resume_latency.notifiers · e84b4a84
      John Keeping 提交于
      Since commit 2d984ad1 (PM / QoS: Introcuce latency tolerance device
      PM QoS type) we reassign "c" to point at qos->latency_tolerance before
      freeing c->notifiers, but the notifiers field of latency_tolerance is
      never used.
      
      Restore the original behaviour of freeing the notifiers pointer on
      qos->resume_latency, which is used, and fix the following kmemleak
      warning.
      
      unreferenced object 0xed9dba00 (size 64):
        comm "kworker/0:1", pid 36, jiffies 4294670128 (age 15202.983s)
        hex dump (first 32 bytes):
          00 00 00 00 04 ba 9d ed 04 ba 9d ed 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<c06f6084>] kmemleak_alloc+0x74/0xb8
          [<c011c964>] kmem_cache_alloc_trace+0x170/0x25c
          [<c035f448>] dev_pm_qos_constraints_allocate+0x3c/0xe4
          [<c035f574>] __dev_pm_qos_add_request+0x84/0x1a0
          [<c035f6cc>] dev_pm_qos_add_request+0x3c/0x54
          [<c03c3fc4>] usb_hub_create_port_device+0x110/0x2b8
          [<c03b2a60>] hub_probe+0xadc/0xc80
          [<c03bb050>] usb_probe_interface+0x1b4/0x260
          [<c035773c>] driver_probe_device+0x198/0x40c
          [<c0357b14>] __device_attach_driver+0x8c/0x98
          [<c0355bbc>] bus_for_each_drv+0x8c/0x9c
          [<c0357494>] __device_attach+0x98/0x138
          [<c0357c64>] device_initial_probe+0x14/0x18
          [<c03569dc>] bus_probe_device+0x30/0x88
          [<c0354c54>] device_add+0x430/0x554
          [<c03b92d8>] usb_set_configuration+0x660/0x6fc
      
      Fixes: 2d984ad1 (PM / QoS: Introcuce latency tolerance device PM QoS type)
      Signed-off-by: NJohn Keeping <john@metanate.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e84b4a84
    • P
      vxlan: fix oops in dev_fill_metadata_dst · 22f0708a
      Paolo Abeni 提交于
      Since the commit 0c1d70af ("net: use dst_cache for vxlan device")
      vxlan_fill_metadata_dst() calls vxlan_get_route() passing a NULL
      dst_cache pointer, so the latter should explicitly check for
      valid dst_cache ptr. Unfortunately the commit d71785ff ("net: add
      dst_cache to ovs vxlan lwtunnel") removed said check.
      
      As a result is possible to trigger a null pointer access calling
      vxlan_fill_metadata_dst(), e.g. with:
      
      ovs-vsctl add-br ovs-br0
      ovs-vsctl add-port ovs-br0 vxlan0 -- set interface vxlan0 \
      	type=vxlan options:remote_ip=192.168.1.1 \
      	options:key=1234 options:dst_port=4789 ofport_request=10
      ip address add dev ovs-br0 172.16.1.2/24
      ovs-vsctl set Bridge ovs-br0 ipfix=@i -- --id=@i create IPFIX \
      	targets=\"172.16.1.1:1234\" sampling=1
      iperf -c 172.16.1.1 -u -l 1000 -b 10M -t 1 -p 1234
      
      This commit addresses the issue passing to vxlan_get_route() the
      dst_cache already available into the lwt info processed by
      vxlan_fill_metadata_dst().
      
      Fixes: d71785ff ("net: add dst_cache to ovs vxlan lwtunnel")
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22f0708a
    • S
      nvme: Check for Security send/recv support before issuing commands. · 8a9ae523
      Scott Bauer 提交于
      We need to verify that the controller supports the security
      commands before actually trying to issue them.
      Signed-off-by: NScott Bauer <scott.bauer@intel.com>
      [hch: moved the check so that we don't call into the OPAL code if not
            supported]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      8a9ae523
    • C
      block/sed-opal: allocate struct opal_dev dynamically · 4f1244c8
      Christoph Hellwig 提交于
      Insted of bloating the containing structure with it all the time this
      allocates struct opal_dev dynamically.  Additionally this allows moving
      the definition of struct opal_dev into sed-opal.c.  For this a new
      private data field is added to it that is passed to the send/receive
      callback.  After that a lot of internals can be made private as well.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Tested-by: NScott Bauer <scott.bauer@intel.com>
      Reviewed-by: NScott Bauer <scott.bauer@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      4f1244c8
    • D
      dpaa_eth: small leak on error · 785f3577
      Dan Carpenter 提交于
      This should be >= instead of > here.  It means that we don't increment
      the free count enough so it becomes off by one.
      
      Fixes: 9ad1a374 ("dpaa_eth: add support for DPAA Ethernet")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      785f3577
  5. 17 2月, 2017 11 次提交
  6. 16 2月, 2017 10 次提交
  7. 15 2月, 2017 5 次提交
    • Y
      PCI/PME: Restore pcie_pme_driver.remove · afe3e4d1
      Yinghai Lu 提交于
      In addition to making PME non-modular, d7def204 ("PCI/PME: Make
      explicitly non-modular") removed the pcie_pme_driver .remove() method,
      pcie_pme_remove().
      
      pcie_pme_remove() freed the PME IRQ that was requested in pci_pme_probe().
      The fact that we don't free the IRQ after d7def204 causes the following
      crash when removing a PCIe port device via /sys:
      
        ------------[ cut here ]------------
        kernel BUG at drivers/pci/msi.c:370!
        invalid opcode: 0000 [#1] SMP
        Modules linked in:
        CPU: 1 PID: 14509 Comm: sh Tainted: G    W  4.8.0-rc1-yh-00012-gd29438d6
        RIP: 0010:[<ffffffff9758bbf5>]  free_msi_irqs+0x65/0x190
        ...
        Call Trace:
         [<ffffffff9758cda4>] pci_disable_msi+0x34/0x40
         [<ffffffff97583817>] cleanup_service_irqs+0x27/0x30
         [<ffffffff97583e9a>] pcie_port_device_remove+0x2a/0x40
         [<ffffffff97584250>] pcie_portdrv_remove+0x40/0x50
         [<ffffffff97576d7b>] pci_device_remove+0x4b/0xc0
         [<ffffffff9785ebe6>] __device_release_driver+0xb6/0x150
         [<ffffffff9785eca5>] device_release_driver+0x25/0x40
         [<ffffffff975702e4>] pci_stop_bus_device+0x74/0xa0
         [<ffffffff975704ea>] pci_stop_and_remove_bus_device_locked+0x1a/0x30
         [<ffffffff97578810>] remove_store+0x50/0x70
         [<ffffffff9785a378>] dev_attr_store+0x18/0x30
         [<ffffffff97260b64>] sysfs_kf_write+0x44/0x60
         [<ffffffff9725feae>] kernfs_fop_write+0x10e/0x190
         [<ffffffff971e13f8>] __vfs_write+0x28/0x110
         [<ffffffff970b0fa4>] ? percpu_down_read+0x44/0x80
         [<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
         [<ffffffff971e53a7>] ? __sb_start_write+0xa7/0xe0
         [<ffffffff971e1f04>] vfs_write+0xc4/0x180
         [<ffffffff971e3089>] SyS_write+0x49/0xa0
         [<ffffffff97001a46>] do_syscall_64+0xa6/0x1b0
         [<ffffffff9819201e>] entry_SYSCALL64_slow_path+0x25/0x25
        ...
         RIP  [<ffffffff9758bbf5>] free_msi_irqs+0x65/0x190
         RSP <ffff89ad3085bc48>
        ---[ end trace f4505e1dac5b95d3 ]---
        Segmentation fault
      
      Restore pcie_pme_remove().
      
      [bhelgaas: changelog]
      Fixes: d7def204 ("PCI/PME: Make explicitly non-modular")
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      CC: stable@vger.kernel.org	# v4.9+
      afe3e4d1
    • M
      lightnvm: set default lun range when no luns are specified · 6732c740
      Matias Bjørling 提交于
      The create target ioctl takes a lun begin and lun end parameter, which
      defines the range of luns to initialize a target with. If the user does
      not set the parameters, it default to only using lun 0. Instead,
      defaults to use all luns in the OCSSD, as it is the usual behaviour
      users want.
      Signed-off-by: NMatias Bjørling <matias@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      6732c740
    • M
      lightnvm: fix off-by-one error on target initialization · 0e5ffd1c
      Matias Bjørling 提交于
      If one specifies the end lun id to be the absolute number of luns,
      without taking zero indexing into account, the lightnvm core will pass
      the off-by-one end lun id to target creation, which then panics during
      nvm_ioctl_dev_create.
      Signed-off-by: NMatias Bjørling <matias@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      0e5ffd1c
    • P
      drm/dp/mst: fix kernel oops when turning off secondary monitor · bb08c04d
      Pierre-Louis Bossart 提交于
      100% reproducible issue found on SKL SkullCanyon NUC with two external
      DP daisy-chained monitors in DP/MST mode. When turning off or changing
      the input of the second monitor the machine stops with a kernel
      oops. This issue happened with 4.8.8 as well as drm/drm-intel-nightly.
      
      This issue is traced to an inconsistent control flow in
      drm_dp_update_payload_part1(): the 'port' pointer is set to NULL at the
      same time as 'req_payload.num_slots' is set to zero, but the pointer is
      dereferenced even when req_payload.num_slot is zero.
      
      The problematic dereference was introduced in commit dfda0df3
      ("drm/mst: rework payload table allocation to conform better") and may
      impact all versions since v3.18
      
      The fix suggested by Chris Wilson removes the kernel oops and was found to
      work well after 10mn of monkey-testing with the second monitor power and
      input buttons
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98990
      Fixes: dfda0df3 ("drm/mst: rework payload table allocation to conform better.")
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Nathan D Ciobanu <nathan.d.ciobanu@linux.intel.com>
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: <stable@vger.kernel.org> # v3.18+
      Tested-by: NNathan D Ciobanu <nathan.d.ciobanu@linux.intel.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1487076561-2169-1-git-send-email-jani.nikula@intel.com
      bb08c04d
    • S
      Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN · e225c20e
      Scott Bauer 提交于
      When CONFIG_KASAN is enabled, compilation fails:
      
      block/sed-opal.c: In function 'sed_ioctl':
      block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
      
      Moved all the ioctl structures off the stack and dynamically allocate
      using _IOC_SIZE()
      
      Fixes: 455a7b23 ("block: Add Sed-opal library")
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NScott Bauer <scott.bauer@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e225c20e