Skip to content

Commit 702d3ec

Browse files
committed
Merge branch 'android-4.9-q' of https://android.googlesource.com/kernel/common into HEAD
* 'android-4.9-q' of https://android.googlesource.com/kernel/common: Linux 4.9.274 i2c: robotfuzz-osif: fix control-request directions nilfs2: fix memory leak in nilfs_sysfs_delete_device_group net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY net: qed: Fix memcpy() overflow of qed_dcbx_params() r8169: Avoid memcpy() over-reading of ETH_SS_STATS sh_eth: Avoid memcpy() over-reading of ETH_SS_STATS r8152: Avoid memcpy() over-reading of ETH_SS_STATS net/packet: annotate accesses to po->ifindex net/packet: annotate accesses to po->bind net: caif: fix memory leak in ldisc_open inet: annotate date races around sk->sk_txhash ping: Check return value of function 'ping_queue_rcv_skb' mac80211: drop multicast fragments cfg80211: call cfg80211_leave_ocb when switching away from OCB mac80211: remove warning in ieee80211_get_sband() Revert "PCI: PM: Do not read power state in pci_enable_device_flags()" arm64: perf: Disable PMU while processing counter overflows Makefile: Move -Wno-unused-but-set-variable out of GCC only block ARM: 9081/1: fix gcc-10 thumb2-kernel regression i40e: Be much more verbose about what we can and cannot offload inet: use bigger hash table for IP ID generation x86/fpu: Reset state for all signal restore failures tracing: Do not stop recording comms if the trace file is being read tracing: Do not stop recording cmdlines when tracing is off usb: dwc3: core: fix kernel panic when do reboot can: bcm/raw/isotp: use per module netdevice notifier net: fec_ptp: add clock rate zero check dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc PCI: Mark some NVIDIA GPUs to avoid bus reset PCI: Mark TI C667X to avoid bus reset tracing: Do no increment trace_clock_global() by one can: bcm: fix infoleak in struct bcm_msg_head radeon: use memcpy_to/fromio for UVD fw upload scsi: core: Put .shost_dev in failure path if host state changes to RUNNING net: ethernet: fix potential use-after-free in ec_bhf_remove net: cdc_eem: fix tx fixup skb leak net: hamradio: fix memory leak in mkiss_close be2net: Fix an error handling path in 'be_probe()' net/af_unix: fix a data-race in unix_dgram_sendmsg / unix_release_sock net: ipv4: fix memory leak in ip_mc_add1_src net: usb: fix possible use-after-free in smsc75xx_bind net: cdc_ncm: switch to eth%d interface naming netxen_nic: Fix an error handling path in 'netxen_nic_probe()' qlcnic: Fix an error handling path in 'qlcnic_probe()' net: stmmac: dwmac1000: Fix extended MAC address registers definition alx: Fix an error handling path in 'alx_probe()' netfilter: synproxy: Fix out of bounds when parsing TCP options rtnetlink: Fix regression in bridge VLAN configuration udp: fix race between close() and udp_abort() net: rds: fix memory leak in rds_recvmsg net: ipv4: fix memory leak in netlbl_cipsov4_add_std batman-adv: Avoid WARN_ON timing related checks mm: hwpoison: change PageHWPoison behavior on hugetlb pages dmaengine: stedma40: add missing iounmap() on error in d40_probe() dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM fib: Return the correct errno code net: Return the correct errno code net/x25: Return the correct errno code rtnetlink: Fix missing error code in rtnl_bridge_notify() net: ipconfig: Don't override command-line hostnames or domains ethernet: myri10ge: Fix missing error code in myri10ge_probe() scsi: target: core: Fix warning on realtime kernels gfs2: Fix use-after-free in gfs2_glock_shrink_scan HID: gt683r: add missing MODULE_DEVICE_TABLE ARM: OMAP2+: Fix build warning when mmc_omap is not built HID: usbhid: fix info leak in hid_submit_ctrl HID: Add BUS_VIRTUAL to hid_connect logging HID: hid-sensor-hub: Return error for hid_set_field() failure net: ieee802154: fix null deref in parse dev addr FROMGIT: bpf: Do not change gso_size during bpf_skb_change_proto() Change-Id: Ifc07dc4590bce6a09a5dc9dc75ddab59adff3b88
2 parents de5e94a + 54b5f55 commit 702d3ec

69 files changed

Lines changed: 448 additions & 262 deletions

File tree

Some content is hidden

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

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 9
3-
SUBLEVEL = 273
3+
SUBLEVEL = 274
44
EXTRAVERSION =
55
NAME = Roaring Lionus
66

