Skip to content

Commit 24b4fcc

Browse files
committed
Merge 4.4.231 into android-msm-wahoo-4.4
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
2 parents b7a52ef + 554bbfc commit 24b4fcc

File tree

59 files changed

+352
-239
lines changed

Some content is hidden

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

59 files changed

+352
-239
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 230
3+
SUBLEVEL = 231
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arc/include/asm/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define R_ARC_S25W_PCREL 0x11
2828

2929
/*to set parameters in the core dumps */
30-
#define ELF_ARCH EM_ARCOMPACT
30+
#define ELF_ARCH EM_ARC_INUSE
3131
#define ELF_CLASS ELFCLASS32
3232

3333
#ifdef CONFIG_CPU_BIG_ENDIAN

arch/arc/kernel/entry.S

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ END(EV_Extension)
168168
tracesys:
169169
; save EFA in case tracer wants the PC of traced task
170170
; using ERET won't work since next-PC has already committed
171-
lr r12, [efa]
172171
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
173172
st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
174173

@@ -211,15 +210,9 @@ tracesys_exit:
211210
; Breakpoint TRAP
212211
; ---------------------------------------------
213212
trap_with_param:
214-
215-
; stop_pc info by gdb needs this info
216-
lr r0, [efa]
213+
mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc
217214
mov r1, sp
218215

219-
; Now that we have read EFA, it is safe to do "fake" rtie
220-
; and get out of CPU exception mode
221-
FAKE_RET_FROM_EXCPN
222-
223216
; Save callee regs in case gdb wants to have a look
224217
; SP will grow up by size of CALLEE Reg-File
225218
; NOTE: clobbers r12
@@ -246,16 +239,17 @@ ENTRY(EV_Trap)
246239

247240
EXCEPTION_PROLOGUE
248241

242+
lr r12, [efa]
243+
244+
FAKE_RET_FROM_EXCPN
245+
249246
;============ TRAP 1 :breakpoints
250247
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
251248
bmsk.f 0, r9, 7
252249
bnz trap_with_param
253250

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

256-
; First return from Exception to pure K mode (Exception/IRQs renabled)
257-
FAKE_RET_FROM_EXCPN
258-
259253
; If syscall tracing ongoing, invoke pre-post-hooks
260254
GET_CURR_THR_INFO_FLAGS r10
261255
btst r10, TIF_SYSCALL_TRACE

arch/arm64/kernel/kgdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
241241
if (user_mode(regs))
242242
return DBG_HOOK_ERROR;
243243

244-
kgdb_handle_exception(1, SIGTRAP, 0, regs);
244+
kgdb_handle_exception(0, SIGTRAP, 0, regs);
245245
return DBG_HOOK_HANDLED;
246246
}
247247
NOKPROBE_SYMBOL(kgdb_step_brk_fn);

arch/mips/kernel/time.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ static unsigned long glb_lpj_ref_freq;
4040
static int cpufreq_callback(struct notifier_block *nb,
4141
unsigned long val, void *data)
4242
{
43-
struct cpufreq_freqs *freq = data;
44-
struct cpumask *cpus = freq->policy->cpus;
45-
unsigned long lpj;
4643
int cpu;
44+
struct cpufreq_freqs *freq = data;
4745

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

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

77-
for_each_cpu(cpu, cpus) {
78-
lpj = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
79-
per_cpu(pcp_lpj_ref_freq, cpu),
80-
freq->new);
81-
cpu_data[cpu].udelay_val = (unsigned int)lpj;
82-
}
76+
cpu_data[cpu].udelay_val = cpufreq_scale(per_cpu(pcp_lpj_ref, cpu),
77+
per_cpu(pcp_lpj_ref_freq, cpu), freq->new);
8378
}
8479

8580
return NOTIFY_OK;

arch/s390/include/asm/kvm_host.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
#define KVM_USER_MEM_SLOTS 32
3030

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

4040
#define SIGP_CTRL_C 0x80

arch/x86/kvm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3679,7 +3679,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
36793679
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
36803680
rsvd_bits(maxphyaddr, 51);
36813681
rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
3682-
nonleaf_bit8_rsvd | gbpages_bit_rsvd |
3682+
gbpages_bit_rsvd |
36833683
rsvd_bits(maxphyaddr, 51);
36843684
rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
36853685
rsvd_bits(maxphyaddr, 51);

