1. 12 1月, 2017 1 次提交
  2. 19 12月, 2016 1 次提交
  3. 14 12月, 2016 3 次提交
    • L
      Revert "nvme: add support for the Write Zeroes command" · cdb98c26
      Linus Torvalds 提交于
      This reverts commit 6d31e3ba.
      
      This causes bootup problems for me both on my laptop and my desktop.
      What they have in common is that they have NVMe disks with dm-crypt, but
      it's not the same controller, so it's not controller-specific.
      
      Jens does not see it on his machine (also NVMe), so it's presumably
      something that triggers just on bootup.  Possibly related to dm-crypt
      and the fact that I mark my luks volume with "allow-discards" in
      /etc/crypttab.
      
      It's 100% repeatable for me, which made it fairly straightforward to
      bisect the problem to this commit. Small mercies.
      
      So we don't know what the reason is yet, but the revert is needed to get
      things going again.
      Acked-by: NJens Axboe <axboe@fb.com>
      Cc: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cdb98c26
    • A
      ata: avoid probing NCQ Prio Support if not explicitly requested · 9f56eca3
      Adam Manzanares 提交于
      Previously, when the ata device was being initialized we were
      probing for NCQ prio support by checking the identify information
      and also checking the log page that holds information about ncq prio
      support.
      
      This caused an error on an Intel HBA so the code is now updated to
      only probe for NCQ prio support when the sysfs variable controlling
      NCQ prio support is enabled.
      
      tj: Update formatting, switch to spin_[un]lock_irq() and update
          locking a bit, use REVALIDATE instead of RESET, and return -EIO
          instead of -EINVAL on config failure.
      Signed-off-by: NAdam Manzanares <adam.manzanares@wdc.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      9f56eca3
    • M
      dm flakey: introduce "error_writes" feature · ef548c55
      Mike Snitzer 提交于
      Recent dm-flakey fixes, to have reads error out during the "down"
      interval, made it so that the previous read behaviour is no longer
      available.
      
      It is useful to have reads complete like normal but have writes error
      out, so make it possible again with a new "error_writes" feature.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      ef548c55
  4. 13 12月, 2016 24 次提交
  5. 12 12月, 2016 10 次提交
    • U
      mmc: block: Move files to core · f397c8d8
      Ulf Hansson 提交于
      Once upon a time it made sense to keep the mmc block device driver and its
      related code, in its own directory called card. Over time, more an more
      functions/structures have become shared through generic mmc header files,
      between the core and the card directory. In other words, the relationship
      between them has become closer.
      
      By sharing functions/structures via generic header files, it becomes easy
      for outside users to abuse them. In a way to avoid that from happen, let's
      move the files from card directory into the core directory, as it enables
      us to move definitions of functions/structures into mmc core specific
      header files.
      
      Note, this is only the first step in providing a cleaner mmc interface for
      outside users. Following changes will do the actual cleanup, as that is not
      part of this change.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      f397c8d8
    • R
      xen/balloon: Only mark a page as managed when it is released · 709613ad
      Ross Lagerwall 提交于
      Only mark a page as managed when it is released back to the allocator.
      This ensures that the managed page count does not get falsely increased
      when a VM is running. Correspondingly change it so that pages are
      marked as unmanaged after getting them from the allocator.
      Signed-off-by: NRoss Lagerwall <ross.lagerwall@citrix.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      709613ad
    • D
      xenbus: fix deadlock on writes to /proc/xen/xenbus · 581d21a2
      David Vrabel 提交于
      /proc/xen/xenbus does not work correctly.  A read blocked waiting for
      a xenstore message holds the mutex needed for atomic file position
      updates.  This blocks any writes on the same file handle, which can
      deadlock if the write is needed to unblock the read.
      
      Clear FMODE_ATOMIC_POS when opening this device to always get
      character device like sematics.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Reviewed-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      581d21a2
    • R
      openrisc: prevent VGA console, fix builds · 7c7808ce
      Randy Dunlap 提交于
      OpenRISC does not support VGA console, so prevent that kconfig symbol
      from being enabled for OpenRISC, thus fixing these build errors:
      
         drivers/built-in.o: In function `vgacon_save_screen':
         vgacon.c:(.text+0x20e0): undefined reference to `screen_info'
         vgacon.c:(.text+0x20e8): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_init':
         vgacon.c:(.text+0x284c): undefined reference to `screen_info'
         vgacon.c:(.text+0x2850): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_startup':
         vgacon.c:(.text+0x28d8): undefined reference to `screen_info'
         drivers/built-in.o:vgacon.c:(.text+0x28f0): more undefined references to `screen_info' follow
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      7c7808ce
    • S
      s390/dasd: channel path aware error recovery · a521b048
      Stefan Haberland 提交于
      With this feature, the DASD device driver more robustly handles DASDs
      that are attached via multiple channel paths and are subject to
      constant Interface-Control-Checks (IFCCs) and Channel-Control-Checks
      (CCCs) or loss of High-Performance-FICON (HPF) functionality on one or
      more of these paths.
      
      If a channel path does not work correctly, it is removed from normal
      operation as long as other channel paths are available. All extended
      error recovery states can be queried and reset via user space
      interfaces.
      Signed-off-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      Reviewed-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Reviewed-by: NJan Hoeppner <hoeppner@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      a521b048
    • S
      s390/dasd: extend dasd path handling · c9346151
      Stefan Haberland 提交于
      Store flags and path_data per channel path.
      Implement get/set functions for various path masks.
      The patch does not add functional changes.
      Signed-off-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      Reviewed-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Reviewed-by: NJan Hoeppner <hoeppner@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c9346151
    • B
      HID: fix missing irq field · 8cd16166
      Benjamin Tissoires 提交于
      commit ba18a931 ("Revert "HID: i2c-hid: Add support for ACPI GPIO
      interrupts"") removed the need for storing the irq in struct i2c_hid.
      
      But then commit de3c99488609 ("HID: i2c-hid: Disable IRQ before freeing
      buffers") forgot to update the location of the irq.
      
      Fix this by using the actual I2C client irq.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8cd16166
    • J
      HID: i2c-hid: fix build · ba1660f1
      Jiri Kosina 提交于
      Add a forgotten include that I've by mistake omitted when resolving
      merge conflict in ead0687fe30 ("HID: i2c-hid: support regulator power
      on/off").
      
      Fixes: ead0687fe30 ("HID: i2c-hid: support regulator power on/off")
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ba1660f1
    • J
      HID: i2c-hid: Disable IRQ before freeing buffers · d46ddc59
      João Paulo Rechi Vita 提交于
      The HID report buffers that are initially allocated on i2c_hid_probe()
      might not be big enough to hold the HID reports from a specific device,
      in which case they will be freed and new ones will be allocated in
      i2c_hid_start(), at point which the device's report size is known. But
      at this point ihid->irq is already running, and may call
      i2c_hid_get_input() which passes ihid->inbuf to i2c_master_recv(). Since
      this handler runs in a separate thread, ihid->inbuf may be freed at this
      very moment, and i2c_master_recv() will write on memory which may be
      already owned by a different part of the kernel, corrupting its data.
      
      This problem has been observed on an Asus UX360UA laptop which has an
      I2C touchpad, and results in a complete system freeze or an unusable
      slowness with a lof of "BUG: unable to handle kernel paging request at
      <address>" warnings. Enabling SLUB debugging shows a use-after-free
      warning on memory allocated in i2c_hid_alloc_buffers() and freed in
      i2c_hid_free_buffers():
      
      =============================================================================
      BUG kmalloc-64 (Not tainted): Poison overwritten
      -----------------------------------------------------------------------------
      Disabling lock debugging due to kernel taint
      INFO: 0xffff880264083273-0xffff88026408329e. first byte 0x0 instead of 0x6b
      INFO: Allocated in i2c_hid_alloc_buffers+0x25/0xa0 [i2c_hid] age=35793 cpu=2 pid=430
      	___slab_alloc+0x41e/0x460
      	__slab_alloc+0x20/0x40
      	__kmalloc+0x210/0x280
      	i2c_hid_alloc_buffers+0x25/0xa0 [i2c_hid]
      	i2c_hid_probe+0x12f/0x5e0 [i2c_hid]
      	i2c_device_probe+0x10a/0x1b0
      	driver_probe_device+0x220/0x4a0
      	__device_attach_driver+0x71/0xa0
      	bus_for_each_drv+0x67/0xb0
      	__device_attach+0xdc/0x170
      	device_initial_probe+0x13/0x20
      	bus_probe_device+0x92/0xa0
      	device_add+0x4aa/0x670
      	device_register+0x1a/0x20
      	i2c_new_device+0x18e/0x230
      	acpi_i2c_add_device+0x1a0/0x210
      INFO: Freed in i2c_hid_free_buffers+0x16/0x60 [i2c_hid] age=7552 cpu=1 pid=1473
      	__slab_free+0x221/0x330
      	kfree+0x139/0x160
      	i2c_hid_free_buffers+0x16/0x60 [i2c_hid]
      	i2c_hid_start+0x2a9/0x2df [i2c_hid]
      	mt_probe+0x160/0x22e [hid_multitouch]
      	hid_device_probe+0xd7/0x150 [hid]
      	driver_probe_device+0x220/0x4a0
      	__driver_attach+0x84/0x90
      	bus_for_each_dev+0x6c/0xc0
      	driver_attach+0x1e/0x20
      	bus_add_driver+0x1c3/0x280
      	driver_register+0x60/0xe0
      	__hid_register_driver+0x53/0x90 [hid]
      	0xffffffffc004f01e
      	do_one_initcall+0xb3/0x1f0
      	do_init_module+0x5f/0x1d0
      INFO: Slab 0xffffea0009902080 objects=20 used=20 fp=0x          (null) flags=0x17fff8000004080
      INFO: Object 0xffff880264083260 @offset=4704 fp=0x          (null)
      Bytes b4 ffff880264083250: 8d e6 fe ff 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a  ........ZZZZZZZZ
      Object ffff880264083260: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      Object ffff880264083270: 6b 6b 6b 00 00 00 00 00 00 00 00 00 00 00 00 00  kkk.............
      Object ffff880264083280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      Object ffff880264083290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      Redzone ffff8802640832a0: bb bb bb bb bb bb bb bb                          ........
      Padding ffff8802640833e0: 5a 5a 5a 5a 5a 5a 5a 5a                          ZZZZZZZZ
      CPU: 1 PID: 1503 Comm: python3 Tainted: G    B           4.4.21+ #10
      Hardware name: ASUSTeK COMPUTER INC. UX360UA/UX360UA, BIOS UX360UA.200 05/05/2016
       0000000000000086 00000000622d48a2 ffff88026061ba38 ffffffff813f6044
       ffff880264082010 ffff880264083260 ffff88026061ba78 ffffffff811e8eab
       0000000000000008 ffff880200000001 ffff88026408329f ffff88026a007700
      Call Trace:
       [<ffffffff813f6044>] dump_stack+0x63/0x8f
       [<ffffffff811e8eab>] print_trailer+0x14b/0x1f0
       [<ffffffff811e94c1>] check_bytes_and_report+0xc1/0x100
       [<ffffffff811e96c4>] check_object+0x1c4/0x240
       [<ffffffff81293fde>] ? ext4_htree_store_dirent+0x3e/0x120
       [<ffffffff811e9b44>] alloc_debug_processing+0x104/0x180
       [<ffffffff811eb7be>] ___slab_alloc+0x41e/0x460
       [<ffffffff81293fde>] ? ext4_htree_store_dirent+0x3e/0x120
       [<ffffffff8124590b>] ? __getblk_gfp+0x2b/0x60
       [<ffffffff8129b969>] ? ext4_getblk+0xa9/0x190
       [<ffffffff811eb820>] __slab_alloc+0x20/0x40
       [<ffffffff811ed320>] __kmalloc+0x210/0x280
       [<ffffffff81293fde>] ? ext4_htree_store_dirent+0x3e/0x120
       [<ffffffff812c1602>] ? ext4fs_dirhash+0xc2/0x2a0
       [<ffffffff81293fde>] ext4_htree_store_dirent+0x3e/0x120
       [<ffffffff812a4f47>] htree_dirblock_to_tree+0x187/0x1b0
       [<ffffffff812a5fd2>] ext4_htree_fill_tree+0xb2/0x2e0
       [<ffffffff811ebb7a>] ? kmem_cache_alloc_trace+0x1fa/0x220
       [<ffffffff81293e45>] ? ext4_readdir+0x775/0x8b0
       [<ffffffff81293cb1>] ext4_readdir+0x5e1/0x8b0
       [<ffffffff81221c82>] iterate_dir+0x92/0x120
       [<ffffffff81222118>] SyS_getdents+0x98/0x110
       [<ffffffff81221d10>] ? iterate_dir+0x120/0x120
       [<ffffffff818157f2>] entry_SYSCALL_64_fastpath+0x16/0x71
      FIX kmalloc-64: Restoring 0xffff880264083273-0xffff88026408329e=0x6b
      FIX kmalloc-64: Marking all objects used
      Signed-off-by: NJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d46ddc59
    • G
      s390/vmlogrdr: fix IUCV buffer allocation · 5457e03d
      Gerald Schaefer 提交于
      The buffer for iucv_message_receive() needs to be below 2 GB. In
      __iucv_message_receive(), the buffer address is casted to an u32, which
      would result in either memory corruption or an addressing exception when
      using addresses >= 2 GB.
      
      Fix this by using GFP_DMA for the buffer allocation.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5457e03d
  6. 11 12月, 2016 1 次提交