@@ -799,12 +799,11 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
799799
# See modpost pattern 2
800800
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
801801
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
802-
else
802+
endif
803803

804804
# These warnings generated too much noise in a regular build.
805805
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
806806
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
807-
endif
808807

809808
KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
810809
ifdef CONFIG_FRAME_POINTER

arch/arm/kernel/setup.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,11 @@ void notrace cpu_init(void)
590590
* In Thumb-2, msr with an immediate value is not allowed.
591591
*/
592592
#ifdef CONFIG_THUMB2_KERNEL
593-
#define PLC "r"
593+
#define PLC_l "l"
594+
#define PLC_r "r"
594595
#else
595-
#define PLC "I"
596+
#define PLC_l "I"
597+
#define PLC_r "I"
596598
#endif
597599

598600
/*
@@ -614,15 +616,15 @@ void notrace cpu_init(void)
614616
"msr cpsr_c, %9"
615617
:
616618
: "r" (stk),
617-
PLC (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
619+
PLC_r (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
618620
"I" (offsetof(struct stack, irq[0])),
619-
PLC (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
621+
PLC_r (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
620622
"I" (offsetof(struct stack, abt[0])),
621-
PLC (PSR_F_BIT | PSR_I_BIT | UND_MODE),
623+
PLC_r (PSR_F_BIT | PSR_I_BIT | UND_MODE),
622624
"I" (offsetof(struct stack, und[0])),
623-
PLC (PSR_F_BIT | PSR_I_BIT | FIQ_MODE),
625+
PLC_r (PSR_F_BIT | PSR_I_BIT | FIQ_MODE),
624626
"I" (offsetof(struct stack, fiq[0])),
625-
PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
627+
PLC_l (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
626628
: "r14");
627629
#endif
628630
}

arch/arm/mach-omap2/board-n8x0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ static int n8x0_mmc_get_cover_state(struct device *dev, int slot)
327327

328328
static void n8x0_mmc_callback(void *data, u8 card_mask)
329329
{
330+
#ifdef CONFIG_MMC_OMAP
330331
int bit, *openp, index;
331332

332333
if (board_is_n800()) {
@@ -344,7 +345,6 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
344345
else
345346
*openp = 0;
346347

347-
#ifdef CONFIG_MMC_OMAP
348348
omap_mmc_notify_cover_event(mmc_device, index, *openp);
349349
#else
350350
pr_warn("MMC: notify cover event not available\n");

arch/arm64/kernel/perf_event.c

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,28 @@ static void armv8pmu_disable_event(struct perf_event *event)
750750
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
751751
}
752752

753+
static void armv8pmu_start(struct arm_pmu *cpu_pmu)
754+
{
755+
unsigned long flags;
756+
struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events);
757+
758+
raw_spin_lock_irqsave(&events->pmu_lock, flags);
759+
/* Enable all counters */
760+
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMU_PMCR_E);
761+
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
762+
}
763+
764+
static void armv8pmu_stop(struct arm_pmu *cpu_pmu)
765+
{
766+
unsigned long flags;
767+
struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events);
768+
769+
raw_spin_lock_irqsave(&events->pmu_lock, flags);
770+
/* Disable all counters */
771+
armv8pmu_pmcr_write(armv8pmu_pmcr_read() & ~ARMV8_PMU_PMCR_E);
772+
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
773+
}
774+
753775
static irqreturn_t armv8pmu_handle_irq(int irq_num, void *dev)
754776
{
755777
u32 pmovsr;
@@ -775,6 +797,11 @@ static irqreturn_t armv8pmu_handle_irq(int irq_num, void *dev)
775797
*/
776798
regs = get_irq_regs();
777799

800+
/*
801+
* Stop the PMU while processing the counter overflows
802+
* to prevent skews in group events.
803+
*/
804+
armv8pmu_stop(cpu_pmu);
778805
for (idx = 0; idx < cpu_pmu->num_events; ++idx) {
779806
struct perf_event *event = cpuc->events[idx];
780807
struct hw_perf_event *hwc;
@@ -799,6 +826,7 @@ static irqreturn_t armv8pmu_handle_irq(int irq_num, void *dev)
799826
if (perf_event_overflow(event, &data, regs))
800827
cpu_pmu->disable(event);
801828
}
829+
armv8pmu_start(cpu_pmu);
802830

803831
/*
804832
* Handle the pending perf events.
@@ -812,28 +840,6 @@ static irqreturn_t armv8pmu_handle_irq(int irq_num, void *dev)
812840
return IRQ_HANDLED;
813841
}
814842

815-
static void armv8pmu_start(struct arm_pmu *cpu_pmu)
816-
{
817-
unsigned long flags;
818-
struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events);
819-
820-
raw_spin_lock_irqsave(&events->pmu_lock, flags);
821-
/* Enable all counters */
822-
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMU_PMCR_E);
823-
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
824-
}
825-
826-
static void armv8pmu_stop(struct arm_pmu *cpu_pmu)
827-
{
828-
unsigned long flags;
829-
struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events);
830-
831-
raw_spin_lock_irqsave(&events->pmu_lock, flags);
832-
/* Disable all counters */
833-
armv8pmu_pmcr_write(armv8pmu_pmcr_read() & ~ARMV8_PMU_PMCR_E);
834-
raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
835-
}
836-
837843
static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc,
838844
struct perf_event *event)
839845
{

arch/x86/kernel/fpu/signal.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,23 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
276276
return 0;
277277
}
278278