drivers/char/virtio_console.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@ static struct virtio_device_id id_table[] = {
21552155
{ VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID },
21562156
{ 0 },
21572157
};
2158+
MODULE_DEVICE_TABLE(virtio, id_table);
21582159

21592160
static unsigned int features[] = {
21602161
VIRTIO_CONSOLE_F_SIZE,
@@ -2167,6 +2168,7 @@ static struct virtio_device_id rproc_serial_id_table[] = {
21672168
#endif
21682169
{ 0 },
21692170
};
2171+
MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table);
21702172

21712173
static unsigned int rproc_serial_features[] = {
21722174
};
@@ -2319,6 +2321,5 @@ static void __exit fini(void)
23192321
module_init(init);
23202322
module_exit(fini);
23212323

2322-
MODULE_DEVICE_TABLE(virtio, id_table);
23232324
MODULE_DESCRIPTION("Virtio console driver");
23242325
MODULE_LICENSE("GPL");

drivers/dma/fsl-edma.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,13 @@ static irqreturn_t fsl_edma_tx_handler(int irq, void *dev_id)
671671
fsl_chan = &fsl_edma->chans[ch];
672672

673673
spin_lock(&fsl_chan->vchan.lock);
674+
675+
if (!fsl_chan->edesc) {
676+
/* terminate_all called before */
677+
spin_unlock(&fsl_chan->vchan.lock);
678+
continue;
679+
}
680+
674681
if (!fsl_chan->edesc->iscyclic) {
675682
list_del(&fsl_chan->edesc->vdesc.node);
676683
vchan_cookie_complete(&fsl_chan->edesc->vdesc);

drivers/gpu/drm/radeon/ci_dpm.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5554,6 +5554,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)
55545554
if (!rdev->pm.dpm.ps)
55555555
return -ENOMEM;
55565556
power_state_offset = (u8 *)state_array->states;
5557+
rdev->pm.dpm.num_ps = 0;
55575558
for (i = 0; i < state_array->ucNumEntries; i++) {
55585559
u8 *idx;
55595560
power_state = (union pplib_power_state *)power_state_offset;
@@ -5563,10 +5564,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
55635564
if (!rdev->pm.power_state[i].clock_info)
55645565
return -EINVAL;
55655566
ps = kzalloc(sizeof(struct ci_ps), GFP_KERNEL);
5566-
if (ps == NULL) {
5567-
kfree(rdev->pm.dpm.ps);
5567+
if (ps == NULL)
55685568
return -ENOMEM;
5569-
}
55705569
rdev->pm.dpm.ps[i].ps_priv = ps;
55715570
ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i],
55725571
non_clock_info,
@@ -5588,8 +5587,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)
55885587
k++;
55895588
}
55905589
power_state_offset += 2 + power_state->v2.ucNumDPMLevels;
5590+
rdev->pm.dpm.num_ps = i + 1;
55915591
}
5592-
rdev->pm.dpm.num_ps = state_array->ucNumEntries;
55935592

55945593
/* fill in the vce power states */
55955594
for (i = 0; i < RADEON_MAX_VCE_LEVELS; i++) {

drivers/hid/hid-magicmouse.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
451451
__set_bit(MSC_RAW, input->mscbit);
452452
}
453453

454+
/*
455+
* hid-input may mark device as using autorepeat, but neither
456+
* the trackpad, nor the mouse actually want it.
457+
*/
458+
__clear_bit(EV_REP, input->evbit);
459+
454460
return 0;
455461
}
456462

drivers/hwmon/emc2103.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
452452
}
453453

