1. Aug 10, 2019
  2. Aug 09, 2019
    • Bartlomiej Zolnierkiewicz's avatar
      MAINTAINERS: handle fbdev changes through drm-misc tree · 6a7553e8
      Bartlomiej Zolnierkiewicz authored
      
      
      fbdev patches will now go to upstream through drm-misc tree (IOW
      starting with v5.4 merge window fbdev changes will be included in
      DRM pull request) for improved maintainership and better integration
      testing. Update MAINTAINERS file accordingly.
      
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      6a7553e8
    • Coly Li's avatar
      bcache: Revert "bcache: use sysfs_match_string() instead of __sysfs_match_string()" · 20621fed
      Coly Li authored
      This reverts commit 89e0341a.
      
      In drivers/md/bcache/sysfs.c:bch_snprint_string_list(), NULL pointer at
      the end of list is necessary. Remove the NULL from last element of each
      lists will cause the following panic,
      
      [ 4340.455652] bcache: register_cache() registered cache device nvme0n1
      [ 4340.464603] bcache: register_bdev() registered backing device sdk
      [ 4421.587335] bcache: bch_cached_dev_run() cached dev sdk is running already
      [ 4421.587348] bcache: bch_cached_dev_attach() Caching sdk as bcache0 on set 354e1d46-d99f-4d8b-870b-078b80dc88a6
      [ 5139.247950] general protection fault: 0000 [#1] SMP NOPTI
      [ 5139.247970] CPU: 9 PID: 5896 Comm: cat Not tainted 4.12.14-95.29-default #1 SLE12-SP4
      [ 5139.247988] Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 04/18/2019
      [ 5139.248006] task: ffff888fb25c0b00 task.stack: ffff9bbacc704000
      [ 5139.248021] RIP: 0010:string+0x21/0x70
      [ 5139.248030] RSP: 0018:ffff9bbacc707bf0 EFLAGS: 00010286
      [ 5139.248043] RAX: ffffffffa7e432e3 RBX: ffff8881c20da02a RCX: ffff0a00ffffff04
      [ 5139.248058] RDX: 3f00656863616362 RSI: ffff8881c20db000 RDI: ffffffffffffffff
      [ 5139.248075] RBP: ffff8881c20db000 R08: 0000000000000000 R09: ffff8881c20da02a
      [ 5139.248090] R10: 0000000000000004 R11: 0000000000000000 R12: ffff9bbacc707c48
      [ 5139.248104] R13: 0000000000000fd6 R14: ffffffffc0665855 R15: ffffffffc0665855
      [ 5139.248119] FS:  00007faf253b8700(0000) GS:ffff88903f840000(0000) knlGS:0000000000000000
      [ 5139.248137] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 5139.248149] CR2: 00007faf25395008 CR3: 0000000f72150006 CR4: 00000000007606e0
      [ 5139.248164] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 5139.248179] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 5139.248193] PKRU: 55555554
      [ 5139.248200] Call Trace:
      [ 5139.248210]  vsnprintf+0x1fb/0x510
      [ 5139.248221]  snprintf+0x39/0x40
      [ 5139.248238]  bch_snprint_string_list.constprop.15+0x5b/0x90 [bcache]
      [ 5139.248256]  __bch_cached_dev_show+0x44d/0x5f0 [bcache]
      [ 5139.248270]  ? __alloc_pages_nodemask+0xb2/0x210
      [ 5139.248284]  bch_cached_dev_show+0x2c/0x50 [bcache]
      [ 5139.248297]  sysfs_kf_seq_show+0xbb/0x190
      [ 5139.248308]  seq_read+0xfc/0x3c0
      [ 5139.248317]  __vfs_read+0x26/0x140
      [ 5139.248327]  vfs_read+0x87/0x130
      [ 5139.248336]  SyS_read+0x42/0x90
      [ 5139.248346]  do_syscall_64+0x74/0x160
      [ 5139.248358]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
      [ 5139.248370] RIP: 0033:0x7faf24eea370
      [ 5139.248379] RSP: 002b:00007fff82d03f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      [ 5139.248395] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007faf24eea370
      [ 5139.248411] RDX: 0000000000020000 RSI: 00007faf25396000 RDI: 0000000000000003
      [ 5139.248426] RBP: 00007faf25396000 R08: 00000000ffffffff R09: 0000000000000000
      [ 5139.248441] R10: 000000007c9d4d41 R11: 0000000000000246 R12: 00007faf25396000
      [ 5139.248456] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000fff
      [ 5139.248892] Code: ff ff ff 0f 1f 80 00 00 00 00 49 89 f9 48 89 cf 48 c7 c0 e3 32 e4 a7 48 c1 ff 30 48 81 fa ff 0f 00 00 48 0f 46 d0 48 85 ff 74 45 <44> 0f b6 02 48 8d 42 01 45 84 c0 74 38 48 01 fa 4c 89 cf eb 0e
      
      The simplest way to fix is to revert commit 89e0341a ("bcache: use
      sysfs_match_string() instead of __sysfs_match_string()").
      
      This bug was introduced in Linux v5.2, so this fix only applies to
      Linux v5.2 is enough for stable tree maintainer.
      
      Fixes: 89e0341a
      
       ("bcache: use sysfs_match_string() instead of __sysfs_match_string()")
      Cc: stable@vger.kernel.org
      Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
      Reported-by: default avatarPeifeng Lin <pflin@suse.com>
      Acked-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      20621fed
    • Heiko Carstens's avatar
      s390/vdso: map vdso also for statically linked binaries · 404861e1
      Heiko Carstens authored
      s390 does not map the vdso for statically linked binaries, assuming
      that this doesn't make sense. See commit fc5243d9
      
       ("[S390]
      arch_setup_additional_pages arguments").
      
      However with glibc commit d665367f596d ("linux: Enable vDSO for static
      linking as default (BZ#19767)") and commit 5e855c895401 ("s390: Enable
      VDSO for static linking") the vdso is also used for statically linked
      binaries - if the kernel would make it available.
      
      Therefore map the vdso always, just like all other architectures.
      
      Reported-by: default avatarStefan Liebler <stli@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      404861e1
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-08-08' of... · a111ef6b
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-intel
      
       into drm-fixes
      
      drm/i915 fixes for v5.3-rc4:
      - Fix GLK DSI escape clock setting
      - Fix a memleak on HDCP revoked Ksv error path
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87pnlghz79.fsf@intel.com
      a111ef6b
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 359f1dcb
      Dave Airlie authored
      
      
      drm-misc-fixes for v5.3-rc4:
      - Suspend fix for rockchip
      - Fix unterminated strncpy cmdline mode parser
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ace294a6-6bb2-d9b1-695d-3260e1d60831@linux.intel.com
      359f1dcb
    • Dave Airlie's avatar
      6ca847a9
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · b678c568
      Linus Torvalds authored
      Pull NFS client fixes from Trond Myklebust:
       "Highlights include:
      
        Stable fixes:
      
         - NFSv4: Ensure we check the return value of update_open_stateid() so
           we correctly track active open state.
      
         - NFSv4: Fix for delegation state recovery to ensure we recover all
           open modes that are active.
      
         - NFSv4: Fix an Oops in nfs4_do_setattr
      
        Fixes:
      
         - NFS: Fix regression whereby fscache errors are appearing on 'nofsc'
           mounts
      
         - NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim()
      
         - NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid
      
         - pNFS: Report errors from the call to nfs4_select_rw_stateid()
      
         - NFSv4: Various other delegation and open stateid recovery fixes
      
         - NFSv4: Fix state recovery behaviour when server connection times
           out"
      
      * tag 'nfs-for-5.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4: Ensure state recovery handles ETIMEDOUT correctly
        NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts
        NFSv4: Fix an Oops in nfs4_do_setattr
        NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim()
        NFSv4: Check the return value of update_open_stateid()
        NFSv4.1: Only reap expired delegations
        NFSv4.1: Fix open stateid recovery
        NFSv4: Report the error from nfs4_select_rw_stateid()
        NFSv4: When recovering state fails with EAGAIN, retry the same recovery
        NFSv4: Print an error in the syslog when state is marked as irrecoverable
        NFSv4: Fix delegation state recovery
        NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid
      b678c568
    • Jia He's avatar
      arm64: mm: add missing PTE_SPECIAL in pte_mkdevmap on arm64 · 30e23538
      Jia He authored
      Without this patch, the MAP_SYNC test case will cause a print_bad_pte
      warning on arm64 as follows:
      
      [   25.542693] BUG: Bad page map in process mapdax333 pte:2e8000448800f53 pmd:41ff5f003
      [   25.546360] page:ffff7e0010220000 refcount:1 mapcount:-1 mapping:ffff8003e29c7440 index:0x0
      [   25.550281] ext4_dax_aops
      [   25.550282] name:"__aaabbbcccddd__"
      [   25.551553] flags: 0x3ffff0000001002(referenced|reserved)
      [   25.555802] raw: 03ffff0000001002 ffff8003dfffa908 0000000000000000 ffff8003e29c7440
      [   25.559446] raw: 0000000000000000 0000000000000000 00000001fffffffe 0000000000000000
      [   25.563075] page dumped because: bad pte
      [   25.564938] addr:0000ffffbe05b000 vm_flags:208000fb anon_vma:0000000000000000 mapping:ffff8003e29c7440 index:0
      [   25.574272] file:__aaabbbcccddd__ fault:ext4_dax_fault mmmmap:ext4_file_mmap readpage:0x0
      [   25.578799] CPU: 1 PID: 1180 Comm: mapdax333 Not tainted 5.2.0+ #21
      [   25.581702] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
      [   25.585624] Call trace:
      [   25.587008]  dump_backtrace+0x0/0x178
      [   25.588799]  show_stack+0x24/0x30
      [   25.590328]  dump_stack+0xa8/0xcc
      [   25.591901]  print_bad_pte+0x18c/0x218
      [   25.593628]  unmap_page_range+0x778/0xc00
      [   25.595506]  unmap_single_vma+0x94/0xe8
      [   25.597304]  unmap_vmas+0x90/0x108
      [   25.598901]  unmap_region+0xc0/0x128
      [   25.600566]  __do_munmap+0x284/0x3f0
      [   25.602245]  __vm_munmap+0x78/0xe0
      [   25.603820]  __arm64_sys_munmap+0x34/0x48
      [   25.605709]  el0_svc_common.constprop.0+0x78/0x168
      [   25.607956]  el0_svc_handler+0x34/0x90
      [   25.609698]  el0_svc+0x8/0xc
      [...]
      
      The root cause is in _vm_normal_page, without the PTE_SPECIAL bit,
      the return value will be incorrectly set to pfn_to_page(pfn) instead
      of NULL. Besides, this patch also rewrite the pmd_mkdevmap to avoid
      setting PTE_SPECIAL for pmd
      
      The MAP_SYNC test case is as follows(Provided by Yibo Cai)
      $#include <stdio.h>
      $#include <string.h>
      $#include <unistd.h>
      $#include <sys/file.h>
      $#include <sys/mman.h>
      
      $#ifndef MAP_SYNC
      $#define MAP_SYNC 0x80000
      $#endif
      
      /* mount -o dax /dev/pmem0 /mnt */
      $#define F "/mnt/__aaabbbcccddd__"
      
      int main(void)
      {
          int fd;
          char buf[4096];
          void *addr;
      
          if ((fd = open(F, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) {
              perror("open1");
              return 1;
          }
      
          if (write(fd, buf, 4096) != 4096) {
              perror("lseek");
              return 1;
          }
      
          addr = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_SYNC, fd, 0);
          if (addr == MAP_FAILED) {
              perror("mmap");
              printf("did you mount with '-o dax'?\n");
              return 1;
          }
      
          memset(addr, 0x55, 4096);
      
          if (munmap(addr, 4096) == -1) {
              perror("munmap");
              return 1;
          }
      
          close(fd);
      
          return 0;
      }
      
      Fixes: 73b20c84
      
       ("arm64: mm: implement pte_devmap support")
      Reported-by: default avatarYibo Cai <Yibo.Cai@arm.com>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Acked-by: default avatarRobin Murphy <Robin.Murphy@arm.com>
      Signed-off-by: default avatarJia He <justin.he@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      30e23538
    • Linus Torvalds's avatar
      Merge tag '5.3-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 518a1c2f
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Six small SMB3 fixes, two for stable"
      
      * tag '5.3-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        SMB3: Kernel oops mounting a encryptData share with CONFIG_DEBUG_VIRTUAL
        smb3: update TODO list of missing features
        smb3: send CAP_DFS capability during session setup
        SMB3: Fix potential memory leak when processing compound chain
        SMB3: Fix deadlock in validate negotiate hits reconnect
        cifs: fix rmmod regression in cifs.ko caused by force_sig changes
      518a1c2f
    • Mikulas Patocka's avatar
      loop: set PF_MEMALLOC_NOIO for the worker thread · d0a255e7
      Mikulas Patocka authored
      
      
      A deadlock with this stacktrace was observed.
      
      The loop thread does a GFP_KERNEL allocation, it calls into dm-bufio
      shrinker and the shrinker depends on I/O completion in the dm-bufio
      subsystem.
      
      In order to fix the deadlock (and other similar ones), we set the flag
      PF_MEMALLOC_NOIO at loop thread entry.
      
      PID: 474    TASK: ffff8813e11f4600  CPU: 10  COMMAND: "kswapd0"
         #0 [ffff8813dedfb938] __schedule at ffffffff8173f405
         #1 [ffff8813dedfb990] schedule at ffffffff8173fa27
         #2 [ffff8813dedfb9b0] schedule_timeout at ffffffff81742fec
         #3 [ffff8813dedfba60] io_schedule_timeout at ffffffff8173f186
         #4 [ffff8813dedfbaa0] bit_wait_io at ffffffff8174034f
         #5 [ffff8813dedfbac0] __wait_on_bit at ffffffff8173fec8
         #6 [ffff8813dedfbb10] out_of_line_wait_on_bit at ffffffff8173ff81
         #7 [ffff8813dedfbb90] __make_buffer_clean at ffffffffa038736f [dm_bufio]
         #8 [ffff8813dedfbbb0] __try_evict_buffer at ffffffffa0387bb8 [dm_bufio]
         #9 [ffff8813dedfbbd0] dm_bufio_shrink_scan at ffffffffa0387cc3 [dm_bufio]
        #10 [ffff8813dedfbc40] shrink_slab at ffffffff811a87ce
        #11 [ffff8813dedfbd30] shrink_zone at ffffffff811ad778
        #12 [ffff8813dedfbdc0] kswapd at ffffffff811ae92f
        #13 [ffff8813dedfbec0] kthread at ffffffff810a8428
        #14 [ffff8813dedfbf50] ret_from_fork at ffffffff81745242
      
        PID: 14127  TASK: ffff881455749c00  CPU: 11  COMMAND: "loop1"
         #0 [ffff88272f5af228] __schedule at ffffffff8173f405
         #1 [ffff88272f5af280] schedule at ffffffff8173fa27
         #2 [ffff88272f5af2a0] schedule_preempt_disabled at ffffffff8173fd5e
         #3 [ffff88272f5af2b0] __mutex_lock_slowpath at ffffffff81741fb5
         #4 [ffff88272f5af330] mutex_lock at ffffffff81742133
         #5 [ffff88272f5af350] dm_bufio_shrink_count at ffffffffa03865f9 [dm_bufio]
         #6 [ffff88272f5af380] shrink_slab at ffffffff811a86bd
         #7 [ffff88272f5af470] shrink_zone at ffffffff811ad778
         #8 [ffff88272f5af500] do_try_to_free_pages at ffffffff811adb34
         #9 [ffff88272f5af590] try_to_free_pages at ffffffff811adef8
        #10 [ffff88272f5af610] __alloc_pages_nodemask at ffffffff811a09c3
        #11 [ffff88272f5af710] alloc_pages_current at ffffffff811e8b71
        #12 [ffff88272f5af760] new_slab at ffffffff811f4523
        #13 [ffff88272f5af7b0] __slab_alloc at ffffffff8173a1b5
        #14 [ffff88272f5af880] kmem_cache_alloc at ffffffff811f484b
        #15 [ffff88272f5af8d0] do_blockdev_direct_IO at ffffffff812535b3
        #16 [ffff88272f5afb00] __blockdev_direct_IO at ffffffff81255dc3
        #17 [ffff88272f5afb30] xfs_vm_direct_IO at ffffffffa01fe3fc [xfs]
        #18 [ffff88272f5afb90] generic_file_read_iter at ffffffff81198994
        #19 [ffff88272f5afc50] __dta_xfs_file_read_iter_2398 at ffffffffa020c970 [xfs]
        #20 [ffff88272f5afcc0] lo_rw_aio at ffffffffa0377042 [loop]
        #21 [ffff88272f5afd70] loop_queue_work at ffffffffa0377c3b [loop]
        #22 [ffff88272f5afe60] kthread_worker_fn at ffffffff810a8a0c
        #23 [ffff88272f5afec0] kthread at ffffffff810a8428
        #24 [ffff88272f5aff50] ret_from_fork at ffffffff81745242
      
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d0a255e7
  3. Aug 08, 2019