279-
if (!access_ok(VERIFY_READ, buf, size))
279+
if (!access_ok(VERIFY_READ, buf, size)) {
280+
fpu__clear(fpu);
280281
return -EACCES;
282+
}
281283

282284
fpu__activate_curr(fpu);
283285

284-
if (!static_cpu_has(X86_FEATURE_FPU))
285-
return fpregs_soft_set(current, NULL,
286-
0, sizeof(struct user_i387_ia32_struct),
287-
NULL, buf) != 0;
286+
if (!static_cpu_has(X86_FEATURE_FPU)) {
287+
int ret = fpregs_soft_set(current, NULL, 0,
288+
sizeof(struct user_i387_ia32_struct),
289+
NULL, buf);
290+
291+
if (ret)
292+
fpu__clear(fpu);
293+
294+
return ret != 0;
295+
}
288296

289297
if (use_xsave()) {
290298
struct _fpx_sw_bytes fx_sw_user;

drivers/dma/pl330.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,13 +2579,15 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
25792579
for (i = 0; i < len / period_len; i++) {
25802580
desc = pl330_get_desc(pch);
25812581
if (!desc) {
2582+
unsigned long iflags;
2583+
25822584
dev_err(pch->dmac->ddma.dev, "%s:%d Unable to fetch desc\n",
25832585
__func__, __LINE__);
25842586

25852587
if (!first)
25862588
return NULL;
25872589

2588-
spin_lock_irqsave(&pl330->pool_lock, flags);
2590+
spin_lock_irqsave(&pl330->pool_lock, iflags);
25892591

25902592
while (!list_empty(&first->node)) {
25912593
desc = list_entry(first->node.next,
@@ -2595,7 +2597,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
25952597

25962598
list_move_tail(&first->node, &pl330->desc_pool);
25972599

2598-
spin_unlock_irqrestore(&pl330->pool_lock, flags);
2600+
spin_unlock_irqrestore(&pl330->pool_lock, iflags);
25992601

26002602
return NULL;
26012603
}

drivers/dma/qcom/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config QCOM_BAM_DMA
99

1010
config QCOM_HIDMA_MGMT
1111
tristate "Qualcomm Technologies HIDMA Management support"
12+
depends on HAS_IOMEM
1213
select DMA_ENGINE
1314
help
1415
Enable support for the Qualcomm Technologies HIDMA Management.

drivers/dma/ste_dma40.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3674,6 +3674,9 @@ static int __init d40_probe(struct platform_device *pdev)
36743674

36753675
kfree(base->lcla_pool.base_unaligned);
36763676

3677+
if (base->lcpa_base)
3678+
iounmap(base->lcpa_base);
3679+
36773680
if (base->phy_lcpa)
36783681
release_mem_region(base->phy_lcpa,
36793682
base->lcpa_size);

drivers/gpu/drm/radeon/radeon_uvd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ int radeon_uvd_resume(struct radeon_device *rdev)
286286
if (rdev->uvd.vcpu_bo == NULL)
287287
return -EINVAL;
288288

289-
memcpy(rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size);
289+
memcpy_toio((void __iomem *)rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size);
290290

291291
size = radeon_bo_size(rdev->uvd.vcpu_bo);
292292
size -= rdev->uvd_fw->size;
293293

294294
ptr = rdev->uvd.cpu_addr;
295295
ptr += rdev->uvd_fw->size;
296296

297-
memset(ptr, 0, size);
297+
memset_io((void __iomem *)ptr, 0, size);
298298

299299
return 0;
300300
}

drivers/hid/hid-core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,9 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask)
18041804
case BUS_I2C:
18051805
bus = "I2C";
18061806
break;
1807+
case BUS_VIRTUAL:
1808+
bus = "VIRTUAL";
1809+
break;
18071810
default:
18081811
bus = "<UNKNOWN>";
18091812
}

0 commit comments

Comments
 (0)