Skip to content

Commit 875c0cc

Browse files
committed
Merge 4.4.302 into android-4.4-p
Changes in 4.4.302 can: bcm: fix UAF of bcm op Bluetooth: refactor malicious adv data check s390/hypfs: include z/VM guests with access control group set scsi: zfcp: Fix failed recovery on gone remote port with non-NPIV FCP devices udf: Restore i_lenAlloc when inode expansion fails udf: Fix NULL ptr deref when converting from inline format PM: wakeup: simplify the output logic of pm_show_wakelocks() serial: stm32: fix software flow control transfer tty: n_gsm: fix SW flow control encoding/handling tty: Add support for Brainboxes UC cards. usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge USB: core: Fix hang in usb_kill_urb by adding memory barriers scsi: bnx2fc: Flush destroy_work queue before calling bnx2fc_interface_put() ipv6_tunnel: Rate limit warning messages net: fix information leakage in /proc/net/ptype ipv4: avoid using shared IP generator for connected sockets net-procfs: show net devices bound packet types drm/msm: Fix wrong size calculation hwmon: (lm90) Reduce maximum conversion rate for G781 ipv4: raw: lock the socket in raw_bind() ipv4: tcp: send zero IPID in SYNACK messages Bluetooth: MGMT: Fix misplaced BT_HS check Revert "drm/radeon/ci: disable mclk switching for high refresh rates (v2)" Revert "tc358743: fix register i2c_rd/wr function fix" KVM: x86: Fix misplaced backport of "work around leak of uninitialized stack contents" Input: i8042 - Fix misplaced backport of "add ASUS Zenbook Flip to noselftest list" Linux 4.4.302 Signed-off-by: Greg Kroah-Hartman <[email protected]> Change-Id: I5191d3cb4df0fa8de60170d2fedf4a3c51380fdf
2 parents f9409de + a09b2d8 commit 875c0cc

File tree

28 files changed

+267
-98
lines changed

28 files changed

+267
-98
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 = 301
3+
SUBLEVEL = 302
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/s390/hypfs/hypfs_vm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
static char local_guest[] = " ";
2121
static char all_guests[] = "* ";
22+
static char *all_groups = all_guests;
2223
static char *guest_query;
2324

2425
struct diag2fc_data {
@@ -61,10 +62,11 @@ static int diag2fc(int size, char* query, void *addr)
6162

6263
memcpy(parm_list.userid, query, NAME_LEN);
6364
ASCEBC(parm_list.userid, NAME_LEN);
64-
parm_list.addr = (unsigned long) addr ;
65+
memcpy(parm_list.aci_grp, all_groups, NAME_LEN);
66+
ASCEBC(parm_list.aci_grp, NAME_LEN);
67+
parm_list.addr = (unsigned long)addr;
6568
parm_list.size = size;
6669
parm_list.fmt = 0x02;
67-
memset(parm_list.aci_grp, 0x40, NAME_LEN);
6870
rc = -1;
6971

7072
diag_stat_inc(DIAG_STAT_X2FC);

arch/x86/kvm/x86.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4417,20 +4417,20 @@ static int emulator_write_std(struct x86_emulate_ctxt *ctxt, gva_t addr, void *v
44174417
if (!system && kvm_x86_ops->get_cpl(vcpu) == 3)
44184418
access |= PFERR_USER_MASK;
44194419

4420-
/*
4421-
* FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED
4422-
* is returned, but our callers are not ready for that and they blindly
4423-
* call kvm_inject_page_fault. Ensure that they at least do not leak
4424-
* uninitialized kernel stack memory into cr2 and error code.
4425-
*/
4426-
memset(exception, 0, sizeof(*exception));
44274420
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
44284421
access, exception);
44294422
}
44304423

44314424
int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val,
44324425
unsigned int bytes, struct x86_exception *exception)
44334426
{
4427+
/*
4428+
* FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED
4429+
* is returned, but our callers are not ready for that and they blindly
4430+
* call kvm_inject_page_fault. Ensure that they at least do not leak
4431+
* uninitialized kernel stack memory into cr2 and error code.
4432+
*/
4433+
memset(exception, 0, sizeof(*exception));
44344434
return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
44354435
PFERR_WRITE_MASK, exception);
44364436
}

