Skip to content

Commit

Permalink
Merge 4.4.231 into android-msm-wahoo-4.4
Browse files Browse the repository at this point in the history
Changes in 4.4.231: (59 commits)
        KVM: s390: reduce number of IO pins to 1
        spi: spidev: fix a race between spidev_release and spidev_remove
        spi: spidev: fix a potential use-after-free in spidev_release()
        scsi: mptscsih: Fix read sense data size
        net: cxgb4: fix return error value in t4_prep_fw
        smsc95xx: check return value of smsc95xx_reset
        smsc95xx: avoid memory leak in smsc95xx_bind
        ALSA: compress: fix partial_drain completion state
        arm64: kgdb: Fix single-step exception handling oops
        ALSA: opl3: fix infoleak in opl3
        ALSA: hda - let hs_mic be picked ahead of hp_mic
        ALSA: usb-audio: add quirk for MacroSilicon MS2109
        KVM: x86: bit 8 of non-leaf PDPEs is not reserved
        Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb"
        btrfs: fix fatal extent_buffer readahead vs releasepage race
        drm/radeon: fix double free
        ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
        ARC: elf: use right ELF_ARCH
        bnxt_en: fix NULL dereference in case SR-IOV configuration fails
        ipv4: fill fl4_icmp_{type,code} in ping_v4_sendmsg
        l2tp: remove skb_dst_set() from l2tp_xmit_skb()
        llc: make sure applications use ARPHRD_ETHER
        net: Added pointer check for dst->ops->neigh_lookup in dst_neigh_lookup_skb
        genetlink: remove genl_bind
        tcp: make sure listeners don't initialize congestion-control state
        tcp: md5: add missing memory barriers in tcp_md5_do_add()/tcp_md5_hash_key()
        tcp: md5: refine tcp_md5_do_add()/tcp_md5_hash_key() barriers
        tcp: md5: allow changing MD5 keys in all socket states
        i2c: eg20t: Load module automatically if ID matches
        Revert "usb/ehci-platform: Set PM runtime as active on resume"
        Revert "usb/xhci-plat: Set PM runtime as active on resume"
        Revert "usb/ohci-platform: Fix a warning when hibernating"
        usb: gadget: udc: atmel: fix uninitialized read in debug printk
        staging: comedi: verify array index is correct before using it
        perf stat: Zero all the 'ena' and 'run' array slot stats for interval mode
        mtd: rawnand: brcmnand: fix CS0 layout
        HID: magicmouse: do not set up autorepeat
        usb: core: Add a helper function to check the validity of EP type in URB
        ALSA: line6: Perform sanity check for each URB creation
        ALSA: usb-audio: Fix race against the error recovery URB submission
        USB: c67x00: fix use after free in c67x00_giveback_urb
        usb: chipidea: core: add wakeup support for extcon
        usb: gadget: function: fix missing spinlock in f_uac1_legacy
        USB: serial: iuu_phoenix: fix memory corruption
        USB: serial: cypress_m8: enable Simply Automated UPB PIM
        USB: serial: ch341: add new Product ID for CH340
        USB: serial: option: add GosunCn GM500 series
        USB: serial: option: add Quectel EG95 LTE modem
        virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
        fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS
        mei: bus: don't clean driver pointer
        Input: i8042 - add Lenovo XiaoXin Air 12 to i8042 nomux list
        uio_pdrv_genirq: fix use without device tree and no interrupt
        MIPS: Fix build for LTS kernel caused by backporting lpj adjustment
        hwmon: (emc2103) fix unable to change fan pwm1_enable attribute
        dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler
        misc: atmel-ssc: lock with mutex instead of spinlock
        sched/fair: handle case of task_h_load() returning 0
        Linux 4.4.231

Signed-off-by: Nathan Chancellor <[email protected]>

Conflicts:
	drivers/usb/host/xhci-plat.c
	net/netlink/genetlink.c
	sound/core/compress_offload.c
  • Loading branch information
nathanchance committed Jul 31, 2020
2 parents b7a52ef + 554bbfc commit 24b4fcc
Show file tree
Hide file tree
Showing 59 changed files with 352 additions and 239 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 = 230
SUBLEVEL = 231
EXTRAVERSION =
NAME = Blurry Fish Butt

