Skip to content

Commit 4f30a53

Browse files
committed
Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y
2 parents 3b53ff1 + 1244bbb commit 4f30a53

File tree

129 files changed

+1472
-1361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1472
-1361
lines changed

Documentation/networking/ip-sysctl.txt

+5-8
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,11 @@ min_adv_mss - INTEGER
133133

134134
IP Fragmentation:
135135

136-
ipfrag_high_thresh - INTEGER
137-
Maximum memory used to reassemble IP fragments. When
138-
ipfrag_high_thresh bytes of memory is allocated for this purpose,
139-
the fragment handler will toss packets until ipfrag_low_thresh
140-
is reached. This also serves as a maximum limit to namespaces
141-
different from the initial one.
142-
143-
ipfrag_low_thresh - INTEGER
136+
ipfrag_high_thresh - LONG INTEGER
137+
Maximum memory used to reassemble IP fragments.
138+
139+
ipfrag_low_thresh - LONG INTEGER
140+
(Obsolete since linux-4.17)
144141
Maximum memory used to reassemble IP fragments before the kernel
145142
begins to remove incomplete fragment queues to free up resources.
146143
The kernel still accepts new fragments for defragmentation.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 14
4-
SUBLEVEL = 70
4+
SUBLEVEL = 71
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

arch/arc/configs/axs101_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
2-
# CONFIG_SWAP is not set
32
CONFIG_SYSVIPC=y
43
CONFIG_POSIX_MQUEUE=y
54
# CONFIG_CROSS_MEMORY_ATTACH is not set

arch/arc/configs/axs103_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
2-
# CONFIG_SWAP is not set
32
CONFIG_SYSVIPC=y
43
CONFIG_POSIX_MQUEUE=y
54
# CONFIG_CROSS_MEMORY_ATTACH is not set

arch/arc/configs/axs103_smp_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CONFIG_DEFAULT_HOSTNAME="ARCLinux"
2-
# CONFIG_SWAP is not set
32
CONFIG_SYSVIPC=y
43
CONFIG_POSIX_MQUEUE=y
54
# CONFIG_CROSS_MEMORY_ATTACH is not set

arch/mips/cavium-octeon/octeon-platform.c

+2
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static int __init octeon_ehci_device_init(void)
322322
return 0;
323323

324324
pd = of_find_device_by_node(ehci_node);
325+
of_node_put(ehci_node);
325326
if (!pd)
326327
return 0;
327328

@@ -384,6 +385,7 @@ static int __init octeon_ohci_device_init(void)
384385
return 0;
385386

386387
pd = of_find_device_by_node(ohci_node);
388+
of_node_put(ohci_node);
387389
if (!pd)
388390
return 0;
389391

arch/mips/generic/init.c

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ void __init arch_init_irq(void)
204204
"mti,cpu-interrupt-controller");
205205
if (!cpu_has_veic && !intc_node)
206206
mips_cpu_irq_init();
207+
of_node_put(intc_node);
207208

208209
irqchip_init();
209210
}

arch/mips/include/asm/io.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ static inline void * phys_to_virt(unsigned long address)
141141
/*
142142
* ISA I/O bus memory addresses are 1:1 with the physical address.
143143
*/
144-
static inline unsigned long isa_virt_to_bus(volatile void * address)
144+
static inline unsigned long isa_virt_to_bus(volatile void *address)
145145
{
146-
return (unsigned long)address - PAGE_OFFSET;
146+
return virt_to_phys(address);
147147
}
148148

149-
static inline void * isa_bus_to_virt(unsigned long address)
149+
static inline void *isa_bus_to_virt(unsigned long address)
150150
{
151-
return (void *)(address + PAGE_OFFSET);
151+
return phys_to_virt(address);
152152
}
153153

154154
#define isa_page_to_bus page_to_phys

arch/mips/kernel/vdso.c

+20
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
#include <linux/err.h>
1414
#include <linux/init.h>
1515
#include <linux/ioport.h>
16+
#include <linux/kernel.h>
1617
#include <linux/mm.h>
1718
#include <linux/sched.h>
1819
#include <linux/slab.h>
1920
#include <linux/timekeeper_internal.h>
2021

