aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2018-07-03 18:27:19 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2018-07-03 18:27:19 +0200
commit03c70feafdb2e8b133f774ae3d57864b6f09f318 (patch)
tree691c004ed8249c66b4a82e4b125bda4882d49084 /kernel
parent00a0bcbfcfb692d986338466cb58457971b1a809 (diff)
parente692f66fab3019ca8f45463df165177505f38caa (diff)
Merge 4.9.111 into android-4.9
Changes in 4.9.111 x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec() x86/mce: Improve error message when kernel cannot recover x86/mce: Check for alternate indication of machine check recovery on Skylake x86/mce: Fix incorrect "Machine check from unknown source" message x86/mce: Do not overwrite MCi_STATUS in mce_no_way_out() x86: Call fixup_exception() before notify_die() in math_error() m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap() serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version signal/xtensa: Consistenly use SIGBUS in do_unaligned_user usb: do not reset if a low-speed or full-speed device timed out 1wire: family module autoload fails because of upper/lower case mismatch. ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it ASoC: cirrus: i2s: Fix LRCLK configuration ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup clk: renesas: cpg-mssr: Stop using printk format %pCr lib/vsprintf: Remove atomic-unsafe support for %pCr mips: ftrace: fix static function graph tracing branch-check: fix long->int truncation when profiling branches ipmi:bt: Set the timeout before doing a capabilities check Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader fuse: atomic_o_trunc should truncate pagecache fuse: don't keep dead fuse_conn at fuse_fill_super(). fuse: fix control dir setup and teardown powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG powerpc/ptrace: Fix enforcement of DAWR constraints powerpc/powernv/ioda2: Remove redundant free of TCE pages cpuidle: powernv: Fix promotion from snooze if next state disabled powerpc/fadump: Unregister fadump on kexec down path. ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size arm64: kpti: Use early_param for kpti= command-line option arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance of: unittest: for strings, account for trailing \0 in property length field IB/qib: Fix DMA api warning with debug kernel IB/{hfi1, qib}: Add handling of kernel restart IB/mlx5: Fetch soft WQE's on fatal error state IB/isert: Fix for lib/dma_debug check_sync warning IB/isert: fix T10-pi check mask setting RDMA/mlx4: Discard unknown SQP work requests mtd: cfi_cmdset_0002: Change write buffer to check correct value mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock() mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking. MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum PCI: Add ACS quirk for Intel 7th & 8th Gen mobile PCI: Add ACS quirk for Intel 300 series PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume printk: fix possible reuse of va_list variable MIPS: io: Add barrier after register read in inX() time: Make sure jiffies_to_msecs() preserves non-zero time periods X.509: unpack RSA signatureValue field from BIT STRING Btrfs: fix return value on rename exchange failure Btrfs: fix unexpected cow in run_delalloc_nocow iio:buffer: make length types match kfifo types scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread linvdimm, pmem: Preserve read-only setting for pmem devices clk: at91: PLL recalc_rate() now using cached MUL and DIV values md: fix two problems with setting the "re-add" device state. rpmsg: smd: do not use mananged resources for endpoints and channels ubi: fastmap: Cancel work upon detach ubi: fastmap: Correctly handle interrupted erasures in EBA UBIFS: Fix potential integer overflow in allocation backlight: as3711_bl: Fix Device Tree node lookup backlight: max8925_bl: Fix Device Tree node lookup backlight: tps65217_bl: Fix Device Tree node lookup mfd: intel-lpss: Program REMAP register in PIO mode perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP perf intel-pt: Fix MTC timing after overflow perf intel-pt: Fix "Unexpected indirect branch" error perf intel-pt: Fix packet decoding of CYC packets media: v4l2-compat-ioctl32: prevent go past max size media: cx231xx: Add support for AverMedia DVD EZMaker 7 media: dvb_frontend: fix locking issues at dvb_frontend_get_event() nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message NFSv4: Revert commit 5f83d86cf531d ("NFSv4.x: Fix wraparound issues..") video: uvesafb: Fix integer overflow in allocation Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume rbd: flush rbd_dev->watch_dwork after watch is unregistered mm: fix devmem_is_allowed() for sub-page System RAM intersections xen: Remove unnecessary BUG_ON from __unbind_from_irq() udf: Detect incorrect directory size Input: elan_i2c_smbus - fix more potential stack buffer overflows Input: elantech - enable middle button of touchpads on ThinkPad P52 Input: elantech - fix V4 report decoding for module with middle key ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210 block: Fix transfer when chunk sectors exceeds max dm thin: handle running out of data space vs concurrent discard cdc_ncm: avoid padding beyond end of skb Linux 4.9.111 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/nmi.c5
-rw-r--r--kernel/time/time.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/kernel/printk/nmi.c b/kernel/printk/nmi.c
index 16bab471c7e2..5fa65aa904d3 100644
--- a/kernel/printk/nmi.c
+++ b/kernel/printk/nmi.c
@@ -63,6 +63,7 @@ static int vprintk_nmi(const char *fmt, va_list args)
struct nmi_seq_buf *s = this_cpu_ptr(&nmi_print_seq);
int add = 0;
size_t len;
+ va_list ap;
again:
len = atomic_read(&s->len);
@@ -79,7 +80,9 @@ again:
if (!len)
smp_rmb();
- add = vsnprintf(s->buffer + len, sizeof(s->buffer) - len, fmt, args);
+ va_copy(ap, args);
+ add = vsnprintf(s->buffer + len, sizeof(s->buffer) - len, fmt, ap);
+ va_end(ap);
/*
* Do it once again if the buffer has been flushed in the meantime.
diff --git a/kernel/time/time.c b/kernel/time/time.c
index bd62fb8e8e77..39468651a064 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -28,6 +28,7 @@
*/
#include <linux/export.h>
+#include <linux/kernel.h>
#include <linux/timex.h>
#include <linux/capability.h>
#include <linux/timekeeper_internal.h>
@@ -258,9 +259,10 @@ unsigned int jiffies_to_msecs(const unsigned long j)
return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC);
#else
# if BITS_PER_LONG == 32
- return (HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32;
+ return (HZ_TO_MSEC_MUL32 * j + (1ULL << HZ_TO_MSEC_SHR32) - 1) >>
+ HZ_TO_MSEC_SHR32;
# else
- return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN;
+ return DIV_ROUND_UP(j * HZ_TO_MSEC_NUM, HZ_TO_MSEC_DEN);
# endif
#endif
}