Expand Down
2 changes: 1 addition & 1 deletion arch/arc/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define R_ARC_S25W_PCREL 0x11

/*to set parameters in the core dumps */
#define ELF_ARCH EM_ARCOMPACT
#define ELF_ARCH EM_ARC_INUSE
#define ELF_CLASS ELFCLASS32

#ifdef CONFIG_CPU_BIG_ENDIAN
Expand Down
16 changes: 5 additions & 11 deletions arch/arc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ END(EV_Extension)
tracesys:
; save EFA in case tracer wants the PC of traced task
; using ERET won't work since next-PC has already committed
lr r12, [efa]
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address

Expand Down Expand Up @@ -211,15 +210,9 @@ tracesys_exit:
; Breakpoint TRAP
; ---------------------------------------------
trap_with_param:

; stop_pc info by gdb needs this info
lr r0, [efa]
mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc
mov r1, sp

; Now that we have read EFA, it is safe to do "fake" rtie
; and get out of CPU exception mode
FAKE_RET_FROM_EXCPN

; Save callee regs in case gdb wants to have a look
; SP will grow up by size of CALLEE Reg-File
; NOTE: clobbers r12
Expand All @@ -246,16 +239,17 @@ ENTRY(EV_Trap)

EXCEPTION_PROLOGUE

lr r12, [efa]

FAKE_RET_FROM_EXCPN

;============ TRAP 1 :breakpoints
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
bmsk.f 0, r9, 7
bnz trap_with_param

;============ TRAP (no param): syscall top level

; First return from Exception to pure K mode (Exception/IRQs renabled)
FAKE_RET_FROM_EXCPN

; If syscall tracing ongoing, invoke pre-post-hooks
GET_CURR_THR_INFO_FLAGS r10
btst r10, TIF_SYSCALL_TRACE
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
if (user_mode(regs))
return DBG_HOOK_ERROR;

