1. 23 6月, 2017 1 次提交
  2. 09 6月, 2017 1 次提交
    • V
      cxl: Avoid double free_irq() for psl,slice interrupts · ed45509b
      Vaibhav Jain 提交于
      During an eeh call to cxl_remove can result in double free_irq of
      psl,slice interrupts. This can happen if perst_reloads_same_image == 1
      and call to cxl_configure_adapter() fails during slot_reset
      callback. In such a case we see a kernel oops with following back-trace:
      
      Oops: Kernel access of bad area, sig: 11 [#1]
      Call Trace:
        free_irq+0x88/0xd0 (unreliable)
        cxl_unmap_irq+0x20/0x40 [cxl]
        cxl_native_release_psl_irq+0x78/0xd8 [cxl]
        pci_deconfigure_afu+0xac/0x110 [cxl]
        cxl_remove+0x104/0x210 [cxl]
        pci_device_remove+0x6c/0x110
        device_release_driver_internal+0x204/0x2e0
        pci_stop_bus_device+0xa0/0xd0
        pci_stop_and_remove_bus_device+0x28/0x40
        pci_hp_remove_devices+0xb0/0x150
        pci_hp_remove_devices+0x68/0x150
        eeh_handle_normal_event+0x140/0x580
        eeh_handle_event+0x174/0x360
        eeh_event_handler+0x1e8/0x1f0
      
      This patch fixes the issue of double free_irq by checking that
      variables that hold the virqs (err_hwirq, serr_hwirq, psl_virq) are
      not '0' before un-mapping and resetting these variables to '0' when
      they are un-mapped.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed45509b
  3. 08 6月, 2017 1 次提交
  4. 06 6月, 2017 1 次提交
    • V
      cxl: Avoid double free_irq() for psl,slice interrupts · b3aa20ba
      Vaibhav Jain 提交于
      During an eeh call to cxl_remove can result in double free_irq of
      psl,slice interrupts. This can happen if perst_reloads_same_image == 1
      and call to cxl_configure_adapter() fails during slot_reset
      callback. In such a case we see a kernel oops with following back-trace:
      
      Oops: Kernel access of bad area, sig: 11 [#1]
      Call Trace:
        free_irq+0x88/0xd0 (unreliable)
        cxl_unmap_irq+0x20/0x40 [cxl]
        cxl_native_release_psl_irq+0x78/0xd8 [cxl]
        pci_deconfigure_afu+0xac/0x110 [cxl]
        cxl_remove+0x104/0x210 [cxl]
        pci_device_remove+0x6c/0x110
        device_release_driver_internal+0x204/0x2e0
        pci_stop_bus_device+0xa0/0xd0
        pci_stop_and_remove_bus_device+0x28/0x40
        pci_hp_remove_devices+0xb0/0x150
        pci_hp_remove_devices+0x68/0x150
        eeh_handle_normal_event+0x140/0x580
        eeh_handle_event+0x174/0x360
        eeh_event_handler+0x1e8/0x1f0
      
      This patch fixes the issue of double free_irq by checking that
      variables that hold the virqs (err_hwirq, serr_hwirq, psl_virq) are
      not '0' before un-mapping and resetting these variables to '0' when
      they are un-mapped.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Reviewed-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Acked-by: NFrederic Barrat <fbarrat@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b3aa20ba
  5. 03 6月, 2017 1 次提交
    • P
      mei: make sysfs modalias format similar as uevent modalias · 6f9193ec
      Pratyush Anand 提交于
      modprobe is not able to resolve sysfs modalias for mei devices.
      
       # cat
      /sys/class/watchdog/watchdog0/device/watchdog/watchdog0/device/modalias
      mei::05b79a6f-4628-4d7f-899d-a91514cb32ab:
       # modprobe --set-version 4.9.6-200.fc25.x86_64 -R
      mei::05b79a6f-4628-4d7f-899d-a91514cb32ab:
      modprobe: FATAL: Module mei::05b79a6f-4628-4d7f-899d-a91514cb32ab: not
      found in directory /lib/modules/4.9.6-200.fc25.x86_64
       # cat /lib/modules/4.9.6-200.fc25.x86_64/modules.alias | grep
      05b79a6f-4628-4d7f-899d-a91514cb32ab
      alias mei:*:05b79a6f-4628-4d7f-899d-a91514cb32ab:*:* mei_wdt
      
      commit b26864ca ("mei: bus: add client protocol
      version to the device alias"), however sysfs modalias
      is still in formmat mei:S:uuid:*.
      
      This patch equates format of uevent and sysfs modalias so that modprobe
      is able to resolve the aliases.
      
      Cc: <stable@vger.kernel.org> 4.7+
      Fixes: commit b26864ca ("mei: bus: add client protocol version to the device alias")
      Signed-off-by: NPratyush Anand <panand@redhat.com>
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6f9193ec
  6. 29 5月, 2017 1 次提交
  7. 17 5月, 2017 1 次提交
    • T
      misc: pci_endpoint_test: select CRC32 · a20cfc1c
      Tobias Regnery 提交于
      There is the following link error with CONFIG_PCI_ENDPOINT_TEST=y and
      CONFIG_CRC32=m:
      
      drivers/built-in.o: In function 'pci_endpoint_test_ioctl':
      pci_endpoint_test.c:(.text+0xf1251): undefined reference to 'crc32_le'
      pci_endpoint_test.c:(.text+0xf1322): undefined reference to 'crc32_le'
      pci_endpoint_test.c:(.text+0xf13b2): undefined reference to 'crc32_le'
      pci_endpoint_test.c:(.text+0xf141e): undefined reference to 'crc32_le'
      
      Fix this by selecting CRC32 in the PCI_ENDPOINT_TEST kconfig entry.
      
      Fixes: 2c156ac7 ("misc: Add host side PCI driver for PCI test function device")
      Signed-off-by: NTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a20cfc1c
  8. 09 5月, 2017 3 次提交
  9. 03 5月, 2017 1 次提交
  10. 02 5月, 2017 3 次提交
  11. 28 4月, 2017 1 次提交
  12. 20 4月, 2017 1 次提交
    • D
      Annotate hardware config module parameters in drivers/misc/ · 4f1927dc
      David Howells 提交于
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in drivers/misc/.
      Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Arnd Bergmann <arnd@arndb.de>
      4f1927dc
  13. 19 4月, 2017 2 次提交
  14. 13 4月, 2017 7 次提交
  15. 09 4月, 2017 3 次提交
  16. 08 4月, 2017 10 次提交
  17. 07 4月, 2017 1 次提交
    • M
      scsi: ses: don't get power status of SES device slot on probe · 75106523
      Mauricio Faria de Oliveira 提交于
      The commit 08024885 ("ses: Add power_status to SES device slot")
      introduced the 'power_status' attribute to enclosure components and
      the associated callbacks.
      
      There are 2 callbacks available to get the power status of a device:
      1) ses_get_power_status() for 'struct enclosure_component_callbacks'
      2) get_component_power_status() for the sysfs device attribute
      (these are available for kernel-space and user-space, respectively.)
      
      However, despite both methods being available to get power status
      on demand, that commit also introduced a call to get power status
      in ses_enclosure_data_process().
      
      This dramatically increased the total probe time for SCSI devices
      on larger configurations, because ses_enclosure_data_process() is
      called several times during the SCSI devices probe and loops over
      the component devices (but that is another problem, another patch).
      
      That results in a tremendous continuous hammering of SCSI Receive
      Diagnostics commands to the enclosure-services device, which does
      delay the total probe time for the SCSI devices __significantly__:
      
        Originally, ~34 minutes on a system attached to ~170 disks:
      
          [ 9214.490703] mpt3sas version 13.100.00.00 loaded
          ...
          [11256.580231] scsi 17:0:177:0: qdepth(16), tagged(1), simple(0),
                         ordered(0), scsi_level(6), cmd_que(1)
      
        With this patch, it decreased to ~2.5 minutes -- a 13.6x faster
      
          [ 1002.992533] mpt3sas version 13.100.00.00 loaded
          ...
          [ 1151.978831] scsi 11:0:177:0: qdepth(16), tagged(1), simple(0),
                         ordered(0), scsi_level(6), cmd_que(1)
      
      Back to the commit discussion.. on the ses_get_power_status() call
      introduced in ses_enclosure_data_process(): impact of removing it.
      
      That may possibly be in place to initialize the power status value
      on device probe.  However, those 2 functions available to retrieve
      that value _do_ automatically refresh/update it.  So the potential
      benefit would be a direct access of the 'power_status' field which
      does not use the callbacks...
      
      But the only reader of 'struct enclosure_component::power_status'
      is the get_component_power_status() callback for sysfs attribute,
      and it _does_ check for and call the .get_power_status callback,
      (which indeed is defined and implemented by that commit), so the
      power status value is, again, automatically updated.
      
      So, the remaining potential for a direct/non-callback access to
      the power_status attribute would be out-of-tree modules -- well,
      for those, if they are for whatever reason interested in values
      that are set during device probe and not up-to-date by the time
      they need it.. well, that would be curious.
      
      Well, to handle that more properly, set the initial power state
      value to '-1' (i.e., uninitialized) instead of '1' (power 'on'),
      and check for it in that callback which may do an direct access
      to the field value _if_ a callback function is not defined.
      Signed-off-by: NMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
      Fixes: 08024885 ("ses: Add power_status to SES device slot")
      Reviewed-by: NDan Williams <dan.j.williams@intel.com>
      Reviewed-by: NSong Liu <songliubraving@fb.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      75106523
  18. 24 3月, 2017 1 次提交