Skip to content

Commit

Permalink
Merge tag 'v4.4.270' into android-msm-wahoo-4.4
Browse files Browse the repository at this point in the history
This is the 4.4.270 stable release

# gpg: Signature made Wed May 26 12:28:01 2021 EEST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Good signature from "Greg Kroah-Hartman <[email protected]>" [full]
# gpg: [email protected]: Verified 21 signatures in the past 2 hours.  Encrypted
#      0 messages.

# By Greg Kroah-Hartman (14) and others
# Via Greg Kroah-Hartman
* tag 'v4.4.270':
  Linux 4.4.270
  Bluetooth: SMP: Fail if remote and local public keys are identical
  video: hgafb: correctly handle card detect failure during probe
  tty: vt: always invoke vc->vc_sw->con_resize callback
  vt: Fix character height handling with VT_RESIZEX
  vgacon: Record video mode changes with VT_RESIZEX
  video: hgafb: fix potential NULL pointer dereference
  qlcnic: Add null check after calling netdev_alloc_skb
  leds: lp5523: check return value of lp5xx_read and jump to cleanup code
  net: rtlwifi: properly check for alloc_workqueue() failure
  net: stmicro: handle clk_prepare() failure during init
  ethernet: sun: niu: fix missing checks of niu_pci_eeprom_read()
  Revert "niu: fix missing checks of niu_pci_eeprom_read"
  Revert "qlcnic: Avoid potential NULL pointer dereference"
  Revert "rtlwifi: fix a potential NULL pointer dereference"
  cdrom: gdrom: initialize global variable at init time
  cdrom: gdrom: deallocate struct gdrom_unit fields in remove_gdrom
  Revert "gdrom: fix a memory leak bug"
  Revert "ecryptfs: replace BUG_ON with error handling code"
  Revert "video: imsttfb: fix potential NULL pointer dereferences"
  Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe"
  Revert "leds: lp5523: fix a missing check of return value of lp55xx_read"
  Revert "net: stmicro: fix a missing check of clk_prepare"
  Revert "video: hgafb: fix potential NULL pointer dereference"
  dm snapshot: fix crash with transient storage and zero chunk size
  xen-pciback: reconfigure also from backend watch handler
  Revert "ALSA: sb8: add a check for request_region"
  ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro
  ALSA: usb-audio: Validate MS endpoint descriptors
  cifs: fix memory leak in smb2_copychunk_range
  ptrace: make ptrace() fail if the tracee changed its pid unexpectedly
  scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword()
  openrisc: Fix a memory leak

Change-Id: Ia3f35785f13fea3f56a4f03b7bff3da492f79933
  • Loading branch information
mikeNG committed Jul 24, 2021
2 parents dfe6bc2 + adec72d commit 9a7b761
Show file tree
Hide file tree
Showing 28 changed files with 158 additions and 103 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 269
SUBLEVEL = 270
EXTRAVERSION =
NAME = Blurry Fish Butt

Expand Down
2 changes: 2 additions & 0 deletions arch/openrisc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ void calibrate_delay(void)
pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
loops_per_jiffy / (500000 / HZ),
(loops_per_jiffy / (5000 / HZ)) % 100, loops_per_jiffy);

of_node_put(cpu);
}

