1. 23 3月, 2018 6 次提交
  2. 27 2月, 2018 5 次提交
  3. 15 2月, 2018 1 次提交
  4. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  5. 25 1月, 2018 2 次提交
  6. 22 1月, 2018 3 次提交
    • A
      ipmi_ssif: Remove duplicate NULL check · e45af3d3
      Andy Shevchenko 提交于
      Since i2c_unregister_device() became NULL-aware we may remove duplicate
      NULL check.
      
      Cc: Corey Minyard <minyard@acm.org>
      Cc: openipmi-developer@lists.sourceforge.net
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      e45af3d3
    • W
      ipmi/powernv: Fix error return code in ipmi_powernv_probe() · e749d328
      Wei Yongjun 提交于
      Fix to return a negative error code from the request_irq() error
      handling case instead of 0, as done elsewhere in this function.
      
      Fixes: dce143c3 ("ipmi/powernv: Convert to irq event interface")
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      e749d328
    • J
      ipmi: use dynamic memory for DMI driver override · 5516e21a
      John Garry 提交于
      Currently a crash can be seen if we reach the "err"
      label in dmi_add_platform_ipmi(), calling
      platform_device_put(), like here:
      [    7.270584]  (null): ipmi:dmi: Unable to add resources: -16
      [    7.330229] ------------[ cut here ]------------
      [    7.334889] kernel BUG at mm/slub.c:3894!
      [    7.338936] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      [    7.344475] Modules linked in:
      [    7.347556] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2-00004-gbe9cb7b-dirty #114
      [    7.355907] Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT17 Nemo 2.0 RC0 11/29/2017
      [    7.365137] task: 00000000c211f6d3 task.stack: 00000000f276e9af
      [    7.371116] pstate: 60000005 (nZCv daif -PAN -UAO)
      [    7.375957] pc : kfree+0x194/0x1b4
      [    7.379389] lr : platform_device_release+0xcc/0xd8
      [    7.384225] sp : ffff0000092dba90
      [    7.387567] x29: ffff0000092dba90 x28: ffff000008a83000
      [    7.392933] x27: ffff0000092dbc10 x26: 00000000000000e6
      [    7.398297] x25: 0000000000000003 x24: ffff0000085b51e8
      [    7.403662] x23: 0000000000000100 x22: ffff7e0000234cc0
      [    7.409027] x21: ffff000008af3660 x20: ffff8017d21acc10
      [    7.414392] x19: ffff8017d21acc00 x18: 0000000000000002
      [    7.419757] x17: 0000000000000001 x16: 0000000000000008
      [    7.425121] x15: 0000000000000001 x14: 6666666678303d65
      [    7.430486] x13: 6469727265766f5f x12: 7265766972642e76
      [    7.435850] x11: 6564703e2d617020 x10: 6530326435373638
      [    7.441215] x9 : 3030303030303030 x8 : 3d76656420657361
      [    7.446580] x7 : ffff000008f59df8 x6 : ffff8017fbe0ea50
      [    7.451945] x5 : 0000000000000000 x4 : 0000000000000000
      [    7.457309] x3 : ffffffffffffffff x2 : 0000000000000000
      [    7.462674] x1 : 0fffc00000000800 x0 : ffff7e0000234ce0
      [    7.468039] Process swapper/0 (pid: 1, stack limit = 0x00000000f276e9af)
      [    7.474809] Call trace:
      [    7.477272]  kfree+0x194/0x1b4
      [    7.480351]  platform_device_release+0xcc/0xd8
      [    7.484837]  device_release+0x34/0x90
      [    7.488531]  kobject_put+0x70/0xcc
      [    7.491961]  put_device+0x14/0x1c
      [    7.495304]  platform_device_put+0x14/0x1c
      [    7.499439]  dmi_add_platform_ipmi+0x348/0x3ac
      [    7.503923]  scan_for_dmi_ipmi+0xfc/0x10c
      [    7.507970]  do_one_initcall+0x38/0x124
      [    7.511840]  kernel_init_freeable+0x188/0x228
      [    7.516238]  kernel_init+0x10/0x100
      [    7.519756]  ret_from_fork+0x10/0x18
      [    7.523362] Code: f94002c0 37780080 f94012c0 37000040 (d4210000)
      [    7.529552] ---[ end trace 11750e4787deef9e ]---
      [    7.534228] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      [    7.534228]
      
      This is because when the device is released in
      platform_device_release(), we try to free
      pdev.driver_override. This is a const string, hence
      the crash.
      Fix by using dynamic memory for pdev->driver_override.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      [Removed the free of driver_override from ipmi_si_remove_by_dev().  The
       free is done in platform_device_release(), and would result in a double
       free, and ipmi_si_remove_by_dev() is called by non-platform devices.]
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Cc: <stable@vger.kernel.org> # 4.14+
      5516e21a
  7. 18 1月, 2018 4 次提交
  8. 17 1月, 2018 1 次提交
  9. 16 1月, 2018 1 次提交
    • M
      ipmi: Clear smi_info->thread to prevent use-after-free during module unload · bd1c06a4
      Masamitsu Yamazaki 提交于
      During code inspection, I found an use-after-free possibility during unloading
      ipmi_si in the polling mode.
      
      If start_new_msg() is called after kthread_stop(), the function will try to
      wake up non-existing kthread using the dangling pointer.
      
      Possible scenario is when a new internal message is generated after
      ipmi_unregister_smi()[*1] and remains after stop_timer_and_thread()
      in clenaup_one_si() [*2].
      Use-after-free could occur as follows depending on BMC replies.
      
        cleanup_one_si
          => ipmi_unregister_smi
             [*1]
          => stop_timer_and_thread
             => kthread_stop(smi_info->thread)
             [*2]
          => poll
             => smi_event_handler
                => start_new_msg
                   => if (smi_info->thread)
                          wake_up_process(smi_info->thread) <== use-after-free!!
      
      Although currently it seems no such message is generated in the polling mode,
      some changes might introduce that in thefuture. For example in the interrupt
      mode, disable_si_irq() does that at [*2].
      
      So let's prevent such a critical issue possibility now.
      Signed-off-by: NYamazaki Masamitsu <m-yamazaki@ah.jp.nec.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      bd1c06a4
  10. 12 1月, 2018 2 次提交
    • S
      agp: sworks: Deprecate pci_get_bus_and_slot() · 067ddab5
      Sinan Kaya 提交于
      pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
      where a PCI device is present. This restricts the device drivers to be
      reused for other domain numbers.
      
      Getting ready to remove pci_get_bus_and_slot() function in favor of
      pci_get_domain_bus_and_slot().
      
      Replace pci_get_bus_and_slot() with pci_get_domain_bus_and_slot()
      and extract the domain number from struct pci_dev.
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      067ddab5
    • S
      agp: nvidia: Deprecate pci_get_bus_and_slot() · 84f8cbf7
      Sinan Kaya 提交于
      pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as
      where a PCI device is present. This restricts the device drivers to be
      reused for other domain numbers.
      
      Getting ready to remove pci_get_bus_and_slot() function in favor of
      pci_get_domain_bus_and_slot().
      
      Replace pci_get_bus_and_slot() with pci_get_domain_bus_and_slot()
      and extract the domain number from struct pci_dev.
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <helgaas@kernel.org>
      84f8cbf7
  11. 10 1月, 2018 1 次提交
  12. 09 1月, 2018 2 次提交
  13. 08 1月, 2018 11 次提交