kgdb_handle_exception(1, SIGTRAP, 0, regs);
kgdb_handle_exception(0, SIGTRAP, 0, regs);
return DBG_HOOK_HANDLED;
}
NOKPROBE_SYMBOL(kgdb_step_brk_fn);
Expand Down
13 changes: 4 additions & 9 deletions arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ static unsigned long glb_lpj_ref_freq;
static int cpufreq_callback(struct notifier_block *nb,
unsigned long val, void *data)
{
struct cpufreq_freqs *freq = data;
struct cpumask *cpus = freq->policy->cpus;
unsigned long lpj;
int cpu;
struct cpufreq_freqs *freq = data;

/*
* Skip lpj numbers adjustment if the CPU-freq transition is safe for
Expand All @@ -64,6 +62,7 @@ static int cpufreq_callback(struct notifier_block *nb,
}
}

cpu = freq->cpu;
/*
* Adjust global lpj variable and per-CPU udelay_val number in
* accordance with the new CPU frequency.
Expand All @@ -74,12 +73,8 @@ static int cpufreq_callback(struct notifier_block *nb,
glb_lpj_ref_freq,
freq->new);

for_each_cpu(cpu, cpus) {
lpj = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
per_cpu(pcp_lpj_ref_freq, cpu),
freq->new);
cpu_data[cpu].udelay_val = (unsigned int)lpj;
}
cpu_data[cpu].udelay_val = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
per_cpu(pcp_lpj_ref_freq, cpu), freq->new);
}

return NOTIFY_OK;
Expand Down
8 changes: 4 additions & 4 deletions arch/s390/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
#define KVM_USER_MEM_SLOTS 32

/*
* These seem to be used for allocating ->chip in the routing table,
* which we don't use. 4096 is an out-of-thin-air value. If we need
* to look at ->chip later on, we'll need to revisit this.
* These seem to be used for allocating ->chip in the routing table, which we
* don't use. 1 is as small as we can get to reduce the needed memory. If we
* need to look at ->chip later on, we'll need to revisit this.
*/
#define KVM_NR_IRQCHIPS 1
#define KVM_IRQCHIP_NUM_PINS 4096
#define KVM_IRQCHIP_NUM_PINS 1
#define KVM_HALT_POLL_NS_DEFAULT 0

#define SIGP_CTRL_C 0x80
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3679,7 +3679,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
rsvd_bits(maxphyaddr, 51);
rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
nonleaf_bit8_rsvd | gbpages_bit_rsvd |
gbpages_bit_rsvd |
rsvd_bits(maxphyaddr, 51);
rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
rsvd_bits(maxphyaddr, 51);
Expand Down
3 changes: 2 additions & 1 deletion drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,7 @@ static struct virtio_device_id id_table[] = {
{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
{ 0 },
};
MODULE_DEVICE_TABLE(virtio, id_table);

static unsigned int features[] = {
VIRTIO_CONSOLE_F_SIZE,
Expand All @@ -2167,6 +2168,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {
#endif
{ 0 },
};
MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);

static unsigned int rproc_serial_features[] = {
};
Expand Down Expand Up @@ -2319,6 +2321,5 @@ static void __exit fini(void)
module_init(init);
module_exit(fini);

MODULE_DEVICE_TABLE(virtio, id_table);
MODULE_DESCRIPTION("Virtio console driver");
MODULE_LICENSE("GPL");
7 changes: 7 additions & 0 deletions drivers/dma/fsl-edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,13 @@ static irqreturn_t fsl_edma_tx_handler(int irq, void *dev_id)
fsl_chan = &fsl_edma->chans[ch];

spin_lock(&fsl_chan->vchan.lock);

if (!fsl_chan->edesc) {
/* terminate_all called before */
spin_unlock(&fsl_chan->vchan.lock);
continue;
}

if (!fsl_chan->edesc->iscyclic) {
list_del(&fsl_chan->edesc->vdesc.node);
vchan_cookie_complete(&fsl_chan->edesc->vdesc);
Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/radeon/ci_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5554,6 +5554,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
if (!rdev->pm.dpm.ps)
return -ENOMEM;
power_state_offset = (u8 *)state_array->states;
rdev->pm.dpm.num_ps = 0;
for (i = 0; i < state_array->ucNumEntries; i++) {
u8 *idx;
power_state = (union pplib_power_state *)power_state_offset;
Expand All @@ -5563,10 +5564,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
if (!rdev->pm.power_state[i].clock_info)
return -EINVAL;
ps = kzalloc(sizeof(struct ci_ps), GFP_KERNEL);
if (ps == NULL) {
kfree(rdev->pm.dpm.ps);
if (ps == NULL)
return -ENOMEM;
}
rdev->pm.dpm.ps[i].ps_priv = ps;
ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i],
non_clock_info,
Expand All @@ -5588,8 +5587,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
k++;
}
power_state_offset += 2 + power_state->v2.ucNumDPMLevels;
rdev->pm.dpm.num_ps = i + 1;
}
rdev->pm.dpm.num_ps = state_array->ucNumEntries;

/* fill in the vce power states */
for (i = 0; i < RADEON_MAX_VCE_LEVELS; i++) {
Expand Down
6 changes: 6 additions & 0 deletions drivers/hid/hid-magicmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
__set_bit(MSC_RAW, input->mscbit);
}

/*
* hid-input may mark device as using autorepeat, but neither
* the trackpad, nor the mouse actually want it.
*/
__clear_bit(EV_REP, input->evbit);

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/emc2103.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
}

result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
if (result) {
if (result < 0) {
count = result;
goto err;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-eg20t.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ static const struct pci_device_id pch_pcidev_id[] = {
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_I2C), 1, },
{0,}
};
MODULE_DEVICE_TABLE(pci, pch_pcidev_id);

static irqreturn_t pch_i2c_handler(int irq, void *pData);

Expand Down
7 changes: 7 additions & 0 deletions drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
},
},
{
/* Lenovo XiaoXin Air 12 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "80UN"),
},
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
Expand Down
4 changes: 1 addition & 3 deletions drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
int mptscsih_resume(struct pci_dev *pdev);
#endif

#define SNS_LEN(scp) SCSI_SENSE_BUFFERSIZE


/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*
Expand Down Expand Up @@ -2427,7 +2425,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
/* Copy the sense received into the scsi command block. */
req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC));
memcpy(sc->sense_buffer, sense_data, SNS_LEN(sc));
memcpy(sc->sense_buffer, sense_data, MPT_SENSE_BUFFER_ALLOC);