void __init setup_arch(char **cmdline_p)
Expand Down
13 changes: 10 additions & 3 deletions drivers/cdrom/gdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,13 @@ static int probe_gdrom_setupqueue(void)
static int probe_gdrom(struct platform_device *devptr)
{
int err;

/*
* Ensure our "one" device is initialized properly in case of previous
* usages of it
*/
memset(&gd, 0, sizeof(gd));

/* Start the device */
if (gdrom_execute_diagnostic() != 1) {
pr_warning("ATA Probe for GDROM failed\n");
Expand Down Expand Up @@ -850,6 +857,8 @@ static int remove_gdrom(struct platform_device *devptr)
if (gdrom_major)
unregister_blkdev(gdrom_major, GDROM_DEV_NAME);
unregister_cdrom(gd.cd_info);
kfree(gd.cd_info);
kfree(gd.toc);

return 0;
}
Expand All @@ -865,7 +874,7 @@ static struct platform_driver gdrom_driver = {
static int __init init_gdrom(void)
{
int rc;
gd.toc = NULL;

rc = platform_driver_register(&gdrom_driver);
if (rc)
return rc;
Expand All @@ -881,8 +890,6 @@ static void __exit exit_gdrom(void)
{
platform_device_unregister(pd);
platform_driver_unregister(&gdrom_driver);
kfree(gd.toc);
kfree(gd.cd_info);
}

module_init(init_gdrom);
Expand Down
11 changes: 2 additions & 9 deletions drivers/hwmon/lm80.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@ static int lm80_probe(struct i2c_client *client,
struct device *dev = &client->dev;
struct device *hwmon_dev;
struct lm80_data *data;
int rv;

data = devm_kzalloc(dev, sizeof(struct lm80_data), GFP_KERNEL);
if (!data)
Expand All @@ -643,14 +642,8 @@ static int lm80_probe(struct i2c_client *client,
lm80_init_client(client);

/* A few vars need to be filled upon startup */
rv = lm80_read_value(client, LM80_REG_FAN_MIN(1));
if (rv < 0)
return rv;
data->fan[f_min][0] = rv;
rv = lm80_read_value(client, LM80_REG_FAN_MIN(2));
if (rv < 0)
return rv;
data->fan[f_min][1] = rv;
data->fan[f_min][0] = lm80_read_value(client, LM80_REG_FAN_MIN(1));
data->fan[f_min][1] = lm80_read_value(client, LM80_REG_FAN_MIN(2));

hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
data, lm80_groups);
Expand Down
2 changes: 1 addition & 1 deletion drivers/leds/leds-lp5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int lp5523_init_program_engine(struct lp55xx_chip *chip)
usleep_range(3000, 6000);
ret = lp55xx_read(chip, LP5523_REG_STATUS, &status);
if (ret)
return ret;
goto out;
status &= LP5523_ENG_STATUS_MASK;

if (status != LP5523_ENG_STATUS_MASK) {
Expand Down
1 change: 1 addition & 0 deletions drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)

if (!s->store->chunk_size) {
ti->error = "Chunk size not set";
r = -EINVAL;
goto bad_read_metadata;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) {
skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE);
if (!skb)
break;
goto error;
qlcnic_create_loopback_buff(skb->data, adapter->mac_addr);
skb_put(skb, QLCNIC_ILB_PKT_SIZE);
adapter->ahw->diag_cnt = 0;
Expand All @@ -1063,6 +1063,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)
cnt++;
}
if (cnt != i) {
error:
dev_err(&adapter->pdev->dev,
"LB Test: failed, TX[%d], RX[%d]\n", i, cnt);
if (mode != QLCNIC_ILB_MODE)
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct sunxi_priv_data {
static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
{
struct sunxi_priv_data *gmac = priv;
int ret;
int ret = 0;

if (gmac->regulator) {
ret = regulator_enable(gmac->regulator);
Expand All @@ -60,11 +60,11 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
} else {
clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE);
ret = clk_prepare(gmac->tx_clk);
if (ret)
return ret;
if (ret && gmac->regulator)
regulator_disable(gmac->regulator);
}

return 0;
return ret;
}

static void sun7i_gmac_exit(struct platform_device *pdev, void *priv)
Expand Down
32 changes: 20 additions & 12 deletions drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8166,10 +8166,10 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end)
"VPD_SCAN: Reading in property [%s] len[%d]\n",
namebuf, prop_len);
for (i = 0; i < prop_len; i++) {
err = niu_pci_eeprom_read(np, off + i);
if (err >= 0)
*prop_buf = err;
++prop_buf;
err = niu_pci_eeprom_read(np, off + i);
if (err < 0)
return err;
*prop_buf++ = err;
}
}

Expand All @@ -8180,14 +8180,14 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end)
}

/* ESPC_PIO_EN_ENABLE must be set */
static void niu_pci_vpd_fetch(struct niu *np, u32 start)
static int niu_pci_vpd_fetch(struct niu *np, u32 start)
{
u32 offset;
int err;

err = niu_pci_eeprom_read16_swp(np, start + 1);
if (err < 0)
return;
return err;

offset = err + 3;

Expand All @@ -8196,22 +8196,27 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start)
u32 end;