2122
#include <asm/abi.h>
2223
#include <asm/mips-cps.h>
24+
#include <asm/page.h>
2325
#include <asm/vdso.h>
2426

2527
/* Kernel-provided data used by the VDSO. */
@@ -128,12 +130,30 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
128130
vvar_size = gic_size + PAGE_SIZE;
129131
size = vvar_size + image->size;
130132

133+
/*
134+
* Find a region that's large enough for us to perform the
135+
* colour-matching alignment below.
136+
*/
137+
if (cpu_has_dc_aliases)
138+
size += shm_align_mask + 1;
139+
131140
base = get_unmapped_area(NULL, 0, size, 0, 0);
132141
if (IS_ERR_VALUE(base)) {
133142
ret = base;
134143
goto out;
135144
}
136145

146+
/*
147+
* If we suffer from dcache aliasing, ensure that the VDSO data page
148+
* mapping is coloured the same as the kernel's mapping of that memory.
149+
* This ensures that when the kernel updates the VDSO data userland
150+
* will observe it without requiring cache invalidations.
151+
*/
152+
if (cpu_has_dc_aliases) {
153+
base = __ALIGN_MASK(base, shm_align_mask);
154+
base += ((unsigned long)&vdso_data - gic_size) & shm_align_mask;
155+
}
156+
137157
data_addr = base + gic_size;
138158
vdso_addr = data_addr + PAGE_SIZE;
139159

