1. 12 12月, 2016 1 次提交
  2. 28 10月, 2016 7 次提交
  3. 17 10月, 2016 1 次提交
    • C
      s390/dasd: avoid undefined behaviour · 0f02c4e7
      Christian Borntraeger 提交于
      the mdc value can be quite big (like 65535), so we are in undefined
      territory when doing the multiplication with the (also signed)
      FCX_MAX_DATA_FACTOR as outlined by UBSAN:
      
      UBSAN: Undefined behaviour in drivers/s390/block/dasd_eckd.c:1678:14
      signed integer overflow:
      65535 * 65536 cannot be represented in type 'int'
      CPU: 5 PID: 183 Comm: kworker/u512:1 Not tainted 4.7.0+ #150
      Workqueue: events_unbound async_run_entry_fn
      000000fb8b59f900 000000fb8b59f990 0000000000000002 0000000000000000
      000000fb8b59fa30 000000fb8b59f9a8 000000fb8b59f9a8 000000000011732e
      00000000000000a4 0000000000a309e2 0000000000a4c072 000000000000000b
      000000fb8b59f9f0 000000fb8b59f990 0000000000000000 0000000000000000
      0400000000d83238 000000000011732e 000000fb8b59f990 000000fb8b59f9f0
      Call Trace:
      ([<0000000000117260>] show_trace+0x98/0xa8)
      ([<00000000001172e0>] show_stack+0x70/0xf0)
      ([<000000000053ac96>] dump_stack+0x86/0xb8)
      ([<000000000057f5f8>] ubsan_epilogue+0x28/0x70)
      ([<000000000057fe9e>] handle_overflow+0xde/0xf0)
      ([<00000000006c322a>] dasd_eckd_check_characteristics+0x50a/0x550)
      ([<00000000006b42ca>] dasd_generic_set_online+0xba/0x380)
      ([<0000000000693d82>] ccw_device_set_online+0x192/0x550)
      ([<00000000006ac1ae>] dasd_generic_auto_online+0x2e/0x70)
      ([<0000000000172130>] async_run_entry_fn+0x70/0x270)
      ([<0000000000165a72>] process_one_work+0x26a/0x638)
      ([<0000000000165e8a>] worker_thread+0x4a/0x658)
      ([<000000000016dd9c>] kthread+0x10c/0x110)
      ([<00000000008963ae>] kernel_thread_starter+0x6/0xc)
      ([<00000000008963a8>] kernel_thread_starter+0x0/0xc)
      
      As this is a runtime value there is actually no risk of any sane
      compiler to detect and (ab)use this undefinedness, but let's make
      the multiplication defined by making mdc unsigned.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0f02c4e7
  4. 28 9月, 2016 1 次提交
  5. 26 9月, 2016 3 次提交
  6. 20 9月, 2016 1 次提交
  7. 11 8月, 2016 1 次提交
    • S
      s390/dasd: fix failing CUIR assignment under LPAR · af775210
      Stefan Haberland 提交于
      On LPAR the read message buffer command should be executed on the path
      it was received on otherwise there is a chance that the CUIR assignment
      might be faulty and the wrong channel path is set online/offline.
      
      Fix by setting the path mask accordingly.
      On z/VM we might not be able to do I/O on this path but there it does
      not matter on which path the read message buffer command is executed.
      Therefor implement a retry with an open path mask.
      Signed-off-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      af775210
  8. 10 8月, 2016 1 次提交
  9. 21 7月, 2016 1 次提交
  10. 13 7月, 2016 1 次提交
    • D
      pmem: kill __pmem address space · 7a9eb206
      Dan Williams 提交于
      The __pmem address space was meant to annotate codepaths that touch
      persistent memory and need to coordinate a call to wmb_pmem().  Now that
      wmb_pmem() is gone, there is little need to keep this annotation.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7a9eb206
  11. 28 6月, 2016 1 次提交
    • D
      block: convert to device_add_disk() · 0d52c756
      Dan Williams 提交于
      For block drivers that specify a parent device, convert them to use
      device_add_disk().
      
      This conversion was done with the following semantic patch:
      
          @@
          struct gendisk *disk;
          expression E;
          @@
      
          - disk->driverfs_dev = E;
          ...
          - add_disk(disk);
          + device_add_disk(E, disk);
      
          @@
          struct gendisk *disk;
          expression E1, E2;
          @@
      
          - disk->driverfs_dev = E1;
          ...
          E2 = disk;
          ...
          - add_disk(E2);
          + device_add_disk(E1, E2);
      
      ...plus some manual fixups for a few missed conversions.
      
      Cc: Jens Axboe <axboe@fb.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0d52c756
  12. 13 6月, 2016 1 次提交
    • M
      s390/time: LPAR offset handling · 40277891
      Martin Schwidefsky 提交于
      It is possible to specify a user offset for the TOD clock, e.g. +2 hours.
      The TOD clock will carry this offset even if the clock is synchronized
      with STP. This makes the time stamps acquired with get_sync_clock()
      useless as another LPAR migth use a different TOD offset.
      
      Use the PTFF instrution to get the TOD epoch difference and subtract
      it from the TOD clock value to get a physical timestamp. As the epoch
      difference contains the sync check delta as well the LPAR offset value
      to the physical clock needs to be refreshed after each clock
      synchronization.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      40277891
  13. 19 5月, 2016 1 次提交
  14. 16 4月, 2016 3 次提交
  15. 01 4月, 2016 1 次提交
  16. 17 3月, 2016 1 次提交
    • S
      s390/dasd: reorder lcu and device lock · 59a9ed5f
      Stefan Haberland 提交于
      Reorder lcu and device lock to get rid of the error-prone trylock
      mechanism.
      
      The locking order is lcu lock -> device lock.
      This protects against changes to the lcu device lists and enables us
      to iterate over the devices, take the cdev lock and make changes to
      the device structures.
      
      The complicated part is the summary unit check handler that gets an
      interrupt on one device of the lcu that leads to structural changes of
      the whole lcu itself. This work needs to be done even if devices on
      the lcu disappear. So a device independent worker is used.
      The old approach tried to update some lcu structures and set up the
      lcu worker in the interrupt context with the device lock held.
      But this forced the lock order "cdev lock -> lcu lock" that made it
      hard to have the lcu lock held and iterate over all devices and change
      them.
      
      The new approach is to schedule a device specific worker that gets
      out of the interrupt context and rid of the device lock for summary
      unit checks. This worker is able to take the lcu lock and schedule the
      lcu worker that updates all devices. The time between interrupt and
      worker execution is no problem because the devices in the lcu reject
      all I/O in this time with an appropriate error. The dasd driver can
      deal with this situation and re-drive the I/O later on.
      Signed-off-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      59a9ed5f
  17. 07 3月, 2016 5 次提交
  18. 02 3月, 2016 1 次提交
  19. 23 2月, 2016 1 次提交
  20. 17 2月, 2016 1 次提交
  21. 11 2月, 2016 2 次提交
  22. 16 1月, 2016 1 次提交
    • D
      mm, dax, pmem: introduce pfn_t · 34c0fd54
      Dan Williams 提交于
      For the purpose of communicating the optional presence of a 'struct
      page' for the pfn returned from ->direct_access(), introduce a type that
      encapsulates a page-frame-number plus flags.  These flags contain the
      historical "page_link" encoding for a scatterlist entry, but can also
      denote "device memory".  Where "device memory" is a set of pfns that are
      not part of the kernel's linear mapping by default, but are accessed via
      the same memory controller as ram.
      
      The motivation for this new type is large capacity persistent memory
      that needs struct page entries in the 'memmap' to support 3rd party DMA
      (i.e.  O_DIRECT I/O with a persistent memory source/target).  However,
      we also need it in support of maintaining a list of mapped inodes which
      need to be unmapped at driver teardown or freeze_bdev() time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Hansen <dave@sr71.net>
      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>
      34c0fd54
  23. 30 12月, 2015 1 次提交
  24. 08 11月, 2015 1 次提交
  25. 03 11月, 2015 1 次提交