/* Log SMART data (asc = 0x5D, non-IM case only) if required.
*/
Expand Down
24 changes: 12 additions & 12 deletions drivers/misc/atmel-ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/atmel-ssc.h>
#include <linux/slab.h>
#include <linux/module.h>

#include <linux/of.h>

/* Serialize access to ssc_list and user count */
static DEFINE_SPINLOCK(user_lock);
static DEFINE_MUTEX(user_lock);
static LIST_HEAD(ssc_list);

struct ssc_device *ssc_request(unsigned int ssc_num)
{
int ssc_valid = 0;
struct ssc_device *ssc;

spin_lock(&user_lock);
mutex_lock(&user_lock);
list_for_each_entry(ssc, &ssc_list, list) {
if (ssc->pdev->dev.of_node) {
if (of_alias_get_id(ssc->pdev->dev.of_node, "ssc")
Expand All @@ -44,18 +44,18 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
}

if (!ssc_valid) {
spin_unlock(&user_lock);
mutex_unlock(&user_lock);
pr_err("ssc: ssc%d platform device is missing\n", ssc_num);
return ERR_PTR(-ENODEV);
}

if (ssc->user) {
spin_unlock(&user_lock);
mutex_unlock(&user_lock);
dev_dbg(&ssc->pdev->dev, "module busy\n");
return ERR_PTR(-EBUSY);
}
ssc->user++;
spin_unlock(&user_lock);
mutex_unlock(&user_lock);

clk_prepare(ssc->clk);

Expand All @@ -67,14 +67,14 @@ void ssc_free(struct ssc_device *ssc)
{
bool disable_clk = true;

spin_lock(&user_lock);
mutex_lock(&user_lock);
if (ssc->user)
ssc->user--;
else {
disable_clk = false;
dev_dbg(&ssc->pdev->dev, "device already free\n");
}
spin_unlock(&user_lock);
mutex_unlock(&user_lock);

if (disable_clk)
clk_unprepare(ssc->clk);
Expand Down Expand Up @@ -194,9 +194,9 @@ static int ssc_probe(struct platform_device *pdev)
return -ENXIO;
}

spin_lock(&user_lock);
mutex_lock(&user_lock);
list_add_tail(&ssc->list, &ssc_list);
spin_unlock(&user_lock);
mutex_unlock(&user_lock);

platform_set_drvdata(pdev, ssc);

Expand All @@ -210,9 +210,9 @@ static int ssc_remove(struct platform_device *pdev)
{
struct ssc_device *ssc = platform_get_drvdata(pdev);

spin_lock(&user_lock);
mutex_lock(&user_lock);
list_del(&ssc->list);
spin_unlock(&user_lock);
mutex_unlock(&user_lock);

return 0;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/misc/mei/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,8 @@ static int mei_cl_device_remove(struct device *dev)
ret = cldrv->remove(cldev);

module_put(THIS_MODULE);
dev->driver = NULL;
return ret;

return ret;
}

static ssize_t name_show(struct device *dev, struct device_attribute *a,
Expand Down
5 changes: 3 additions & 2 deletions drivers/mtd/nand/brcmnand/brcmnand.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl)
} else {
ctrl->cs_offsets = brcmnand_cs_offsets;

/* v5.0 and earlier has a different CS0 offset layout */
if (ctrl->nand_version <= 0x0500)
/* v3.3-5.0 have a different CS0 offset layout */
if (ctrl->nand_version >= 0x0303 &&
ctrl->nand_version <= 0x0500)
ctrl->cs0_offsets = brcmnand_cs_offsets_cs0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ static void bnxt_free_vf_resources(struct bnxt *bp)
}
}

bp->pf.active_vfs = 0;
kfree(bp->pf.vf);
bp->pf.vf = NULL;
}
Expand Down Expand Up @@ -535,7 +536,6 @@ void bnxt_sriov_disable(struct bnxt *bp)

bnxt_free_vf_resources(bp);

bp->pf.active_vfs = 0;
bp->pf.max_pf_rx_rings = bp->pf.max_rx_rings;
bp->pf.max_pf_tx_rings = bp->pf.max_tx_rings;
}
Expand Down
Loading

0 comments on commit 24b4fcc

Please sign in to comment.