454454
result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
455-
if (result) {
455+
if (result < 0) {
456456
count = result;
457457
goto err;
458458
}

drivers/i2c/busses/i2c-eg20t.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static const struct pci_device_id pch_pcidev_id[] = {
189189
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7831_I2C), 1, },
190190
{0,}
191191
};
192+
MODULE_DEVICE_TABLE(pci, pch_pcidev_id);
192193

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

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
429429
DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
430430
},
431431
},
432+
{
433+
/* Lenovo XiaoXin Air 12 */
434+
.matches = {
435+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
436+
DMI_MATCH(DMI_PRODUCT_NAME, "80UN"),
437+
},
438+
},
432439
{
433440
.matches = {
434441
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),

drivers/message/fusion/mptscsih.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
118118
int mptscsih_resume(struct pci_dev *pdev);
119119
#endif
120120

121-
#define SNS_LEN(scp) SCSI_SENSE_BUFFERSIZE
122-
123121

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

24322430
/* Log SMART data (asc = 0x5D, non-IM case only) if required.
24332431
*/

drivers/misc/atmel-ssc.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313
#include <linux/clk.h>
1414
#include <linux/err.h>
1515
#include <linux/io.h>
16-
#include <linux/spinlock.h>
16+
#include <linux/mutex.h>
1717
#include <linux/atmel-ssc.h>
1818
#include <linux/slab.h>
1919
#include <linux/module.h>
2020

2121
#include <linux/of.h>
2222

2323
/* Serialize access to ssc_list and user count */
24-
static DEFINE_SPINLOCK(user_lock);
24+
static DEFINE_MUTEX(user_lock);
2525
static LIST_HEAD(ssc_list);
2626

2727
struct ssc_device *ssc_request(unsigned int ssc_num)
2828
{
2929
int ssc_valid = 0;
3030
struct ssc_device *ssc;
3131

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

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

5252
if (ssc->user) {
53-
spin_unlock(&user_lock);
53+
mutex_unlock(&user_lock);
5454
dev_dbg(&ssc->pdev->dev, "module busy\n");
5555
return ERR_PTR(-EBUSY);
5656
}
5757
ssc->user++;
58-
spin_unlock(&user_lock);
58+
mutex_unlock(&user_lock);
5959

6060
clk_prepare(ssc->clk);
6161

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

70-
spin_lock(&user_lock);
70+
mutex_lock(&user_lock);
7171
if (ssc->user)
7272
ssc->user--;
7373
else {
7474
disable_clk = false;
7575
dev_dbg(&ssc->pdev->dev, "device already free\n");
7676
}
77-
spin_unlock(&user_lock);
77+
mutex_unlock(&user_lock);
7878

7979
if (disable_clk)
8080
clk_unprepare(ssc->clk);
@@ -194,9 +194,9 @@ static int ssc_probe(struct platform_device *pdev)
194194
return -ENXIO;
195195
}
196196

197-
spin_lock(&user_lock);
197+
mutex_lock(&user_lock);
198198
list_add_tail(&ssc->list, &ssc_list);
199-
spin_unlock(&user_lock);
199+
mutex_unlock(&user_lock);
200200

201201
platform_set_drvdata(pdev, ssc);
202202

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

213-
spin_lock(&user_lock);
213+
mutex_lock(&user_lock);
214214
list_del(&ssc->list);
215-
spin_unlock(&user_lock);
215+
mutex_unlock(&user_lock);
216216

217217
return 0;
218218
}

drivers/misc/mei/bus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,8 @@ static int mei_cl_device_remove(struct device *dev)
626626
ret = cldrv->remove(cldev);
627627

628628
module_put(THIS_MODULE);
629-
dev->driver = NULL;
630-
return ret;
631629

630+
return ret;
632631
}
633632

634633
static ssize_t name_show(struct device *dev, struct device_attribute *a,

drivers/mtd/nand/brcmnand/brcmnand.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl)
455455
} else {
456456
ctrl->cs_offsets = brcmnand_cs_offsets;
457457

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

drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ static void bnxt_free_vf_resources(struct bnxt *bp)
295295
}
296296
}
297297

298+
bp->pf.active_vfs = 0;
298299
kfree(bp->pf.vf);
299300
bp->pf.vf = NULL;
300301
}
@@ -535,7 +536,6 @@ void bnxt_sriov_disable(struct bnxt *bp)
535536

536537
bnxt_free_vf_resources(bp);
537538

538-
bp->pf.active_vfs = 0;
539539
bp->pf.max_pf_rx_rings = bp->pf.max_rx_rings;
540540
bp->pf.max_pf_tx_rings = bp->pf.max_tx_rings;
541541
}

0 commit comments

Comments
 (0)