1. 22 Nov, 2019 9 commits
    • Marc Dionne's avatar
      afs: Fix large file support · b485275f
      Marc Dionne authored
      By default s_maxbytes is set to MAX_NON_LFS, which limits the usable
      file size to 2GB, enforced by the vfs.
      
      Commit b9b1f8d5 ("AFS: write support fixes") added support for the
      64-bit fetch and store server operations, but did not change this value.
      As a result, attempts to write past the 2G mark result in EFBIG errors:
      
       $ dd if=/dev/zero of=foo bs=1M count=1 seek=2048
       dd: error writing 'foo': File too large
      
      Set s_maxbytes to MAX_LFS_FILESIZE.
      
      Fixes: b9b1f8d5 ("AFS: write support fixes")
      Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b485275f
    • Marc Dionne's avatar
      afs: Fix possible assert with callbacks from yfs servers · cd340703
      Marc Dionne authored
      Servers sending callback breaks to the YFS_CM_SERVICE service may
      send up to YFSCBMAX (1024) fids in a single RPC.  Anything over
      AFSCBMAX (50) will cause the assert in afs_break_callbacks to trigger.
      
      Remove the assert, as the count has already been checked against
      the appropriate max values in afs_deliver_cb_callback and
      afs_deliver_yfs_cb_callback.
      
      Fixes: 35dbfba3 ("afs: Implement the YFS cache manager service")
      Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd340703
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · cc079039
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "Three fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm/ksm.c: don't WARN if page is still mapped in remove_stable_node()
        mm/memory_hotplug: don't access uninitialized memmaps in shrink_zone_span()
        Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()"
      cc079039
    • Linus Torvalds's avatar
      Merge tag 'pm-5.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · a6b0373f
      Linus Torvalds authored
      Pull power management regression fix from Rafael Wysocki:
       "Fix problems with switching cpufreq drivers on some x86 systems with
        ACPI (and with changing the operation modes of the intel_pstate driver
        on those systems) introduced by recent changes related to the
        management of frequency limits in cpufreq"
      
      * tag 'pm-5.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM: QoS: Invalidate frequency QoS requests after removal
      a6b0373f
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-11-22' of git://anongit.freedesktop.org/drm/drm · 5d867ab0
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two sets of fixes in here, one for amdgpu, and one for i915.
      
        The amdgpu ones are pretty small, i915's CI system seems to have a few
        problems in the last week or so, there is one major regression fix for
        fb_mmap, but there are a bunch of other issues fixed in there as well,
        oops, screen flashes and rcu related.
      
        amdgpu:
         - Remove experimental flag for navi14
         - Fix confusing power message failures on older VI parts
         - Hang fix for gfxoff when using the read register interface
         - Two stability regression fixes for Raven
      
        i915:
         - Fix kernel oops on dumb_create ioctl on no crtc situation
         - Fix bad ugly colored flash on VLV/CHV related to gamma LUT update
         - Fix unity of the frequencies reported on PMU
         - Fix kernel oops on set_page_dirty using better locks around it
         - Protect the request pointer with RCU to prevent it being freed
           while we might need still
         - Make pool objects read-only
         - Restore physical addresses for fb_map to avoid corrupted page
           table"
      
      * tag 'drm-fixes-2019-11-22' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/fbdev: Restore physical addresses for fb_mmap()
        Revert "drm/amd/display: enable S/G for RAVEN chip"
        drm/amdgpu: disable gfxoff on original raven
        drm/amdgpu: disable gfxoff when using register read interface
        drm/amd/powerplay: correct fine grained dpm force level setting
        drm/amd/powerplay: issue no PPSMC_MSG_GetCurrPkgPwr on unsupported ASICs
        drm/amdgpu: remove experimental flag for Navi14
        drm/i915: make pool objects read-only
        drm/i915: Protect request peeking with RCU
        drm/i915/userptr: Try to acquire the page lock around set_page_dirty()
        drm/i915/pmu: "Frequency" is reported as accumulated cycles
        drm/i915: Preload LUTs if the hw isn't currently using them
        drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
      5d867ab0
    • Andrey Ryabinin's avatar
      mm/ksm.c: don't WARN if page is still mapped in remove_stable_node() · 9a63236f
      Andrey Ryabinin authored
      It's possible to hit the WARN_ON_ONCE(page_mapped(page)) in
      remove_stable_node() when it races with __mmput() and squeezes in
      between ksm_exit() and exit_mmap().
      
        WARNING: CPU: 0 PID: 3295 at mm/ksm.c:888 remove_stable_node+0x10c/0x150
      
        Call Trace:
         remove_all_stable_nodes+0x12b/0x330
         run_store+0x4ef/0x7b0
         kernfs_fop_write+0x200/0x420
         vfs_write+0x154/0x450
         ksys_write+0xf9/0x1d0
         do_syscall_64+0x99/0x510
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Remove the warning as there is nothing scary going on.
      
      Link: http://lkml.kernel.org/r/20191119131850.5675-1-aryabinin@virtuozzo.com
      Fixes: cbf86cfe ("ksm: remove old stable nodes more thoroughly")
      Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9a63236f
    • David Hildenbrand's avatar
      mm/memory_hotplug: don't access uninitialized memmaps in shrink_zone_span() · 7ce700bf
      David Hildenbrand authored
      Let's limit shrinking to !ZONE_DEVICE so we can fix the current code.
      We should never try to touch the memmap of offline sections where we
      could have uninitialized memmaps and could trigger BUGs when calling
      page_to_nid() on poisoned pages.
      
      There is no reliable way to distinguish an uninitialized memmap from an
      initialized memmap that belongs to ZONE_DEVICE, as we don't have
      anything like SECTION_IS_ONLINE we can use similar to
      pfn_to_online_section() for !ZONE_DEVICE memory.
      
      E.g., set_zone_contiguous() similarly relies on pfn_to_online_section()
      and will therefore never set a ZONE_DEVICE zone consecutive.  Stopping
      to shrink the ZONE_DEVICE therefore results in no observable changes,
      besides /proc/zoneinfo indicating different boundaries - something we
      can totally live with.
      
      Before commit d0dc12e8 ("mm/memory_hotplug: optimize memory
      hotplug"), the memmap was initialized with 0 and the node with the right
      value.  So the zone might be wrong but not garbage.  After that commit,
      both the zone and the node will be garbage when touching uninitialized
      memmaps.
      
      Toshiki reported a BUG (race between delayed initialization of
      ZONE_DEVICE memmaps without holding the memory hotplug lock and
      concurrent zone shrinking).
      
        https://lkml.org/lkml/2019/11/14/1040
      
      "Iteration of create and destroy namespace causes the panic as below:
      
            kernel BUG at mm/page_alloc.c:535!
            CPU: 7 PID: 2766 Comm: ndctl Not tainted 5.4.0-rc4 #6
            Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014
            RIP: 0010:set_pfnblock_flags_mask+0x95/0xf0
            Call Trace:
             memmap_init_zone_device+0x165/0x17c
             memremap_pages+0x4c1/0x540
             devm_memremap_pages+0x1d/0x60
             pmem_attach_disk+0x16b/0x600 [nd_pmem]
             nvdimm_bus_probe+0x69/0x1c0
             really_probe+0x1c2/0x3e0
             driver_probe_device+0xb4/0x100
             device_driver_attach+0x4f/0x60
             bind_store+0xc9/0x110
             kernfs_fop_write+0x116/0x190
             vfs_write+0xa5/0x1a0
             ksys_write+0x59/0xd0
             do_syscall_64+0x5b/0x180
             entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
        While creating a namespace and initializing memmap, if you destroy the
        namespace and shrink the zone, it will initialize the memmap outside
        the zone and trigger VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page),
        pfn), page) in set_pfnblock_flags_mask()."
      
      This BUG is also mitigated by this commit, where we for now stop to
      shrink the ZONE_DEVICE zone until we can do it in a safe and clean way.
      
      Link: http://lkml.kernel.org/r/20191006085646.5768-5-david@redhat.com
      Fixes: f1dd2cd1 ("mm, memory_hotplug: do not associate hotadded memory to zones until online")	[visible after d0dc12e8]
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reported-by: default avatarToshiki Fukasawa <t-fukasawa@vx.jp.nec.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Damian Tometzki <damian.tometzki@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Halil Pasic <pasic@linux.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jun Yao <yaojun8558363@gmail.com>
      Cc: Logan Gunthorpe <logang@deltatee.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Pankaj Gupta <pagupta@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pavel Tatashin <pavel.tatashin@microsoft.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qian Cai <cai@lca.pw>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Steve Capper <steve.capper@arm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Wei Yang <richard.weiyang@gmail.com>
      Cc: Wei Yang <richardw.yang@linux.intel.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Yu Zhao <yuzhao@google.com>
      Cc: <stable@vger.kernel.org>	[4.13+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7ce700bf
    • Joseph Qi's avatar
      Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()" · 94b07b6f
      Joseph Qi authored
      This reverts commit 56e94ea1.
      
      Commit 56e94ea1 ("fs: ocfs2: fix possible null-pointer dereferences
      in ocfs2_xa_prepare_entry()") introduces a regression that fail to
      create directory with mount option user_xattr and acl.  Actually the
      reported NULL pointer dereference case can be correctly handled by
      loc->xl_ops->xlo_add_entry(), so revert it.
      
      Link: http://lkml.kernel.org/r/1573624916-83825-1-git-send-email-joseph.qi@linux.alibaba.com
      Fixes: 56e94ea1 ("fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()")
      Signed-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Reported-by: default avatarThomas Voegtle <tv@lio96.de>
      Acked-by: default avatarChangwei Ge <gechangwei@live.cn>
      Cc: Jia-Ju Bai <baijiaju1990@gmail.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      94b07b6f
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-11-21' of... · 51658c04
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-11-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix kernel oops on dumb_create ioctl on no crtc situation
      - Fix bad ugly colored flash on VLV/CHV related to gamma LUT update
      - Fix unity of the frequencies reported on PMU
      - Fix kernel oops on set_page_dirty using better locks around it
      - Protect the request pointer with RCU to prevent it being freed while we might need still
      - Make pool objects read-only
      - Restore physical addresses for fb_map to avoid corrupted page table
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191121165339.GA23920@intel.com
      51658c04
  2. 21 Nov, 2019 6 commits
  3. 20 Nov, 2019 10 commits
  4. 19 Nov, 2019 4 commits
  5. 18 Nov, 2019 5 commits
  6. 17 Nov, 2019 6 commits