Linux 4.4.221
Greg KH
maintainerI'm announcing the release of the 4.4.221 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-imx/Makefile | 2 arch/x86/kvm/vmx.c | 2 arch/x86/net/bpf_jit_comp.c | 18 +++++++- drivers/crypto/mxs-dcp.c | 4 - drivers/iio/adc/xilinx-xadc-core.c | 17 ++++++-- drivers/mtd/chips/cfi_cmdset_0002.c | 6 ++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 drivers/net/macvlan.c | 2 drivers/net/team/team.c | 4 + drivers/pwm/pwm-bcm2835.c | 1 drivers/pwm/pwm-rcar.c | 10 +++- drivers/pwm/pwm-renesas-tpu.c | 9 +--- drivers/remoteproc/remoteproc_core.c | 2 drivers/s390/cio/device.c | 13 ++++-- drivers/scsi/lpfc/lpfc_sli.c | 2 drivers/scsi/scsi_transport_iscsi.c | 4 + drivers/staging/comedi/comedi_fops.c | 4 + drivers/staging/comedi/drivers/dt2815.c | 3 + drivers/staging/vt6656/int.c | 3 - drivers/staging/vt6656/main_usb.c | 9 ++-- drivers/target/target_core_fabric_lib.c | 2 drivers/tty/hvc/hvc_console.c | 23 ++++++----- drivers/tty/rocket.c | 25 ++++++------ drivers/usb/core/hub.c | 14 ++++++ drivers/usb/core/message.c | 53 +++++++++++++------------- drivers/usb/core/quirks.c | 4 + drivers/usb/gadget/function/f_fs.c | 4 + drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 drivers/usb/misc/sisusbvga/sisusb.c | 20 ++++----- drivers/usb/misc/sisusbvga/sisusb_init.h | 14 +++--- drivers/usb/storage/uas.c | 46 +++++++++++++++++++++- drivers/usb/storage/unusual_devs.h | 7 +++ drivers/xen/xenbus/xenbus_client.c | 9 +++- fs/ceph/caps.c | 8 ++- fs/ceph/export.c | 5 ++ fs/ext4/block_validity.c | 54 ++++++++++++++++++++++++++ fs/ext4/ext4.h | 15 ++++++- fs/ext4/extents.c | 59 +++++++++++++++++------------ fs/ext4/ialloc.c | 2 fs/ext4/inode.c | 48 +++++++++++++++++------ fs/ext4/ioctl.c | 2 fs/ext4/mballoc.c | 6 +- fs/ext4/namei.c | 4 - fs/ext4/resize.c | 5 +- fs/ext4/super.c | 28 ++++--------- fs/fuse/dev.c | 12 ++++- fs/namespace.c | 2 fs/pnode.c | 9 +--- include/linux/kvm_host.h | 2 include/net/tcp.h | 2 ipc/util.c | 2 kernel/audit.c | 3 + kernel/events/core.c | 13 ++++-- kernel/gcov/fs.c | 2 net/ipv4/ip_vti.c | 4 - net/ipv4/raw.c | 4 + net/ipv4/route.c | 3 - net/ipv4/xfrm4_output.c | 2 net/ipv6/ipv6_sockglue.c | 13 ++---- net/ipv6/xfrm6_output.c | 2 net/netrom/nr_route.c | 1 net/sctp/socket.c | 6 +- net/x25/x25_dev.c | 4 + sound/pci/hda/hda_intel.c | 1 sound/pci/hda/patch_realtek.c | 2 sound/soc/intel/atom/sst-atom-controls.c | 2 sound/soc/soc-dapm.c | 20 ++++++++- sound/usb/format.c | 52 +++++++++++++++++++++++++ sound/usb/mixer_quirks.c | 12 +++-- sound/usb/usx2y/usbusx2yaudio.c | 2 71 files changed, 542 insertions(+), 213 deletions(-)
Ahmad Fatoum (1):
ARM: imx: provide v7_cpu_resume() only on ARM_CPU_SUSPEND=y
Al Viro (1):
propagate_one(): mnt_set_mountpoint() needs mount_lock
Alan Stern (3):
USB: core: Fix free-while-in-use bug in the USB S-Glibrary
USB: hub: Fix handling of connect changes during sleep
usb-storage: Add unusual_devs entry for JMicron JMS566
Alexander Tsoy (1):
ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices
Andrew Melnychenko (1):
tty: hvc: fix buffer overflow during hvc_alloc().
Arnd Bergmann (1):
net: ipv4: avoid unused variable warning for sysctl
Bodo Stroesser (1):
scsi: target: fix PR IN / READ FULL STATUS for FC
Changming Liu (1):
USB: sisusbvga: Change port variable from signed to unsigned
Clement Leger (1):
remoteproc: Fix wrong rvring index computation
Colin Ian King (1):
ext4: unsigned int compared against zero
Cornelia Huck (1):
s390/cio: avoid duplicated 'ADD' uevents
David Ahern (1):
xfrm: Always set XFRM_TRANSFORMED in xfrm{4,6}_output_finish
David Mosberger (2):
drivers: usb: core: Don't disable irqs in usb_sg_wait() during URB submit.
drivers: usb: core: Minimize irq disabling in usb_sg_cancel()
Dmitry Monakhov (1):
ext4: fix extent_status fragmentation for plain files
Eric Dumazet (1):
tcp: cache line align MAX_TCP_HEADER
Florian Fainelli (1):
pwm: bcm2835: Dynamically allocate base
Geert Uytterhoeven (2):
pwm: rcar: Fix late Runtime PM enablement
pwm: renesas-tpu: Fix late Runtime PM enablement
Greg Kroah-Hartman (1):
Linux 4.4.221
Gyeongtaek Lee (1):
ASoC: dapm: fixup dapm kcontrol widget
Hans de Goede (1):
ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()
Ian Abbott (1):
staging: comedi: dt2815: fix writing hi byte of analog output
Ian Rogers (1):
perf/core: fix parent pid/tid in task exit events
James Smart (1):
scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
Jason Gunthorpe (1):
net/cxgb4: Check the return from t4_query_params properly
Jeremy Sowden (1):
vti4: removed duplicate log message.
Jiri Slaby (1):
tty: rocket, avoid OOB access
John Haxby (1):
ipv6: fix restrict IPV6_ADDRFORM operation
Jonathan Cox (1):
USB: Add USB_QUIRK_DELAY_CTRL_MSG and USB_QUIRK_DELAY_INIT for Corsair K70 RGB RAPIDFIRE
Juergen Gross (1):
xen/xenbus: ensure xenbus_map_ring_valloc() returns proper grant status
Lars-Peter Clausen (3):
iio: xilinx-xadc: Fix ADC-B powerdown
iio: xilinx-xadc: Fix clearing interrupt when enabling trigger
iio: xilinx-xadc: Fix sequencer configuration for aux channels in simultaneous mode
Liu Jian (1):
mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer
Luke Nelson (1):
bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B
Malcolm Priestley (2):
staging: vt6656: Fix drivers TBTT timing counter.
staging: vt6656: Power save stop wake_up_count wrap around.
Miklos Szeredi (1):
fuse: fix possibly missed wake-up after abort
Nathan Chancellor (1):
usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete
Nicolai Stange (1):
net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()
Oliver Neukum (2):
UAS: no use logging any details in case of ENODEV
UAS: fix deadlock in error handling and PM flushing work
Paul Moore (1):
audit: check the length of userspace generated audit records
Piotr Krysiuk (1):
fs/namespace.c: fix mountpoint reference counter race
Qiujun Huang (1):
ceph: return ceph_mdsc_do_request() errors from __get_parent()
Sean Christopherson (1):
KVM: Check validity of resolved slot when searching memslots
Taehee Yoo (2):
macvlan: fix null dereference in macvlan_device_event()
team: fix hang in team_mode_get()
Takashi Iwai (3):
ALSA: hda - Fix incorrect usage of IS_REACHABLE()
ALSA: hda: Remove ASUS ROG Zenith from the blacklist
ALSA: usx2y: Fix potential NULL dereference
Theodore Ts'o (5):
ext4: convert BUG_ON's to WARN_ON's in mballoc.c
ext4: avoid declaring fs inconsistent due to invalid file handles
ext4: protect journal inode's blocks using block_validity
ext4: don't perform block validity checks on the journal inode
ext4: fix block validity checks for journal inodes using indirect blocks
Udipto Goswami (1):
usb: f_fs: Clear OS Extended descriptor counts to zero in ffs_data_reset()
Uros Bizjak (1):
KVM: VMX: Enable machine check support for 32bit targets
Vasily Averin (2):
kernel/gcov/fs.c: gcov_seq_next() should increase position index ipc/util.c: sysvipc_find_ipc() should increase position index
Wei Yongjun (1):
crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static
Wu Bo (1):
scsi: iscsi: Report unbind session event when the target has been removed
Xin Long (1):
sctp: use right member as the param of list_for_each_entry
Xiyu Yang (4):
net: netrom: Fix potential nr_neigh refcnt leak in nr_add_node net/x25: Fix x25_neigh refcnt leak when receiving frame
ALSA: usb-audio: Fix usb audio refcnt leak when getting spdif
staging: comedi: Fix comedi_device refcnt leak in comedi_open
Yan, Zheng (1):
ceph: don't skip updating wanted caps when cap is stale
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 220 +SUBLEVEL = 221 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/mach-imx/Makefile +2 -0
@@ -91,8 +91,10 @@ AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o endif +ifeq ($(CONFIG_ARM_CPU_SUSPEND),y) AFLAGS_resume-imx6.o :=-Wa,-march=armv7-a obj-$(CONFIG_SOC_IMX6) += resume-imx6.o +endif obj-$(CONFIG_SOC_IMX6) += pm-imx6.o obj-$(CONFIG_SOC_IMX50) += mach-imx50.o
arch/x86/kvm/vmx.c +1 -1
@@ -5441,7 +5441,7 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,*/ static void kvm_machine_check (void ) { -#if defined(CONFIG_X86_MCE ) && defined(CONFIG_X86_64 ) +#if defined(CONFIG_X86_MCE )struct pt_regs regs = { .cs =3 ,/* Fake ring 3 no matter what the guest ran on */ .flags = X86_EFLAGS_IF,
arch/x86/net/bpf_jit_comp.c +15 -3
@@ -145,6 +145,19 @@ static bool is_ereg(u32 reg) BIT(BPF_REG_9)); } +/* +* is_ereg_8l() == true if BPF register 'reg' is mapped to access x86-64 +* lower 8-bit registers dil,sil,bpl,spl,r8b..r15b, which need extra byte +* of encoding. al,cl,dl,bl have simpler encoding. +*/ +static bool is_ereg_8l (u32 reg) +{ +return is_ereg (reg) || + (1 << reg) & (BIT (BPF_REG_1 ) | +BIT (BPF_REG_2 ) | +BIT (BPF_REG_FP )); +} +/* add modifiers if 'reg' maps to x64 registers r8..r15 */ static u8 add_1mod (u8 byte,u32 reg) {
@@ -731,9 +744,8 @@ st: if (is_imm8(insn->off))/* STX: *(u8*)(dst_reg + off) = src_reg */ case BPF_STX |BPF_MEM |BPF_B :/* emit 'mov byte ptr [rax + off], al' */ -if (is_ereg (dst_reg) ||is_ereg (src_reg) || -/* have to add extra byte for x86 SIL, DIL regs */ - src_reg ==BPF_REG_1 || src_reg ==BPF_REG_2 ) +if (is_ereg (dst_reg) ||is_ereg_8l (src_reg)) +/* Add extra byte for eregs or SIL,DIL,BPL in src_reg */ EMIT2 (add_2mod (0x40 , dst_reg, src_reg),0x88 );else EMIT1 (0x88 );
drivers/crypto/mxs-dcp.c +2 -2
@@ -37,11 +37,11 @@* Null hashes to align with hw behavior on imx6sl and ull * these are flipped for consistency with hw output */ -const uint8_t sha1_null_hash[] = +static const uint8_t sha1_null_hash[] ="\x09\x07\xd8\xaf\x90\x18\x60\x95\xef\xbf" "\x55\x32\x0d\x4b\x6b\x5e\xee\xa3\x39\xda" ; -const uint8_t sha256_null_hash[] = +static const uint8_t sha256_null_hash[] ="\x55\xb8\x52\x78\x1b\x99\x95\xa4" "\x4c\x93\x9b\x64\xe4\x41\xae\x27" "\x24\xb9\x6f\x99\xc8\xf4\xfb\x9a"
drivers/iio/adc/xilinx-xadc-core.c +14 -3
@@ -660,7 +660,7 @@ static int xadc_trigger_set_state(struct iio_trigger *trigger, bool state)spin_lock_irqsave (&xadc->lock, flags);xadc_read_reg (xadc,XADC_AXI_REG_IPIER , &val); -xadc_write_reg (xadc,XADC_AXI_REG_IPISR , val &XADC_AXI_INT_EOS ); +xadc_write_reg (xadc,XADC_AXI_REG_IPISR ,XADC_AXI_INT_EOS );if (state) val |=XADC_AXI_INT_EOS ;else
@@ -709,13 +709,14 @@ static int xadc_power_adc_b(struct xadc *xadc, unsigned int seq_mode) {uint16_t val; +/* Powerdown the ADC-B when it is not needed. */ switch (seq_mode) {case XADC_CONF1_SEQ_SIMULTANEOUS :case XADC_CONF1_SEQ_INDEPENDENT : - val =XADC_CONF2_PD_ADC_B ; + val =0 ;break ;default : - val =0 ; + val =XADC_CONF2_PD_ADC_B ;break ; }
@@ -784,6 +785,16 @@ static int xadc_preenable(struct iio_dev *indio_dev)if (ret) goto err; +/* +* In simultaneous mode the upper and lower aux channels are samples at +* the same time. In this mode the upper 8 bits in the sequencer +* register are don't care and the lower 8 bits control two channels +* each. As such we must set the bit if either the channel in the lower +* group or the upper group is enabled. +*/ +if (seq_mode ==XADC_CONF1_SEQ_SIMULTANEOUS ) + scan_mask = ((scan_mask >>8 ) | scan_mask) &0xff0000 ; + ret =xadc_write_adc_reg (xadc,XADC_REG_SEQ (1 ), scan_mask >>16 );if (ret) goto err;
drivers/mtd/chips/cfi_cmdset_0002.c +5 -1
@@ -1881,7 +1881,11 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,continue ; } -if (time_after (jiffies, timeo) && !chip_ready (map, adr)) +/* +* We check "time_after" and "!chip_good" before checking "chip_good" to avoid +* the failure due to scheduling. +*/ +if (time_after (jiffies, timeo) && !chip_good (map, adr, datum))break ;if (chip_good (map, adr, datum)) {
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +1 -1
@@ -3341,7 +3341,7 @@ int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver) FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_VERSION)); ret =t4_query_params (adap, adap->mbox, adap->pf,0 ,1 , ¶m, &val); -if (ret <0 ) +if (ret)return ret; *phy_fw_ver = val;return 0 ;
drivers/net/macvlan.c +1 -1
@@ -1561,7 +1561,7 @@ static int macvlan_device_event(struct notifier_block *unused, struct macvlan_dev, list); -if (macvlan_sync_address (vlan->dev, dev->dev_addr)) +if (vlan &&macvlan_sync_address (vlan->dev, dev->dev_addr))return NOTIFY_BAD ;break ;
drivers/net/team/team.c +4 -0
@@ -466,6 +466,9 @@ static const struct team_mode *team_mode_get(const char *kind)struct team_mode_item *mitem;const struct team_mode *mode =NULL ; +if (!try_module_get (THIS_MODULE )) +return NULL ; +spin_lock (&mode_list_lock); mitem =__find_mode (kind);if (!mitem) {
@@ -481,6 +484,7 @@ static const struct team_mode *team_mode_get(const char *kind) }spin_unlock (&mode_list_lock); +module_put (THIS_MODULE );return mode; }
drivers/pwm/pwm-bcm2835.c +1 -0
@@ -160,6 +160,7 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) pc->chip.dev = &pdev->dev; pc->chip.ops = &bcm2835_pwm_ops; + pc->chip.base =-1 ; pc->chip.npwm =2 ;platform_set_drvdata (pdev, pc);
drivers/pwm/pwm-rcar.c +7 -3
@@ -232,24 +232,28 @@ static int rcar_pwm_probe(struct platform_device *pdev) rcar_pwm->chip.base =-1 ; rcar_pwm->chip.npwm =1 ; +pm_runtime_enable (&pdev->dev); + ret =pwmchip_add (&rcar_pwm->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to register PWM chip: %d\n" , ret); +pm_runtime_disable (&pdev->dev);return ret; } -pm_runtime_enable (&pdev->dev); -return 0 ; }static int rcar_pwm_remove (struct platform_device *pdev) {struct rcar_pwm_chip *rcar_pwm =platform_get_drvdata (pdev); +int ret; + + ret =pwmchip_remove (&rcar_pwm->chip);pm_runtime_disable (&pdev->dev); -return pwmchip_remove (&rcar_pwm->chip); +return ret; }static const struct of_device_id rcar_pwm_of_table[] = {
drivers/pwm/pwm-renesas-tpu.c +4 -5
@@ -423,16 +423,17 @@ static int tpu_probe(struct platform_device *pdev) tpu->chip.base =-1 ; tpu->chip.npwm =TPU_CHANNEL_MAX ; +pm_runtime_enable (&pdev->dev); + ret =pwmchip_add (&tpu->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to register PWM chip\n" ); +pm_runtime_disable (&pdev->dev);return ret; }dev_info (&pdev->dev,"TPU PWM %d registered\n" , tpu->pdev->id); -pm_runtime_enable (&pdev->dev); -return 0 ; }
@@ -442,12 +443,10 @@ static int tpu_remove(struct platform_device *pdev)int ret; ret =pwmchip_remove (&tpu->chip); -if (ret) -return ret;pm_runtime_disable (&pdev->dev); -return 0 ; +return ret; }#ifdef CONFIG_OF
drivers/remoteproc/remoteproc_core.c +1 -1
@@ -288,7 +288,7 @@ void rproc_free_vring(struct rproc_vring *rvring) {int size =PAGE_ALIGN (vring_size (rvring->len, rvring->align));struct rproc *rproc = rvring->rvdev->rproc; -int idx = rvring->rvdev->vring - rvring; +int idx = rvring - rvring->rvdev->vring;struct fw_rsc_vdev *rsc;dma_free_coherent (rproc->dev.parent, size, rvring->va, rvring->dma);
drivers/s390/cio/device.c +9 -4
@@ -872,8 +872,10 @@ static void io_subchannel_register(struct ccw_device *cdev)* Now we know this subchannel will stay, we can throw * our delayed uevent. */ -dev_set_uevent_suppress (&sch->dev,0 ); -kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); +if (dev_get_uevent_suppress (&sch->dev)) { +dev_set_uevent_suppress (&sch->dev,0 ); +kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); + }/* make it known to the system */ ret =ccw_device_add (cdev);if (ret) {
@@ -1082,8 +1084,11 @@ static int io_subchannel_probe(struct subchannel *sch)* Throw the delayed uevent for the subchannel, register * the ccw_device and exit. */ -dev_set_uevent_suppress (&sch->dev,0 ); -kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); +if (dev_get_uevent_suppress (&sch->dev)) { +/* should always be the case for the console */ +dev_set_uevent_suppress (&sch->dev,0 ); +kobject_uevent (&sch->dev.kobj,KOBJ_ADD ); + } cdev =sch_get_cdev (sch); rc =ccw_device_add (cdev);if (rc) {
drivers/scsi/lpfc/lpfc_sli.c +2 -0
@@ -2186,6 +2186,8 @@ lpfc_sli_def_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) !pmb->u.mb.mbxStatus) { rpi = pmb->u.mb.un.varWords[0 ]; vpi = pmb->u.mb.un.varRegLogin.vpi; +if (phba->sli_rev ==LPFC_SLI_REV4 ) + vpi -= phba->sli4_hba.max_cfg_param.vpi_base;lpfc_unreg_login (phba, vpi, rpi, pmb); pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; rc =lpfc_sli_issue_mbox (phba, pmb,MBX_NOWAIT );
drivers/scsi/scsi_transport_iscsi.c +3 -1
@@ -2014,7 +2014,7 @@ static void __iscsi_unbind_session(struct work_struct *work)if (session->target_id ==ISCSI_MAX_TARGET ) {spin_unlock_irqrestore (&session->lock, flags);mutex_unlock (&ihost->mutex); -return ; + goto unbind_session_exit; } target_id = session->target_id;
@@ -2026,6 +2026,8 @@ static void __iscsi_unbind_session(struct work_struct *work)ida_simple_remove (&iscsi_sess_ida, target_id);scsi_remove_target (&session->dev); + +unbind_session_exit:iscsi_session_event (session,ISCSI_KEVENT_UNBIND_SESSION );ISCSI_DBG_TRANS_SESSION (session,"Completed target removal\n" ); }
drivers/staging/comedi/comedi_fops.c +3 -1
@@ -2592,8 +2592,10 @@ static int comedi_open(struct inode *inode, struct file *file) } cfp =kzalloc (sizeof (*cfp),GFP_KERNEL ); -if (!cfp) +if (!cfp) { +comedi_dev_put (dev);return -ENOMEM ; + } cfp->dev = dev;
drivers/staging/comedi/drivers/dt2815.c +3 -0
@@ -101,6 +101,7 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,int ret;for (i =0 ; i < insn->n; i++) { +/* FIXME: lo bit 0 chooses voltage output or current output */ lo = ((data[i] &0x0f ) <<4 ) | (chan <<1 ) |0x01 ; hi = (data[i] &0xff0 ) >>4 ;
@@ -114,6 +115,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,if (ret)return ret; +outb (hi, dev->iobase +DT2815_DATA ); + devpriv->ao_readback[chan] = data[i]; }return i;
drivers/staging/vt6656/int.c +2 -1
@@ -157,7 +157,8 @@ void vnt_int_process_data(struct vnt_private *priv) priv->wake_up_count = priv->hw->conf.listen_interval; - --priv->wake_up_count; +if (priv->wake_up_count) + --priv->wake_up_count;/* Turn on wake up to listen next beacon */ if (priv->wake_up_count ==1 )
drivers/staging/vt6656/main_usb.c +6 -3
@@ -762,12 +762,15 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,vnt_mac_reg_bits_on (priv,MAC_REG_TFTCTL ,TFTCTL_TSFCNTREN ); -vnt_adjust_tsf (priv, conf->beacon_rate->hw_value, - conf->sync_tsf, priv->current_tsf); -vnt_mac_set_beacon_interval (priv, conf->beacon_int);vnt_reset_next_tbtt (priv, conf->beacon_int); + +vnt_adjust_tsf (priv, conf->beacon_rate->hw_value, + conf->sync_tsf, priv->current_tsf); + +vnt_update_next_tbtt (priv, + conf->sync_tsf, conf->beacon_int); }else {vnt_clear_current_tsf (priv);
drivers/target/target_core_fabric_lib.c +1 -1
@@ -75,7 +75,7 @@ static int fc_get_pr_transport_id(* encoded TransportID. */ ptr = &se_nacl->initiatorname[0 ]; -for (i =0 ; i <24 ; ) { +for (i =0 ; i <23 ; ) {if (!strncmp (&ptr[i],":" ,1 )) { i++;continue ;
drivers/tty/hvc/hvc_console.c +14 -9
@@ -289,10 +289,6 @@ int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops) vtermnos[index] = vtermno; cons_ops[index] = ops; -/* reserve all indices up to and including this index */ -if (last_hvc < index) - last_hvc = index; -/* check if we need to re-register the kernel console */ hvc_check_console (index);
@@ -896,13 +892,22 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data, cons_ops[i] == hp->ops)break ; -/* no matching slot, just use a counter */ -if (i >=MAX_NR_HVC_CONSOLES ) - i = ++last_hvc; +if (i >=MAX_NR_HVC_CONSOLES ) { + +/* find 'empty' slot for console */ +for (i =0 ; i <MAX_NR_HVC_CONSOLES && vtermnos[i] !=-1 ; i++) { + } + +/* no matching slot, just use a counter */ +if (i ==MAX_NR_HVC_CONSOLES ) + i = ++last_hvc +MAX_NR_HVC_CONSOLES ; + } hp->index = i; - cons_ops[i] = ops; - vtermnos[i] = vtermno; +if (i <MAX_NR_HVC_CONSOLES ) { + cons_ops[i] = ops; + vtermnos[i] = vtermno; + }list_add_tail (&(hp->next), &hvc_structs);spin_unlock (&hvc_structs_lock);
drivers/tty/rocket.c +14 -11
@@ -645,18 +645,21 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev) info->port.ops = &rocket_port_ops;init_completion (&info->close_wait); info->flags &= ~ROCKET_MODE_MASK ; -switch (pc104[board][line]) { -case 422 : - info->flags |=ROCKET_MODE_RS422 ; -break ; -case 485 : - info->flags |=ROCKET_MODE_RS485 ; -break ; -case 232 : -default : +if (board <ARRAY_SIZE (pc104) && line <ARRAY_SIZE (pc104_1)) +switch (pc104[board][line]) { +case 422 : + info->flags |=ROCKET_MODE_RS422 ; +break ; +case 485 : + info->flags |=ROCKET_MODE_RS485 ; +break ; +case 232 : +default : + info->flags |=ROCKET_MODE_RS232 ; +break ; + } +else info->flags |=ROCKET_MODE_RS232 ; -break ; - } info->intmask =RXF_TRIG |TXFIFO_MT |SRC_INT |DELTA_CD |DELTA_CTS |DELTA_DSR ;if (sInitChan (ctlp, &info->channel, aiop, chan) ==0 ) {
drivers/usb/core/hub.c +14 -0
@@ -1175,6 +1175,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)#ifdef CONFIG_PM udev->reset_resume =1 ;#endif +/* Don't set the change_bits when the device +* was powered off. +*/ +if (test_bit (port1, hub->power_bits)) +set_bit (port1, hub->change_bits); }else {/* The power session is gone; tell hub_wq */
@@ -2939,6 +2944,15 @@ static int check_port_resume_type(struct usb_device *udev,if (portchange &USB_PORT_STAT_C_ENABLE )usb_clear_port_feature (hub->hdev, port1,USB_PORT_FEAT_C_ENABLE ); + +/* +* Whatever made this reset-resume necessary may have +* turned on the port1 bit in hub->change_bits. But after +* a successful reset-resume we want the bit to be clear; +* if it was on it would indicate that something happened +* following the reset-resume. +*/ +clear_bit (port1, hub->change_bits); }return status;
drivers/usb/core/message.c +28 -25
79 lines not on this page · raw message
drivers/usb/core/quirks.c +4 -0
@@ -272,6 +272,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* Corsair K70 LUX */ { USB_DEVICE(0x1b1c, 0x1b36), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Corsair K70 RGB RAPDIFIRE */ + { USB_DEVICE(0x1b1c, 0x1b38), .driver_info = USB_QUIRK_DELAY_INIT | + USB_QUIRK_DELAY_CTRL_MSG }, + /* MIDI keyboard WORLDE MINI */ { USB_DEVICE(0x1c75, 0x0204), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/gadget/function/f_fs.c +4 -0
@@ -1511,6 +1511,10 @@ static void ffs_data_reset(struct ffs_data *ffs) ffs->state =FFS_READ_DESCRIPTORS ; ffs->setup_state =FFS_NO_SETUP ; ffs->flags =0 ; + + ffs->ms_os_descs_ext_prop_count =0 ; + ffs->ms_os_descs_ext_prop_name_len =0 ; + ffs->ms_os_descs_ext_prop_data_len =0 ; }
drivers/usb/gadget/udc/bdc/bdc_ep.c +1 -1
@@ -546,7 +546,7 @@ static void bdc_req_complete(struct bdc_ep *ep, struct bdc_req *req, {struct bdc *bdc = ep->bdc; -if (req ==NULL || &req->queue ==NULL || &req->usb_req ==NULL ) +if (req ==NULL )return ;dev_dbg (bdc->dev,"%s ep:%s status:%d\n" , __func__, ep->name, status);
drivers/usb/misc/sisusbvga/sisusb.c +10 -10
@@ -1243,20 +1243,20 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,#ifdef INCL_SISUSB_CON int -sisusb_setreg (struct sisusb_usb_data *sisusb,int port,u8 data) +sisusb_setreg (struct sisusb_usb_data *sisusb,u32 port,u8 data) {return sisusb_write_memio_byte (sisusb,SISUSB_TYPE_IO , port, data); }int -sisusb_getreg (struct sisusb_usb_data *sisusb,int port,u8 *data) +sisusb_getreg (struct sisusb_usb_data *sisusb,u32 port,u8 *data) {return sisusb_read_memio_byte (sisusb,SISUSB_TYPE_IO , port, data); }#endif int -sisusb_setidxreg (struct sisusb_usb_data *sisusb,int port,u8 index,u8 data) +sisusb_setidxreg (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 data) {int ret; ret =sisusb_write_memio_byte (sisusb,SISUSB_TYPE_IO , port, index);
@@ -1265,7 +1265,7 @@ sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data) }int -sisusb_getidxreg (struct sisusb_usb_data *sisusb,int port,u8 index,u8 *data) +sisusb_getidxreg (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 *data) {int ret; ret =sisusb_write_memio_byte (sisusb,SISUSB_TYPE_IO , port, index);
@@ -1274,7 +1274,7 @@ sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data) }int -sisusb_setidxregandor (struct sisusb_usb_data *sisusb,int port,u8 idx, +sisusb_setidxregandor (struct sisusb_usb_data *sisusb,u32 port,u8 idx,u8 myand,u8 myor) {int ret;
@@ -1289,7 +1289,7 @@ sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx, }static int -sisusb_setidxregmask (struct sisusb_usb_data *sisusb,int port,u8 idx, +sisusb_setidxregmask (struct sisusb_usb_data *sisusb,u32 port,u8 idx,u8 data,u8 mask) {int ret;
@@ -1303,13 +1303,13 @@ sisusb_setidxregmask(struct sisusb_usb_data *sisusb, int port, u8 idx, }int -sisusb_setidxregor (struct sisusb_usb_data *sisusb,int port,u8 index,u8 myor) +sisusb_setidxregor (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 myor) {return (sisusb_setidxregandor (sisusb, port, index,0xff , myor)); }int -sisusb_setidxregand (struct sisusb_usb_data *sisusb,int port,u8 idx,u8 myand) +sisusb_setidxregand (struct sisusb_usb_data *sisusb,u32 port,u8 idx,u8 myand) {return (sisusb_setidxregandor (sisusb, port, idx, myand,0x00 )); }
@@ -2849,8 +2849,8 @@ static int sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y, unsigned long arg) { - int retval, port, length; -u32 address; + int retval, length; +u32 port, address;/* All our commands require the device * to be initialized.
drivers/usb/misc/sisusbvga/sisusb_init.h +7 -7
@@ -811,17 +811,17 @@ static const struct SiS_VCLKData SiSUSB_VCLKData[] = {int SiSUSBSetMode (struct SiS_Private *SiS_Pr,unsigned short ModeNo);int SiSUSBSetVESAMode (struct SiS_Private *SiS_Pr,unsigned short VModeNo); -extern int sisusb_setreg (struct sisusb_usb_data *sisusb,int port,u8 data); -extern int sisusb_getreg (struct sisusb_usb_data *sisusb,int port,u8 * data); -extern int sisusb_setidxreg (struct sisusb_usb_data *sisusb,int port, +extern int sisusb_setreg (struct sisusb_usb_data *sisusb,u32 port,u8 data); +extern int sisusb_getreg (struct sisusb_usb_data *sisusb,u32 port,u8 * data); +extern int sisusb_setidxreg (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 data); -extern int sisusb_getidxreg (struct sisusb_usb_data *sisusb,int port, +extern int sisusb_getidxreg (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 * data); -extern int sisusb_setidxregandor (struct sisusb_usb_data *sisusb,int port, +extern int sisusb_setidxregandor (struct sisusb_usb_data *sisusb,u32 port,u8 idx,u8 myand,u8 myor); -extern int sisusb_setidxregor (struct sisusb_usb_data *sisusb,int port, +extern int sisusb_setidxregor (struct sisusb_usb_data *sisusb,u32 port,u8 index,u8 myor); -extern int sisusb_setidxregand (struct sisusb_usb_data *sisusb,int port, +extern int sisusb_setidxregand (struct sisusb_usb_data *sisusb,u32 port,u8 idx,u8 myand);void sisusb_delete (struct kref *kref);
drivers/usb/storage/uas.c +43 -3
76 lines not on this page · raw message
drivers/usb/storage/unusual_devs.h +7 -0
@@ -2208,6 +2208,13 @@ UNUSUAL_DEV( 0x3340, 0xffff, 0x0000, 0x0000, USB_SC_DEVICE,USB_PR_DEVICE,NULL, US_FL_MAX_SECTORS_64 ), +/* Reported by Cyril Roelandt <[email protected]> */ +UNUSUAL_DEV (0x357d ,0x7788 ,0x0114 ,0x0114 , +"JMicron" , +"USB to ATA/ATAPI Bridge" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_BROKEN_FUA ), +/* Reported by Andrey Rahmatullin <[email protected]> */ UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0x0100, "iRiver",
drivers/xen/xenbus/xenbus_client.c +8 -1
@@ -469,7 +469,14 @@ EXPORT_SYMBOL_GPL(xenbus_free_evtchn);int xenbus_map_ring_valloc (struct xenbus_device *dev,grant_ref_t *gnt_refs,unsigned int nr_grefs,void **vaddr) { -return ring_ops->map (dev, gnt_refs, nr_grefs, vaddr); +int err; + + err = ring_ops->map (dev, gnt_refs, nr_grefs, vaddr); +/* Some hypervisors are buggy and can return 1. */ +if (err >0 ) + err = GNTST_general_error; + +return err; }EXPORT_SYMBOL_GPL (xenbus_map_ring_valloc);
fs/ceph/caps.c +6 -2
@@ -1734,8 +1734,12 @@ retry_locked: }/* want more caps from mds? */ -if (want & ~(cap->mds_wanted | cap->issued)) - goto ack; +if (want & ~cap->mds_wanted) { +if (want & ~(cap->mds_wanted | cap->issued)) + goto ack; +if (!__cap_is_valid (cap)) + goto ack; + }/* things we might delay */ if ((cap->issued & ~retain) == 0 &&
fs/ceph/export.c +5 -0
@@ -146,6 +146,11 @@ static struct dentry *__get_parent(struct super_block *sb, } req->r_num_caps =1 ; err =ceph_mdsc_do_request (mdsc,NULL , req); +if (err) { +ceph_mdsc_put_request (req); +return ERR_PTR (err); + } + inode = req->r_target_inode;if (inode)ihold (inode);
fs/ext4/block_validity.c +54 -0
72 lines not on this page · raw message
fs/ext4/ext4.h +13 -2
@@ -2497,8 +2497,19 @@ int do_journal_get_write_access(handle_t *handle,#define FALL_BACK_TO_NONDELALLOC 1#define CONVERT_INLINE_DATA 2 -extern struct inode *ext4_iget (struct super_block *,unsigned long ); -extern struct inode *ext4_iget_normal (struct super_block *,unsigned long ); +typedef enum { +EXT4_IGET_NORMAL =0 , +EXT4_IGET_SPECIAL =0x0001 ,/* OK to iget a system inode */ +EXT4_IGET_HANDLE =0x0002 /* Inode # is from a handle */ +}ext4_iget_flags ; + +extern struct inode *__ext4_iget (struct super_block *sb,unsigned long ino, +ext4_iget_flags flags,const char *function, +unsigned int line); + +#define ext4_iget (sb, ino, flags) \ + __ext4_iget((sb), (ino), (flags), __func__, __LINE__) +extern int ext4_write_inode (struct inode *,struct writeback_control *);extern int ext4_setattr (struct dentry *,struct iattr *); extern int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
fs/ext4/extents.c +35 -24
83 lines not on this page · raw message
fs/ext4/ialloc.c +1 -1
@@ -1150,7 +1150,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)if (!ext4_test_bit (bit, bitmap_bh->b_data)) goto bad_orphan; - inode =ext4_iget (sb, ino); + inode =ext4_iget (sb, ino,EXT4_IGET_NORMAL );if (IS_ERR (inode)) { err =PTR_ERR (inode); ext4_error(sb, "couldn't read orphan inode %lu (err %d)",
fs/ext4/inode.c +35 -13
106 lines not on this page · raw message
fs/ext4/ioctl.c +1 -1
@@ -105,7 +105,7 @@ static long swap_inode_boot_loader(struct super_block *sb,if (!inode_owner_or_capable (inode) || !capable (CAP_SYS_ADMIN ))return -EPERM ; - inode_bl =ext4_iget (sb,EXT4_BOOT_LOADER_INO ); + inode_bl =ext4_iget (sb,EXT4_BOOT_LOADER_INO ,EXT4_IGET_SPECIAL );if (IS_ERR (inode_bl))return PTR_ERR (inode_bl); ei_bl =EXT4_I (inode_bl);
fs/ext4/mballoc.c +4 -2
@@ -1944,7 +1944,8 @@ void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,int free; free = e4b->bd_info->bb_free; -BUG_ON (free <=0 ); +if (WARN_ON (free <=0 )) +return ; i = e4b->bd_info->bb_first_free;
@@ -1965,7 +1966,8 @@ void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac, }mb_find_extent (e4b, i, ac->ac_g_ex.fe_len, &ex); -BUG_ON (ex.fe_len <=0 ); +if (WARN_ON (ex.fe_len <=0 )) +break ;if (free < ex.fe_len) {ext4_grp_locked_error (sb, e4b->bd_group,0 ,0 , "%d free clusters as per "
fs/ext4/namei.c +2 -2
@@ -1601,7 +1601,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi dentry);return ERR_PTR (-EFSCORRUPTED ); } - inode =ext4_iget_normal (dir->i_sb, ino); + inode =ext4_iget (dir->i_sb, ino,EXT4_IGET_NORMAL );if (inode ==ERR_PTR (-ESTALE )) { EXT4_ERROR_INODE(dir, "deleted inode referenced: %u",
@@ -1646,7 +1646,7 @@ struct dentry *ext4_get_parent(struct dentry *child)return ERR_PTR (-EFSCORRUPTED ); } -return d_obtain_alias (ext4_iget_normal (d_inode (child)->i_sb, ino)); +return d_obtain_alias (ext4_iget (d_inode (child)->i_sb, ino,EXT4_IGET_NORMAL )); }/*
fs/ext4/resize.c +3 -2
@@ -1649,7 +1649,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) "No reserved GDT blocks, can't resize");return -EPERM ; } - inode =ext4_iget (sb,EXT4_RESIZE_INO ); + inode =ext4_iget (sb,EXT4_RESIZE_INO ,EXT4_IGET_SPECIAL );if (IS_ERR (inode)) {ext4_warning (sb,"Error opening resize inode" );return PTR_ERR (inode);
@@ -1977,7 +1977,8 @@ retry: }if (!resize_inode) - resize_inode =ext4_iget (sb,EXT4_RESIZE_INO ); + resize_inode =ext4_iget (sb,EXT4_RESIZE_INO , +EXT4_IGET_SPECIAL );if (IS_ERR (resize_inode)) {ext4_warning (sb,"Error opening resize inode" );return PTR_ERR (resize_inode);
fs/ext4/super.c +10 -18
@@ -1022,20 +1022,11 @@ static struct inode *ext4_nfs_get_inode(struct super_block *sb, {struct inode *inode; -if (ino <EXT4_FIRST_INO (sb) && ino !=EXT4_ROOT_INO ) -return ERR_PTR (-ESTALE ); -if (ino >le32_to_cpu (EXT4_SB (sb)->s_es->s_inodes_count)) -return ERR_PTR (-ESTALE ); - -/* iget isn't really right if the inode is currently unallocated!! -* -* ext4_read_inode will return a bad_inode if the inode had been -* deleted, so we should be safe. -* +/* * Currently we don't know the generation for parent directory, so * a generation of 0 means "accept any" */ - inode =ext4_iget_normal (sb, ino); + inode =ext4_iget (sb, ino,EXT4_IGET_HANDLE );if (IS_ERR (inode))return ERR_CAST (inode);if (generation && inode->i_generation != generation) {
@@ -4036,7 +4027,7 @@ no_journal:* so we can safely mount the rest of the filesystem now. */ - root =ext4_iget (sb,EXT4_ROOT_INO ); + root =ext4_iget (sb,EXT4_ROOT_INO ,EXT4_IGET_SPECIAL );if (IS_ERR (root)) {ext4_msg (sb,KERN_ERR ,"get root inode failed" ); ret =PTR_ERR (root);
@@ -4273,11 +4264,12 @@ static journal_t *ext4_get_journal(struct super_block *sb,BUG_ON (!ext4_has_feature_journal (sb)); -/* First, test for the existence of a valid inode on disk. Bad -* things happen if we iget() an unused inode, as the subsequent -* iput() will try to delete it. */ - - journal_inode =ext4_iget (sb, journal_inum); +/* +* Test for the existence of a valid inode on disk. Bad things +* happen if we iget() an unused inode, as the subsequent iput() +* will try to delete it. +*/ + journal_inode =ext4_iget (sb, journal_inum,EXT4_IGET_SPECIAL );if (IS_ERR (journal_inode)) {ext4_msg (sb,KERN_ERR ,"no journal found" );return NULL ;
@@ -5241,7 +5233,7 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,if (!qf_inums[type])return -EPERM ; - qf_inode =ext4_iget (sb, qf_inums[type]); + qf_inode =ext4_iget (sb, qf_inums[type],EXT4_IGET_SPECIAL );if (IS_ERR (qf_inode)) {ext4_error (sb,"Bad quota inode # %lu" , qf_inums[type]);return PTR_ERR (qf_inode);
fs/fuse/dev.c +9 -3
@@ -145,9 +145,13 @@ static bool fuse_block_alloc(struct fuse_conn *fc, bool for_background)static void fuse_drop_waiting (struct fuse_conn *fc) { -if (fc->connected) { -atomic_dec (&fc->num_waiting); - }else if (atomic_dec_and_test (&fc->num_waiting)) { +/* +* lockess check of fc->connected is okay, because atomic_dec_and_test() +* provides a memory barrier mached with the one in fuse_wait_aborted() +* to ensure no wake-up is missed. +*/ +if (atomic_dec_and_test (&fc->num_waiting) && + !READ_ONCE (fc->connected)) {/* wake up aborters */ wake_up_all (&fc->blocked_waitq); }
@@ -2222,6 +2226,8 @@ EXPORT_SYMBOL_GPL(fuse_abort_conn);void fuse_wait_aborted (struct fuse_conn *fc) { +/* matches implicit memory barrier in fuse_drop_waiting() */ +smp_mb ();wait_event (fc->blocked_waitq,atomic_read (&fc->num_waiting) ==0 ); }
fs/namespace.c +1 -1
@@ -3161,8 +3161,8 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,/* make certain new is below the root */ if (!is_path_reachable (new_mnt, new.dentry, &root)) goto out4; - root_mp->m_count++;/* pin it so it won't go away */ lock_mount_hash (); + root_mp->m_count++;/* pin it so it won't go away */ detach_mnt (new_mnt, &parent_path);detach_mnt (root_mnt, &root_parent);if (root_mnt->mnt.mnt_flags &MNT_LOCKED ) {
fs/pnode.c +4 -5
@@ -268,14 +268,13 @@ static int propagate_one(struct mount *m)if (IS_ERR (child))return PTR_ERR (child); child->mnt.mnt_flags &= ~MNT_LOCKED ; +read_seqlock_excl (&mount_lock);mnt_set_mountpoint (m, mp, child); +if (m->mnt_master != dest_master) +SET_MNT_MARK (m->mnt_master); +read_sequnlock_excl (&mount_lock); last_dest = m; last_source = child; -if (m->mnt_master != dest_master) { -read_seqlock_excl (&mount_lock); -SET_MNT_MARK (m->mnt_master); -read_sequnlock_excl (&mount_lock); - }hlist_add_head (&child->mnt_hash, list);return count_mounts (m->mnt_ns, child); }
include/linux/kvm_host.h +1 -1
@@ -934,7 +934,7 @@ search_memslots(struct kvm_memslots *slots, gfn_t gfn) start = slot +1 ; } -if (gfn >= memslots[start].base_gfn && +if (start < slots->used_slots && gfn >= memslots[start].base_gfn && gfn < memslots[start].base_gfn + memslots[start].npages) {atomic_set (&slots->lru_slot, start);return &memslots[start];
include/net/tcp.h +1 -1
@@ -52,7 +52,7 @@ extern struct inet_hashinfo tcp_hashinfo;extern struct percpu_counter tcp_orphan_count;void tcp_time_wait (struct sock *sk,int state,int timeo); -#define MAX_TCP_HEADER (128 + MAX_HEADER) +#define MAX_TCP_HEADER L1_CACHE_ALIGN(128 + MAX_HEADER)#define MAX_TCP_OPTION_SPACE 40#define TCP_MIN_SND_MSS 48#define TCP_MIN_GSO_SIZE (TCP_MIN_SND_MSS - MAX_TCP_OPTION_SPACE)
ipc/util.c +1 -1
@@ -756,13 +756,13 @@ static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos, total++; } + *new_pos = pos +1 ;if (total >= ids->in_use)return NULL ;for (; pos <IPCMNI ; pos++) { ipc =idr_find (&ids->ipcs_idr, pos);if (ipc !=NULL ) { - *new_pos = pos +1 ;rcu_read_lock ();ipc_lock_object (ipc);return ipc;
kernel/audit.c +3 -0
@@ -919,6 +919,9 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2:if (!audit_enabled && msg_type !=AUDIT_USER_AVC )return 0 ; +/* exit early if there isn't at least one character to print */ +if (data_len <2 ) +return -EINVAL ; err =audit_filter_user (msg_type);if (err ==1 ) {/* match or error */
kernel/events/core.c +10 -3
@@ -5810,10 +5810,17 @@ static void perf_event_task_output(struct perf_event *event, goto out; task_event->event_id.pid =perf_event_pid (event, task); - task_event->event_id.ppid =perf_event_pid (event, current); - task_event->event_id.tid =perf_event_tid (event, task); - task_event->event_id.ptid =perf_event_tid (event, current); + +if (task_event->event_id.header.type ==PERF_RECORD_EXIT ) { + task_event->event_id.ppid =perf_event_pid (event, + task->real_parent); + task_event->event_id.ptid =perf_event_pid (event, + task->real_parent); + }else {/* PERF_RECORD_FORK */ + task_event->event_id.ppid =perf_event_pid (event, current); + task_event->event_id.ptid =perf_event_tid (event, current); + } task_event->event_id.time =perf_event_clock (event);
kernel/gcov/fs.c +1 -1
@@ -108,9 +108,9 @@ static void *gcov_seq_next(struct seq_file *seq, void *data, loff_t *pos) {struct gcov_iterator *iter = data; + (*pos)++;if (gcov_iter_next (iter))return NULL ; - (*pos)++;return iter; }
net/ipv4/ip_vti.c +1 -3
@@ -666,10 +666,8 @@ static int __init vti_init(void) msg ="ipip tunnel" ; err =xfrm4_tunnel_register (&ipip_handler,AF_INET ); -if (err <0 ) { -pr_info ("%s: cant't register tunnel\n" ,__func__); +if (err <0 ) goto xfrm_tunnel_failed; - } msg ="netlink interface" ; err =rtnl_link_register (&vti_link_ops);
net/ipv4/raw.c +3 -1
@@ -507,9 +507,11 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) goto out;/* hdrincl should be READ_ONCE(inet->hdrincl) -* but READ_ONCE() doesn't work with bit fields +* but READ_ONCE() doesn't work with bit fields. +* Doing this indirectly yields the same result. */ hdrincl = inet->hdrincl; + hdrincl =READ_ONCE (hdrincl);/* * Check the flags. */
net/ipv4/route.c +1 -2
@@ -131,8 +131,6 @@ static int ip_rt_min_advmss __read_mostly = 256;static int ip_rt_gc_timeout__read_mostly =RT_GC_TIMEOUT ; -static int ip_min_valid_pmtu__read_mostly =IPV4_MIN_MTU ; -/* * Interface to generic destination cache. */
@@ -2705,6 +2703,7 @@ void ip_rt_multicast_event(struct in_device *in_dev)static int ip_rt_gc_interval__read_mostly =60 *HZ ;static int ip_rt_gc_min_interval__read_mostly =HZ /2 ;static int ip_rt_gc_elasticity__read_mostly =8 ; +static int ip_min_valid_pmtu__read_mostly =IPV4_MIN_MTU ; static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write, void __user *buffer,
net/ipv4/xfrm4_output.c +0 -2
@@ -75,9 +75,7 @@ int xfrm4_output_finish(struct sock *sk, struct sk_buff *skb) {memset (IPCB (skb),0 ,sizeof (*IPCB (skb))); -#ifdef CONFIG_NETFILTER IPCB (skb)->flags |=IPSKB_XFRM_TRANSFORMED ; -#endif return xfrm_output (sk, skb); }
net/ipv6/ipv6_sockglue.c +6 -7
@@ -185,15 +185,14 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, retv = -EBUSY ;break ; } - }else if (sk->sk_protocol ==IPPROTO_TCP ) { -if (sk->sk_prot != &tcpv6_prot) { - retv = -EBUSY ; -break ; - } -break ; - }else { + } +if (sk->sk_protocol ==IPPROTO_TCP && + sk->sk_prot != &tcpv6_prot) { + retv = -EBUSY ;break ; } +if (sk->sk_protocol !=IPPROTO_TCP ) +break ;if (sk->sk_state !=TCP_ESTABLISHED ) { retv = -ENOTCONN ;break ;
net/ipv6/xfrm6_output.c +0 -2
@@ -125,9 +125,7 @@ int xfrm6_output_finish(struct sock *sk, struct sk_buff *skb) {memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb))); -#ifdef CONFIG_NETFILTER IP6CB (skb)->flags |=IP6SKB_XFRM_TRANSFORMED ; -#endif return xfrm_output (sk, skb); }
net/netrom/nr_route.c +1 -0
@@ -199,6 +199,7 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic,/* refcount initialized at 1 */ spin_unlock_bh (&nr_node_list_lock); +nr_neigh_put (nr_neigh);return 0 ; }nr_node_lock (nr_node);
net/sctp/socket.c +3 -3
@@ -185,13 +185,13 @@ static void sctp_for_each_tx_datachunk(struct sctp_association *asoc,list_for_each_entry (chunk, &t->transmitted, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->retransmit, list) +list_for_each_entry (chunk, &q->retransmit, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->sacked, list) +list_for_each_entry (chunk, &q->sacked, transmitted_list)cb (chunk); -list_for_each_entry (chunk, &q->abandoned, list) +list_for_each_entry (chunk, &q->abandoned, transmitted_list)cb (chunk);list_for_each_entry (chunk, &q->out_chunk_list, list)
net/x25/x25_dev.c +3 -1
@@ -120,8 +120,10 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev, goto drop; } -if (!pskb_may_pull (skb,1 )) +if (!pskb_may_pull (skb,1 )) { +x25_neigh_put (nb);return 0 ; + }switch (skb->data[0 ]) {
sound/pci/hda/hda_intel.c +0 -1
@@ -1978,7 +1978,6 @@ static const struct hdac_io_ops pci_hda_io_ops = {* should be ignored from the beginning. */ static const struct snd_pci_quirk driver_blacklist[] = { -SND_PCI_QUIRK (0x1043 ,0x874f ,"ASUS ROG Zenith II / Strix" ,0 ),SND_PCI_QUIRK (0x1462 ,0xcb59 ,"MSI TRX40 Creator" ,0 ),SND_PCI_QUIRK (0x1462 ,0xcb60 ,"MSI TRX40" ,0 ), {}
sound/pci/hda/patch_realtek.c +1 -1
@@ -3500,7 +3500,7 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec, } } -#if IS_REACHABLE (INPUT ) +#if IS_REACHABLE (CONFIG_INPUT )static void gpio2_mic_hotkey_event (struct hda_codec *codec,struct hda_jack_callback *event) {
sound/soc/intel/atom/sst-atom-controls.c +2 -0
@@ -963,7 +963,9 @@ static int sst_set_be_modules(struct snd_soc_dapm_widget *w,dev_dbg (c->dev,"Enter: widget=%s\n" , w->name);if (SND_SOC_DAPM_EVENT_ON (event)) { +mutex_lock (&drv->lock); ret =sst_send_slot_map (drv); +mutex_unlock (&drv->lock);if (ret)return ret; ret =sst_send_pipe_module_params (w, k);
sound/soc/soc-dapm.c +17 -3
@@ -384,7 +384,7 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,memset (&template,0 ,sizeof (template)); template.reg = e->reg; - template.mask = e->mask << e->shift_l; + template.mask = e->mask; template.shift = e->shift_l; template.off_val =snd_soc_enum_item_to_val (e,0 ); template.on_val = template.off_val;
@@ -510,8 +510,22 @@ static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,if (data->value == value)return false; -if (data->widget) - data->widget->on_val = value; +if (data->widget) { +switch (dapm_kcontrol_get_wlist (kcontrol)->widgets[0 ]->id) { +case snd_soc_dapm_switch: +case snd_soc_dapm_mixer: +case snd_soc_dapm_mixer_named_ctl: + data->widget->on_val = value & data->widget->mask; +break ; +case snd_soc_dapm_demux: +case snd_soc_dapm_mux: + data->widget->on_val = value >> data->widget->shift; +break ; +default : + data->widget->on_val = value; +break ; + } + } data->value = value;
sound/usb/format.c +52 -0
70 lines not on this page · raw message
sound/usb/mixer_quirks.c +8 -4
@@ -1519,11 +1519,15 @@ static int snd_microii_spdif_default_get(struct snd_kcontrol *kcontrol,/* use known values for that card: interface#1 altsetting#1 */ iface =usb_ifnum_to_if (chip->dev,1 ); -if (!iface || iface->num_altsetting <2 ) -return -EINVAL ; +if (!iface || iface->num_altsetting <2 ) { + err = -EINVAL ; + goto end; + } alts = &iface->altsetting[1 ]; -if (get_iface_desc (alts)->bNumEndpoints <1 ) -return -EINVAL ; +if (get_iface_desc (alts)->bNumEndpoints <1 ) { + err = -EINVAL ; + goto end; + } ep =get_endpoint (alts,0 )->bEndpointAddress; err = snd_usb_ctl_msg(chip->dev,
sound/usb/usx2y/usbusx2yaudio.c +2 -0
@@ -691,6 +691,8 @@ static int usX2Y_rate_set(struct usX2Ydev *usX2Y, int rate) us->submitted =2 *NOOF_SETRATE_URBS ;for (i =0 ; i <NOOF_SETRATE_URBS ; ++i) {struct urb *urb = us->urb[i]; +if (!urb) +continue ;if (urb->status) {if (!err) err = -ENODEV ;