Skip to content

Commit

Permalink
Merge 4.19.239 into android-4.19-stable
Browse files Browse the repository at this point in the history
Changes in 4.19.239
	memory: atmel-ebi: Fix missing of_node_put in atmel_ebi_probe
	net/sched: flower: fix parsing of ethertype following VLAN header
	veth: Ensure eth header is in skb's linear part
	gpiolib: acpi: use correct format characters
	mlxsw: i2c: Fix initialization error flow
	net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
	sctp: Initialize daddr on peeled off socket
	testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
	nfc: nci: add flush_workqueue to prevent uaf
	cifs: potential buffer overflow in handling symlinks
	drm/amd: Add USBC connector ID
	drm/amdkfd: Check for potential null return of kmalloc_array()
	Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
	scsi: target: tcmu: Fix possible page UAF
	scsi: ibmvscsis: Increase INITIAL_SRP_LIMIT to 1024
	net: micrel: fix KS8851_MLL Kconfig
	ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
	gpu: ipu-v3: Fix dev_dbg frequency output
	arm64: alternatives: mark patch_alternative() as `noinstr`
	drm/amd/display: Fix allocate_mst_payload assert on resume
	scsi: mvsas: Add PCI ID of RocketRaid 2640
	drivers: net: slip: fix NPD bug in sl_tx_timeout()
	mm, page_alloc: fix build_zonerefs_node()
	mm: kmemleak: take a full lowmem check in kmemleak_*_phys()
	gcc-plugins: latent_entropy: use /dev/urandom
	ALSA: hda/realtek: Add quirk for Clevo PD50PNT
	ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
	ipv6: fix panic when forwarding a pkt with no in6 dev
	ARM: davinci: da850-evm: Avoid NULL pointer dereference
	smp: Fix offline cpu check in flush_smp_call_function_queue()
	i2c: pasemi: Wait for write xfers to finish
	Linux 4.19.239

Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: Ia9e9320ce18a1d1b1f943adbafc1b80f33a9c3e0
  • Loading branch information
gregkh committed Apr 21, 2022
2 parents 864405f + eadf658 commit dbfc3fb
Show file tree
Hide file tree
Showing 36 changed files with 147 additions and 76 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 238
SUBLEVEL = 239
EXTRAVERSION =
NAME = "People's Front"

Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,13 @@ static int __init da850_evm_config_emac(void)
int ret;
u32 val;
struct davinci_soc_info *soc_info = &davinci_soc_info;
u8 rmii_en = soc_info->emac_pdata->rmii_en;
u8 rmii_en;

if (!machine_is_davinci_da850_evm())
return 0;

rmii_en = soc_info->emac_pdata->rmii_en;

cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);

val = __raw_readl(cfg_chip3_base);
Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ struct alt_region {
/*
* Check if the target PC is within an alternative block.
*/
static bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)
static __always_inline bool branch_insn_requires_update(struct alt_instr *alt, unsigned long pc)
{
unsigned long replptr = (unsigned long)ALT_REPL_PTR(alt);
return !(pc >= replptr && pc <= (replptr + alt->alt_len));
}

#define align_down(x, a) ((unsigned long)(x) & ~(((unsigned long)(a)) - 1))