arch/mips/mm/c-r4k.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,8 @@ static void r4k_flush_icache_user_range(unsigned long start, unsigned long end)
835835
static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
836836
{
837837
/* Catch bad driver code */
838-
BUG_ON(size == 0);
838+
if (WARN_ON(size == 0))
839+
return;
839840

840841
preempt_disable();
841842
if (cpu_has_inclusive_pcaches) {
@@ -871,7 +872,8 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)
871872
static void r4k_dma_cache_inv(unsigned long addr, unsigned long size)
872873
{
873874
/* Catch bad driver code */
874-
BUG_ON(size == 0);
875+
if (WARN_ON(size == 0))
876+
return;
875877

876878
preempt_disable();
877879
if (cpu_has_inclusive_pcaches) {

arch/powerpc/platforms/powernv/npu-dma.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,9 @@ static int get_mmio_atsd_reg(struct npu *npu)
427427
int i;
428428

429429
for (i = 0; i < npu->mmio_atsd_count; i++) {
430-
if (!test_and_set_bit_lock(i, &npu->mmio_atsd_usage))
431-
return i;
430+
if (!test_bit(i, &npu->mmio_atsd_usage))
431+
if (!test_and_set_bit_lock(i, &npu->mmio_atsd_usage))
432+
return i;
432433
}
433434

434435
return -ENOSPC;

arch/s390/kvm/vsie.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ static int shadow_crycb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
170170
return set_validity_icpt(scb_s, 0x0039U);
171171

172172
/* copy only the wrapping keys */
173-
if (read_guest_real(vcpu, crycb_addr + 72, &vsie_page->crycb, 56))
173+
if (read_guest_real(vcpu, crycb_addr + 72,
174+
vsie_page->crycb.dea_wrapping_key_mask, 56))
174175
return set_validity_icpt(scb_s, 0x0035U);
175176

176177
scb_s->ecb3 |= ecb3_flags;

arch/x86/kernel/cpu/microcode/amd.c

+16-8
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ static enum ucode_state apply_microcode_amd(int cpu)
504504
struct microcode_amd *mc_amd;
505505
struct ucode_cpu_info *uci;
506506
struct ucode_patch *p;
507+
enum ucode_state ret;
507508
u32 rev, dummy;
508509

509510
BUG_ON(raw_smp_processor_id() != cpu);
@@ -521,23 +522,30 @@ static enum ucode_state apply_microcode_amd(int cpu)
521522

522523
/* need to apply patch? */
523524
if (rev >= mc_amd->hdr.patch_id) {
524-
c->microcode = rev;
525-
uci->cpu_sig.rev = rev;
526-
return UCODE_OK;
525+
ret = UCODE_OK;
526+
goto out;
527527
}
528528

529529
if (__apply_microcode_amd(mc_amd)) {
530530
pr_err("CPU%d: update failed for patch_level=0x%08x\n",
531531
cpu, mc_amd->hdr.patch_id);
532532
return UCODE_ERROR;
533533
}
534-
pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
535-
mc_amd->hdr.patch_id);
536534

537-
uci->cpu_sig.rev = mc_amd->hdr.patch_id;
538-
c->microcode = mc_amd->hdr.patch_id;
535+
rev = mc_amd->hdr.patch_id;
536+
ret = UCODE_UPDATED;
537+
538+
pr_info("CPU%d: new patch_level=0x%08x\n", cpu, rev);
539539

540-
return UCODE_UPDATED;
540+
out:
541+
uci->cpu_sig.rev = rev;
542+
c->microcode = rev;
543+
544+
/* Update boot_cpu_data's revision too, if we're on the BSP: */
545+
if (c->cpu_index == boot_cpu_data.cpu_index)
546+
boot_cpu_data.microcode = rev;
547+
548+
return ret;
541549
}
542550

543551
static int install_equiv_cpu_table(const u8 *buf)

arch/x86/kernel/cpu/microcode/intel.c

+12-5
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
795795
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
796796
struct cpuinfo_x86 *c = &cpu_data(cpu);
797797
struct microcode_intel *mc;
798+
enum ucode_state ret;
798799
static int prev_rev;
799800
u32 rev;
800801

@@ -817,9 +818,8 @@ static enum ucode_state apply_microcode_intel(int cpu)
817818
*/
818819
rev = intel_get_microcode_revision();
819820
if (rev >= mc->hdr.rev) {
820-
uci->cpu_sig.rev = rev;
821-
c->microcode = rev;
822-
return UCODE_OK;
821+
ret = UCODE_OK;
822+
goto out;
823823
}
824824

825825
/*
@@ -848,10 +848,17 @@ static enum ucode_state apply_microcode_intel(int cpu)
848848
prev_rev = rev;
849849
}
850850

851+
ret = UCODE_UPDATED;
852+
853+
out:
851854
uci->cpu_sig.rev = rev;
852-
c->microcode = rev;
855+
c->microcode = rev;
856+
857+
/* Update boot_cpu_data's revision too, if we're on the BSP: */
858+
if (c->cpu_index == boot_cpu_data.cpu_index)
859+
boot_cpu_data.microcode = rev;
853860

854-
return UCODE_UPDATED;
861+
return ret;
855862
}
856863

857864
static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,

arch/x86/kvm/vmx.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6965,8 +6965,8 @@ static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
69656965
if (!static_cpu_has(X86_FEATURE_HYPERVISOR))
69666966
return kvm_skip_emulated_instruction(vcpu);
69676967
else
6968-
return x86_emulate_instruction(vcpu, gpa, EMULTYPE_SKIP,
6969-
NULL, 0) == EMULATE_DONE;
6968+
return emulate_instruction(vcpu, EMULTYPE_SKIP) ==
6969+
EMULATE_DONE;
69706970
}
69716971

69726972
ret = kvm_mmu_page_fault(vcpu, gpa, PFERR_RSVD_MASK, NULL, 0);

arch/x86/mm/fault.c

-2
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,6 @@ static noinline int vmalloc_fault(unsigned long address)
317317
if (!(address >= VMALLOC_START && address < VMALLOC_END))
318318
return -1;
319319