err = niu_pci_eeprom_read(np, here);
if (err < 0)
return err;
if (err != 0x90)
return;
return -EINVAL;

err = niu_pci_eeprom_read16_swp(np, here + 1);
if (err < 0)
return;
return err;

here = start + offset + 3;
end = start + offset + err;

offset += err;

err = niu_pci_vpd_scan_props(np, here, end);
if (err < 0 || err == 1)
return;
if (err < 0)
return err;
if (err == 1)
return -EINVAL;
}
return 0;
}

/* ESPC_PIO_EN_ENABLE must be set */
Expand Down Expand Up @@ -9304,8 +9309,11 @@ static int niu_get_invariants(struct niu *np)
offset = niu_pci_vpd_offset(np);
netif_printk(np, probe, KERN_DEBUG, np->dev,
"%s() VPD offset [%08x]\n", __func__, offset);
if (offset)
niu_pci_vpd_fetch(np, offset);
if (offset) {
err = niu_pci_vpd_fetch(np, offset);
if (err < 0)
return err;
}
nw64(ESPC_PIO_EN, 0);

if (np->flags & NIU_FLAGS_VPD_VALID) {
Expand Down
19 changes: 9 additions & 10 deletions drivers/net/wireless/realtek/rtlwifi/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
}
}

static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
static int _rtl_init_deferred_work(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct workqueue_struct *wq;

wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
if (!wq)
return -ENOMEM;

/* <1> timer */
setup_timer(&rtlpriv->works.watchdog_timer,
Expand All @@ -465,11 +470,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw);
/* <2> work queue */
rtlpriv->works.hw = hw;
rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
if (unlikely(!rtlpriv->works.rtl_wq)) {
pr_err("Failed to allocate work queue\n");
return;
}
rtlpriv->works.rtl_wq = wq;

INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
(void *)rtl_watchdog_wq_callback);
Expand All @@ -481,7 +482,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
(void *)rtl_swlps_rfon_wq_callback);
INIT_DELAYED_WORK(&rtlpriv->works.fwevt_wq,
(void *)rtl_fwevt_wq_callback);

return 0;
}

void rtl_deinit_deferred_work(struct ieee80211_hw *hw)
Expand Down Expand Up @@ -573,9 +574,7 @@ int rtl_init_core(struct ieee80211_hw *hw)
rtlmac->link_state = MAC80211_NOLINK;

/* <6> init deferred work */
_rtl_init_deferred_work(hw);

return 0;
return _rtl_init_deferred_work(hw);
}
EXPORT_SYMBOL_GPL(rtl_init_core);

Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr,
return ret;
}

if (qla82xx_flash_set_write_enable(ha))
ret = qla82xx_flash_set_write_enable(ha);
if (ret < 0)
goto done_write;

qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data);
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/vt/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
/* Resizes the resolution of the display adapater */
int err = 0;

if (vc->vc_mode != KD_GRAPHICS && vc->vc_sw->con_resize)
if (vc->vc_sw->con_resize)
err = vc->vc_sw->con_resize(vc, width, height, user);

return err;
Expand Down
6 changes: 3 additions & 3 deletions drivers/tty/vt/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,17 +898,17 @@ int vt_ioctl(struct tty_struct *tty,
if (vcp) {
int ret;
int save_scan_lines = vcp->vc_scan_lines;
int save_font_height = vcp->vc_font.height;
int save_cell_height = vcp->vc_cell_height;

if (v.v_vlin)
vcp->vc_scan_lines = v.v_vlin;
if (v.v_clin)
vcp->vc_font.height = v.v_clin;
vcp->vc_cell_height = v.v_clin;
vcp->vc_resize_user = 1;
ret = vc_resize(vcp, v.v_cols, v.v_rows);
if (ret) {
vcp->vc_scan_lines = save_scan_lines;
vcp->vc_font.height = save_font_height;
vcp->vc_cell_height = save_cell_height;
console_unlock();
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width,
return -EINVAL;

DPRINTK("resize now %ix%i\n", var.xres, var.yres);
if (CON_IS_VISIBLE(vc)) {
if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) {
var.activate = FB_ACTIVATE_NOW |
FB_ACTIVATE_FORCE;
fb_set_var(info, &var);
Expand Down
Loading

0 comments on commit 9a7b761

Please sign in to comment.