static u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr)
static __always_inline u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnptr)
{
u32 insn;

Expand Down Expand Up @@ -95,7 +95,7 @@ static u32 get_alt_insn(struct alt_instr *alt, __le32 *insnptr, __le32 *altinsnp
return insn;
}

static void patch_alternative(struct alt_instr *alt,
static noinstr void patch_alternative(struct alt_instr *alt,
__le32 *origptr, __le32 *updptr, int nr_inst)
{
__le32 *replptr;
Expand Down
3 changes: 3 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4598,6 +4598,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 840 EVO*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_NO_DMA_LOG |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 840*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Samsung SSD 850*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpiolib-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
pin = agpio->pin_table[0];

if (pin <= 255) {
char ev_name[5];
sprintf(ev_name, "_%c%02hhX",
char ev_name[8];
sprintf(ev_name, "_%c%02X",
agpio->triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L',
pin);
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/ObjectID.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
#define CONNECTOR_OBJECT_ID_eDP 0x14
#define CONNECTOR_OBJECT_ID_MXM 0x15
#define CONNECTOR_OBJECT_ID_LVDS_eDP 0x16
#define CONNECTOR_OBJECT_ID_USBC 0x17

/* deleted */

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdkfd/kfd_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
event_waiters = kmalloc_array(num_events,
sizeof(struct kfd_event_waiter),
GFP_KERNEL);
if (!event_waiters)
return NULL;

for (i = 0; (event_waiters) && (i < num_events) ; i++) {
init_wait(&event_waiters[i].wait);
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ static int dm_resume(void *handle)
* this is the case when traversing through already created
* MST connectors, should be skipped
*/
if (aconnector->mst_port)
if (aconnector->dc_link &&
aconnector->dc_link->type == dc_connection_mst_branch)
continue;

mutex_lock(&aconnector->hpd_lock);
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/ipu-v3/ipu-di.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,9 @@ static void ipu_di_config_clock(struct ipu_di *di,

error = rate / (sig->mode.pixelclock / 1000);

dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %d.%u%%\n",
rate, div, (signed)(error - 1000) / 10, error % 10);
dev_dbg(di->ipu->dev, " IPU clock can give %lu with divider %u, error %c%d.%d%%\n",
rate, div, error < 1000 ? '-' : '+',
abs(error - 1000) / 10, abs(error - 1000) % 10);

/* Allow a 1% error */
if (error < 1010 && error >= 990) {
Expand Down
11 changes: 10 additions & 1 deletion drivers/hv/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,16 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
static u32 hv_pkt_iter_avail(const struct hv_ring_buffer_info *rbi)
{
u32 priv_read_loc = rbi->priv_read_index;
u32 write_loc = READ_ONCE(rbi->ring_buffer->write_index);
u32 write_loc;

/*
* The Hyper-V host writes the packet data, then uses
* store_release() to update the write_index. Use load_acquire()
* here to prevent loads of the packet data from being re-ordered
* before the read of the write_index and potentially getting
* stale data.
*/
write_loc = virt_load_acquire(&rbi->ring_buffer->write_index);

if (write_loc >= priv_read_loc)
return write_loc - priv_read_loc;
Expand Down
6 changes: 6 additions & 0 deletions drivers/i2c/busses/i2c-pasemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter,

TXFIFO_WR(smbus, msg->buf[msg->len-1] |
(stop ? MTXFIFO_STOP : 0));

if (stop) {
err = pasemi_smb_waitready(smbus);
if (err)
goto reset_out;
}
}

return 0;
Expand Down
23 changes: 17 additions & 6 deletions drivers/memory/atmel-ebi.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,20 +524,27 @@ static int atmel_ebi_probe(struct platform_device *pdev)
smc_np = of_parse_phandle(dev->of_node, "atmel,smc", 0);

ebi->smc.regmap = syscon_node_to_regmap(smc_np);
if (IS_ERR(ebi->smc.regmap))
return PTR_ERR(ebi->smc.regmap);
if (IS_ERR(ebi->smc.regmap)) {
ret = PTR_ERR(ebi->smc.regmap);
goto put_node;
}

ebi->smc.layout = atmel_hsmc_get_reg_layout(smc_np);
if (IS_ERR(ebi->smc.layout))
return PTR_ERR(ebi->smc.layout);
if (IS_ERR(ebi->smc.layout)) {
ret = PTR_ERR(ebi->smc.layout);
goto put_node;
}

ebi->smc.clk = of_clk_get(smc_np, 0);
if (IS_ERR(ebi->smc.clk)) {
if (PTR_ERR(ebi->smc.clk) != -ENOENT)
return PTR_ERR(ebi->smc.clk);
if (PTR_ERR(ebi->smc.clk) != -ENOENT) {
ret = PTR_ERR(ebi->smc.clk);
goto put_node;
}

ebi->smc.clk = NULL;
}
of_node_put(smc_np);
ret = clk_prepare_enable(ebi->smc.clk);
if (ret)
return ret;
Expand Down Expand Up @@ -587,6 +594,10 @@ static int atmel_ebi_probe(struct platform_device *pdev)
}

return of_platform_populate(np, NULL, NULL, dev);

put_node:
of_node_put(smc_np);
return ret;
}

static __maybe_unused int atmel_ebi_resume(struct device *dev)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlxsw/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ static int mlxsw_i2c_probe(struct i2c_client *client,
return 0;

errout:
mutex_destroy(&mlxsw_i2c->cmd.lock);
i2c_set_clientdata(client, NULL);

return err;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/micrel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ config KS8851
config KS8851_MLL
tristate "Micrel KS8851 MLL"
depends on HAS_IOMEM
depends on PTP_1588_CLOCK_OPTIONAL
select MII
---help---
This platform driver is for Micrel KS8851 Address/data bus
Expand Down
8 changes: 0 additions & 8 deletions drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@
#define TSE_PCS_USE_SGMII_ENA BIT(0)
#define TSE_PCS_IF_USE_SGMII 0x03

#define SGMII_ADAPTER_CTRL_REG 0x00
#define SGMII_ADAPTER_DISABLE 0x0001
#define SGMII_ADAPTER_ENABLE 0x0000

#define AUTONEGO_LINK_TIMER 20

static int tse_pcs_reset(void __iomem *base, struct tse_pcs *pcs)
Expand Down Expand Up @@ -213,12 +209,8 @@ void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev,
unsigned int speed)
{
void __iomem *tse_pcs_base = pcs->tse_pcs_base;
void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base;
u32 val;

writew(SGMII_ADAPTER_ENABLE,
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);

pcs->autoneg = phy_dev->autoneg;

if (phy_dev->autoneg == AUTONEG_ENABLE) {
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include <linux/phy.h>
#include <linux/timer.h>

#define SGMII_ADAPTER_CTRL_REG 0x00
#define SGMII_ADAPTER_ENABLE 0x0000
#define SGMII_ADAPTER_DISABLE 0x0001

struct tse_pcs {
struct device *dev;
void __iomem *tse_pcs_base;
Expand Down
13 changes: 5 additions & 8 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@

#include "altr_tse_pcs.h"

#define SGMII_ADAPTER_CTRL_REG 0x00
#define SGMII_ADAPTER_DISABLE 0x0001

#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII 0x0
#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII 0x1
#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII 0x2
Expand Down Expand Up @@ -65,16 +62,14 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
{
struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv;
void __iomem *splitter_base = dwmac->splitter_base;
void __iomem *tse_pcs_base = dwmac->pcs.tse_pcs_base;
void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base;
struct device *dev = dwmac->dev;
struct net_device *ndev = dev_get_drvdata(dev);
struct phy_device *phy_dev = ndev->phydev;
u32 val;

if ((tse_pcs_base) && (sgmii_adapter_base))
writew(SGMII_ADAPTER_DISABLE,
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
writew(SGMII_ADAPTER_DISABLE,
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);

if (splitter_base) {
val = readl(splitter_base + EMAC_SPLITTER_CTRL_REG);
Expand All @@ -96,7 +91,9 @@ static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed)
writel(val, splitter_base + EMAC_SPLITTER_CTRL_REG);
}

if (tse_pcs_base && sgmii_adapter_base)
writew(SGMII_ADAPTER_ENABLE,
sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG);
if (phy_dev)
tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/slip/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static void sl_tx_timeout(struct net_device *dev)
spin_lock(&sl->lock);

if (netif_queue_stopped(dev)) {
if (!netif_running(dev))
if (!netif_running(dev) || !sl->tty)
goto out;

/* May be we must check transmitter timeout here ?
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)

rcu_read_lock();
rcv = rcu_dereference(priv->peer);
if (unlikely(!rcv)) {
if (unlikely(!rcv) || !pskb_may_pull(skb, ETH_HLEN)) {
kfree_skb(skb);
goto drop;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#define IBMVSCSIS_VERSION "v0.2"

#define INITIAL_SRP_LIMIT 800
#define INITIAL_SRP_LIMIT 1024
#define DEFAULT_MAX_SECTORS 256
#define MAX_TXU 1024 * 1024

Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/mvsas/mv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ static struct pci_device_id mvs_pci_table[] = {
{ PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1300), chip_1300 },
{ PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1320), chip_1320 },
{ PCI_VDEVICE(ADAPTEC2, 0x0450), chip_6440 },
{ PCI_VDEVICE(TTI, 0x2640), chip_6440 },
{ PCI_VDEVICE(TTI, 0x2710), chip_9480 },
{ PCI_VDEVICE(TTI, 0x2720), chip_9480 },
{ PCI_VDEVICE(TTI, 0x2721), chip_9480 },
Expand Down
3 changes: 2 additions & 1 deletion drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ static struct page *tcmu_try_get_block_page(struct tcmu_dev *udev, uint32_t dbi)
mutex_lock(&udev->cmdr_lock);
page = tcmu_get_block_page(udev, dbi);
if (likely(page)) {
get_page(page);
mutex_unlock(&udev->cmdr_lock);
return page;
}
Expand Down Expand Up @@ -1537,6 +1538,7 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf)
/* For the vmalloc()ed cmd area pages */
addr = (void *)(unsigned long)info->mem[mi].addr + offset;
page = vmalloc_to_page(addr);
get_page(page);
} else {
uint32_t dbi;

Expand All @@ -1547,7 +1549,6 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS;
}

get_page(page);
vmf->page = page;
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions fs/cifs/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len,
if (rc != 1)
return -EINVAL;

if (link_len > CIFS_MF_SYMLINK_LINK_MAXLEN)
return -EINVAL;

rc = symlink_hash(link_len, link_str, md5_hash);
if (rc) {
cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc);
Expand Down
2 changes: 2 additions & 0 deletions include/net/flow_dissector.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ struct flow_dissector_key_vlan {
u16 vlan_id:12,
vlan_priority:3;
__be16 vlan_tpid;
__be16 vlan_eth_type;
u16 padding;
};

struct flow_dissector_key_mpls {
Expand Down
2 changes: 1 addition & 1 deletion kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)

/* There shouldn't be any pending callbacks on an offline CPU. */
if (unlikely(warn_cpu_offline && !cpu_online(smp_processor_id()) &&
!warned && !llist_empty(head))) {
!warned && entry != NULL)) {
warned = true;
WARN(1, "IPI on offline CPU %d\n", smp_processor_id());

Expand Down
Loading

0 comments on commit dbfc3fb

Please sign in to comment.