Commit Graph

967252 Commits

Author SHA1 Message Date
Muchun Song
8b21ca0218 mm: memcontrol: fix missing wakeup polling thread
When we poll the swap.events, we can miss being woken up when the swap
event occurs.  Because we didn't notify.

Fixes: f3a53a3a1e ("mm, memcontrol: implement memory.swap.events")
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Yafang Shao <laoar.shao@gmail.com>
Cc: Chris Down <chris@chrisdown.name>
Cc: Tejun Heo <tj@kernel.org>
Link: https://lkml.kernel.org/r/20201105161936.98312-1-songmuchun@bytedance.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:04 -08:00
Santosh Sivaraj
e7e046155a kernel/watchdog: fix watchdog_allowed_mask not used warning
Define watchdog_allowed_mask only when SOFTLOCKUP_DETECTOR is enabled.

Fixes: 7feeb9cd4f ("watchdog/sysctl: Clean up sysctl variable name space")
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20201106015025.1281561-1-santosh@fossix.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Matteo Croce
df5b0ab3e0 reboot: fix overflow parsing reboot cpu number
Limit the CPU number to num_possible_cpus(), because setting it to a
value lower than INT_MAX but higher than NR_CPUS produces the following
error on reboot and shutdown:

    BUG: unable to handle page fault for address: ffffffff90ab1bb0
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page
    PGD 1c09067 P4D 1c09067 PUD 1c0a063 PMD 0
    Oops: 0000 [#1] SMP
    CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 5.9.0-rc8-kvm #110
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
    RIP: 0010:migrate_to_reboot_cpu+0xe/0x60
    Code: ea ea 00 48 89 fa 48 c7 c7 30 57 f1 81 e9 fa ef ff ff 66 2e 0f 1f 84 00 00 00 00 00 53 8b 1d d5 ea ea 00 e8 14 33 fe ff 89 da <48> 0f a3 15 ea fc bd 00 48 89 d0 73 29 89 c2 c1 e8 06 65 48 8b 3c
    RSP: 0018:ffffc90000013e08 EFLAGS: 00010246
    RAX: ffff88801f0a0000 RBX: 0000000077359400 RCX: 0000000000000000
    RDX: 0000000077359400 RSI: 0000000000000002 RDI: ffffffff81c199e0
    RBP: ffffffff81c1e3c0 R08: ffff88801f41f000 R09: ffffffff81c1e348
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
    R13: 00007f32bedf8830 R14: 00000000fee1dead R15: 0000000000000000
    FS:  00007f32bedf8980(0000) GS:ffff88801f480000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffffff90ab1bb0 CR3: 000000001d057000 CR4: 00000000000006a0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
      __do_sys_reboot.cold+0x34/0x5b
      do_syscall_64+0x2d/0x40

Fixes: 1b3a5d02ee ("reboot: move arch/x86 reboot= handling to generic kernel")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Robin Holt <robinmholt@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201103214025.116799-3-mcroce@linux.microsoft.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Matteo Croce
8b92c4ff44 Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
Patch series "fix parsing of reboot= cmdline", v3.

The parsing of the reboot= cmdline has two major errors:

 - a missing bound check can crash the system on reboot

 - parsing of the cpu number only works if specified last

Fix both.

This patch (of 2):

This reverts commit 616feab753.

kstrtoint() and simple_strtoul() have a subtle difference which makes
them non interchangeable: if a non digit character is found amid the
parsing, the former will return an error, while the latter will just
stop parsing, e.g.  simple_strtoul("123xyx") = 123.

The kernel cmdline reboot= argument allows to specify the CPU used for
rebooting, with the syntax `s####` among the other flags, e.g.
"reboot=warm,s31,force", so if this flag is not the last given, it's
silently ignored as well as the subsequent ones.

Fixes: 616feab753 ("kernel/reboot.c: convert simple_strtoul to kstrtoint")
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Robin Holt <robinmholt@gmail.com>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201103214025.116799-2-mcroce@linux.microsoft.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Arvind Sankar
3347acc6fc compiler.h: fix barrier_data() on clang
Commit 815f0ddb34 ("include/linux/compiler*.h: make compiler-*.h
mutually exclusive") neglected to copy barrier_data() from
compiler-gcc.h into compiler-clang.h.

The definition in compiler-gcc.h was really to work around clang's more
aggressive optimization, so this broke barrier_data() on clang, and
consequently memzero_explicit() as well.

For example, this results in at least the memzero_explicit() call in
lib/crypto/sha256.c:sha256_transform() being optimized away by clang.

Fix this by moving the definition of barrier_data() into compiler.h.

Also move the gcc/clang definition of barrier() into compiler.h,
__memory_barrier() is icc-specific (and barrier() is already defined
using it in compiler-intel.h) and doesn't belong in compiler.h.

[rdunlap@infradead.org: fix ALPHA builds when SMP is not enabled]

Link: https://lkml.kernel.org/r/20201101231835.4589-1-rdunlap@infradead.org
Fixes: 815f0ddb34 ("include/linux/compiler*.h: make compiler-*.h mutually exclusive")
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201014212631.207844-1-nivedita@alum.mit.edu
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Jason Gunthorpe
96e1fac162 mm/gup: use unpin_user_pages() in __gup_longterm_locked()
When FOLL_PIN is passed to __get_user_pages() the page list must be put
back using unpin_user_pages() otherwise the page pin reference persists
in a corrupted state.

There are two places in the unwind of __gup_longterm_locked() that put
the pages back without checking.  Normally on error this function would
return the partial page list making this the caller's responsibility,
but in these two cases the caller is not allowed to see these pages at
all.

Fixes: 3faa52c03f ("mm/gup: track FOLL_PIN pages")
Reported-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/0-v2-3ae7d9d162e2+2a7-gup_cma_fix_jgg@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Laurent Dufour
22e4663e91 mm/slub: fix panic in slab_alloc_node()
While doing memory hot-unplug operation on a PowerPC VM running 1024 CPUs
with 11TB of ram, I hit the following panic:

    BUG: Kernel NULL pointer dereference on read at 0x00000007
    Faulting instruction address: 0xc000000000456048
    Oops: Kernel access of bad area, sig: 11 [#2]
    LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS= 2048 NUMA pSeries
    Modules linked in: rpadlpar_io rpaphp
    CPU: 160 PID: 1 Comm: systemd Tainted: G      D           5.9.0 #1
    NIP:  c000000000456048 LR: c000000000455fd4 CTR: c00000000047b350
    REGS: c00006028d1b77a0 TRAP: 0300   Tainted: G      D            (5.9.0)
    MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 24004228  XER: 00000000
    CFAR: c00000000000f1b0 DAR: 0000000000000007 DSISR: 40000000 IRQMASK: 0
    GPR00: c000000000455fd4 c00006028d1b7a30 c000000001bec800 0000000000000000
    GPR04: 0000000000000dc0 0000000000000000 00000000000374ef c00007c53df99320
    GPR08: 000007c53c980000 0000000000000000 000007c53c980000 0000000000000000
    GPR12: 0000000000004400 c00000001e8e4400 0000000000000000 0000000000000f6a
    GPR16: 0000000000000000 c000000001c25930 c000000001d62528 00000000000000c1
    GPR20: c000000001d62538 c00006be469e9000 0000000fffffffe0 c0000000003c0ff8
    GPR24: 0000000000000018 0000000000000000 0000000000000dc0 0000000000000000
    GPR28: c00007c513755700 c000000001c236a4 c00007bc4001f800 0000000000000001
    NIP [c000000000456048] __kmalloc_node+0x108/0x790
    LR [c000000000455fd4] __kmalloc_node+0x94/0x790
    Call Trace:
      kvmalloc_node+0x58/0x110
      mem_cgroup_css_online+0x10c/0x270
      online_css+0x48/0xd0
      cgroup_apply_control_enable+0x2c4/0x470
      cgroup_mkdir+0x408/0x5f0
      kernfs_iop_mkdir+0x90/0x100
      vfs_mkdir+0x138/0x250
      do_mkdirat+0x154/0x1c0
      system_call_exception+0xf8/0x200
      system_call_common+0xf0/0x27c
    Instruction dump:
    e93e0000 e90d0030 39290008 7cc9402a e94d0030 e93e0000 7ce95214 7f89502a
    2fbc0000 419e0018 41920230 e9270010 <89290007> 7f994800 419e0220 7ee6bb78

This pointing to the following code:

    mm/slub.c:2851
            if (unlikely(!object || !node_match(page, node))) {
    c000000000456038:       00 00 bc 2f     cmpdi   cr7,r28,0
    c00000000045603c:       18 00 9e 41     beq     cr7,c000000000456054 <__kmalloc_node+0x114>
    node_match():
    mm/slub.c:2491
            if (node != NUMA_NO_NODE && page_to_nid(page) != node)
    c000000000456040:       30 02 92 41     beq     cr4,c000000000456270 <__kmalloc_node+0x330>
    page_to_nid():
    include/linux/mm.h:1294
    c000000000456044:       10 00 27 e9     ld      r9,16(r7)
    c000000000456048:       07 00 29 89     lbz     r9,7(r9)	<<<< r9 = NULL
    node_match():
    mm/slub.c:2491
    c00000000045604c:       00 48 99 7f     cmpw    cr7,r25,r9
    c000000000456050:       20 02 9e 41     beq     cr7,c000000000456270 <__kmalloc_node+0x330>

The panic occurred in slab_alloc_node() when checking for the page's node:

	object = c->freelist;
	page = c->page;
	if (unlikely(!object || !node_match(page, node))) {
		object = __slab_alloc(s, gfpflags, node, addr, c);
		stat(s, ALLOC_SLOWPATH);

The issue is that object is not NULL while page is NULL which is odd but
may happen if the cache flush happened after loading object but before
loading page.  Thus checking for the page pointer is required too.

The cache flush is done through an inter processor interrupt when a
piece of memory is off-lined.  That interrupt is triggered when a memory
hot-unplug operation is initiated and offline_pages() is calling the
slub's MEM_GOING_OFFLINE callback slab_mem_going_offline_callback()
which is calling flush_cpu_slab().  If that interrupt is caught between
the reading of c->freelist and the reading of c->page, this could lead
to such a situation.  That situation is expected and the later call to
this_cpu_cmpxchg_double() will detect the change to c->freelist and redo
the whole operation.

In commit 6159d0f5c0 ("mm/slub.c: page is always non-NULL in
node_match()") check on the page pointer has been removed assuming that
page is always valid when it is called.  It happens that this is not
true in that particular case, so check for page before calling
node_match() here.

Fixes: 6159d0f5c0 ("mm/slub.c: page is always non-NULL in node_match()")
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Nathan Lynch <nathanl@linux.ibm.com>
Cc: Scott Cheloha <cheloha@linux.ibm.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201027190406.33283-1-ldufour@linux.ibm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Dmitry Baryshkov
044747e971 mailmap: fix entry for Dmitry Baryshkov/Eremin-Solenikov
Change back surname to new (old) one.  Dmitry Baryshkov -> Dmitry
Eremin-Solenikov -> Dmitry Baryshkov.  Map several odd entries to main
identity.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/20201103005158.1181426-1-dmitry.baryshkov@linaro.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Nicholas Piggin
2da9f6305f mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit
Previously the negated unsigned long would be cast back to signed long
which would have the correct negative value.  After commit 730ec8c01a
("mm/vmscan.c: change prototype for shrink_page_list"), the large
unsigned int converts to a large positive signed long.

Symptoms include CMA allocations hanging forever holding the cma_mutex
due to alloc_contig_range->...->isolate_migratepages_block waiting
forever in "while (unlikely(too_many_isolated(pgdat)))".

[akpm@linux-foundation.org: fix -stat.nr_lazyfree_fail as well, per Michal]

Fixes: 730ec8c01a ("mm/vmscan.c: change prototype for shrink_page_list")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vaneet Narang <v.narang@samsung.com>
Cc: Maninder Singh <maninder1.s@samsung.com>
Cc: Amit Sahrawat <a.sahrawat@samsung.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201029032320.1448441-1-npiggin@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Zi Yan
d20bdd571e mm/compaction: stop isolation if too many pages are isolated and we have pages to migrate
In isolate_migratepages_block, if we have too many isolated pages and
nr_migratepages is not zero, we should try to migrate what we have
without wasting time on isolating.

In theory it's possible that multiple parallel compactions will cause
too_many_isolated() to become true even if each has isolated less than
COMPACT_CLUSTER_MAX, and loop forever in the while loop.  Bailing
immediately prevents that.

[vbabka@suse.cz: changelog addition]

Fixes: 1da2f328fa (“mm,thp,compaction,cma: allow THP migration for CMA allocations”)
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Yang Shi <shy828301@gmail.com>
Link: https://lkml.kernel.org/r/20201030183809.3616803-2-zi.yan@sent.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Zi Yan
38935861d8 mm/compaction: count pages and stop correctly during page isolation
In isolate_migratepages_block, when cc->alloc_contig is true, we are
able to isolate compound pages.  But nr_migratepages and nr_isolated did
not count compound pages correctly, causing us to isolate more pages
than we thought.

So count compound pages as the number of base pages they contain.
Otherwise, we might be trapped in too_many_isolated while loop, since
the actual isolated pages can go up to COMPACT_CLUSTER_MAX*512=16384,
where COMPACT_CLUSTER_MAX is 32, since we stop isolation after
cc->nr_migratepages reaches to COMPACT_CLUSTER_MAX.

In addition, after we fix the issue above, cc->nr_migratepages could
never be equal to COMPACT_CLUSTER_MAX if compound pages are isolated,
thus page isolation could not stop as we intended.  Change the isolation
stop condition to '>='.

The issue can be triggered as follows:

In a system with 16GB memory and an 8GB CMA region reserved by
hugetlb_cma, if we first allocate 10GB THPs and mlock them (so some THPs
are allocated in the CMA region and mlocked), reserving 6 1GB hugetlb
pages via /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages will
get stuck (looping in too_many_isolated function) until we kill either
task.  With the patch applied, oom will kill the application with 10GB
THPs and let hugetlb page reservation finish.

[ziy@nvidia.com: v3]

Link: https://lkml.kernel.org/r/20201030183809.3616803-1-zi.yan@sent.com
Fixes: 1da2f328fa ("cmm,thp,compaction,cma: allow THP migration for CMA allocations")
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Rik van Riel <riel@surriel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20201029200435.3386066-1-zi.yan@sent.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-11-14 11:26:03 -08:00
Linus Torvalds
9e6a39eae4 Devicetree fixes for v5.10, take 2:
- Fix Flexcan binding schema errors introduced in rc3
 
 - Fix an of_node ref counting error in of_dma_is_coherent
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAl+u7m8QHHJvYmhAa2Vy
 bmVsLm9yZwAKCRD6+121jbxhw3tFD/0Rur5UXAQdGSIuOK7j0Skka+RifCoUTBea
 D1dKXcFEAsMDtlih35qwaDJNix/OENDBkiwzXWcfW/kkm47T9fcjQFbUC/JbT75e
 aXQILG8l+YVlD5Dma2suMCbYTj6814E/Ys839rXYuNvLUlYIU8UJUSpdmjAe4x3X
 ulMMnF3ZY1fR431XhGtKZBQEczGMCAQnoHk2ZksvRsryMJfddDMuBNFwzTGZ2Uee
 kC+KM9P0TYR9+5Pc75MNZUZW2ZFKV/Jv+R0E0i39GFhSesXKg8qBFesZYi6wriS1
 N4J449uwqA2B5IuDgKWPFJVTq+3RbsQJR44ybWI3i22jgimVg3BrTSLdsnxQYhtO
 tuu0j/p19DW+JdT5698ErKbnBtFK7LZIkzbmEd9y+df64BtjCMOlRiDUf1+MkbTT
 nf6dUMmyg+/xQxPhyuuJ8/QF30kfz9FIC09VRnaiTN7C0cEFROIqC5bbwGf0FEBC
 YdH1VF05ldr8anHsbJ6FJU5WhghZDEGFFkx3gZ12YyX5sLeeLxGGGFg2Nreu7I0P
 yFsP2+kxaP22sQ3JX8RJr2kvHKRqqIhDDNvvFftTTJI3bw5Cx9Ke9fA5baptLbO8
 gE2KLzffLaZffuHgc8J63ZAi0RswPtOpMAgO/4OWf7AHSyiISTevaGD+Ec46b/pd
 PBpytuyxIw==
 =Bqzk
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - fix Flexcan binding schema errors introduced in rc3

 - fix an of_node ref counting error in of_dma_is_coherent

* tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: clock: imx5: fix example
  dt-bindings: can: fsl,flexcan.yaml: fix compatible for i.MX35 and i.MX53
  dt-bindings: can: fsl,flexcan.yaml: fix fsl,stop-mode
  of/address: Fix of_node memory leak in of_dma_is_coherent
2020-11-13 12:47:02 -08:00
Linus Torvalds
4de010e2c9 Pin control fixes for the v5.10 series:
- Two fixes to the Intel pin controller drivers: fixing
   pull resistance bias.
 
 - Fix some invalid SSI pins on the Ingenic pin controller.
 
 - Make sure the clock is enabled when requesting interrupts
   from the Rockchip GPIO controller.
 
 - Make sure IRQs are mapped when looking up the IRQ for
   a GPIO line on the Rockchip GPIO Write.
 
 - Two regmap initialization fixes for the MCP23s08.
 
 - Fix a GPI-only prefix function problem on the Aspeed pin
   controller.
 
 - Disable the debounce filter correctly on the AMD
   pin controller.
 
 - Correct the timer clock setting for the AMD debounce
   timer.
 
 - Make the Qualcomm pin controller more cautious around the
   handling of PDC-related GPIO interrupts.
 
 - Fix the interrupt map in the Qualcomm SM8250 pin controller.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAl+uh50ACgkQQRCzN7AZ
 XXNp2A/8CeX/RZ/Or7uPNTcZ3SMCuSh30iSctu7dZHBKqxQZyNpJ8DYMkUP0w2+b
 snK50zU1LNSVj4rh396/qeI7QcO/gPslhohuoTbXvJC6Z1OOLlpyIkVn596uLaYE
 /+fD1sslGxcTpBOZ/yOoyBeVbhh4X+Pq1+svxdGm493RyXi2Tj5mVnnfC9l7sXnK
 WVkYcvXNd2tW7FspK1XDvVMwAy+5tRczKXKvGeQELg3esgGgTEKGTcO5NwLsLOKC
 Q8Kz/wvEpC/nvqbHTPBc24AYrGD6mGE1a0iZRD6lFHaqzNO2CxQN7vPX1kfijcuS
 Fr/naWre8kw+VxlEBamWclp0d5fjOnPfexn6IUsSVJSl8T73M4c5DPaqxgZrwmUx
 PGAPJCBPnaTAIOoK9CBIS8fa3mXItlwaTXOYAjsQtYYMptcoKXncWo3RU1zZXiSw
 E/5Q6nxH2yb9oobOz1yHmpMPxhLV490McUwC2sW5VxzTJVIXTDmOOOop2ck1IIRF
 NXVEfsRuQPHaOQbXClUgr/KkRu7RRKigov7tJiMQy8wZZiM+jP8gbLv/1g7cnAum
 KrIo3oks0matYeBdgbkwS4gf4PloDw0CAqIONawT76XlDx0kmLiSk0ie4oa12npu
 BIP+iG4MBk9P3QkwMcbQ3aN5dlI3C2nNKRshlKFFBl4m83ebcpI=
 =HNAI
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "A bunch of pin control fixes for the v5.10 kernel series.

  Nothing in particular to say about it, because they are all driver
  fixes.

  I'm happy that some AMD driver fixes are appearing, it's been an
  undermaintained driver, and laptops have suffered.

  Summary:

   - Two fixes to the Intel pin controller drivers: fixing pull
     resistance bias.

   - Fix some invalid SSI pins on the Ingenic pin controller.

   - Make sure the clock is enabled when requesting interrupts from the
     Rockchip GPIO controller.

   - Make sure IRQs are mapped when looking up the IRQ for a GPIO line
     on the Rockchip GPIO Write.

   - Two regmap initialization fixes for the MCP23s08.

   - Fix a GPI-only prefix function problem on the Aspeed pin
     controller.

   - Disable the debounce filter correctly on the AMD pin controller.

   - Correct the timer clock setting for the AMD debounce timer.

   - Make the Qualcomm pin controller more cautious around the handling
     of PDC-related GPIO interrupts.

   - Fix the interrupt map in the Qualcomm SM8250 pin controller"

* tag 'pinctrl-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: qcom: sm8250: Specify PDC map
  pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback
  pinctrl: amd: use higher precision for 512 RtcClk
  pinctrl: amd: fix incorrect way to disable debounce filter
  pinctrl: aspeed: Fix GPI only function problem.
  pinctrl: mcp23s08: Print error message when regmap init fails
  pinctrl: mcp23s08: Use full chunk of memory for regmap configuration
  pinctrl: rockchip: create irq mapping in gpio_to_irq
  pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
  pinctrl: ingenic: Fix invalid SSI pins
  pinctrl: intel: Set default bias in case no particular value given
  pinctrl: intel: Fix 2 kOhm bias which is 833 Ohm
2020-11-13 11:04:25 -08:00
Linus Torvalds
29eb6b7d62 GPIO fixes for the v5.10 series:
- Tidy up a missed function call in the designware driver
   when converting to gpiolib irqchip.
 
 - Fix some bitmasks in the Aspeed driver.
 
 - Fix some kerneldoc warnings and minor bugs in the improved
   userspace API documentation.
 
 - Revert the revert of the OMAP fix for lost edge wakeup
   interrupts: the fix needs to stay in.
 
 - Fix a compile error when deselecting the character
   device.
 
 - A bunch of IRQ fixes on the idio GPIO drivers.
 
 - Fix an off-by-one error in the SiFive GPIO driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAl+uhVIACgkQQRCzN7AZ
 XXPMzxAAu3laxIprKKOGnhWuXIGJPD73behWS8QVAjGzZQm6Xo6daqQXJYarLiiV
 jJIt3HoaDN/YYA0duwYJOq41olnqR1ntkpfff7K9XX4gEZsJjRTFojijFkXXmu1Q
 Oj7j4GtyjuStLO/5Z6AGs7Nx4zv77JzDWIqSU++QyhNPnAH74MtT9VWsvLVoNK7e
 gDX5nQbQ3+oBMaZ51ZUct/mID3tyBHFOgCx35fEywLYvjNoKOC4w8W+DqNk1LQ18
 8lW6ynYZcyy6tWXJL1PdSGjICdhxp2rdFOZlDSpGH/RY1BaDNfGVTYZy4rDAJwBA
 ymGCW7v7ub+RiED8J6lRmr8gFZtiQmpmAYgfbPeneiStTrRbYoFD0vQxIqUCnoJs
 tO+It3jCxUr51tQAv/2yjU+bqBQOsnCPbcFi+OtTDpcUOkzeLktk1WW+PvGQiCjF
 rdudrsmdzM8V+VFiLWKVGliPfEpeVXHu05mlN80NYg35PaNfOpnT6G9KM7mNytyF
 WmVR+FUQ22jq44gP471Ic69HMGvpC7JX59faKSLfPKCM/QJOVhk2o9MNgNAC1v0l
 5t17RMn9EUJDM039Nz8E5+1R1UsuPPHwjC+VYh+6jseyd2VDEKCRpMiY8NRqFFbs
 +46mYZghuIrZz6oWuYZg3qp7YdVDupAA2UgvCQ7oBcjTIJKS0D4=
 =EtKV
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Some GPIO fixes I've collected with the help of Bartosz.

  Nothing special about them: all are driver and kbuild fixes + some
  documentation fixes:

   - Tidy up a missed function call in the designware driver when
     converting to gpiolib irqchip

   - Fix some bitmasks in the Aspeed driver

   - Fix some kerneldoc warnings and minor bugs in the improved
     userspace API documentation

   - Revert the revert of the OMAP fix for lost edge wakeup interrupts:
     the fix needs to stay in

   - Fix a compile error when deselecting the character device

   - A bunch of IRQ fixes on the idio GPIO drivers

   - Fix an off-by-one error in the SiFive GPIO driver"

* tag 'gpio-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: sifive: Fix SiFive gpio probe
  gpio: pcie-idio-24: Enable PEX8311 interrupts
  gpio: pcie-idio-24: Fix IRQ Enable Register value
  gpio: pcie-idio-24: Fix irq mask when masking
  gpiolib: fix sysfs when cdev is not selected
  Revert "Revert "gpio: omap: Fix lost edge wake-up interrupts""
  gpio: uapi: clarify the meaning of 'empty' char arrays
  gpio: uapi: remove whitespace
  gpio: uapi: kernel-doc formatting improvements
  gpio: uapi: comment consistency
  gpio: uapi: fix kernel-doc warnings
  gpio: aspeed: fix ast2600 bank properties
  gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip
2020-11-13 10:55:50 -08:00
Linus Torvalds
673cb932b6 MMC host:
- tmio: Fixup support for reset
  - sdhci-of-esdhc: Extend erratum for pulse width to more broken HWs
  - renesas_sdhi: Fix re-binding of drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAl+ubXUXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCncSBAAmVXt4Ol8Yo0ROpPwlO9GrbHY
 vI7kVfUcNtnSfEhovRJ9tlL0iVR9WqxaemWVIwLbu3v4UYJgv4PMZktkyqWY4Qbe
 dC3nI3eBBL1zI+TX0xKoeNNRgPNa7RVuGnJfE8cvOzJ+sGY2Kx/bv3NTJNVKHY8D
 iOvoQaR9FIoN+8KebyA0fdSYytwAa0GfGck7M+BU/3vTCRABYDtd3tL4UB3o2Qgt
 15RfWogbuckowXLxlunFmh8YgZkpTrqul3HJq0B0+SfBozyQnfGLdm7O8Qk8vAQw
 yzTXtRBmpf4k7rUsVfOkotRVuuDR+WRyywrGdIS2ulXvqUBJ/9P6ACterLpXyx0M
 JPtPZjevplTDB2yGLcbMD0BSKbteO7uGcptizDvBd6qsXi89Xw6ABmROQ+2lj6sa
 cDSdJ8azdoYQ3J895uDZo4y+7yNU9DQOnJFAdwCWRsqBpHMvp2XVihyeqD1N3E62
 82FFPtlHDCr2/J25mMZfqe+I56kbaJb+4fvIQ07Rl8zdIBL8udj3A3h5o8lLJhP6
 qYEXnt8OLXR1GA/5lP3Faynh/4IoeEhIQYqMmywvMnp8qIAAHQznX+oj8uDC8tUz
 SG7qKYU7V6K/fm4hAbW2Gt2QnfyKkHwDz9DkPw3t1lubPYotutHeNRSPvYNMGvZl
 d07pN+ybCe4bZ7i7w1s=
 =9KYt
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

 - tmio: Fixup support for reset

 - sdhci-of-esdhc: Extend erratum for pulse width to more broken HWs

 - renesas_sdhi: Fix re-binding of drivers

* tag 'mmc-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  Revert "mmc: renesas_sdhi: workaround a regression when reinserting SD cards"
  mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF
  mmc: tmio: when resetting, reset DMA controller, too
  mmc: sdhci-of-esdhc: Handle pulse width detection erratum for more SoCs
  mmc: renesas_sdhi_core: Add missing tmio_mmc_host_free() at remove
2020-11-13 10:09:40 -08:00
Linus Torvalds
e627c25544 drm fixes for 5.10-rc4
amdgpu:
 - Pageflip fix for DCN3
 - Declare TA firmware for green sardine
 - Headless navi fix
 
 i915:
 - Pull phys pread/pwrite implementations to the backend
 - Correctly set SFC capability for video engines
 
 bridge:
 - cdns Kconfig fix
 
 hyperv_fb:
 - fix missing include
 
 gma500:
 - oob access fix
 
 mcde:
 - unbalanced regulator fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJfriYLAAoJEAx081l5xIa+EaIP/0aXqdQZUUm7MMSiyRFG3ipc
 C1jMS9x1DYYuhtmNis4uspWekUpiX7uNEVquANzfcETu6UWuEFot6vN86Xi1hYXv
 VkMaULcI6vISjoiuAQZVWz+F5R5zin1lu6ogKcJcsSz6u/4mqdbUrleSArAiNwAg
 wVUWUQd9sjrn/ROuXS19pgRluuOzAPMjs40Vn5gi741MReBdxVfgSbYL1Yj/CwQT
 xgc0gLdqwtXoB3ZTEkAmYVYJEDLVZeD75BQexOkRXliDSAU22qYlCxjXMjiNgqLa
 lZ430yz3LU4pS5ZCnDSShRT6szCJksjC3oQzU1mVnmCqXRZ3O9PRPpcRkNkea2dP
 ckZ1oKHV6rYN+CEUjPIIpVEXvjH1I2UibsoLu0ObfLPyktdZsg+N8F6PnZZDiteL
 iGBvfZUHfok1x3lFCj9FO08f8ja5Nlm0l8Q+Xet+ByUpjLqIqf33YZVJ4zJ++9lD
 4BsQygXPQK4FeQLitViLhOYdhbq1k/st7V776amg5PtssC86zItij/MMl1qjrj6b
 hPsJ+nl/l9Fc2x0IiXCYxLXNHvG1W7Z9k4J+//XjM1u/KpaHRg+3mrulzIxCDiN/
 6GWpujYUFX78nu1aic8hZo5I1RntxyChxASBmi+O7EKjYsRJsprGo4iFkfx5WIPm
 xDjt2JCA6C9tQCqGNRy/
 =0sud
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Nearly didn't send you a PR this week at all, but a few things
  trickled in over the day, not a huge amount here, some i915, amdgpu
  and a bunch of misc fixes. I have a couple of nouveau fixes
  outstanding due to the PR having the wrong base, I'll figure it out
  next week.

  amdgpu:
   - Pageflip fix for DCN3
   - Declare TA firmware for green sardine
   - Headless navi fix

  i915:
   - Pull phys pread/pwrite implementations to the backend
   - Correctly set SFC capability for video engines

  bridge:
   - cdns Kconfig fix

  hyperv_fb:
   - fix missing include

  gma500:
   - oob access fix

  mcde:
   - unbalanced regulator fix"

* tag 'drm-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm:
  drm/amdgpu: enable DCN for navi10 headless SKU
  drm/amdgpu: add ta firmware load for green-sardine
  drm/i915: Correctly set SFC capability for video engines
  drm/i915/gem: Pull phys pread/pwrite implementations to the backend
  drm/i915/gem: Allow backends to override pread implementation
  drm/mcde: Fix unbalanced regulator
  drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]
  video: hyperv_fb: include vmalloc.h
  drm: bridge: cdns: Kconfig: Switch over dependency to ARCH_K3
  drm/amd/display: Add missing pflip irq
2020-11-13 09:53:53 -08:00
Linus Torvalds
6186313d06 Fix alignment of bootconfig
GRUB may align the init ramdisk size to 4 bytes, the magic number at the
 end of the init ramdisk that denotes bootconfig is attached may not be at
 the exact end of the ramdisk. The kernel needs to check back at least 4
 bytes.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCX66JaxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qpWgAPwKHiHkSIBW2eFblngmknzLZsdmUep/
 NAm+FxhQBHryJQEAido2x++mXD0/KVLotpTHQHsZv2xFkEbMZGY/3R2iog4=
 =Xhnj
 -----END PGP SIGNATURE-----

Merge tag 'trace-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull bootconfig fix from Steven Rostedt:
 "Fix alignment of bootconfig

  GRUB may align the init ramdisk size to 4 bytes, the magic number at
  the end of the init ramdisk that denotes bootconfig is attached may
  not be at the exact end of the ramdisk. The kernel needs to check back
  at least 4 bytes"

* tag 'trace-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  bootconfig: Extend the magic check range to the preceding 3 bytes
2020-11-13 09:36:10 -08:00
Linus Torvalds
e45f90fc72 ARM fix for 5.10-rc:
Just one bug fix:
 - avoid a fortify panic when copying optprobe template
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAl+tVuwACgkQ9OeQG+St
 rGTXww//fHEQyp9oLBAiLd5EtUVZMsyhZNZyori6kCReTK5Hcsxbjwh0v0394GCX
 RSwWOX6MEypmuzt0dIEIKCtIKmac6YR736kZzoq23evB6eA5ZHbYk/BVKI718BIq
 mKiPTzR0n5MCjUlNIOoGcAXW+LIsWqGz6aeCa0QcgcpPZbw5wpyNgl4CpoIKn5Aq
 c2s16GHaipozDh4BSjfd9RahkPKekJggbzRrSb4oIxe2dFj5hFJDpQgMuTs2nzWV
 UnP/6pqCapg/p0zq5Ea14T5Ay3ZTUU5FVpbA4sJxm3jnOKIg5Z6JZqWbPpskJrgw
 0ytZWN9UuzRai+80X9W7gKO5XuZ+G8esE2QbRZ6axLdPWs791/oiKiwiOPQhQRjk
 61J4FXQasuGoyQXcfYYxBw+aS1e2FQ90V1hDbmRbmJSvDmlR8rK8wXvWSWx8qjl/
 VAwuvbG0EJO4mVg2V5nQCBduKTeN8jVbKcOws5cozN2+cUOh3syVIYddH3nGzZ2Q
 u2B7vQGob2P5bMAeB19KRpVpT+EzTuUhrO2cK+n725b9R9AAKX169n/vPRiOOcAJ
 ev/vc8UDUlQ2Yp8xvCqAcGiIFVuRIJTsS7M039ZqCS5TBoTIydJp4JQtqxfhLRVn
 ha5bWxY3yTo8CjIv2+uc1eIHEaVKeQ6WcdsKOhSwh5JuKSToVPY=
 =ef2i
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fix from Russell King:
 "Just one bug fix: avoid a fortify panic when copying optprobe template"

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template
2020-11-13 09:31:20 -08:00
Linus Torvalds
88b31f07f3 arm64 fixes for -rc4
- Spectre/Meltdown safelisting for some Qualcomm KRYO cores
 
 - Fix RCU splat when failing to online a CPU due to a feature mismatch
 
 - Fix a recently introduced sparse warning in kexec()
 
 - Fix handling of CPU erratum 1418040 for late CPUs
 
 - Ensure hot-added memory falls within linear-mapped region
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAl+ubogQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNPD7B/9i5ao44AEJwjz0a68S/jD7kUD7i3xVkCNN
 Y8i/i9mx44IAcf8pmyQh3ngaFlJuF2C6oC/SQFiDbmVeGeZXLXvXV7uGAqXG5Xjm
 O2Svgr1ry176JWpsB7MNnZwzAatQffdkDjbjQCcUnUIKYcLvge8H2fICljujGcfQ
 094vNmT9VerTWRbWDti3Ck/ug+sanVHuzk5BWdKx3jamjeTqo+sBZK/wgBr6UoYQ
 mT3BFX42kLIGg+AzwXRDPlzkJymjYgQDbSwGsvny8qKdOEJbAUwWXYZ5sTs9J/gU
 E9PT3VJI7BYtTd1uPEWkD645U3arfx3Pf2JcJlbkEp86qx4CUF9s
 =T6k4
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:

 - Spectre/Meltdown safelisting for some Qualcomm KRYO cores

 - Fix RCU splat when failing to online a CPU due to a feature mismatch

 - Fix a recently introduced sparse warning in kexec()

 - Fix handling of CPU erratum 1418040 for late CPUs

 - Ensure hot-added memory falls within linear-mapped region

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver
  arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list
  arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist
  arm64: Add MIDR value for KRYO2XX gold/silver CPU cores
  arm64/mm: Validate hotplug range before creating linear mapping
  arm64: smp: Tell RCU about CPUs that fail to come online
  arm64: psci: Avoid printing in cpu_psci_cpu_die()
  arm64: kexec_file: Fix sparse warning
  arm64: errata: Fix handling of 1418040 with late CPU onlining
2020-11-13 09:23:10 -08:00
Linus Torvalds
d3ba7afcc1 Two ext4 bug fixes, one via a revert of a commit sent during the merge window.
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAl+t+7EACgkQ8vlZVpUN
 gaN6nQf+OzMMrP/QWF6fRG/ocQTgm4UZ/lo3REfZa8dRrFH+6qjtoFrmSnK7e+MJ
 V+639IYvHknDEgvap2yF8S6g06nAqb2HeSCHnkxdS3tCh5ZLgo2XmFOtB/WxZLnU
 Cx8dv9kw+mWJPdoRqJ+A4jn5cW2j3VLGNyJIdyIikkTb8L92fZRa/jKVZeIb84xX
 FEyshnzb3rV6ba0XdE99gWkabIAnnIsSwkF6SPhcqJpI3Lt1jkkV3D5h6DDoDz8d
 YpIA/6oPhEM2KwRgx9RJPdNRzHgmwWr2ti/0YLqlLNHWz1oZqi9K6yimXCfccwSU
 oCdK38tMWAFNiOGaijYx5xS3oNV+Dg==
 =9MzH
 -----END PGP SIGNATURE-----

Merge tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Two ext4 bug fixes, one being a revert of a commit sent during the
  merge window"

* tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  Revert "ext4: fix superblock checksum calculation race"
  ext4: handle dax mount option collision
2020-11-13 09:05:33 -08:00
Marc Kleine-Budde
bdac39a3bd dt-bindings: clock: imx5: fix example
Since commit:

    0e030a373d ("can: flexcan: fix endianess detection")

the fsl,imx53-flexcan isn't compatible with the fsl,p1010-flexcan any more. As
the former accesses the IP core in Little Endian mode and the latter uses Big
Endian mode.

With the conversion of the flexcan DT bindings to yaml, the dt_binding_check
this throws the following error:

Documentation/devicetree/bindings/clock/imx5-clock.example.dt.yaml: can@53fc8000: compatible: 'oneOf' conditional failed, one must be fixed:
	['fsl,imx53-flexcan', 'fsl,p1010-flexcan'] is too long
	Additional items are not allowed ('fsl,p1010-flexcan' was unexpected)
	'fsl,imx53-flexcan' is not one of ['fsl,imx7d-flexcan', 'fsl,imx6ul-flexcan', 'fsl,imx6sx-flexcan']
	'fsl,imx53-flexcan' is not one of ['fsl,ls1028ar1-flexcan']
	'fsl,imx6q-flexcan' was expected
	'fsl,lx2160ar1-flexcan' was expected
	From schema: /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml

The error is fixed by replacing the "fsl,p1010-flexcan" compatible
(which turned out the be incompatible) with "fsl,imx25-flexcan" in the
binding example.

Reported-by: Rob Herring <robh+dt@kernel.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20201111213548.1621094-1-mkl@pengutronix.de
[robh: Add "fsl,imx25-flexcan" as fallback]
Signed-off-by: Rob Herring <robh@kernel.org>
2020-11-13 08:49:59 -06:00
Marc Kleine-Budde
3bbb73f8e6 dt-bindings: can: fsl,flexcan.yaml: fix compatible for i.MX35 and i.MX53
As both the i.MX35 and i.MX53 flexcan IP cores are compatible to the i.MX25,
they are listed as:

    compatible = "fsl,imx35-flexcan", "fsl,imx25-flexcan";

and:

    compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";

in the SoC device trees.

This patch fixes the following errors, which shows up during a dtbs_check:

arch/arm/boot/dts/imx53-ard.dt.yaml: can@53fc8000: compatible: 'oneOf' conditional failed, one must be fixed:
   ['fsl,imx53-flexcan', 'fsl,imx25-flexcan'] is too long
   Additional items are not allowed ('fsl,imx25-flexcan' was unexpected)
   'fsl,imx53-flexcan' is not one of ['fsl,imx7d-flexcan', 'fsl,imx6ul-flexcan', 'fsl,imx6sx-flexcan']
   'fsl,imx53-flexcan' is not one of ['fsl,ls1028ar1-flexcan']
   'fsl,imx6q-flexcan' was expected
   'fsl,lx2160ar1-flexcan' was expected
   From schema: Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml

Fixes: e5ab9aa7e4 ("dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml")
Reported-by: Rob Herring <robh+dt@kernel.org>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20201111130507.1560881-4-mkl@pengutronix.de
[robh: drop singular fsl,imx53-flexcan and fsl,imx35-flexcan]
Signed-off-by: Rob Herring <robh@kernel.org>
2020-11-13 08:46:57 -06:00
Konrad Dybcio
23c2164160 arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver
QCOM KRYO2XX Silver cores are Cortex-A53 based and are
susceptible to the 845719 erratum. Add them to the lookup
list to apply the erratum.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20201104232218.198800-5-konrad.dybcio@somainline.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-13 09:47:08 +00:00
Konrad Dybcio
38328d4011 arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list
KRYO2XX silver (LITTLE) CPUs are based on Cortex-A53
and they are not affected by spectre-v2.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20201104232218.198800-4-konrad.dybcio@somainline.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-13 09:47:08 +00:00
Konrad Dybcio
e3dd11a9f2 arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist
QCOM KRYO2XX gold (big) silver (LITTLE) CPU cores are based on
Cortex-A73 and Cortex-A53 respectively and are meltdown safe,
hence add them to kpti_safe_list[].

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20201104232218.198800-3-konrad.dybcio@somainline.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-13 09:47:08 +00:00
Konrad Dybcio
77473cffef arm64: Add MIDR value for KRYO2XX gold/silver CPU cores
Add MIDR value for KRYO2XX gold (big) and silver (LITTLE)
CPU cores which are used in Qualcomm Technologies, Inc.
SoCs. This will be used to identify and apply errata
which are applicable for these CPU cores.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20201104232218.198800-2-konrad.dybcio@somainline.org
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-13 09:47:08 +00:00
Anshuman Khandual
58284a901b arm64/mm: Validate hotplug range before creating linear mapping
During memory hotplug process, the linear mapping should not be created for
a given memory range if that would fall outside the maximum allowed linear
range. Else it might cause memory corruption in the kernel virtual space.

Maximum linear mapping region is [PAGE_OFFSET..(PAGE_END -1)] accommodating
both its ends but excluding PAGE_END. Max physical range that can be mapped
inside this linear mapping range, must also be derived from its end points.

This ensures that arch_add_memory() validates memory hot add range for its
potential linear mapping requirements, before creating it with
__create_pgd_mapping().

Fixes: 4ab2150615 ("arm64: Add memory hotplug support")
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1605252614-761-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-11-13 09:45:08 +00:00
Dave Airlie
41f3ed2cac Merge tag 'amd-drm-fixes-5.10-2020-11-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
amd-drm-fixes-5.10-2020-11-12:

amdgpu:
- Pageflip fix for DCN3
- Declare TA firmware for green sardine
- Headless navi fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201113055512.3963-1-alexander.deucher@amd.com
2020-11-13 16:05:31 +10:00
Dave Airlie
858fbdbcef - Pull phys pread/pwrite implementations to the backend (Chris)
- Correctly set SFC capability for video engines (Venkata)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAl+uGG0ACgkQ+mJfZA7r
 E8piQwf/Q9B5IHSXwXG5PamvzVYv4gCw61VPOGIL4SIoaX7Y5psQpVX4Dq02dT/e
 zVyma+42sx88zUg7SmA2TDFsT0YnkorcgEBLG3m5pFE6u2FST1DVsW6jacqCoRk+
 /hBjsBkocjpOn2WQ1fMdvpp9KmQlPZj7M9iuQG9AnNjcw5m7/o9+GjJXRAzRQpeb
 9dEokC+8xuqqVI6hNACz/QOi9RWf/DmS6Xz2KiSobuyKrkzgiS5QnbModqfyB13J
 VucoXlb0ivo7FmemWRlkgBTdplu6daVv86uQDK5mcHyo9R/pnhSUVcPEIRV7NFeV
 qFjCAPF5jWiR2UPN0T/xcydj8ecv9Q==
 =MR5S
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- Pull phys pread/pwrite implementations to the backend (Chris)
- Correctly set SFC capability for video engines (Venkata)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201113052551.GA1319429@intel.com
2020-11-13 16:01:41 +10:00
Tianci.Yin
38a2509184 drm/amdgpu: enable DCN for navi10 headless SKU
There is a NULL pointer crash when DCN disabled on headless SKU.
On normal SKU, the variable adev->ddev.mode_config.funcs is
initialized in dm_hw_init(), and it is fine to access it in
amdgpu_device_resume(). But on headless SKU, DCN is disabled,
the funcs variable is not initialized, then crash arises.
Enable DCN to fix this issue.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:30:05 -05:00
Roman Li
2664219255 drm/amdgpu: add ta firmware load for green-sardine
[Why]
In preparation to enabling hdcp on green sardine.

[How]
Add green-sardine ta f/w loading in psp_v12

Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-13 00:29:26 -05:00
Dave Airlie
59f7dcd929 One Kconfig fix for bridge/cdns, a missing include for hypervb_fb, an
out-of-bound access fix for gma500 and a unbalanced regulator fix for
 mcde.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX60zagAKCRDj7w1vZxhR
 xRpCAP9DO2oXOTZmdRTGFAapnPRs+SS70Xl4j9gEVM/WNP77xQEAqPMwb1lu/pOK
 0zFFL4hJHQZsI0ucrpBIaFf/8tZ/SQw=
 =+1eJ
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2020-11-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

One Kconfig fix for bridge/cdns, a missing include for hypervb_fb, an
out-of-bound access fix for gma500 and a unbalanced regulator fix for
mcde.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201112130726.qwtryqvgspmljkax@gilmour.lan
2020-11-13 15:01:14 +10:00
Masami Hiramatsu
50b8a74285 bootconfig: Extend the magic check range to the preceding 3 bytes
Since Grub may align the size of initrd to 4 if user pass
initrd from cpio, we have to check the preceding 3 bytes as well.

Link: https://lkml.kernel.org/r/160520205132.303174.4876760192433315429.stgit@devnote2

Cc: stable@vger.kernel.org
Fixes: 85c46b78da ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly")
Reported-by: Chen Yu <yu.chen.surf@gmail.com>
Tested-by: Chen Yu <yu.chen.surf@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-11-12 20:36:52 -05:00
Venkata Sandeep Dhanalakota
5ce6861d36 drm/i915: Correctly set SFC capability for video engines
SFC capability of video engines is not set correctly because i915
is testing for incorrect bits.

Fixes: c5d3e39caa ("drm/i915: Engine discovery query")
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: <stable@vger.kernel.org> # v5.3+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20201106011842.36203-1-daniele.ceraolospurio@intel.com
(cherry picked from commit ad18fa0f5f)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2020-11-12 19:47:30 -05:00
Chris Wilson
0eb0feb9ae drm/i915/gem: Pull phys pread/pwrite implementations to the backend
Move the specialised interactions with the physical GEM object from the
pread/pwrite ioctl handler into the phys backend.

Currently, if one is able to exhaust the entire aperture and then try to
pwrite into an object not backed by struct page, we accidentally invoked
the phys pwrite handler on a non-phys object; calamitous.

Fixes: c6790dc223 ("drm/i915: Wean off drm_pci_alloc/drm_pci_free")
Testcase: igt/gem_pwrite/exhaustion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-2-chris@chris-wilson.co.uk
(cherry picked from commit 852e1b3644)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2020-11-12 19:47:30 -05:00
Matthew Auld
0a1db6f084 drm/i915/gem: Allow backends to override pread implementation
As there are more and more complicated interactions between the different
backing stores and userspace, push the control into the backends rather
than accumulate them all inside the ioctl handlers.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-1-chris@chris-wilson.co.uk
(cherry picked from commit 0049b68845)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2020-11-12 19:47:30 -05:00
Linus Torvalds
585e5b17b9 another fscrypt fix for 5.10-rc4
Fix a regression where new files weren't using inline encryption when
 they should be.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCX63AIhQcZWJpZ2dlcnNA
 Z29vZ2xlLmNvbQAKCRDzXCl4vpKOKzlsAP9/m9XfxW3SwG4D1dnajXQPNZgsaby2
 AxkqJyjxq3kBvQEAo8fPe8uURAzYBA9C5tcP0+QCB3jqZkHu0HVCeQKvXwI=
 =zldW
 -----END PGP SIGNATURE-----

Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt

Pull fscrypt fix from Eric Biggers:
 "Fix a regression where new files weren't using inline encryption when
  they should be"

* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
  fscrypt: fix inline encryption not used on new files
2020-11-12 16:39:58 -08:00
Linus Torvalds
20ca21dfcc Fix jdata data corruption and glock reference leak
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEJZs3krPW0xkhLMTc1b+f6wMTZToFAl+ttO4UHGFncnVlbmJh
 QHJlZGhhdC5jb20ACgkQ1b+f6wMTZTqAdg//Xssi+p1N13BfAdyYdPoqEQ9JKSZH
 vEwth53ASsEy+WXz7TMulmrwJXWyQXfEibPvGLrHZZ0zgdw3DyLqGCnDCJOqmdOQ
 /e08MmJ9LdGz06IHnlzhWj3Lm4KpJaFzil4HBYE8Jlu4PimLVKcIQoDRRMV2DURl
 arPSm/dJtqUFVDj9+bawq5mRmxA0gXPFspf857wnDzNB+hGlll2wvK70vapNlg39
 hNVjDMfhb04CVNsJoVZS4wRI3TlwvOjlxB9WKvNvyRDF1jQT8bSX8UJyq5Qupf+K
 /HJvZFrm0gv6W0Z9UFMy5JXIQ5NTriBzrdu5rgzhKPA/r8oV0/8i0pq/macXHOQF
 shPNZQXdsN6uCK57JNugSW6C96l2K4kP7rOSjTE6N0WFo9y/u2bCAbo0+hh0lvns
 2sSKLX2ZtVwvyy0LVcAJa0Q1ZU9CK5F4J8F2Zy3DFOJqV1GuRCh0LBgyWoL4jJEQ
 J3JLJdUevP7E7dvXIwzsDNWOUiRy0xAqFQOIcdvt4WhMsH7QsHIiYjodHFLKx2qq
 Xk9YSTua7A+UjpLDyt2iMbumplMomQqx72NLUM5Kv9r+kSId4Ird/Q8HYHvWezzY
 xUjIvOAMXI/ZKsrJRwE0V2xI+q2wmHPFYrBjl0CymWsCksc9kB1wzkqQYp/Tcxxm
 hhp3iPPY/mEXr4s=
 =bTtI
 -----END PGP SIGNATURE-----

Merge tag 'gfs2-v5.10-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fixes from Andreas Gruenbacher:
 "Fix jdata data corruption and glock reference leak"

* tag 'gfs2-v5.10-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: Fix case in which ail writes are done to jdata holes
  Revert "gfs2: Ignore journal log writes for jdata holes"
  gfs2: fix possible reference leak in gfs2_check_blk_type
2020-11-12 16:37:14 -08:00
Linus Torvalds
db7c953555 Networking fixes for 5.10-rc4, including fixes from the bpf subtree.
Current release - regressions:
 
  - arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for ENETC
 
 Current release - bugs in new features:
 
  - mptcp: provide rmem[0] limit offset to fix oops
 
 Previous release - regressions:
 
  - IPv6: Set SIT tunnel hard_header_len to zero to fix path MTU
    calculations
 
  - lan743x: correctly handle chips with internal PHY
 
  - bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE
 
  - mlx5e: Fix VXLAN port table synchronization after function reload
 
 Previous release - always broken:
 
  - bpf: Zero-fill re-used per-cpu map element
 
  - net: udp: fix out-of-order packets when forwarding with UDP GSO
              fraglists turned on
    - fix UDP header access on Fast/frag0 UDP GRO
    - fix IP header access and skb lookup on Fast/frag0 UDP GRO
 
  - ethtool: netlink: add missing netdev_features_change() call
 
  - net: Update window_clamp if SOCK_RCVBUF is set
 
  - igc: Fix returning wrong statistics
 
  - ch_ktls: fix multiple leaks and corner cases in Chelsio TLS offload
 
  - tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies
 
  - r8169: disable hw csum for short packets on all chip versions
 
  - vrf: Fix fast path output packet handling with async Netfilter rules
 
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAl+thbIACgkQMUZtbf5S
 Irsy0RAAhYIYDNMSkQhcVcQPMxbtStwgTtKrWxg/D2zh3Kg+B4oRgoNZnt9kmlHX
 Su/aRWbTWBkDIMxIWBfRsO3z5zSQm4yLG1FTlfsOcWzOJcsntCO8SzikyxtnEZK8
 Bpi7dOoKB6KF0V2YjM9AHh5fbXvS7KJfp/PjZ7Kpn5BEbFV8rKtIyiJxwXXZUr6O
 ddM9Om4i0zf+dmsY1HVEyowPQMVB3vbn8F3dPk3ZrD8NVa53NtvMRxHKSsourRbZ
 yp4LKZV+POKHPFglO4jhLymhyeiwb1qgA8wssk7EKu0bwPeOcER4Tpewh1ib4C/C
 sRRzj0Wlw6dyPCkyNKx23D7dF/DrnLmXLUBhGS2mu2htSlWOH6w6rFQoVSNGGy9T
 DKUlUVUPG80mgYdME6NLJ27GOGQzxoAvzWgpcL6dJs9jz8nQqABJeXvdjw/vc/XH
 AOaKy4VwE3qf0W106JpUb+a/q0RJf7w3o4c1vLc/AZwpshNBOsrJBqrTk2E5Nrhd
 mcQykaF++DbLPIyTqhHl0GpKapohThESyMvfc4WRBFBaCwgFdOY/t0Gz3GA2N8Jc
 fuq9NOB1bfouaFGfzdkZ7RZJi3lFqZfv/XiJCh/knp1/lHAQPo4TuADcFDsjeEc9
 yr48SRDnCqahAQ7bUP0b5i31SZzwAYb/HnwYuvf4LWFvHl9XG5A=
 =AKM7
 -----END PGP SIGNATURE-----

Merge tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Current release - regressions:

   - arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for
     ENETC

  Current release - bugs in new features:

   - mptcp: provide rmem[0] limit offset to fix oops

  Previous release - regressions:

   - IPv6: Set SIT tunnel hard_header_len to zero to fix path MTU
     calculations

   - lan743x: correctly handle chips with internal PHY

   - bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE

   - mlx5e: Fix VXLAN port table synchronization after function reload

  Previous release - always broken:

   - bpf: Zero-fill re-used per-cpu map element

   - fix out-of-order UDP packets when forwarding with UDP GSO fraglists
     turned on:
       - fix UDP header access on Fast/frag0 UDP GRO
       - fix IP header access and skb lookup on Fast/frag0 UDP GRO

   - ethtool: netlink: add missing netdev_features_change() call

   - net: Update window_clamp if SOCK_RCVBUF is set

   - igc: Fix returning wrong statistics

   - ch_ktls: fix multiple leaks and corner cases in Chelsio TLS offload

   - tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies

   - r8169: disable hw csum for short packets on all chip versions

   - vrf: Fix fast path output packet handling with async Netfilter
     rules"

* tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits)
  lan743x: fix use of uninitialized variable
  net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO
  net: udp: fix UDP header access on Fast/frag0 UDP GRO
  devlink: Avoid overwriting port attributes of registered port
  vrf: Fix fast path output packet handling with async Netfilter rules
  cosa: Add missing kfree in error path of cosa_write
  net: switch to the kernel.org patchwork instance
  ch_ktls: stop the txq if reaches threshold
  ch_ktls: tcb update fails sometimes
  ch_ktls/cxgb4: handle partial tag alone SKBs
  ch_ktls: don't free skb before sending FIN
  ch_ktls: packet handling prior to start marker
  ch_ktls: Correction in middle record handling
  ch_ktls: missing handling of header alone
  ch_ktls: Correction in trimmed_len calculation
  cxgb4/ch_ktls: creating skbs causes panic
  ch_ktls: Update cheksum information
  ch_ktls: Correction in finding correct length
  cxgb4/ch_ktls: decrypted bit is not enough
  net/x25: Fix null-ptr-deref in x25_connect
  ...
2020-11-12 14:02:04 -08:00
Linus Torvalds
200f9d21aa NFS Client Bugfixes for Linux 5.10-rc4
- Stable fixes:
   - Fix failure to unregister shrinker
 
 - Other fixes:
   - Fix unnecessary locking to clear up some contention
   - Fix listxattr receive buffer size
   - Fix default mount options for nfsroot
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAl+tbGIACgkQ18tUv7Cl
 QOvRyxAA4YXD1dlnO2Xbqo7ZyrgoZkVn08rb9yloeCuCNJDZPDSXt2QHAKdbmMU+
 8dxpcWN/8RUEUJK3cccNf2+XV/AWqqaFnFXylcfXLUnjZx0f30ou+HO+BRZFInVd
 OgG3njO94jV1B3RK38J7jyVRqx3hd0Vkq9Ja4LVF2l/x9ueGrj+pOdNauWr1JhFo
 6l4Fk2PKakLKJGsxLXmKlBb7p+EEwKa1qRov8SED33uTZkSnbFOmbxtEp1bu7sQx
 UKBTLADny9FClA1sjM45XN2nLS99/uUl/CaRKm/GB5nP4WKG4J3HgziAAvVglHcP
 yrUIiwLaUGZvteiO5O6NJqZpk6NyzWnBo4ZDt/TZcQ5nvK7uD6buUbDFFn++lbKm
 qwVWCnsme7sx3zVLLS4pY2GXnNNkGozjyrQOV0NQx1QphfalKsXHxeXikY+dkXr5
 FZwKodWxiKlsZj8cyOVjrm9q3+EsBnW8FyitgVQH4QIvcU9Z9zdB5QFyy7KsG4bw
 3iKsbz4HsJ0K10m7ykNEcR5R6XQBnFVWGxAHkQ3qbxzw9hYvhEebP/N2P7x3DC1X
 3gVPDto03Vc5PsuGoXm50kqXpRD3w+fnpf+HMZFmRbqjanqBHvgyYu58Zy0fXEnQ
 VigUcvsjAJhmoneahO3va8HF3a70PPqhzTTVKtfORBNg9uHmS1M=
 =7a8T
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client bugfixes from Anna Schumaker:
 "Stable fixes:
  - Fix failure to unregister shrinker

  Other fixes:
  - Fix unnecessary locking to clear up some contention
  - Fix listxattr receive buffer size
  - Fix default mount options for nfsroot"

* tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  NFS: Remove unnecessary inode lock in nfs_fsync_dir()
  NFS: Remove unnecessary inode locking in nfs_llseek_dir()
  NFS: Fix listxattr receive buffer size
  NFSv4.2: fix failure to unregister shrinker
  nfsroot: Default mount option should ask for built-in NFS version
2020-11-12 13:49:12 -08:00
Linus Torvalds
af5043c89a ACPI updates for 5.10-rc4.
- Fix documentation regarding GPIO properties (Andy Shevchenko).
 
  - Fix spelling mistakes in ACPI documentation (Flavio Suligoi).
 
  - Fix white space inconsistencies in ACPI code (Maximilian Luz).
 
  - Fix string formatting in the ACPI Generic Event Device (GED)
    driver (Nick Desaulniers).
 
  - Add Intel Alder Lake device IDs to the ACPI drivers used by the
    Dynamic Platform and Thermal Framework (Srinivas Pandruvada).
 
  - Add lid-related DMI quirk for Medion Akoya E2228T to the ACPI
    button driver (Hans de Goede).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl+tVekSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxoAQQAJOvpgaXEwAm64wLVCuJRllGWcMmufh5
 EdUb1JMZ4IKhnPLi6ZWvmOKDNkWyIqG5DgT0FILl5b5LgWOGtvqsZ5aTqOKDTJvJ
 57cMVXQHBna5+Zp9nL51XeQfDZukmVYaTxckdgaeltsal8/6Gfy/V6mkLlSl3a5L
 PkxxrDVa9M1SVg/aRsx//HKw3M4O/aGURR3kv6ao8DetMRNORbuY1pv2znWRSda/
 eMcNZXEyEwgekL34VKBJhxUD/pSjunV6qcUPin3lA8viaSjbaLkvdTteOVrlwu/S
 EE8wXfwDODPJT1PBvckobGjsQfHix0COK8MatkxUMEyLBG2LdHnHhV8fObQtAEuM
 wOf2Yz7LtCrSWVC9VOEMUKfIXbIpj4VHqOj7Oby+ymIrq5OaXxOmixwjaQh2HLgM
 XCCSicP9kk+UxiVK15gGF1veVqld7CA6SRm9cGHc94QJuTsvrl3p5E32UHz0CjkM
 l+CBIhOUE7cDq1AQ0ikJJmfdr152NzFILIbMAa+xjFgFmWZabOJszYGSlKl7FNnG
 xbYI4cR8uDsYR1Mjb66yhpdncSxThq3HkuX0zgvhEpclyfWm3Ocg+4ZhIhn9VHug
 Wj/dDjBQozNgGYvtUj085FzDCnVgarR4wjZ3QtubUEvMia1m7ssTrPSys9aE5Gwt
 RWqs7x9Feqw/
 =tUOl
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These are mostly docmentation fixes and janitorial changes plus some
  new device IDs and a new quirk.

  Specifics:

   - Fix documentation regarding GPIO properties (Andy Shevchenko)

   - Fix spelling mistakes in ACPI documentation (Flavio Suligoi)

   - Fix white space inconsistencies in ACPI code (Maximilian Luz)

   - Fix string formatting in the ACPI Generic Event Device (GED) driver
     (Nick Desaulniers)

   - Add Intel Alder Lake device IDs to the ACPI drivers used by the
     Dynamic Platform and Thermal Framework (Srinivas Pandruvada)

   - Add lid-related DMI quirk for Medion Akoya E2228T to the ACPI
     button driver (Hans de Goede)"

* tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: DPTF: Support Alder Lake
  Documentation: ACPI: fix spelling mistakes
  ACPI: button: Add DMI quirk for Medion Akoya E2228T
  ACPI: GED: fix -Wformat
  ACPI: Fix whitespace inconsistencies
  ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name
  Documentation: firmware-guide: gpio-properties: Clarify initial output state
  Documentation: firmware-guide: gpio-properties: active_low only for GpioIo()
  Documentation: firmware-guide: gpio-properties: Fix factual mistakes
2020-11-12 11:06:53 -08:00
Linus Torvalds
fcfb67918c Power management fixes for 5.10-rc4.
Make the intel_pstate driver behave as expected when it operates in
 the passive mode with HWP enabled and the "powersave" governor on
 top of it.
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl+tVWUSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxNIwQALNj2uV+CJL4DCvcMPFqvtB7bwwsk1mS
 fqRk/wEhz5noE/x3uhD1DKlL3VPj1sDUVRmHKSdIgqrwSFX2zbw+cf2y6E94WdDz
 /7x0Khj4mT5cfGHacItNBnkglCrxVXxSdU4DcPTgINlWM8iv6W8D3uK5OpFYDtKr
 5shqf45U8/+fh7hGCtNnofAZEVU+YTDzY0jHnnIxD8FKXFLaDFj6jVGjgdXgBD5s
 /XgsKz867SybzLuTW9O0SKDughMhmhaqXnHwtu9jvlw/3i1Wn16r2LeCWyIkoxWy
 MRNXg4rOerJvK084gxJW9BWmCuA6NnKBtKvXNlqHzl14ept3Cf3dYtaQ50x7eYQB
 osMWbBDdRjV1fo7SptMXQmn8sKxZgrjc0pSYicbiMOH3BkpIn5ed4+MPWfWN8pyb
 piRkx17sFwPE7jI5Rkuv+EucisG8tNvWImE9gFENxtelF1rj7njV1xMYlevrD/9u
 aYTNYUeRAc6DA2AF/mzXtqwXpDqoxa7X0UBl8JFmkLvcvORtR3XY6HlcYMgp820a
 /Sh0rZmuUlssUnrhd1Kr6QRiMIrCihTnbhTXsY0oZH4QSYYJCS89qijngAtqobEt
 K+eqsHHoGmVK3Ch+O+YpFo+GpH5Avk0b/DisX3Zu20hGEX4fvv4q7ZTuNSnHhgOL
 ERjLBUQZUFaf
 =zh3K
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "Make the intel_pstate driver behave as expected when it operates in
  the passive mode with HWP enabled and the 'powersave' governor on top
  of it"

* tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: Take CPUFREQ_GOV_STRICT_TARGET into account
  cpufreq: Add strict_target to struct cpufreq_policy
  cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET
  cpufreq: Introduce governor flags
2020-11-12 11:03:38 -08:00
Sven Van Asbroeck
edbc21113b lan743x: fix use of uninitialized variable
When no devicetree is present, the driver will use an
uninitialized variable.

Fix by initializing this variable.

Fixes: 902a66e08c ("lan743x: correctly handle chips with internal PHY")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 10:03:16 -08:00
Jakub Kicinski
5861c8cb1c Merge branch 'net-udp-fix-fast-frag0-udp-gro'
Alexander Lobakin says:

====================
net: udp: fix Fast/frag0 UDP GRO

While testing UDP GSO fraglists forwarding through driver that uses
Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order
iperf packets:

[ ID] Interval           Transfer     Bitrate         Jitter
[SUM]  0.0-40.0 sec  12106 datagrams received out-of-order

Simple switch to napi_gro_receive() or any other method without frag0
shortcut completely resolved them.

I've found two incorrect header accesses in GRO receive callback(s):
 - udp_hdr() (instead of udp_gro_udphdr()) that always points to junk
   in "fast" mode and could probably do this in "regular".
   This was the actual bug that caused all out-of-order delivers;
 - udp{4,6}_lib_lookup_skb() -> ip{,v6}_hdr() (instead of
   skb_gro_network_header()) that potentionally might return odd
   pointers in both modes.

Each patch addresses one of these two issues.

This doesn't cover a support for nested tunnels as it's out of the
subject and requires more invasive changes. It will be handled
separately in net-next series.

Credits:
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Willem de Bruijn <willemb@google.com>

Since v4 [0]:
 - split the fix into two logical ones (Willem);
 - replace ternaries with plain ifs to beautify the code (Jakub);
 - drop p->data part to reintroduce it later in abovementioned set.

Since v3 [1]:
 - restore the original {,__}udp{4,6}_lib_lookup_skb() and use
   private versions of them inside GRO code (Willem).

Since v2 [2]:
 - dropped redundant check introduced in v2 as it's performed right
   before (thanks to Eric);
 - udp_hdr() switched to data + off for skbs from list (also Eric);
 - fixed possible malfunction of {,__}udp{4,6}_lib_lookup_skb() with
   Fast/frag0 due to ip{,v6}_hdr() usage (Willem).

Since v1 [3]:
 - added a NULL pointer check for "uh" as suggested by Willem.

[0] https://lore.kernel.org/netdev/Ha2hou5eJPcblo4abjAqxZRzIl1RaLs2Hy0oOAgFs@cp4-web-036.plabs.ch
[1] https://lore.kernel.org/netdev/MgZce9htmEtCtHg7pmWxXXfdhmQ6AHrnltXC41zOoo@cp7-web-042.plabs.ch
[2] https://lore.kernel.org/netdev/0eaG8xtbtKY1dEKCTKUBubGiC9QawGgB3tVZtNqVdY@cp4-web-030.plabs.ch
[3] https://lore.kernel.org/netdev/YazU6GEzBdpyZMDMwJirxDX7B4sualpDG68ADZYvJI@cp4-web-034.plabs.ch
====================

Link: https://lore.kernel.org/r/hjGOh0iCOYyo1FPiZh6TMXcx3YCgNs1T1eGKLrDz8@cp4-web-037.plabs.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 09:55:59 -08:00
Alexander Lobakin
55e729889b net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO
udp{4,6}_lib_lookup_skb() use ip{,v6}_hdr() to get IP header of the
packet. While it's probably OK for non-frag0 paths, this helpers
will also point to junk on Fast/frag0 GRO when all headers are
located in frags. As a result, sk/skb lookup may fail or give wrong
results. To support both GRO modes, skb_gro_network_header() might
be used. To not modify original functions, add private versions of
udp{4,6}_lib_lookup_skb() only to perform correct sk lookups on GRO.

Present since the introduction of "application-level" UDP GRO
in 4.7-rc1.

Misc: replace totally unneeded ternaries with plain ifs.

Fixes: a6024562ff ("udp: Add GRO functions to UDP socket")
Suggested-by: Willem de Bruijn <willemb@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 09:55:51 -08:00
Alexander Lobakin
4b1a86281c net: udp: fix UDP header access on Fast/frag0 UDP GRO
UDP GRO uses udp_hdr(skb) in its .gro_receive() callback. While it's
probably OK for non-frag0 paths (when all headers or even the entire
frame are already in skb head), this inline points to junk when
using Fast GRO (napi_gro_frags() or napi_gro_receive() with only
Ethernet header in skb head and all the rest in the frags) and breaks
GRO packet compilation and the packet flow itself.
To support both modes, skb_gro_header_fast() + skb_gro_header_slow()
are typically used. UDP even has an inline helper that makes use of
them, udp_gro_udphdr(). Use that instead of troublemaking udp_hdr()
to get rid of the out-of-order delivers.

Present since the introduction of plain UDP GRO in 5.0-rc1.

Fixes: e20cf8d3f1 ("udp: implement GRO for plain UDP sockets.")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 09:55:43 -08:00
Bob Peterson
4e79e3f08e gfs2: Fix case in which ail writes are done to jdata holes
Patch b2a846dbef ("gfs2: Ignore journal log writes for jdata holes")
tried (unsuccessfully) to fix a case in which writes were done to jdata
blocks, the blocks are sent to the ail list, then a punch_hole or truncate
operation caused the blocks to be freed. In other words, the ail items
are for jdata holes. Before b2a846dbef, the jdata hole caused function
gfs2_block_map to return -EIO, which was eventually interpreted as an
IO error to the journal, and then withdraw.

This patch changes function gfs2_get_block_noalloc, which is only used
for jdata writes, so it returns -ENODATA rather than -EIO, and when
-ENODATA is returned to gfs2_ail1_start_one, the error is ignored.
We can safely ignore it because gfs2_ail1_start_one is only called
when the jdata pages have already been written and truncated, so the
ail1 content no longer applies.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-11-12 18:55:20 +01:00
Bob Peterson
d3039c0615 Revert "gfs2: Ignore journal log writes for jdata holes"
This reverts commit b2a846dbef.

That commit changed the behavior of function gfs2_block_map to return
-ENODATA in cases where a hole (IOMAP_HOLE) is encountered and create is
false.  While that fixed the intended problem for jdata, it also broke
other callers of gfs2_block_map such as some jdata block reads.  Before
the patch, an encountered hole would be skipped and the buffer seen as
unmapped by the caller.  The patch changed the behavior to return
-ENODATA, which is interpreted as an error by the caller.

The -ENODATA return code should be restricted to the specific case where
jdata holes are encountered during ail1 writes.  That will be done in a
later patch.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2020-11-12 18:41:57 +01:00
Jakub Kicinski
8a5c2906c5 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2020-11-10

This series contains updates to i40e and igc drivers and the MAINTAINERS
file.

Slawomir fixes updating VF MAC addresses to fix various issues related
to reporting and setting of these addresses for i40e.

Dan Carpenter fixes a possible used before being initialized issue for
i40e.

Vinicius fixes reporting of netdev stats for igc.

Tony updates repositories for Intel Ethernet Drivers.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  MAINTAINERS: Update repositories for Intel Ethernet Drivers
  igc: Fix returning wrong statistics
  i40e, xsk: uninitialized variable in i40e_clean_rx_irq_zc()
  i40e: Fix MAC address setting for a VF via Host/VM
====================

Link: https://lore.kernel.org/r/20201111001955.533210-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 08:47:23 -08:00
Parav Pandit
9f73bd1c2c devlink: Avoid overwriting port attributes of registered port
Cited commit in fixes tag overwrites the port attributes for the
registered port.

Avoid such error by checking registered flag before setting attributes.

Fixes: 71ad8d55f8 ("devlink: Replace devlink_port_attrs_set parameters with a struct")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20201111034744.35554-1-parav@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 08:06:57 -08:00