mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-17 12:21:23 +00:00
rk3328-default upstream patches
This commit is contained in:
parent
57e06fe81e
commit
98045afb1c
13 changed files with 26417 additions and 0 deletions
2294
patch/kernel/rk3328-default/patch-4.4.70-71.patch
Normal file
2294
patch/kernel/rk3328-default/patch-4.4.70-71.patch
Normal file
File diff suppressed because it is too large
Load diff
3244
patch/kernel/rk3328-default/patch-4.4.71-72.patch
Normal file
3244
patch/kernel/rk3328-default/patch-4.4.71-72.patch
Normal file
File diff suppressed because it is too large
Load diff
2192
patch/kernel/rk3328-default/patch-4.4.72-73.patch
Normal file
2192
patch/kernel/rk3328-default/patch-4.4.72-73.patch
Normal file
File diff suppressed because it is too large
Load diff
1488
patch/kernel/rk3328-default/patch-4.4.73-74.patch
Normal file
1488
patch/kernel/rk3328-default/patch-4.4.73-74.patch
Normal file
File diff suppressed because it is too large
Load diff
996
patch/kernel/rk3328-default/patch-4.4.74-75.patch
Normal file
996
patch/kernel/rk3328-default/patch-4.4.74-75.patch
Normal file
|
@ -0,0 +1,996 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 1f75507acbf4..696d15d8ad5d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 74
|
||||
+SUBLEVEL = 75
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
|
||||
index 7c053f281406..1138fec3dd65 100644
|
||||
--- a/arch/powerpc/kernel/kprobes.c
|
||||
+++ b/arch/powerpc/kernel/kprobes.c
|
||||
@@ -514,6 +514,15 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+ /*
|
||||
+ * jprobes use jprobe_return() which skips the normal return
|
||||
+ * path of the function, and this messes up the accounting of the
|
||||
+ * function graph tracer.
|
||||
+ *
|
||||
+ * Pause function graph tracing while performing the jprobe function.
|
||||
+ */
|
||||
+ pause_graph_tracing();
|
||||
+
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -536,6 +545,8 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
* saved regs...
|
||||
*/
|
||||
memcpy(regs, &kcb->jprobe_saved_regs, sizeof(struct pt_regs));
|
||||
+ /* It's OK to start function graph tracing again */
|
||||
+ unpause_graph_tracing();
|
||||
preempt_enable_no_resched();
|
||||
return 1;
|
||||
}
|
||||
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
|
||||
index 3c3a367b6e59..396dc44e783b 100644
|
||||
--- a/arch/powerpc/kvm/book3s_hv.c
|
||||
+++ b/arch/powerpc/kvm/book3s_hv.c
|
||||
@@ -2693,6 +2693,27 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Don't allow entry with a suspended transaction, because
|
||||
+ * the guest entry/exit code will lose it.
|
||||
+ * If the guest has TM enabled, save away their TM-related SPRs
|
||||
+ * (they will get restored by the TM unavailable interrupt).
|
||||
+ */
|
||||
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||
+ if (cpu_has_feature(CPU_FTR_TM) && current->thread.regs &&
|
||||
+ (current->thread.regs->msr & MSR_TM)) {
|
||||
+ if (MSR_TM_ACTIVE(current->thread.regs->msr)) {
|
||||
+ run->exit_reason = KVM_EXIT_FAIL_ENTRY;
|
||||
+ run->fail_entry.hardware_entry_failure_reason = 0;
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ current->thread.tm_tfhar = mfspr(SPRN_TFHAR);
|
||||
+ current->thread.tm_tfiar = mfspr(SPRN_TFIAR);
|
||||
+ current->thread.tm_texasr = mfspr(SPRN_TEXASR);
|
||||
+ current->thread.regs->msr &= ~MSR_TM;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
kvmppc_core_prepare_to_enter(vcpu);
|
||||
|
||||
/* No need to go into the guest when all we'll do is come back out */
|
||||
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
|
||||
index 4c48b487698c..0b48ce40d351 100644
|
||||
--- a/arch/powerpc/mm/slb_low.S
|
||||
+++ b/arch/powerpc/mm/slb_low.S
|
||||
@@ -179,6 +179,16 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
|
||||
b slb_finish_load
|
||||
|
||||
8: /* invalid EA */
|
||||
+ /*
|
||||
+ * It's possible the bad EA is too large to fit in the SLB cache, which
|
||||
+ * would mean we'd fail to invalidate it on context switch. So mark the
|
||||
+ * SLB cache as full so we force a full flush. We also set cr7+eq to
|
||||
+ * mark the address as a kernel address, so slb_finish_load() skips
|
||||
+ * trying to insert it into the SLB cache.
|
||||
+ */
|
||||
+ li r9,SLB_CACHE_ENTRIES + 1
|
||||
+ sth r9,PACASLBCACHEPTR(r13)
|
||||
+ crset 4*cr7+eq
|
||||
li r10,0 /* BAD_VSID */
|
||||
li r9,0 /* BAD_VSID */
|
||||
li r11,SLB_VSID_USER /* flags don't much matter */
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
|
||||
index 51a9942cdb40..f4cae5357e40 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
|
||||
@@ -681,6 +681,10 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev)
|
||||
DRM_INFO("Changing default dispclk from %dMhz to 600Mhz\n",
|
||||
adev->clock.default_dispclk / 100);
|
||||
adev->clock.default_dispclk = 60000;
|
||||
+ } else if (adev->clock.default_dispclk <= 60000) {
|
||||
+ DRM_INFO("Changing default dispclk from %dMhz to 625Mhz\n",
|
||||
+ adev->clock.default_dispclk / 100);
|
||||
+ adev->clock.default_dispclk = 62500;
|
||||
}
|
||||
adev->clock.dp_extclk =
|
||||
le16_to_cpu(firmware_info->info_21.usUniphyDPModeExtClkFreq);
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
|
||||
index 49aa35016653..247b088990dc 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_crtc.c
|
||||
@@ -164,7 +164,7 @@ void amdgpu_atombios_crtc_powergate(struct drm_crtc *crtc, int state)
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct amdgpu_device *adev = dev->dev_private;
|
||||
int index = GetIndexIntoMasterTable(COMMAND, EnableDispPowerGating);
|
||||
- ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1 args;
|
||||
+ ENABLE_DISP_POWER_GATING_PS_ALLOCATION args;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
|
||||
@@ -177,7 +177,7 @@ void amdgpu_atombios_crtc_powergate(struct drm_crtc *crtc, int state)
|
||||
void amdgpu_atombios_crtc_powergate_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int index = GetIndexIntoMasterTable(COMMAND, EnableDispPowerGating);
|
||||
- ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1 args;
|
||||
+ ENABLE_DISP_POWER_GATING_PS_ALLOCATION args;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
|
||||
index a9b01bcf7d0a..fcecaf5b5526 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_combios.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
|
||||
@@ -3394,6 +3394,13 @@ void radeon_combios_asic_init(struct drm_device *dev)
|
||||
rdev->pdev->subsystem_vendor == 0x103c &&
|
||||
rdev->pdev->subsystem_device == 0x280a)
|
||||
return;
|
||||
+ /* quirk for rs4xx Toshiba Sattellite L20-183 latop to make it resume
|
||||
+ * - it hangs on resume inside the dynclk 1 table.
|
||||
+ */
|
||||
+ if (rdev->family == CHIP_RS400 &&
|
||||
+ rdev->pdev->subsystem_vendor == 0x1179 &&
|
||||
+ rdev->pdev->subsystem_device == 0xff31)
|
||||
+ return;
|
||||
|
||||
/* DYN CLK 1 */
|
||||
table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE);
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
|
||||
index 4aa2cbe4c85f..a77521695c9a 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_device.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_device.c
|
||||
@@ -127,6 +127,10 @@ static struct radeon_px_quirk radeon_px_quirk_list[] = {
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=51381
|
||||
*/
|
||||
{ PCI_VENDOR_ID_ATI, 0x6840, 0x1043, 0x2122, RADEON_PX_QUIRK_DISABLE_PX },
|
||||
+ /* Asus K53TK laptop with AMD A6-3420M APU and Radeon 7670m GPU
|
||||
+ * https://bugs.freedesktop.org/show_bug.cgi?id=101491
|
||||
+ */
|
||||
+ { PCI_VENDOR_ID_ATI, 0x6741, 0x1043, 0x2122, RADEON_PX_QUIRK_DISABLE_PX },
|
||||
/* macbook pro 8.2 */
|
||||
{ PCI_VENDOR_ID_ATI, 0x6741, PCI_VENDOR_ID_APPLE, 0x00e2, RADEON_PX_QUIRK_LONG_WAKEUP },
|
||||
{ 0, 0, 0, 0, 0 },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index e37030624165..c7f8b70d15ee 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -285,6 +285,9 @@
|
||||
#define USB_VENDOR_ID_DEALEXTREAME 0x10c5
|
||||
#define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701 0x819a
|
||||
|
||||
+#define USB_VENDOR_ID_DELL 0x413c
|
||||
+#define USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE 0x301a
|
||||
+
|
||||
#define USB_VENDOR_ID_DELORME 0x1163
|
||||
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
|
||||
#define USB_DEVICE_ID_DELORME_EM_LT20 0x0200
|
||||
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
|
||||
index 6ca6ab00fa93..ce1543d69acb 100644
|
||||
--- a/drivers/hid/usbhid/hid-quirks.c
|
||||
+++ b/drivers/hid/usbhid/hid-quirks.c
|
||||
@@ -72,6 +72,7 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
|
||||
{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
|
||||
{ USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51, HID_QUIRK_NOGET },
|
||||
+ { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
|
||||
{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
|
||||
{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },
|
||||
{ USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL },
|
||||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
|
||||
index e7b96f1ac2c5..5be14ad29d46 100644
|
||||
--- a/drivers/input/serio/i8042-x86ia64io.h
|
||||
+++ b/drivers/input/serio/i8042-x86ia64io.h
|
||||
@@ -788,6 +788,13 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"),
|
||||
},
|
||||
},
|
||||
+ {
|
||||
+ /* Fujitsu UH554 laptop */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK UH544"),
|
||||
+ },
|
||||
+ },
|
||||
{ }
|
||||
};
|
||||
|
||||
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
|
||||
index 37e4135ab213..64d6f053c2a5 100644
|
||||
--- a/drivers/mtd/spi-nor/spi-nor.c
|
||||
+++ b/drivers/mtd/spi-nor/spi-nor.c
|
||||
@@ -1057,6 +1057,13 @@ static int spansion_quad_enable(struct spi_nor *nor)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ ret = spi_nor_wait_till_ready(nor);
|
||||
+ if (ret) {
|
||||
+ dev_err(nor->dev,
|
||||
+ "timeout while writing configuration register\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
/* read back and check it */
|
||||
ret = read_cr(nor);
|
||||
if (!(ret > 0 && (ret & CR_QUAD_EN_SPAN))) {
|
||||
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
|
||||
index d2701c53ed68..ebec2dceff45 100644
|
||||
--- a/drivers/net/phy/marvell.c
|
||||
+++ b/drivers/net/phy/marvell.c
|
||||
@@ -822,8 +822,6 @@ static int marvell_read_status(struct phy_device *phydev)
|
||||
phydev->lp_advertising = mii_stat1000_to_ethtool_lpa_t(lpagb) |
|
||||
mii_lpa_to_ethtool_lpa_t(lpa);
|
||||
|
||||
- lpa &= adv;
|
||||
-
|
||||
if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
|
||||
phydev->duplex = DUPLEX_FULL;
|
||||
else
|
||||
diff --git a/drivers/net/phy/mdio-bcm-iproc.c b/drivers/net/phy/mdio-bcm-iproc.c
|
||||
index c0b4e65267af..46fe1ae919a3 100644
|
||||
--- a/drivers/net/phy/mdio-bcm-iproc.c
|
||||
+++ b/drivers/net/phy/mdio-bcm-iproc.c
|
||||
@@ -81,8 +81,6 @@ static int iproc_mdio_read(struct mii_bus *bus, int phy_id, int reg)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- iproc_mdio_config_clk(priv->base);
|
||||
-
|
||||
/* Prepare the read operation */
|
||||
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
|
||||
(reg << MII_DATA_RA_SHIFT) |
|
||||
@@ -112,8 +110,6 @@ static int iproc_mdio_write(struct mii_bus *bus, int phy_id,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- iproc_mdio_config_clk(priv->base);
|
||||
-
|
||||
/* Prepare the write operation */
|
||||
cmd = (MII_DATA_TA_VAL << MII_DATA_TA_SHIFT) |
|
||||
(reg << MII_DATA_RA_SHIFT) |
|
||||
@@ -163,6 +159,8 @@ static int iproc_mdio_probe(struct platform_device *pdev)
|
||||
bus->read = iproc_mdio_read;
|
||||
bus->write = iproc_mdio_write;
|
||||
|
||||
+ iproc_mdio_config_clk(priv->base);
|
||||
+
|
||||
rc = of_mdiobus_register(bus, pdev->dev.of_node);
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "MDIO bus registration failed\n");
|
||||
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
|
||||
index 044253dca30a..b8a5a8e8f57d 100644
|
||||
--- a/drivers/nvme/host/nvme.h
|
||||
+++ b/drivers/nvme/host/nvme.h
|
||||
@@ -27,6 +27,13 @@ enum {
|
||||
NVME_NS_LIGHTNVM = 1,
|
||||
};
|
||||
|
||||
+/* The below value is the specific amount of delay needed before checking
|
||||
+ * readiness in case of the PCI_DEVICE(0x1c58, 0x0003), which needs the
|
||||
+ * NVME_QUIRK_DELAY_BEFORE_CHK_RDY quirk enabled. The value (in ms) was
|
||||
+ * found empirically.
|
||||
+ */
|
||||
+#define NVME_QUIRK_DELAY_AMOUNT 2000
|
||||
+
|
||||
/*
|
||||
* Represents an NVM Express device. Each nvme_dev is a PCI function.
|
||||
*/
|
||||
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
|
||||
index c851bc53831c..4c673d45f1bd 100644
|
||||
--- a/drivers/nvme/host/pci.c
|
||||
+++ b/drivers/nvme/host/pci.c
|
||||
@@ -1633,10 +1633,15 @@ static int nvme_wait_ready(struct nvme_dev *dev, u64 cap, bool enabled)
|
||||
*/
|
||||
static int nvme_disable_ctrl(struct nvme_dev *dev, u64 cap)
|
||||
{
|
||||
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
+
|
||||
dev->ctrl_config &= ~NVME_CC_SHN_MASK;
|
||||
dev->ctrl_config &= ~NVME_CC_ENABLE;
|
||||
writel(dev->ctrl_config, &dev->bar->cc);
|
||||
|
||||
+ if (pdev->vendor == 0x1c58 && pdev->device == 0x0003)
|
||||
+ msleep(NVME_QUIRK_DELAY_AMOUNT);
|
||||
+
|
||||
return nvme_wait_ready(dev, cap, false);
|
||||
}
|
||||
|
||||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||
index 655f79db7899..58048dd5fcd0 100644
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -632,9 +632,12 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,
|
||||
const char *pathp;
|
||||
int offset, rc = 0, depth = -1;
|
||||
|
||||
- for (offset = fdt_next_node(blob, -1, &depth);
|
||||
- offset >= 0 && depth >= 0 && !rc;
|
||||
- offset = fdt_next_node(blob, offset, &depth)) {
|
||||
+ if (!blob)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (offset = fdt_next_node(blob, -1, &depth);
|
||||
+ offset >= 0 && depth >= 0 && !rc;
|
||||
+ offset = fdt_next_node(blob, offset, &depth)) {
|
||||
|
||||
pathp = fdt_get_name(blob, offset, NULL);
|
||||
if (*pathp == '/')
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 200d3de8bc1e..a180c000e246 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -1112,6 +1112,18 @@ iscsit_get_immediate_data(struct iscsi_cmd *cmd, struct iscsi_scsi_req *hdr,
|
||||
*/
|
||||
if (dump_payload)
|
||||
goto after_immediate_data;
|
||||
+ /*
|
||||
+ * Check for underflow case where both EDTL and immediate data payload
|
||||
+ * exceeds what is presented by CDB's TRANSFER LENGTH, and what has
|
||||
+ * already been set in target_cmd_size_check() as se_cmd->data_length.
|
||||
+ *
|
||||
+ * For this special case, fail the command and dump the immediate data
|
||||
+ * payload.
|
||||
+ */
|
||||
+ if (cmd->first_burst_len > cmd->se_cmd.data_length) {
|
||||
+ cmd->sense_reason = TCM_INVALID_CDB_FIELD;
|
||||
+ goto after_immediate_data;
|
||||
+ }
|
||||
|
||||
immed_ret = iscsit_handle_immediate_data(cmd, hdr,
|
||||
cmd->first_burst_len);
|
||||
diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h
|
||||
index 253a91bff943..272e6f755322 100644
|
||||
--- a/drivers/target/target_core_internal.h
|
||||
+++ b/drivers/target/target_core_internal.h
|
||||
@@ -132,7 +132,7 @@ int init_se_kmem_caches(void);
|
||||
void release_se_kmem_caches(void);
|
||||
u32 scsi_get_new_index(scsi_index_t);
|
||||
void transport_subsystem_check_init(void);
|
||||
-void transport_cmd_finish_abort(struct se_cmd *, int);
|
||||
+int transport_cmd_finish_abort(struct se_cmd *, int);
|
||||
unsigned char *transport_dump_cmd_direction(struct se_cmd *);
|
||||
void transport_dump_dev_state(struct se_device *, char *, int *);
|
||||
void transport_dump_dev_info(struct se_device *, struct se_lun *,
|
||||
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
|
||||
index 46b1991fbb50..c9be953496ec 100644
|
||||
--- a/drivers/target/target_core_tmr.c
|
||||
+++ b/drivers/target/target_core_tmr.c
|
||||
@@ -75,7 +75,7 @@ void core_tmr_release_req(struct se_tmr_req *tmr)
|
||||
kfree(tmr);
|
||||
}
|
||||
|
||||
-static void core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas)
|
||||
+static int core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool remove = true, send_tas;
|
||||
@@ -91,7 +91,7 @@ static void core_tmr_handle_tas_abort(struct se_cmd *cmd, int tas)
|
||||
transport_send_task_abort(cmd);
|
||||
}
|
||||
|
||||
- transport_cmd_finish_abort(cmd, remove);
|
||||
+ return transport_cmd_finish_abort(cmd, remove);
|
||||
}
|
||||
|
||||
static int target_check_cdb_and_preempt(struct list_head *list,
|
||||
@@ -185,8 +185,8 @@ void core_tmr_abort_task(
|
||||
cancel_work_sync(&se_cmd->work);
|
||||
transport_wait_for_tasks(se_cmd);
|
||||
|
||||
- transport_cmd_finish_abort(se_cmd, true);
|
||||
- target_put_sess_cmd(se_cmd);
|
||||
+ if (!transport_cmd_finish_abort(se_cmd, true))
|
||||
+ target_put_sess_cmd(se_cmd);
|
||||
|
||||
printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for"
|
||||
" ref_tag: %llu\n", ref_tag);
|
||||
@@ -286,8 +286,8 @@ static void core_tmr_drain_tmr_list(
|
||||
cancel_work_sync(&cmd->work);
|
||||
transport_wait_for_tasks(cmd);
|
||||
|
||||
- transport_cmd_finish_abort(cmd, 1);
|
||||
- target_put_sess_cmd(cmd);
|
||||
+ if (!transport_cmd_finish_abort(cmd, 1))
|
||||
+ target_put_sess_cmd(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,8 +385,8 @@ static void core_tmr_drain_state_list(
|
||||
cancel_work_sync(&cmd->work);
|
||||
transport_wait_for_tasks(cmd);
|
||||
|
||||
- core_tmr_handle_tas_abort(cmd, tas);
|
||||
- target_put_sess_cmd(cmd);
|
||||
+ if (!core_tmr_handle_tas_abort(cmd, tas))
|
||||
+ target_put_sess_cmd(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
|
||||
index 60743bf27f37..37c77db6e737 100644
|
||||
--- a/drivers/target/target_core_transport.c
|
||||
+++ b/drivers/target/target_core_transport.c
|
||||
@@ -639,9 +639,10 @@ static void transport_lun_remove_cmd(struct se_cmd *cmd)
|
||||
percpu_ref_put(&lun->lun_ref);
|
||||
}
|
||||
|
||||
-void transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
|
||||
+int transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
|
||||
{
|
||||
bool ack_kref = (cmd->se_cmd_flags & SCF_ACK_KREF);
|
||||
+ int ret = 0;
|
||||
|
||||
if (cmd->se_cmd_flags & SCF_SE_LUN_CMD)
|
||||
transport_lun_remove_cmd(cmd);
|
||||
@@ -653,9 +654,11 @@ void transport_cmd_finish_abort(struct se_cmd *cmd, int remove)
|
||||
cmd->se_tfo->aborted_task(cmd);
|
||||
|
||||
if (transport_cmd_check_stop_to_fabric(cmd))
|
||||
- return;
|
||||
+ return 1;
|
||||
if (remove && ack_kref)
|
||||
- transport_put_cmd(cmd);
|
||||
+ ret = transport_put_cmd(cmd);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static void target_complete_failure_work(struct work_struct *work)
|
||||
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
|
||||
index 7fbe19d5279e..81b2b9f808b5 100644
|
||||
--- a/drivers/usb/usbip/vhci_hcd.c
|
||||
+++ b/drivers/usb/usbip/vhci_hcd.c
|
||||
@@ -215,14 +215,19 @@ done:
|
||||
|
||||
static inline void hub_descriptor(struct usb_hub_descriptor *desc)
|
||||
{
|
||||
+ int width;
|
||||
+
|
||||
memset(desc, 0, sizeof(*desc));
|
||||
desc->bDescriptorType = USB_DT_HUB;
|
||||
- desc->bDescLength = 9;
|
||||
desc->wHubCharacteristics = cpu_to_le16(
|
||||
HUB_CHAR_INDV_PORT_LPSM | HUB_CHAR_COMMON_OCPM);
|
||||
+
|
||||
desc->bNbrPorts = VHCI_NPORTS;
|
||||
- desc->u.hs.DeviceRemovable[0] = 0xff;
|
||||
- desc->u.hs.DeviceRemovable[1] = 0xff;
|
||||
+ BUILD_BUG_ON(VHCI_NPORTS > USB_MAXCHILDREN);
|
||||
+ width = desc->bNbrPorts / 8 + 1;
|
||||
+ desc->bDescLength = USB_DT_HUB_NONVAR_SIZE + 2 * width;
|
||||
+ memset(&desc->u.hs.DeviceRemovable[0], 0, width);
|
||||
+ memset(&desc->u.hs.DeviceRemovable[width], 0xff, width);
|
||||
}
|
||||
|
||||
static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
|
||||
index ac7d921ed984..257425511d10 100644
|
||||
--- a/fs/autofs4/dev-ioctl.c
|
||||
+++ b/fs/autofs4/dev-ioctl.c
|
||||
@@ -331,7 +331,7 @@ static int autofs_dev_ioctl_fail(struct file *fp,
|
||||
int status;
|
||||
|
||||
token = (autofs_wqt_t) param->fail.token;
|
||||
- status = param->fail.status ? param->fail.status : -ENOENT;
|
||||
+ status = param->fail.status < 0 ? param->fail.status : -ENOENT;
|
||||
return autofs4_wait_release(sbi, token, status);
|
||||
}
|
||||
|
||||
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
|
||||
index 87b87e091e8e..efd72e1fae74 100644
|
||||
--- a/fs/cifs/smb1ops.c
|
||||
+++ b/fs/cifs/smb1ops.c
|
||||
@@ -849,8 +849,13 @@ cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
struct cifs_fid *fid, __u16 search_flags,
|
||||
struct cifs_search_info *srch_inf)
|
||||
{
|
||||
- return CIFSFindFirst(xid, tcon, path, cifs_sb,
|
||||
- &fid->netfid, search_flags, srch_inf, true);
|
||||
+ int rc;
|
||||
+
|
||||
+ rc = CIFSFindFirst(xid, tcon, path, cifs_sb,
|
||||
+ &fid->netfid, search_flags, srch_inf, true);
|
||||
+ if (rc)
|
||||
+ cifs_dbg(FYI, "find first failed=%d\n", rc);
|
||||
+ return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
|
||||
index 087918c4612a..1d125d3d0d89 100644
|
||||
--- a/fs/cifs/smb2ops.c
|
||||
+++ b/fs/cifs/smb2ops.c
|
||||
@@ -909,7 +909,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL);
|
||||
kfree(utf16_path);
|
||||
if (rc) {
|
||||
- cifs_dbg(VFS, "open dir failed\n");
|
||||
+ cifs_dbg(FYI, "open dir failed rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -919,7 +919,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
rc = SMB2_query_directory(xid, tcon, fid->persistent_fid,
|
||||
fid->volatile_fid, 0, srch_inf);
|
||||
if (rc) {
|
||||
- cifs_dbg(VFS, "query directory failed\n");
|
||||
+ cifs_dbg(FYI, "query directory failed rc=%d\n", rc);
|
||||
SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid);
|
||||
}
|
||||
return rc;
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index 3a6de10d3891..02153068a694 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -206,8 +206,26 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
|
||||
|
||||
if (write) {
|
||||
unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start;
|
||||
+ unsigned long ptr_size;
|
||||
struct rlimit *rlim;
|
||||
|
||||
+ /*
|
||||
+ * Since the stack will hold pointers to the strings, we
|
||||
+ * must account for them as well.
|
||||
+ *
|
||||
+ * The size calculation is the entire vma while each arg page is
|
||||
+ * built, so each time we get here it's calculating how far it
|
||||
+ * is currently (rather than each call being just the newly
|
||||
+ * added size from the arg page). As a result, we need to
|
||||
+ * always add the entire size of the pointers, so that on the
|
||||
+ * last call to get_arg_page() we'll actually have the entire
|
||||
+ * correct size.
|
||||
+ */
|
||||
+ ptr_size = (bprm->argc + bprm->envc) * sizeof(void *);
|
||||
+ if (ptr_size > ULONG_MAX - size)
|
||||
+ goto fail;
|
||||
+ size += ptr_size;
|
||||
+
|
||||
acct_arg_size(bprm, size / PAGE_SIZE);
|
||||
|
||||
/*
|
||||
@@ -225,13 +243,15 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
|
||||
* to work from.
|
||||
*/
|
||||
rlim = current->signal->rlim;
|
||||
- if (size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur) / 4) {
|
||||
- put_page(page);
|
||||
- return NULL;
|
||||
- }
|
||||
+ if (size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur) / 4)
|
||||
+ goto fail;
|
||||
}
|
||||
|
||||
return page;
|
||||
+
|
||||
+fail:
|
||||
+ put_page(page);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
static void put_arg_page(struct page *page)
|
||||
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h
|
||||
index 25247220b4b7..f0f1793cfa49 100644
|
||||
--- a/include/linux/timekeeper_internal.h
|
||||
+++ b/include/linux/timekeeper_internal.h
|
||||
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
struct tk_read_base {
|
||||
struct clocksource *clock;
|
||||
- cycle_t (*read)(struct clocksource *cs);
|
||||
cycle_t mask;
|
||||
cycle_t cycle_last;
|
||||
u32 mult;
|
||||
diff --git a/kernel/signal.c b/kernel/signal.c
|
||||
index f3f1f7a972fd..b92a047ddc82 100644
|
||||
--- a/kernel/signal.c
|
||||
+++ b/kernel/signal.c
|
||||
@@ -503,7 +503,8 @@ int unhandled_signal(struct task_struct *tsk, int sig)
|
||||
return !tsk->ptrace;
|
||||
}
|
||||
|
||||
-static void collect_signal(int sig, struct sigpending *list, siginfo_t *info)
|
||||
+static void collect_signal(int sig, struct sigpending *list, siginfo_t *info,
|
||||
+ bool *resched_timer)
|
||||
{
|
||||
struct sigqueue *q, *first = NULL;
|
||||
|
||||
@@ -525,6 +526,12 @@ static void collect_signal(int sig, struct sigpending *list, siginfo_t *info)
|
||||
still_pending:
|
||||
list_del_init(&first->list);
|
||||
copy_siginfo(info, &first->info);
|
||||
+
|
||||
+ *resched_timer =
|
||||
+ (first->flags & SIGQUEUE_PREALLOC) &&
|
||||
+ (info->si_code == SI_TIMER) &&
|
||||
+ (info->si_sys_private);
|
||||
+
|
||||
__sigqueue_free(first);
|
||||
} else {
|
||||
/*
|
||||
@@ -541,12 +548,12 @@ still_pending:
|
||||
}
|
||||
|
||||
static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
|
||||
- siginfo_t *info)
|
||||
+ siginfo_t *info, bool *resched_timer)
|
||||
{
|
||||
int sig = next_signal(pending, mask);
|
||||
|
||||
if (sig)
|
||||
- collect_signal(sig, pending, info);
|
||||
+ collect_signal(sig, pending, info, resched_timer);
|
||||
return sig;
|
||||
}
|
||||
|
||||
@@ -558,15 +565,16 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
|
||||
*/
|
||||
int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
|
||||
{
|
||||
+ bool resched_timer = false;
|
||||
int signr;
|
||||
|
||||
/* We only dequeue private signals from ourselves, we don't let
|
||||
* signalfd steal them
|
||||
*/
|
||||
- signr = __dequeue_signal(&tsk->pending, mask, info);
|
||||
+ signr = __dequeue_signal(&tsk->pending, mask, info, &resched_timer);
|
||||
if (!signr) {
|
||||
signr = __dequeue_signal(&tsk->signal->shared_pending,
|
||||
- mask, info);
|
||||
+ mask, info, &resched_timer);
|
||||
/*
|
||||
* itimer signal ?
|
||||
*
|
||||
@@ -611,7 +619,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
|
||||
*/
|
||||
current->jobctl |= JOBCTL_STOP_DEQUEUED;
|
||||
}
|
||||
- if ((info->si_code & __SI_MASK) == __SI_TIMER && info->si_sys_private) {
|
||||
+ if (resched_timer) {
|
||||
/*
|
||||
* Release the siglock to ensure proper locking order
|
||||
* of timer locks outside of siglocks. Note, we leave
|
||||
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
|
||||
index 738012d68117..6e4866834d26 100644
|
||||
--- a/kernel/time/timekeeping.c
|
||||
+++ b/kernel/time/timekeeping.c
|
||||
@@ -116,6 +116,26 @@ static inline void tk_update_sleep_time(struct timekeeper *tk, ktime_t delta)
|
||||
tk->offs_boot = ktime_add(tk->offs_boot, delta);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * tk_clock_read - atomic clocksource read() helper
|
||||
+ *
|
||||
+ * This helper is necessary to use in the read paths because, while the
|
||||
+ * seqlock ensures we don't return a bad value while structures are updated,
|
||||
+ * it doesn't protect from potential crashes. There is the possibility that
|
||||
+ * the tkr's clocksource may change between the read reference, and the
|
||||
+ * clock reference passed to the read function. This can cause crashes if
|
||||
+ * the wrong clocksource is passed to the wrong read function.
|
||||
+ * This isn't necessary to use when holding the timekeeper_lock or doing
|
||||
+ * a read of the fast-timekeeper tkrs (which is protected by its own locking
|
||||
+ * and update logic).
|
||||
+ */
|
||||
+static inline u64 tk_clock_read(struct tk_read_base *tkr)
|
||||
+{
|
||||
+ struct clocksource *clock = READ_ONCE(tkr->clock);
|
||||
+
|
||||
+ return clock->read(clock);
|
||||
+}
|
||||
+
|
||||
#ifdef CONFIG_DEBUG_TIMEKEEPING
|
||||
#define WARNING_FREQ (HZ*300) /* 5 minute rate-limiting */
|
||||
|
||||
@@ -173,7 +193,7 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
|
||||
*/
|
||||
do {
|
||||
seq = read_seqcount_begin(&tk_core.seq);
|
||||
- now = tkr->read(tkr->clock);
|
||||
+ now = tk_clock_read(tkr);
|
||||
last = tkr->cycle_last;
|
||||
mask = tkr->mask;
|
||||
max = tkr->clock->max_cycles;
|
||||
@@ -207,7 +227,7 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr)
|
||||
cycle_t cycle_now, delta;
|
||||
|
||||
/* read clocksource */
|
||||
- cycle_now = tkr->read(tkr->clock);
|
||||
+ cycle_now = tk_clock_read(tkr);
|
||||
|
||||
/* calculate the delta since the last update_wall_time */
|
||||
delta = clocksource_delta(cycle_now, tkr->cycle_last, tkr->mask);
|
||||
@@ -235,12 +255,10 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
|
||||
|
||||
old_clock = tk->tkr_mono.clock;
|
||||
tk->tkr_mono.clock = clock;
|
||||
- tk->tkr_mono.read = clock->read;
|
||||
tk->tkr_mono.mask = clock->mask;
|
||||
- tk->tkr_mono.cycle_last = tk->tkr_mono.read(clock);
|
||||
+ tk->tkr_mono.cycle_last = tk_clock_read(&tk->tkr_mono);
|
||||
|
||||
tk->tkr_raw.clock = clock;
|
||||
- tk->tkr_raw.read = clock->read;
|
||||
tk->tkr_raw.mask = clock->mask;
|
||||
tk->tkr_raw.cycle_last = tk->tkr_mono.cycle_last;
|
||||
|
||||
@@ -404,7 +422,7 @@ static __always_inline u64 __ktime_get_fast_ns(struct tk_fast *tkf)
|
||||
|
||||
now += timekeeping_delta_to_ns(tkr,
|
||||
clocksource_delta(
|
||||
- tkr->read(tkr->clock),
|
||||
+ tk_clock_read(tkr),
|
||||
tkr->cycle_last,
|
||||
tkr->mask));
|
||||
} while (read_seqcount_retry(&tkf->seq, seq));
|
||||
@@ -432,6 +450,10 @@ static cycle_t dummy_clock_read(struct clocksource *cs)
|
||||
return cycles_at_suspend;
|
||||
}
|
||||
|
||||
+static struct clocksource dummy_clock = {
|
||||
+ .read = dummy_clock_read,
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource.
|
||||
* @tk: Timekeeper to snapshot.
|
||||
@@ -448,13 +470,13 @@ static void halt_fast_timekeeper(struct timekeeper *tk)
|
||||
struct tk_read_base *tkr = &tk->tkr_mono;
|
||||
|
||||
memcpy(&tkr_dummy, tkr, sizeof(tkr_dummy));
|
||||
- cycles_at_suspend = tkr->read(tkr->clock);
|
||||
- tkr_dummy.read = dummy_clock_read;
|
||||
+ cycles_at_suspend = tk_clock_read(tkr);
|
||||
+ tkr_dummy.clock = &dummy_clock;
|
||||
update_fast_timekeeper(&tkr_dummy, &tk_fast_mono);
|
||||
|
||||
tkr = &tk->tkr_raw;
|
||||
memcpy(&tkr_dummy, tkr, sizeof(tkr_dummy));
|
||||
- tkr_dummy.read = dummy_clock_read;
|
||||
+ tkr_dummy.clock = &dummy_clock;
|
||||
update_fast_timekeeper(&tkr_dummy, &tk_fast_raw);
|
||||
}
|
||||
|
||||
@@ -618,11 +640,10 @@ static void timekeeping_update(struct timekeeper *tk, unsigned int action)
|
||||
*/
|
||||
static void timekeeping_forward_now(struct timekeeper *tk)
|
||||
{
|
||||
- struct clocksource *clock = tk->tkr_mono.clock;
|
||||
cycle_t cycle_now, delta;
|
||||
s64 nsec;
|
||||
|
||||
- cycle_now = tk->tkr_mono.read(clock);
|
||||
+ cycle_now = tk_clock_read(&tk->tkr_mono);
|
||||
delta = clocksource_delta(cycle_now, tk->tkr_mono.cycle_last, tk->tkr_mono.mask);
|
||||
tk->tkr_mono.cycle_last = cycle_now;
|
||||
tk->tkr_raw.cycle_last = cycle_now;
|
||||
@@ -1405,7 +1426,7 @@ void timekeeping_resume(void)
|
||||
* The less preferred source will only be tried if there is no better
|
||||
* usable source. The rtc part is handled separately in rtc core code.
|
||||
*/
|
||||
- cycle_now = tk->tkr_mono.read(clock);
|
||||
+ cycle_now = tk_clock_read(&tk->tkr_mono);
|
||||
if ((clock->flags & CLOCK_SOURCE_SUSPEND_NONSTOP) &&
|
||||
cycle_now > tk->tkr_mono.cycle_last) {
|
||||
u64 num, max = ULLONG_MAX;
|
||||
@@ -1800,7 +1821,7 @@ void update_wall_time(void)
|
||||
#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
|
||||
offset = real_tk->cycle_interval;
|
||||
#else
|
||||
- offset = clocksource_delta(tk->tkr_mono.read(tk->tkr_mono.clock),
|
||||
+ offset = clocksource_delta(tk_clock_read(&tk->tkr_mono),
|
||||
tk->tkr_mono.cycle_last, tk->tkr_mono.mask);
|
||||
#endif
|
||||
|
||||
diff --git a/lib/cmdline.c b/lib/cmdline.c
|
||||
index 8f13cf73c2ec..79069d7938ea 100644
|
||||
--- a/lib/cmdline.c
|
||||
+++ b/lib/cmdline.c
|
||||
@@ -22,14 +22,14 @@
|
||||
* the values[M, M+1, ..., N] into the ints array in get_options.
|
||||
*/
|
||||
|
||||
-static int get_range(char **str, int *pint)
|
||||
+static int get_range(char **str, int *pint, int n)
|
||||
{
|
||||
int x, inc_counter, upper_range;
|
||||
|
||||
(*str)++;
|
||||
upper_range = simple_strtol((*str), NULL, 0);
|
||||
inc_counter = upper_range - *pint;
|
||||
- for (x = *pint; x < upper_range; x++)
|
||||
+ for (x = *pint; n && x < upper_range; x++, n--)
|
||||
*pint++ = x;
|
||||
return inc_counter;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ char *get_options(const char *str, int nints, int *ints)
|
||||
break;
|
||||
if (res == 3) {
|
||||
int range_nums;
|
||||
- range_nums = get_range((char **)&str, ints + i);
|
||||
+ range_nums = get_range((char **)&str, ints + i, nints - i);
|
||||
if (range_nums < 0)
|
||||
break;
|
||||
/*
|
||||
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c
|
||||
index da3cc09f683e..91d43ab3a961 100644
|
||||
--- a/net/rxrpc/ar-key.c
|
||||
+++ b/net/rxrpc/ar-key.c
|
||||
@@ -215,7 +215,7 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
|
||||
unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
- unsigned int toklen = *_toklen, n_parts, loop, tmp;
|
||||
+ unsigned int toklen = *_toklen, n_parts, loop, tmp, paddedlen;
|
||||
|
||||
/* there must be at least one name, and at least #names+1 length
|
||||
* words */
|
||||
@@ -245,16 +245,16 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
|
||||
toklen -= 4;
|
||||
if (tmp <= 0 || tmp > AFSTOKEN_STRING_MAX)
|
||||
return -EINVAL;
|
||||
- if (tmp > toklen)
|
||||
+ paddedlen = (tmp + 3) & ~3;
|
||||
+ if (paddedlen > toklen)
|
||||
return -EINVAL;
|
||||
princ->name_parts[loop] = kmalloc(tmp + 1, GFP_KERNEL);
|
||||
if (!princ->name_parts[loop])
|
||||
return -ENOMEM;
|
||||
memcpy(princ->name_parts[loop], xdr, tmp);
|
||||
princ->name_parts[loop][tmp] = 0;
|
||||
- tmp = (tmp + 3) & ~3;
|
||||
- toklen -= tmp;
|
||||
- xdr += tmp >> 2;
|
||||
+ toklen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
}
|
||||
|
||||
if (toklen < 4)
|
||||
@@ -263,16 +263,16 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ,
|
||||
toklen -= 4;
|
||||
if (tmp <= 0 || tmp > AFSTOKEN_K5_REALM_MAX)
|
||||
return -EINVAL;
|
||||
- if (tmp > toklen)
|
||||
+ paddedlen = (tmp + 3) & ~3;
|
||||
+ if (paddedlen > toklen)
|
||||
return -EINVAL;
|
||||
princ->realm = kmalloc(tmp + 1, GFP_KERNEL);
|
||||
if (!princ->realm)
|
||||
return -ENOMEM;
|
||||
memcpy(princ->realm, xdr, tmp);
|
||||
princ->realm[tmp] = 0;
|
||||
- tmp = (tmp + 3) & ~3;
|
||||
- toklen -= tmp;
|
||||
- xdr += tmp >> 2;
|
||||
+ toklen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
|
||||
_debug("%s/...@%s", princ->name_parts[0], princ->realm);
|
||||
|
||||
@@ -291,7 +291,7 @@ static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td,
|
||||
unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
- unsigned int toklen = *_toklen, len;
|
||||
+ unsigned int toklen = *_toklen, len, paddedlen;
|
||||
|
||||
/* there must be at least one tag and one length word */
|
||||
if (toklen <= 8)
|
||||
@@ -305,15 +305,17 @@ static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td,
|
||||
toklen -= 8;
|
||||
if (len > max_data_size)
|
||||
return -EINVAL;
|
||||
+ paddedlen = (len + 3) & ~3;
|
||||
+ if (paddedlen > toklen)
|
||||
+ return -EINVAL;
|
||||
td->data_len = len;
|
||||
|
||||
if (len > 0) {
|
||||
td->data = kmemdup(xdr, len, GFP_KERNEL);
|
||||
if (!td->data)
|
||||
return -ENOMEM;
|
||||
- len = (len + 3) & ~3;
|
||||
- toklen -= len;
|
||||
- xdr += len >> 2;
|
||||
+ toklen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
}
|
||||
|
||||
_debug("tag %x len %x", td->tag, td->data_len);
|
||||
@@ -385,7 +387,7 @@ static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen,
|
||||
const __be32 **_xdr, unsigned int *_toklen)
|
||||
{
|
||||
const __be32 *xdr = *_xdr;
|
||||
- unsigned int toklen = *_toklen, len;
|
||||
+ unsigned int toklen = *_toklen, len, paddedlen;
|
||||
|
||||
/* there must be at least one length word */
|
||||
if (toklen <= 4)
|
||||
@@ -397,6 +399,9 @@ static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen,
|
||||
toklen -= 4;
|
||||
if (len > AFSTOKEN_K5_TIX_MAX)
|
||||
return -EINVAL;
|
||||
+ paddedlen = (len + 3) & ~3;
|
||||
+ if (paddedlen > toklen)
|
||||
+ return -EINVAL;
|
||||
*_tktlen = len;
|
||||
|
||||
_debug("ticket len %u", len);
|
||||
@@ -405,9 +410,8 @@ static int rxrpc_krb5_decode_ticket(u8 **_ticket, u16 *_tktlen,
|
||||
*_ticket = kmemdup(xdr, len, GFP_KERNEL);
|
||||
if (!*_ticket)
|
||||
return -ENOMEM;
|
||||
- len = (len + 3) & ~3;
|
||||
- toklen -= len;
|
||||
- xdr += len >> 2;
|
||||
+ toklen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
}
|
||||
|
||||
*_xdr = xdr;
|
||||
@@ -550,7 +554,7 @@ static int rxrpc_preparse_xdr(struct key_preparsed_payload *prep)
|
||||
{
|
||||
const __be32 *xdr = prep->data, *token;
|
||||
const char *cp;
|
||||
- unsigned int len, tmp, loop, ntoken, toklen, sec_ix;
|
||||
+ unsigned int len, paddedlen, loop, ntoken, toklen, sec_ix;
|
||||
size_t datalen = prep->datalen;
|
||||
int ret;
|
||||
|
||||
@@ -576,22 +580,21 @@ static int rxrpc_preparse_xdr(struct key_preparsed_payload *prep)
|
||||
if (len < 1 || len > AFSTOKEN_CELL_MAX)
|
||||
goto not_xdr;
|
||||
datalen -= 4;
|
||||
- tmp = (len + 3) & ~3;
|
||||
- if (tmp > datalen)
|
||||
+ paddedlen = (len + 3) & ~3;
|
||||
+ if (paddedlen > datalen)
|
||||
goto not_xdr;
|
||||
|
||||
cp = (const char *) xdr;
|
||||
for (loop = 0; loop < len; loop++)
|
||||
if (!isprint(cp[loop]))
|
||||
goto not_xdr;
|
||||
- if (len < tmp)
|
||||
- for (; loop < tmp; loop++)
|
||||
- if (cp[loop])
|
||||
- goto not_xdr;
|
||||
+ for (; loop < paddedlen; loop++)
|
||||
+ if (cp[loop])
|
||||
+ goto not_xdr;
|
||||
_debug("cellname: [%u/%u] '%*.*s'",
|
||||
- len, tmp, len, len, (const char *) xdr);
|
||||
- datalen -= tmp;
|
||||
- xdr += tmp >> 2;
|
||||
+ len, paddedlen, len, len, (const char *) xdr);
|
||||
+ datalen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
|
||||
/* get the token count */
|
||||
if (datalen < 12)
|
||||
@@ -612,10 +615,11 @@ static int rxrpc_preparse_xdr(struct key_preparsed_payload *prep)
|
||||
sec_ix = ntohl(*xdr);
|
||||
datalen -= 4;
|
||||
_debug("token: [%x/%zx] %x", toklen, datalen, sec_ix);
|
||||
- if (toklen < 20 || toklen > datalen)
|
||||
+ paddedlen = (toklen + 3) & ~3;
|
||||
+ if (toklen < 20 || toklen > datalen || paddedlen > datalen)
|
||||
goto not_xdr;
|
||||
- datalen -= (toklen + 3) & ~3;
|
||||
- xdr += (toklen + 3) >> 2;
|
||||
+ datalen -= paddedlen;
|
||||
+ xdr += paddedlen >> 2;
|
||||
|
||||
} while (--loop > 0);
|
||||
|
2823
patch/kernel/rk3328-default/patch-4.4.75-76.patch
Normal file
2823
patch/kernel/rk3328-default/patch-4.4.75-76.patch
Normal file
File diff suppressed because it is too large
Load diff
1584
patch/kernel/rk3328-default/patch-4.4.76-77.patch
Normal file
1584
patch/kernel/rk3328-default/patch-4.4.76-77.patch
Normal file
File diff suppressed because it is too large
Load diff
3019
patch/kernel/rk3328-default/patch-4.4.77-78.patch
Normal file
3019
patch/kernel/rk3328-default/patch-4.4.77-78.patch
Normal file
File diff suppressed because it is too large
Load diff
2607
patch/kernel/rk3328-default/patch-4.4.78-79.patch
Normal file
2607
patch/kernel/rk3328-default/patch-4.4.78-79.patch
Normal file
File diff suppressed because it is too large
Load diff
3287
patch/kernel/rk3328-default/patch-4.4.79-80.patch
Normal file
3287
patch/kernel/rk3328-default/patch-4.4.79-80.patch
Normal file
File diff suppressed because it is too large
Load diff
2077
patch/kernel/rk3328-default/patch-4.4.80-81.patch
Normal file
2077
patch/kernel/rk3328-default/patch-4.4.80-81.patch
Normal file
File diff suppressed because it is too large
Load diff
330
patch/kernel/rk3328-default/patch-4.4.81-82.patch
Normal file
330
patch/kernel/rk3328-default/patch-4.4.81-82.patch
Normal file
|
@ -0,0 +1,330 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index d049e53a6960..52f2dd8dcebd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 81
|
||||
+SUBLEVEL = 82
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
|
||||
index 1f1ff7e7b9cf..ba079e279b58 100644
|
||||
--- a/arch/arm/kvm/mmu.c
|
||||
+++ b/arch/arm/kvm/mmu.c
|
||||
@@ -1629,12 +1629,16 @@ static int kvm_test_age_hva_handler(struct kvm *kvm, gpa_t gpa, void *data)
|
||||
|
||||
int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end)
|
||||
{
|
||||
+ if (!kvm->arch.pgd)
|
||||
+ return 0;
|
||||
trace_kvm_age_hva(start, end);
|
||||
return handle_hva_to_gpa(kvm, start, end, kvm_age_hva_handler, NULL);
|
||||
}
|
||||
|
||||
int kvm_test_age_hva(struct kvm *kvm, unsigned long hva)
|
||||
{
|
||||
+ if (!kvm->arch.pgd)
|
||||
+ return 0;
|
||||
trace_kvm_test_age_hva(hva);
|
||||
return handle_hva_to_gpa(kvm, hva, hva, kvm_test_age_hva_handler, NULL);
|
||||
}
|
||||
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
|
||||
index 0e2919dd8df3..1395eeb6005f 100644
|
||||
--- a/arch/s390/net/bpf_jit_comp.c
|
||||
+++ b/arch/s390/net/bpf_jit_comp.c
|
||||
@@ -1250,7 +1250,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp)
|
||||
insn_count = bpf_jit_insn(jit, fp, i);
|
||||
if (insn_count < 0)
|
||||
return -1;
|
||||
- jit->addrs[i + 1] = jit->prg; /* Next instruction address */
|
||||
+ /* Next instruction address */
|
||||
+ jit->addrs[i + insn_count] = jit->prg;
|
||||
}
|
||||
bpf_jit_epilogue(jit);
|
||||
|
||||
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
|
||||
index 349dd23e2876..0cdeb2b483a0 100644
|
||||
--- a/arch/sparc/include/asm/mmu_context_64.h
|
||||
+++ b/arch/sparc/include/asm/mmu_context_64.h
|
||||
@@ -25,9 +25,11 @@ void destroy_context(struct mm_struct *mm);
|
||||
void __tsb_context_switch(unsigned long pgd_pa,
|
||||
struct tsb_config *tsb_base,
|
||||
struct tsb_config *tsb_huge,
|
||||
- unsigned long tsb_descr_pa);
|
||||
+ unsigned long tsb_descr_pa,
|
||||
+ unsigned long secondary_ctx);
|
||||
|
||||
-static inline void tsb_context_switch(struct mm_struct *mm)
|
||||
+static inline void tsb_context_switch_ctx(struct mm_struct *mm,
|
||||
+ unsigned long ctx)
|
||||
{
|
||||
__tsb_context_switch(__pa(mm->pgd),
|
||||
&mm->context.tsb_block[0],
|
||||
@@ -38,9 +40,12 @@ static inline void tsb_context_switch(struct mm_struct *mm)
|
||||
#else
|
||||
NULL
|
||||
#endif
|
||||
- , __pa(&mm->context.tsb_descr[0]));
|
||||
+ , __pa(&mm->context.tsb_descr[0]),
|
||||
+ ctx);
|
||||
}
|
||||
|
||||
+#define tsb_context_switch(X) tsb_context_switch_ctx(X, 0)
|
||||
+
|
||||
void tsb_grow(struct mm_struct *mm,
|
||||
unsigned long tsb_index,
|
||||
unsigned long mm_rss);
|
||||
@@ -110,8 +115,7 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
|
||||
* cpu0 to update it's TSB because at that point the cpu_vm_mask
|
||||
* only had cpu1 set in it.
|
||||
*/
|
||||
- load_secondary_context(mm);
|
||||
- tsb_context_switch(mm);
|
||||
+ tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
|
||||
|
||||
/* Any time a processor runs a context on an address space
|
||||
* for the first time, we must flush that context out of the
|
||||
diff --git a/arch/sparc/kernel/tsb.S b/arch/sparc/kernel/tsb.S
|
||||
index 395ec1800530..7d961f6e3907 100644
|
||||
--- a/arch/sparc/kernel/tsb.S
|
||||
+++ b/arch/sparc/kernel/tsb.S
|
||||
@@ -375,6 +375,7 @@ tsb_flush:
|
||||
* %o1: TSB base config pointer
|
||||
* %o2: TSB huge config pointer, or NULL if none
|
||||
* %o3: Hypervisor TSB descriptor physical address
|
||||
+ * %o4: Secondary context to load, if non-zero
|
||||
*
|
||||
* We have to run this whole thing with interrupts
|
||||
* disabled so that the current cpu doesn't change
|
||||
@@ -387,6 +388,17 @@ __tsb_context_switch:
|
||||
rdpr %pstate, %g1
|
||||
wrpr %g1, PSTATE_IE, %pstate
|
||||
|
||||
+ brz,pn %o4, 1f
|
||||
+ mov SECONDARY_CONTEXT, %o5
|
||||
+
|
||||
+661: stxa %o4, [%o5] ASI_DMMU
|
||||
+ .section .sun4v_1insn_patch, "ax"
|
||||
+ .word 661b
|
||||
+ stxa %o4, [%o5] ASI_MMU
|
||||
+ .previous
|
||||
+ flush %g6
|
||||
+
|
||||
+1:
|
||||
TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
|
||||
|
||||
stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR]
|
||||
diff --git a/arch/sparc/power/hibernate.c b/arch/sparc/power/hibernate.c
|
||||
index 17bd2e167e07..df707a8ad311 100644
|
||||
--- a/arch/sparc/power/hibernate.c
|
||||
+++ b/arch/sparc/power/hibernate.c
|
||||
@@ -35,6 +35,5 @@ void restore_processor_state(void)
|
||||
{
|
||||
struct mm_struct *mm = current->active_mm;
|
||||
|
||||
- load_secondary_context(mm);
|
||||
- tsb_context_switch(mm);
|
||||
+ tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
|
||||
}
|
||||
diff --git a/mm/mempool.c b/mm/mempool.c
|
||||
index 004d42b1dfaf..7924f4f58a6d 100644
|
||||
--- a/mm/mempool.c
|
||||
+++ b/mm/mempool.c
|
||||
@@ -135,8 +135,8 @@ static void *remove_element(mempool_t *pool)
|
||||
void *element = pool->elements[--pool->curr_nr];
|
||||
|
||||
BUG_ON(pool->curr_nr < 0);
|
||||
- check_element(pool, element);
|
||||
kasan_unpoison_element(pool, element);
|
||||
+ check_element(pool, element);
|
||||
return element;
|
||||
}
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index 4b0853194a03..24d243084aab 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -2551,7 +2551,7 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
|
||||
{
|
||||
if (tx_path)
|
||||
return skb->ip_summed != CHECKSUM_PARTIAL &&
|
||||
- skb->ip_summed != CHECKSUM_NONE;
|
||||
+ skb->ip_summed != CHECKSUM_UNNECESSARY;
|
||||
|
||||
return skb->ip_summed == CHECKSUM_NONE;
|
||||
}
|
||||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
|
||||
index 5d58a6703a43..09c73dd541c5 100644
|
||||
--- a/net/ipv4/ip_output.c
|
||||
+++ b/net/ipv4/ip_output.c
|
||||
@@ -922,11 +922,12 @@ static int __ip_append_data(struct sock *sk,
|
||||
csummode = CHECKSUM_PARTIAL;
|
||||
|
||||
cork->length += length;
|
||||
- if ((((length + (skb ? skb->len : fragheaderlen)) > mtu) ||
|
||||
- (skb && skb_is_gso(skb))) &&
|
||||
+ if ((skb && skb_is_gso(skb)) ||
|
||||
+ (((length + (skb ? skb->len : fragheaderlen)) > mtu) &&
|
||||
+ (skb_queue_len(queue) <= 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len &&
|
||||
- (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx) {
|
||||
+ (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx)) {
|
||||
err = ip_ufo_append_data(sk, queue, getfrag, from, length,
|
||||
hh_len, fragheaderlen, transhdrlen,
|
||||
maxfraglen, flags);
|
||||
@@ -1242,6 +1243,7 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
|
||||
return -EINVAL;
|
||||
|
||||
if ((size + skb->len > mtu) &&
|
||||
+ (skb_queue_len(&sk->sk_write_queue) == 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO)) {
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL)
|
||||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
|
||||
index 8f13b2eaabf8..f0dabd125c43 100644
|
||||
--- a/net/ipv4/tcp_input.c
|
||||
+++ b/net/ipv4/tcp_input.c
|
||||
@@ -2503,8 +2503,8 @@ static inline void tcp_end_cwnd_reduction(struct sock *sk)
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
|
||||
/* Reset cwnd to ssthresh in CWR or Recovery (unless it's undone) */
|
||||
- if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR ||
|
||||
- (tp->undo_marker && tp->snd_ssthresh < TCP_INFINITE_SSTHRESH)) {
|
||||
+ if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH &&
|
||||
+ (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR || tp->undo_marker)) {
|
||||
tp->snd_cwnd = tp->snd_ssthresh;
|
||||
tp->snd_cwnd_stamp = tcp_time_stamp;
|
||||
}
|
||||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
|
||||
index 3fdcdc730f71..850d1b5bfd81 100644
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -3256,6 +3256,9 @@ int tcp_connect(struct sock *sk)
|
||||
struct sk_buff *buff;
|
||||
int err;
|
||||
|
||||
+ if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk))
|
||||
+ return -EHOSTUNREACH; /* Routing failure or similar. */
|
||||
+
|
||||
tcp_connect_init(sk);
|
||||
|
||||
if (unlikely(tp->repair)) {
|
||||
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
|
||||
index ebb34d0c5e80..1ec12a4f327e 100644
|
||||
--- a/net/ipv4/tcp_timer.c
|
||||
+++ b/net/ipv4/tcp_timer.c
|
||||
@@ -606,7 +606,8 @@ static void tcp_keepalive_timer (unsigned long data)
|
||||
goto death;
|
||||
}
|
||||
|
||||
- if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
|
||||
+ if (!sock_flag(sk, SOCK_KEEPOPEN) ||
|
||||
+ ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_SYN_SENT)))
|
||||
goto out;
|
||||
|
||||
elapsed = keepalive_time_when(tp);
|
||||
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
|
||||
index e9513e397c4f..301e60829c7e 100644
|
||||
--- a/net/ipv4/udp.c
|
||||
+++ b/net/ipv4/udp.c
|
||||
@@ -819,7 +819,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4)
|
||||
if (is_udplite) /* UDP-Lite */
|
||||
csum = udplite_csum(skb);
|
||||
|
||||
- else if (sk->sk_no_check_tx) { /* UDP csum disabled */
|
||||
+ else if (sk->sk_no_check_tx && !skb_is_gso(skb)) { /* UDP csum off */
|
||||
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
goto send;
|
||||
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
|
||||
index 6396f1c80ae9..6dfc3daf7c21 100644
|
||||
--- a/net/ipv4/udp_offload.c
|
||||
+++ b/net/ipv4/udp_offload.c
|
||||
@@ -231,7 +231,7 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
|
||||
if (uh->check == 0)
|
||||
uh->check = CSUM_MANGLED_0;
|
||||
|
||||
- skb->ip_summed = CHECKSUM_NONE;
|
||||
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
/* Fragment the skb. IP headers of the fragments are updated in
|
||||
* inet_gso_segment()
|
||||
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
|
||||
index 0de3245ea42f..e22339fad10b 100644
|
||||
--- a/net/ipv6/ip6_output.c
|
||||
+++ b/net/ipv6/ip6_output.c
|
||||
@@ -1357,11 +1357,12 @@ emsgsize:
|
||||
*/
|
||||
|
||||
cork->length += length;
|
||||
- if ((((length + (skb ? skb->len : headersize)) > mtu) ||
|
||||
- (skb && skb_is_gso(skb))) &&
|
||||
+ if ((skb && skb_is_gso(skb)) ||
|
||||
+ (((length + (skb ? skb->len : headersize)) > mtu) &&
|
||||
+ (skb_queue_len(queue) <= 1) &&
|
||||
(sk->sk_protocol == IPPROTO_UDP) &&
|
||||
(rt->dst.dev->features & NETIF_F_UFO) &&
|
||||
- (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk)) {
|
||||
+ (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk))) {
|
||||
err = ip6_ufo_append_data(sk, queue, getfrag, from, length,
|
||||
hh_len, fragheaderlen, exthdrlen,
|
||||
transhdrlen, mtu, flags, fl6);
|
||||
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
|
||||
index 01582966ffa0..2e3c12eeca07 100644
|
||||
--- a/net/ipv6/udp_offload.c
|
||||
+++ b/net/ipv6/udp_offload.c
|
||||
@@ -86,7 +86,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
|
||||
if (uh->check == 0)
|
||||
uh->check = CSUM_MANGLED_0;
|
||||
|
||||
- skb->ip_summed = CHECKSUM_NONE;
|
||||
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
/* Check if there is enough headroom to insert fragment header. */
|
||||
tnl_hlen = skb_tnl_header_len(skb);
|
||||
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
|
||||
index 061771ca2582..148ec130d99d 100644
|
||||
--- a/net/packet/af_packet.c
|
||||
+++ b/net/packet/af_packet.c
|
||||
@@ -3622,14 +3622,19 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
|
||||
|
||||
if (optlen != sizeof(val))
|
||||
return -EINVAL;
|
||||
- if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
|
||||
- return -EBUSY;
|
||||
if (copy_from_user(&val, optval, sizeof(val)))
|
||||
return -EFAULT;
|
||||
if (val > INT_MAX)
|
||||
return -EINVAL;
|
||||
- po->tp_reserve = val;
|
||||
- return 0;
|
||||
+ lock_sock(sk);
|
||||
+ if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
|
||||
+ ret = -EBUSY;
|
||||
+ } else {
|
||||
+ po->tp_reserve = val;
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+ release_sock(sk);
|
||||
+ return ret;
|
||||
}
|
||||
case PACKET_LOSS:
|
||||
{
|
||||
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
|
||||
index d05869646515..0915d448ba23 100644
|
||||
--- a/net/sched/act_ipt.c
|
||||
+++ b/net/sched/act_ipt.c
|
||||
@@ -42,8 +42,8 @@ static int ipt_init_target(struct xt_entry_target *t, char *table, unsigned int
|
||||
return PTR_ERR(target);
|
||||
|
||||
t->u.kernel.target = target;
|
||||
+ memset(&par, 0, sizeof(par));
|
||||
par.table = table;
|
||||
- par.entryinfo = NULL;
|
||||
par.target = target;
|
||||
par.targinfo = t->data;
|
||||
par.hook_mask = hook;
|
476
patch/kernel/rk3328-default/patch-4.4.82-83.patch
Normal file
476
patch/kernel/rk3328-default/patch-4.4.82-83.patch
Normal file
|
@ -0,0 +1,476 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 52f2dd8dcebd..7f67b35caf99 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
-SUBLEVEL = 82
|
||||
+SUBLEVEL = 83
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
|
||||
index fa24d5196615..c7122919a8c0 100644
|
||||
--- a/drivers/iio/accel/bmc150-accel-core.c
|
||||
+++ b/drivers/iio/accel/bmc150-accel-core.c
|
||||
@@ -194,7 +194,6 @@ struct bmc150_accel_data {
|
||||
struct device *dev;
|
||||
int irq;
|
||||
struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
|
||||
- atomic_t active_intr;
|
||||
struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
|
||||
struct mutex mutex;
|
||||
u8 fifo_mode, watermark;
|
||||
@@ -489,11 +488,6 @@ static int bmc150_accel_set_interrupt(struct bmc150_accel_data *data, int i,
|
||||
goto out_fix_power_state;
|
||||
}
|
||||
|
||||
- if (state)
|
||||
- atomic_inc(&data->active_intr);
|
||||
- else
|
||||
- atomic_dec(&data->active_intr);
|
||||
-
|
||||
return 0;
|
||||
|
||||
out_fix_power_state:
|
||||
@@ -1704,8 +1698,7 @@ static int bmc150_accel_resume(struct device *dev)
|
||||
struct bmc150_accel_data *data = iio_priv(indio_dev);
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
- if (atomic_read(&data->active_intr))
|
||||
- bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
|
||||
+ bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
|
||||
bmc150_accel_fifo_set_mode(data);
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
|
||||
index b10f629cc44b..1dbc2143cdfc 100644
|
||||
--- a/drivers/iio/adc/vf610_adc.c
|
||||
+++ b/drivers/iio/adc/vf610_adc.c
|
||||
@@ -77,7 +77,7 @@
|
||||
#define VF610_ADC_ADSTS_MASK 0x300
|
||||
#define VF610_ADC_ADLPC_EN 0x80
|
||||
#define VF610_ADC_ADHSC_EN 0x400
|
||||
-#define VF610_ADC_REFSEL_VALT 0x100
|
||||
+#define VF610_ADC_REFSEL_VALT 0x800
|
||||
#define VF610_ADC_REFSEL_VBG 0x1000
|
||||
#define VF610_ADC_ADTRG_HARD 0x2000
|
||||
#define VF610_ADC_AVGS_8 0x4000
|
||||
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
|
||||
index 12731d6b89ec..ec1b2e798cc1 100644
|
||||
--- a/drivers/iio/light/tsl2563.c
|
||||
+++ b/drivers/iio/light/tsl2563.c
|
||||
@@ -626,7 +626,7 @@ static irqreturn_t tsl2563_event_handler(int irq, void *private)
|
||||
struct tsl2563_chip *chip = iio_priv(dev_info);
|
||||
|
||||
iio_push_event(dev_info,
|
||||
- IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
|
||||
+ IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
|
||||
0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
|
||||
index 71ccf6a90b22..2551e4adb33f 100644
|
||||
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
|
||||
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
|
||||
@@ -194,8 +194,6 @@ static int exynos_irq_request_resources(struct irq_data *irqd)
|
||||
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
|
||||
- exynos_irq_unmask(irqd);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -216,8 +214,6 @@ static void exynos_irq_release_resources(struct irq_data *irqd)
|
||||
shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
|
||||
mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
|
||||
|
||||
- exynos_irq_mask(irqd);
|
||||
-
|
||||
spin_lock_irqsave(&bank->slock, flags);
|
||||
|
||||
con = readl(d->virt_base + reg_con);
|
||||
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
|
||||
index 862a096c5dba..be5c71df148d 100644
|
||||
--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
|
||||
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
|
||||
@@ -811,6 +811,7 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
|
||||
SUNXI_FUNCTION(0x2, "lcd1"), /* D16 */
|
||||
SUNXI_FUNCTION(0x3, "pata"), /* ATAD12 */
|
||||
SUNXI_FUNCTION(0x4, "keypad"), /* IN6 */
|
||||
+ SUNXI_FUNCTION(0x5, "sim"), /* DET */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 16), /* EINT16 */
|
||||
SUNXI_FUNCTION(0x7, "csi1")), /* D16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
|
||||
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
|
||||
index d97aa2827412..8eb7179da342 100644
|
||||
--- a/drivers/staging/iio/resolver/ad2s1210.c
|
||||
+++ b/drivers/staging/iio/resolver/ad2s1210.c
|
||||
@@ -468,7 +468,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
|
||||
long m)
|
||||
{
|
||||
struct ad2s1210_state *st = iio_priv(indio_dev);
|
||||
- bool negative;
|
||||
+ u16 negative;
|
||||
int ret = 0;
|
||||
u16 pos;
|
||||
s16 vel;
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 31d5d9c0e10b..1ff1c83e2df5 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -418,6 +418,7 @@ int iscsit_reset_np_thread(
|
||||
return 0;
|
||||
}
|
||||
np->np_thread_state = ISCSI_NP_THREAD_RESET;
|
||||
+ atomic_inc(&np->np_reset_count);
|
||||
|
||||
if (np->np_thread) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
@@ -1996,6 +1997,7 @@ iscsit_setup_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
||||
cmd->cmd_sn = be32_to_cpu(hdr->cmdsn);
|
||||
cmd->exp_stat_sn = be32_to_cpu(hdr->exp_statsn);
|
||||
cmd->data_direction = DMA_NONE;
|
||||
+ kfree(cmd->text_in_ptr);
|
||||
cmd->text_in_ptr = NULL;
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
|
||||
index b19edffa7d98..bc2cbffec27e 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target_login.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target_login.c
|
||||
@@ -1219,9 +1219,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
||||
flush_signals(current);
|
||||
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
- if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
|
||||
+ if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
|
||||
np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
|
||||
+ spin_unlock_bh(&np->np_thread_lock);
|
||||
complete(&np->np_restart_comp);
|
||||
+ return 1;
|
||||
} else if (np->np_thread_state == ISCSI_NP_THREAD_SHUTDOWN) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
goto exit;
|
||||
@@ -1254,7 +1256,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
||||
goto exit;
|
||||
} else if (rc < 0) {
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
- if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
|
||||
+ if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
|
||||
+ np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
complete(&np->np_restart_comp);
|
||||
iscsit_put_transport(conn->conn_transport);
|
||||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
|
||||
index b403596818db..5c0952995280 100644
|
||||
--- a/drivers/usb/core/hcd.c
|
||||
+++ b/drivers/usb/core/hcd.c
|
||||
@@ -1851,7 +1851,7 @@ void usb_hcd_flush_endpoint(struct usb_device *udev,
|
||||
/* No more submits can occur */
|
||||
spin_lock_irq(&hcd_urb_list_lock);
|
||||
rescan:
|
||||
- list_for_each_entry (urb, &ep->urb_list, urb_list) {
|
||||
+ list_for_each_entry_reverse(urb, &ep->urb_list, urb_list) {
|
||||
int is_in;
|
||||
|
||||
if (urb->unlinked)
|
||||
@@ -2448,6 +2448,8 @@ void usb_hc_died (struct usb_hcd *hcd)
|
||||
}
|
||||
if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) {
|
||||
hcd = hcd->shared_hcd;
|
||||
+ clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
|
||||
+ set_bit(HCD_FLAG_DEAD, &hcd->flags);
|
||||
if (hcd->rh_registered) {
|
||||
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
|
||||
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index 1d59d489a1ad..cdf4be3939f5 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -4661,7 +4661,8 @@ hub_power_remaining(struct usb_hub *hub)
|
||||
static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
|
||||
u16 portchange)
|
||||
{
|
||||
- int status, i;
|
||||
+ int status = -ENODEV;
|
||||
+ int i;
|
||||
unsigned unit_load;
|
||||
struct usb_device *hdev = hub->hdev;
|
||||
struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
|
||||
@@ -4865,9 +4866,10 @@ loop:
|
||||
|
||||
done:
|
||||
hub_port_disable(hub, port1, 1);
|
||||
- if (hcd->driver->relinquish_port && !hub->hdev->parent)
|
||||
- hcd->driver->relinquish_port(hcd, port1);
|
||||
-
|
||||
+ if (hcd->driver->relinquish_port && !hub->hdev->parent) {
|
||||
+ if (status != -ENOTCONN && status != -ENODEV)
|
||||
+ hcd->driver->relinquish_port(hcd, port1);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Handle physical or logical connection change events.
|
||||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
|
||||
index 3116edfcdc18..574da2b4529c 100644
|
||||
--- a/drivers/usb/core/quirks.c
|
||||
+++ b/drivers/usb/core/quirks.c
|
||||
@@ -150,6 +150,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* appletouch */
|
||||
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
+ /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
|
||||
+ { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
|
||||
+
|
||||
/* Avision AV600U */
|
||||
{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
|
||||
USB_QUIRK_STRING_FETCH_255 },
|
||||
@@ -249,6 +252,7 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
|
||||
{ USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
+ { USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Logitech Optical Mouse M90/M100 */
|
||||
{ USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
|
||||
index f9400564cb72..03b9a372636f 100644
|
||||
--- a/drivers/usb/host/pci-quirks.c
|
||||
+++ b/drivers/usb/host/pci-quirks.c
|
||||
@@ -89,6 +89,7 @@ enum amd_chipset_gen {
|
||||
AMD_CHIPSET_HUDSON2,
|
||||
AMD_CHIPSET_BOLTON,
|
||||
AMD_CHIPSET_YANGTZE,
|
||||
+ AMD_CHIPSET_TAISHAN,
|
||||
AMD_CHIPSET_UNKNOWN,
|
||||
};
|
||||
|
||||
@@ -132,6 +133,11 @@ static int amd_chipset_sb_type_init(struct amd_chipset_info *pinfo)
|
||||
pinfo->sb_type.gen = AMD_CHIPSET_SB700;
|
||||
else if (rev >= 0x40 && rev <= 0x4f)
|
||||
pinfo->sb_type.gen = AMD_CHIPSET_SB800;
|
||||
+ }
|
||||
+ pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
|
||||
+ 0x145c, NULL);
|
||||
+ if (pinfo->smbus_dev) {
|
||||
+ pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
|
||||
} else {
|
||||
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
|
||||
PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
|
||||
@@ -251,11 +257,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
|
||||
{
|
||||
/* Make sure amd chipset type has already been initialized */
|
||||
usb_amd_find_chipset_info();
|
||||
- if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
|
||||
- return 0;
|
||||
-
|
||||
- dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
|
||||
- return 1;
|
||||
+ if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
|
||||
+ amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
|
||||
+ dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
|
||||
|
||||
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
|
||||
index 13d5614f37f1..0d843e0f8055 100644
|
||||
--- a/drivers/usb/musb/musb_host.c
|
||||
+++ b/drivers/usb/musb/musb_host.c
|
||||
@@ -138,6 +138,7 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
|
||||
"Could not flush host TX%d fifo: csr: %04x\n",
|
||||
ep->epnum, csr))
|
||||
return;
|
||||
+ mdelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
|
||||
index b0dc6da3d970..41a6513646de 100644
|
||||
--- a/drivers/usb/serial/cp210x.c
|
||||
+++ b/drivers/usb/serial/cp210x.c
|
||||
@@ -135,6 +135,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
|
||||
{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
|
||||
{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
|
||||
+ { USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */
|
||||
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
|
||||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
||||
index ebe51f11105d..fe123153b1a5 100644
|
||||
--- a/drivers/usb/serial/option.c
|
||||
+++ b/drivers/usb/serial/option.c
|
||||
@@ -2025,6 +2025,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
+ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
|
||||
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
|
||||
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
|
||||
index 1db4b61bdf7b..a51b28379850 100644
|
||||
--- a/drivers/usb/serial/pl2303.c
|
||||
+++ b/drivers/usb/serial/pl2303.c
|
||||
@@ -49,6 +49,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
|
||||
+ { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_UC485) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
|
||||
{ USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
|
||||
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
|
||||
index 09d9be88209e..3b5a15d1dc0d 100644
|
||||
--- a/drivers/usb/serial/pl2303.h
|
||||
+++ b/drivers/usb/serial/pl2303.h
|
||||
@@ -27,6 +27,7 @@
|
||||
#define ATEN_VENDOR_ID 0x0557
|
||||
#define ATEN_VENDOR_ID2 0x0547
|
||||
#define ATEN_PRODUCT_ID 0x2008
|
||||
+#define ATEN_PRODUCT_UC485 0x2021
|
||||
#define ATEN_PRODUCT_ID2 0x2118
|
||||
|
||||
#define IODATA_VENDOR_ID 0x04bb
|
||||
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
|
||||
index 53341a77d89f..a37ed1e59e99 100644
|
||||
--- a/drivers/usb/storage/unusual_uas.h
|
||||
+++ b/drivers/usb/storage/unusual_uas.h
|
||||
@@ -123,9 +123,9 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
|
||||
/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
|
||||
UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
|
||||
"Initio Corporation",
|
||||
- "",
|
||||
+ "INIC-3069",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
- US_FL_NO_ATA_1X),
|
||||
+ US_FL_NO_ATA_1X | US_FL_IGNORE_RESIDUE),
|
||||
|
||||
/* Reported-by: Tom Arild Naess <tanaess@gmail.com> */
|
||||
UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999,
|
||||
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
|
||||
index 11538a8be9f0..1a063cbfe503 100644
|
||||
--- a/fs/fuse/file.c
|
||||
+++ b/fs/fuse/file.c
|
||||
@@ -46,7 +46,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
|
||||
{
|
||||
struct fuse_file *ff;
|
||||
|
||||
- ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
|
||||
+ ff = kzalloc(sizeof(struct fuse_file), GFP_KERNEL);
|
||||
if (unlikely(!ff))
|
||||
return NULL;
|
||||
|
||||
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
|
||||
index f31fd0dd92c6..b1daeafbea92 100644
|
||||
--- a/fs/nfs/Kconfig
|
||||
+++ b/fs/nfs/Kconfig
|
||||
@@ -121,6 +121,7 @@ config PNFS_FILE_LAYOUT
|
||||
config PNFS_BLOCK
|
||||
tristate
|
||||
depends on NFS_V4_1 && BLK_DEV_DM
|
||||
+ depends on 64BIT || LBDAF
|
||||
default NFS_V4
|
||||
|
||||
config PNFS_OBJLAYOUT
|
||||
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
|
||||
index e125e55de86d..2603d7589946 100644
|
||||
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
|
||||
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
|
||||
@@ -30,6 +30,7 @@ void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds)
|
||||
{
|
||||
nfs4_print_deviceid(&mirror_ds->id_node.deviceid);
|
||||
nfs4_pnfs_ds_put(mirror_ds->ds);
|
||||
+ kfree(mirror_ds->ds_versions);
|
||||
kfree_rcu(mirror_ds, id_node.rcu);
|
||||
}
|
||||
|
||||
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
|
||||
index 85a868ccb493..8397dc235e84 100644
|
||||
--- a/include/linux/cpuset.h
|
||||
+++ b/include/linux/cpuset.h
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#ifdef CONFIG_CPUSETS
|
||||
|
||||
+extern struct static_key cpusets_pre_enable_key;
|
||||
extern struct static_key cpusets_enabled_key;
|
||||
static inline bool cpusets_enabled(void)
|
||||
{
|
||||
@@ -30,12 +31,14 @@ static inline int nr_cpusets(void)
|
||||
|
||||
static inline void cpuset_inc(void)
|
||||
{
|
||||
+ static_key_slow_inc(&cpusets_pre_enable_key);
|
||||
static_key_slow_inc(&cpusets_enabled_key);
|
||||
}
|
||||
|
||||
static inline void cpuset_dec(void)
|
||||
{
|
||||
static_key_slow_dec(&cpusets_enabled_key);
|
||||
+ static_key_slow_dec(&cpusets_pre_enable_key);
|
||||
}
|
||||
|
||||
extern int cpuset_init(void);
|
||||
@@ -104,7 +107,7 @@ extern void cpuset_print_current_mems_allowed(void);
|
||||
*/
|
||||
static inline unsigned int read_mems_allowed_begin(void)
|
||||
{
|
||||
- if (!cpusets_enabled())
|
||||
+ if (!static_key_false(&cpusets_pre_enable_key))
|
||||
return 0;
|
||||
|
||||
return read_seqcount_begin(¤t->mems_allowed_seq);
|
||||
@@ -118,7 +121,7 @@ static inline unsigned int read_mems_allowed_begin(void)
|
||||
*/
|
||||
static inline bool read_mems_allowed_retry(unsigned int seq)
|
||||
{
|
||||
- if (!cpusets_enabled())
|
||||
+ if (!static_key_false(&cpusets_enabled_key))
|
||||
return false;
|
||||
|
||||
return read_seqcount_retry(¤t->mems_allowed_seq, seq);
|
||||
diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h
|
||||
index fdda45f26f75..22f442ab85f9 100644
|
||||
--- a/include/target/iscsi/iscsi_target_core.h
|
||||
+++ b/include/target/iscsi/iscsi_target_core.h
|
||||
@@ -784,6 +784,7 @@ struct iscsi_np {
|
||||
int np_sock_type;
|
||||
enum np_thread_state_table np_thread_state;
|
||||
bool enabled;
|
||||
+ atomic_t np_reset_count;
|
||||
enum iscsi_timer_flags_table np_login_timer_flags;
|
||||
u32 np_exports;
|
||||
enum np_flags_table np_flags;
|
||||
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
|
||||
index 3b5e5430f5d0..8ccd66a97c8b 100644
|
||||
--- a/kernel/cpuset.c
|
||||
+++ b/kernel/cpuset.c
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
+struct static_key cpusets_pre_enable_key __read_mostly = STATIC_KEY_INIT_FALSE;
|
||||
struct static_key cpusets_enabled_key __read_mostly = STATIC_KEY_INIT_FALSE;
|
||||
|
||||
/* See "Frequency meter" comments, below. */
|
||||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
||||
index f9d648fce8cd..53286b2f5b1c 100644
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -6804,7 +6804,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
|
||||
|
||||
/* Make sure the range is really isolated. */
|
||||
if (test_pages_isolated(outer_start, end, false)) {
|
||||
- pr_info("%s: [%lx, %lx) PFNs busy\n",
|
||||
+ pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n",
|
||||
__func__, outer_start, end);
|
||||
ret = -EBUSY;
|
||||
goto done;
|
Loading…
Add table
Reference in a new issue