drivers/gpu/drm/msm/msm_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static int msm_init_vram(struct drm_device *dev)
286286
ret = of_address_to_resource(node, 0, &r);
287287
if (ret)
288288
return ret;
289-
size = r.end - r.start;
289+
size = r.end - r.start + 1;
290290
DRM_INFO("using VRAM carveout: %lx@%pa\n", size, &r.start);
291291
} else
292292
#endif

drivers/gpu/drm/radeon/ci_dpm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -776,12 +776,6 @@ bool ci_dpm_vblank_too_short(struct radeon_device *rdev)
776776
u32 vblank_time = r600_dpm_get_vblank_time(rdev);
777777
u32 switch_limit = pi->mem_gddr5 ? 450 : 300;
778778

779-
/* disable mclk switching if the refresh is >120Hz, even if the
780-
* blanking period would allow it
781-
*/
782-
if (r600_dpm_get_vrefresh(rdev) > 120)
783-
return true;
784-
785779
/* disable mclk switching if the refresh is >120Hz, even if the
786780
* blanking period would allow it
787781
*/

drivers/hwmon/lm90.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static const struct lm90_params lm90_params[] = {
265265
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
266266
| LM90_HAVE_BROKEN_ALERT,
267267
.alert_alarms = 0x7c,
268-
.max_convrate = 8,
268+
.max_convrate = 7,
269269
},
270270
[lm86] = {
271271
.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT,

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,6 @@ static const struct dmi_system_id i8042_dmi_forcemux_table[] __initconst = {
586586
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
587587
DMI_MATCH(DMI_PRODUCT_NAME, "VGN-CS"),
588588
},
589-
}, {
590-
.matches = {
591-
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
592-
DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */
593-
},
594589
},
595590
{ }
596591
};
@@ -677,6 +672,12 @@ static const struct dmi_system_id i8042_dmi_noselftest_table[] = {
677672
DMI_MATCH(DMI_PRODUCT_NAME, "Z450LA"),
678673
},
679674
},
675+
{
676+
.matches = {
677+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
678+
DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */
679+
},
680+
},
680681
{ }
681682
};
682683
static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = {

drivers/media/i2c/tc358743.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
241241

242242
static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val)
243243
{
244-
i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1);
244+
i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2);
245245
}
246246

247247
static u32 i2c_rd32(struct v4l2_subdev *sd, u16 reg)

drivers/s390/scsi/zfcp_fc.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ static void zfcp_fc_adisc_handler(void *data)
518518
goto out;
519519
}
520520

521+
/* re-init to undo drop from zfcp_fc_adisc() */
522+
port->d_id = ntoh24(adisc_resp->adisc_port_id);
521523
/* port is good, unblock rport without going through erp */
522524
zfcp_scsi_schedule_rport_register(port);
523525
out:
@@ -531,6 +533,7 @@ static int zfcp_fc_adisc(struct zfcp_port *port)
531533
struct zfcp_fc_req *fc_req;
532534
struct zfcp_adapter *adapter = port->adapter;
533535
struct Scsi_Host *shost = adapter->scsi_host;
536+
u32 d_id;
534537
int ret;
535538

536539
fc_req = kmem_cache_zalloc(zfcp_fc_req_cache, GFP_ATOMIC);
@@ -555,7 +558,15 @@ static int zfcp_fc_adisc(struct zfcp_port *port)
555558
fc_req->u.adisc.req.adisc_cmd = ELS_ADISC;
556559
hton24(fc_req->u.adisc.req.adisc_port_id, fc_host_port_id(shost));
557560