320-
WARN_ON_ONCE(in_nmi());
321-
322320
/*
323321
* Synchronize this task's top level page-table
324322
* with the 'reference' page table.

block/bfq-cgroup.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ static void bfqg_and_blkg_get(struct bfq_group *bfqg)
224224

225225
void bfqg_and_blkg_put(struct bfq_group *bfqg)
226226
{
227-
bfqg_put(bfqg);
228-
229227
blkg_put(bfqg_to_blkg(bfqg));
228+
229+
bfqg_put(bfqg);
230230
}
231231

232232
void bfqg_stats_update_io_add(struct bfq_group *bfqg, struct bfq_queue *bfqq,

block/blk-mq-tag.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,6 @@ int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
416416
if (tdepth <= tags->nr_reserved_tags)
417417
return -EINVAL;
418418

419-
tdepth -= tags->nr_reserved_tags;
420-
421419
/*
422420
* If we are allowed to grow beyond the original size, allocate
423421
* a new set of tags before freeing the old one.
@@ -437,7 +435,8 @@ int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
437435
if (tdepth > 16 * BLKDEV_MAX_RQ)
438436
return -EINVAL;
439437

440-
new = blk_mq_alloc_rq_map(set, hctx->queue_num, tdepth, 0);
438+
new = blk_mq_alloc_rq_map(set, hctx->queue_num, tdepth,
439+
tags->nr_reserved_tags);
441440
if (!new)
442441
return -ENOMEM;
443442
ret = blk_mq_alloc_rqs(set, new, hctx->queue_num, tdepth);
@@ -454,7 +453,8 @@ int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
454453
* Don't need (or can't) update reserved tags here, they
455454
* remain static and should never need resizing.
456455
*/
457-
sbitmap_queue_resize(&tags->bitmap_tags, tdepth);
456+
sbitmap_queue_resize(&tags->bitmap_tags,
457+
tdepth - tags->nr_reserved_tags);
458458
}
459459

460460
return 0;

block/partitions/aix.c

+9-4
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ int aix_partition(struct parsed_partitions *state)
178178
u32 vgda_sector = 0;
179179
u32 vgda_len = 0;
180180
int numlvs = 0;
181-
struct pvd *pvd;
181+
struct pvd *pvd = NULL;
182182
struct lv_info {
183183
unsigned short pps_per_lv;
184184
unsigned short pps_found;
@@ -232,10 +232,11 @@ int aix_partition(struct parsed_partitions *state)
232232
if (lvip[i].pps_per_lv)
233233
foundlvs += 1;
234234
}
235+
/* pvd loops depend on n[].name and lvip[].pps_per_lv */
236+
pvd = alloc_pvd(state, vgda_sector + 17);
235237
}
236238
put_dev_sector(sect);
237239
}
238-
pvd = alloc_pvd(state, vgda_sector + 17);
239240
if (pvd) {
240241
int numpps = be16_to_cpu(pvd->pp_count);
241242
int psn_part1 = be32_to_cpu(pvd->psn_part1);
@@ -282,10 +283,14 @@ int aix_partition(struct parsed_partitions *state)
282283
next_lp_ix += 1;
283284
}
284285
for (i = 0; i < state->limit; i += 1)
285-
if (lvip[i].pps_found && !lvip[i].lv_is_contiguous)
286+
if (lvip[i].pps_found && !lvip[i].lv_is_contiguous) {
287+
char tmp[sizeof(n[i].name) + 1]; // null char
288+
289+
snprintf(tmp, sizeof(tmp), "%s", n[i].name);
286290
pr_warn("partition %s (%u pp's found) is "
287291
"not contiguous\n",
288-
n[i].name, lvip[i].pps_found);
292+
tmp, lvip[i].pps_found);
293+
}
289294
kfree(pvd);
290295
}
291296
kfree(n);

crypto/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
9898
obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o
9999
CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
100100
obj-$(CONFIG_CRYPTO_AES) += aes_generic.o
101-
CFLAGS_aes_generic.o := $(call cc-ifversion, -ge, 0701, -Os) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356
101+
CFLAGS_aes_generic.o := $(call cc-option,-fno-code-hoisting) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83356
102102
obj-$(CONFIG_CRYPTO_AES_TI) += aes_ti.o
103103
obj-$(CONFIG_CRYPTO_CAMELLIA) += camellia_generic.o
104104
obj-$(CONFIG_CRYPTO_CAST_COMMON) += cast_common.o

0 commit comments

Comments
 (0)