558-
ret = zfcp_fsf_send_els(adapter, port->d_id, &fc_req->ct_els,
561+
d_id = port->d_id; /* remember as destination for send els below */
562+
/*
563+
* Force fresh GID_PN lookup on next port recovery.
564+
* Must happen after request setup and before sending request,
565+
* to prevent race with port->d_id re-init in zfcp_fc_adisc_handler().
566+
*/
567+
port->d_id = 0;
568+
569+
ret = zfcp_fsf_send_els(adapter, d_id, &fc_req->ct_els,
559570
ZFCP_FC_CTELS_TMO);
560571
if (ret)
561572
kmem_cache_free(zfcp_fc_req_cache, fc_req);

drivers/scsi/bnx2fc/bnx2fc_fcoe.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int bnx2fc_bind_pcidev(struct bnx2fc_hba *hba);
7979
static void bnx2fc_unbind_pcidev(struct bnx2fc_hba *hba);
8080
static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
8181
struct device *parent, int npiv);
82-
static void bnx2fc_destroy_work(struct work_struct *work);
82+
static void bnx2fc_port_destroy(struct fcoe_port *port);
8383

8484
static struct bnx2fc_hba *bnx2fc_hba_lookup(struct net_device *phys_dev);
8585
static struct bnx2fc_interface *bnx2fc_interface_lookup(struct net_device
@@ -855,9 +855,6 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
855855
__bnx2fc_destroy(interface);
856856
}
857857
mutex_unlock(&bnx2fc_dev_lock);
858-
859-
/* Ensure ALL destroy work has been completed before return */
860-
flush_workqueue(bnx2fc_wq);
861858
return;
862859

863860
default:
@@ -1148,8 +1145,8 @@ static int bnx2fc_vport_destroy(struct fc_vport *vport)
11481145
mutex_unlock(&n_port->lp_mutex);
11491146
bnx2fc_free_vport(interface->hba, port->lport);
11501147
bnx2fc_port_shutdown(port->lport);
1148+
bnx2fc_port_destroy(port);
11511149
bnx2fc_interface_put(interface);
1152-
queue_work(bnx2fc_wq, &port->destroy_work);
11531150
return 0;
11541151
}
11551152

@@ -1457,7 +1454,6 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
14571454
port->lport = lport;
14581455
port->priv = interface;
14591456
port->get_netdev = bnx2fc_netdev;
1460-
INIT_WORK(&port->destroy_work, bnx2fc_destroy_work);
14611457

14621458
/* Configure fcoe_port */
14631459
rc = bnx2fc_lport_config(lport);
@@ -1582,8 +1578,8 @@ static void __bnx2fc_destroy(struct bnx2fc_interface *interface)
15821578
bnx2fc_interface_cleanup(interface);
15831579
bnx2fc_stop(interface);
15841580
list_del(&interface->list);
1581+
bnx2fc_port_destroy(port);
15851582
bnx2fc_interface_put(interface);
1586-
queue_work(bnx2fc_wq, &port->destroy_work);
15871583
}
15881584

15891585
/**
@@ -1624,15 +1620,12 @@ static int bnx2fc_destroy(struct net_device *netdev)
16241620
return rc;
16251621
}
16261622

1627-
static void bnx2fc_destroy_work(struct work_struct *work)
1623+
static void bnx2fc_port_destroy(struct fcoe_port *port)
16281624
{
1629-
struct fcoe_port *port;
16301625
struct fc_lport *lport;
16311626

1632-
port = container_of(work, struct fcoe_port, destroy_work);
16331627
lport = port->lport;
1634-
1635-
BNX2FC_HBA_DBG(lport, "Entered bnx2fc_destroy_work\n");
1628+
BNX2FC_HBA_DBG(lport, "Entered %s, destroying lport %p\n", __func__, lport);
16361629

16371630
bnx2fc_if_destroy(lport);
16381631
}
@@ -2469,9 +2462,6 @@ static void bnx2fc_ulp_exit(struct cnic_dev *dev)
24692462
__bnx2fc_destroy(interface);
24702463
mutex_unlock(&bnx2fc_dev_lock);
24712464

2472-
/* Ensure ALL destroy work has been completed before return */
2473-
flush_workqueue(bnx2fc_wq);
2474-
24752465
bnx2fc_ulp_stop(hba);
24762466
/* unregister cnic device */
24772467
if (test_and_clear_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic))

0 commit comments

Comments
 (0)