Linux 4.4.296
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.296 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/mm/copypage-fa.c | 35 +++---- arch/arm/mm/copypage-feroceon.c | 98 ++++++++++----------- arch/arm/mm/copypage-v4mc.c | 19 +--- arch/arm/mm/copypage-v4wb.c | 41 ++++---- arch/arm/mm/copypage-v4wt.c | 37 +++---- arch/arm/mm/copypage-xsc3.c | 71 ++++++--------- arch/arm/mm/copypage-xscale.c | 71 +++++++-------- drivers/block/xen-blkfront.c | 12 ++ drivers/char/agp/parisc-agp.c | 6 - drivers/hwmon/dell-smm-hwmon.c | 7 + drivers/i2c/busses/i2c-rk3x.c | 4 drivers/input/touchscreen/of_touchscreen.c | 18 +-- drivers/md/persistent-data/dm-btree-remove.c | 2 drivers/net/ethernet/broadcom/bcmsysport.c | 5 + drivers/net/ethernet/broadcom/bcmsysport.h | 1 drivers/net/ethernet/intel/igbvf/netdev.c | 1 drivers/net/usb/lan78xx.c | 6 - drivers/net/xen-netback/netback.c | 13 +- drivers/net/xen-netfront.c | 125 ++++++++++++++++++++------- drivers/pci/msi.c | 2 drivers/soc/tegra/fuse/fuse-tegra.c | 2 drivers/soc/tegra/fuse/fuse.h | 2 drivers/tty/hvc/hvc_xen.c | 30 +++++- drivers/usb/gadget/composite.c | 6 - drivers/usb/gadget/legacy/dbgp.c | 6 - drivers/usb/gadget/legacy/inode.c | 6 - drivers/usb/serial/option.c | 8 + fs/nfsd/nfs4state.c | 9 + kernel/time/timekeeping.c | 3 net/mac80211/agg-tx.c | 2 net/netlink/af_netlink.c | 5 + net/nfc/netlink.c | 6 - scripts/recordmcount.pl | 2 34 files changed, 387 insertions(+), 276 deletions(-)
Armin Wolf (1):
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Daniele Palmas (1):
USB: serial: option: add Telit FN990 compositions
Felix Fietkau (1):
mac80211: send ADDBA requests using the tid/queue of the aggregation session
Florian Fainelli (1):
net: systemport: Add global locking for descriptor lifecycle
Greg Kroah-Hartman (2):
USB: gadget: bRequestType is a bitfield, not a enum Linux 4.4.296
Harshit Mogalapalli (1):
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Helge Deller (1):
parisc/agp: Annotate parisc agp init functions with __init
J. Bruce Fields (1):
nfsd: fix use-after-free due to delegation race
Jerome Marchand (1):
recordmcount.pl: look for jgnop instruction as well as bcrl on s390
Joe Thornber (1):
dm btree remove: fix use after free in rebalance_children()
Juergen Gross (4):
xen/blkfront: harden blkfront against event channel storms xen/netfront: harden netfront against event channel storms xen/console: harden hvc_xen against event channel storms xen/netback: don't queue unlimited number of packages
Letu Ren (1):
igbvf: fix double free in igbvf_probe
Nathan Chancellor (3):
soc/tegra: fuse: Fix bitwise vs. logical OR warning
net: lan78xx: Avoid unnecessary self assignment
Input: touchscreen - avoid bitwise vs logical OR warning
Nicolas Pitre (1):
ARM: 8805/2: remove unneeded naked function usage
Ondrej Jirman (1):
i2c: rk3x: Handle a spurious start completion interrupt flag
Tadeusz Struk (1):
nfc: fix segfault in nfc_genl_dump_devices_done
Thomas Gleixner (1):
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
Yu Liao (1):
timekeeping: Really make sure wall_to_monotonic isn't positive
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 295 +SUBLEVEL = 296 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/mm/copypage-fa.c +17 -18
@@ -17,26 +17,25 @@/* * Faraday optimised copy_user_page */ -static void __naked -fa_copy_user_page (void *kto,const void *kfrom) +static void fa_copy_user_page (void *kto,const void *kfrom) { - asm("\ -stmfd sp!, {r4, lr} @ 2\n\ -mov r2, %0 @ 1\n\ -1: ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0, {r3, r4, ip, lr} @ 4\n\ -mcr p15, 0, r0, c7, c14, 1 @ 1 clean and invalidate D line\n\ -add r0, r0, #16 @ 1\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0, {r3, r4, ip, lr} @ 4\n\ -mcr p15, 0, r0, c7, c14, 1 @ 1 clean and invalidate D line\n\ -add r0, r0, #16 @ 1\n\ -subs r2, r2, #1 @ 1\n\ +int tmp; + + asmvolatile ("\ +1: ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0, {r3, r4, ip, lr} @ 4\n\ +mcr p15, 0, %0, c7, c14, 1 @ 1 clean and invalidate D line\n\ +add %0, %0, #16 @ 1\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0, {r3, r4, ip, lr} @ 4\n\ +mcr p15, 0, %0, c7, c14, 1 @ 1 clean and invalidate D line\n\ +add %0, %0, #16 @ 1\n\ +subs %2, %2, #1 @ 1\n\ bne 1b @ 1\n\ -mcr p15, 0, r2, c7, c10, 4 @ 1 drain WB\n\ -ldmfd sp!, {r4, pc} @ 3" - : - :"I" (PAGE_SIZE /32 )); +mcr p15, 0, %2, c7, c10, 4 @ 1 drain WB" + :"+&r" (kto),"+&r" (kfrom),"=&r" (tmp) + :"2" (PAGE_SIZE /32 ) + :"r3" ,"r4" ,"ip" ,"lr" ); } void fa_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-feroceon.c +48 -50
106 lines not on this page · raw message
arch/arm/mm/copypage-v4mc.c +9 -10
@@ -40,12 +40,11 @@ static DEFINE_RAW_SPINLOCK(minicache_lock);* instruction. If your processor does not supply this, you have to write your * own copy_user_highpage that does the right thing. */ -static void __naked -mc_copy_user_page (void *from,void *to) +static void mc_copy_user_page (void *from,void *to) { - asm volatile( - "stmfd sp!, {r4, lr} @ 2\n\ - mov r4, %2 @ 1\n\ +int tmp; + + asm volatile ("\ ldmia %0!, {r2, r3, ip, lr} @ 4\n\ 1: mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\
@@ -55,13 +54,13 @@ mc_copy_user_page(void *from, void *to) mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ ldmia %0!, {r2, r3, ip, lr} @ 4\n\ - subs r4, r4, #1 @ 1\n\ + subs %2, %2, #1 @ 1\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ ldmneia %0!, {r2, r3, ip, lr} @ 4\n\ - bne 1b @ 1\n\ - ldmfd sp!, {r4, pc} @ 3" - : - : "r" (from), "r" (to), "I" (PAGE_SIZE / 64)); + bne 1b @ " + : "+&r" (from), "+&r" (to), "=&r" (tmp) + : "2" (PAGE_SIZE / 64) + : "r2", "r3", "ip", "lr"); } void v4_mc_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-v4wb.c +20 -21
49 lines not on this page · raw message
arch/arm/mm/copypage-v4wt.c +18 -19
@@ -20,27 +20,26 @@* dirty data in the cache. However, we do have to ensure that * subsequent reads are up to date. */ -static void __naked -v4wt_copy_user_page (void *kto,const void *kfrom) +static void v4wt_copy_user_page (void *kto,const void *kfrom) { - asm("\ -stmfd sp!, {r4, lr} @ 2\n\ -mov r2, %2 @ 1\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmia r1!, {r3, r4, ip, lr} @ 4\n\ -subs r2, r2, #1 @ 1\n\ -stmia r0!, {r3, r4, ip, lr} @ 4\n\ -ldmneia r1!, {r3, r4, ip, lr} @ 4\n\ +int tmp; + + asmvolatile ("\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +1: stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4+1\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmia %1!, {r3, r4, ip, lr} @ 4\n\ +subs %2, %2, #1 @ 1\n\ +stmia %0!, {r3, r4, ip, lr} @ 4\n\ +ldmneia %1!, {r3, r4, ip, lr} @ 4\n\ bne 1b @ 1\n\ -mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ -ldmfd sp!, {r4, pc} @ 3" - : - :"r" (kto),"r" (kfrom),"I" (PAGE_SIZE /64 )); +mcr p15, 0, %2, c7, c7, 0 @ flush ID cache" + :"+&r" (kto),"+&r" (kfrom),"=&r" (tmp) + :"2" (PAGE_SIZE /64 ) + :"r3" ,"r4" ,"ip" ,"lr" ); } void v4wt_copy_user_highpage(struct page *to, struct page *from,
arch/arm/mm/copypage-xsc3.c +31 -40
92 lines not on this page · raw message
arch/arm/mm/copypage-xscale.c +35 -36
87 lines not on this page · raw message
drivers/block/xen-blkfront.c +10 -2
@@ -1319,11 +1319,13 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)unsigned long flags;struct blkfront_info *info = (struct blkfront_info *)dev_id;int error; +unsigned int eoiflag =XEN_EOI_FLAG_SPURIOUS ;spin_lock_irqsave (&info->io_lock, flags);if (unlikely (info->connected !=BLKIF_STATE_CONNECTED )) {spin_unlock_irqrestore (&info->io_lock, flags); +xen_irq_lateeoi (irq,XEN_EOI_FLAG_SPURIOUS );return IRQ_HANDLED ; }
@@ -1340,6 +1342,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)unsigned long id;unsigned int op; + eoiflag =0 ; +RING_COPY_RESPONSE (&info->ring, i, &bret); id = bret.id;
@@ -1444,6 +1448,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&info->io_lock, flags); +xen_irq_lateeoi (irq, eoiflag); +return IRQ_HANDLED ; err:
@@ -1451,6 +1457,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&info->io_lock, flags); +/* No EOI in order to avoid further interrupts. */ +pr_alert ("%s disabled for further use\n" , info->gd->disk_name);return IRQ_HANDLED ; }
@@ -1489,8 +1497,8 @@ static int setup_blkring(struct xenbus_device *dev,if (err) goto fail; - err =bind_evtchn_to_irqhandler (info->evtchn, blkif_interrupt,0 , -"blkif" , info); + err =bind_evtchn_to_irqhandler_lateeoi (info->evtchn, blkif_interrupt, +0 ,"blkif" , info);if (err <=0 ) {xenbus_dev_fatal (dev, err,"bind_evtchn_to_irqhandler failed" );
drivers/char/agp/parisc-agp.c +3 -3
@@ -285,7 +285,7 @@ agp_ioc_init(void __iomem *ioc_regs)return 0 ; } -static int +static int __init lba_find_capability (int cap) {struct _parisc_agp_info *info = &parisc_agp_info;
@@ -370,7 +370,7 @@ fail:return error; } -static int +static int __init find_quicksilver (struct device *dev,void *data) {struct parisc_device **lba = data;
@@ -382,7 +382,7 @@ find_quicksilver(struct device *dev, void *data)return 0 ; } -static int +static int __init parisc_agp_init (void ) {extern struct sba_device *sba_list;
drivers/hwmon/dell-smm-hwmon.c +5 -2
@@ -551,15 +551,18 @@ static const struct file_operations i8k_fops = { .unlocked_ioctl = i8k_ioctl, }; +static struct proc_dir_entry *entry; +static void __init i8k_init_procfs (void ) {/* Register the proc entry */ -proc_create ("i8k" ,0 ,NULL , &i8k_fops); + entry =proc_create ("i8k" ,0 ,NULL , &i8k_fops); } static void __exit i8k_exit_procfs(void) { -remove_proc_entry ("i8k" ,NULL ); +if (entry) +remove_proc_entry ("i8k" ,NULL ); }#else
drivers/i2c/busses/i2c-rk3x.c +2 -2
@@ -325,8 +325,8 @@ static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd)if (!(ipd ®_INT_MBRF ))return ; -/* ack interrupt */ -i2c_writel (i2c,REG_INT_MBRF ,REG_IPD ); +/* ack interrupt (read also produces a spurious START flag, clear it too) */ +i2c_writel (i2c,REG_INT_MBRF |REG_INT_START ,REG_IPD );/* Can only handle a maximum of 32 bytes at a time */ if (len >32 )
drivers/input/touchscreen/of_touchscreen.c +9 -9
@@ -75,8 +75,8 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch) data_present =touchscreen_get_prop_u32 (dev,"touchscreen-size-x" ,input_abs_get_max (input, axis) +1 , - &maximum) | -touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-x" , + &maximum); + data_present |=touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-x" ,input_abs_get_fuzz (input, axis), &fuzz);if (data_present)
@@ -86,8 +86,8 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch) data_present =touchscreen_get_prop_u32 (dev,"touchscreen-size-y" ,input_abs_get_max (input, axis) +1 , - &maximum) | -touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-y" , + &maximum); + data_present |=touchscreen_get_prop_u32 (dev,"touchscreen-fuzz-y" ,input_abs_get_fuzz (input, axis), &fuzz);if (data_present)
@@ -97,11 +97,11 @@ void touchscreen_parse_properties(struct input_dev *input, bool multitouch) data_present =touchscreen_get_prop_u32 (dev,"touchscreen-max-pressure" ,input_abs_get_max (input, axis), - &maximum) | -touchscreen_get_prop_u32 (dev, -"touchscreen-fuzz-pressure" , -input_abs_get_fuzz (input, axis), - &fuzz); + &maximum); + data_present |=touchscreen_get_prop_u32 (dev, +"touchscreen-fuzz-pressure" , +input_abs_get_fuzz (input, axis), + &fuzz);if (data_present)touchscreen_set_params (input, axis, maximum, fuzz); }
drivers/md/persistent-data/dm-btree-remove.c +1 -1
@@ -423,9 +423,9 @@ static int rebalance_children(struct shadow_spine *s,memcpy (n,dm_block_data (child),dm_bm_block_size (dm_tm_get_bm (info->tm))); -dm_tm_unlock (info->tm, child);dm_tm_dec (info->tm,dm_block_location (child)); +dm_tm_unlock (info->tm, child);return 0 ; }
drivers/net/ethernet/broadcom/bcmsysport.c +5 -0
@@ -90,9 +90,13 @@ static inline void tdma_port_write_desc_addr(struct bcm_sysport_priv *priv, struct dma_desc *desc, unsigned int port) { +unsigned long desc_flags; +/* Ports are latched, so write upper address first */ +spin_lock_irqsave (&priv->desc_lock, desc_flags);tdma_writel (priv, desc->addr_status_len,TDMA_WRITE_PORT_HI (port));tdma_writel (priv, desc->addr_lo,TDMA_WRITE_PORT_LO (port)); +spin_unlock_irqrestore (&priv->desc_lock, desc_flags); }/* Ethtool operations */
@@ -1608,6 +1612,7 @@ static int bcm_sysport_open(struct net_device *dev) }/* Initialize both hardware and software ring */ +spin_lock_init (&priv->desc_lock);for (i =0 ; i < dev->num_tx_queues; i++) { ret =bcm_sysport_init_tx_ring (priv, i);if (ret) {
drivers/net/ethernet/broadcom/bcmsysport.h +1 -0
@@ -660,6 +660,7 @@ struct bcm_sysport_priv {int wol_irq;/* Transmit rings */ +spinlock_t desc_lock;struct bcm_sysport_tx_ring tx_rings[TDMA_NUM_RINGS ];/* Receive queue */
drivers/net/ethernet/intel/igbvf/netdev.c +1 -0
@@ -2793,6 +2793,7 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)return 0 ; err_hw_init: +netif_napi_del (&adapter->rx_ring->napi);kfree (adapter->tx_ring);kfree (adapter->rx_ring); err_sw_init:
drivers/net/usb/lan78xx.c +2 -4
@@ -609,11 +609,9 @@ static int lan78xx_read_otp(struct lan78xx_net *dev, u32 offset, ret =lan78xx_read_raw_otp (dev,0 ,1 , &sig);if (ret ==0 ) { -if (sig ==OTP_INDICATOR_1 ) - offset = offset; -else if (sig ==OTP_INDICATOR_2 ) +if (sig ==OTP_INDICATOR_2 ) offset +=0x100 ; -else +else if (sig !=OTP_INDICATOR_1 ) ret = -EINVAL ;if (!ret) ret =lan78xx_read_raw_otp (dev, offset, length, data);
drivers/net/xen-netback/netback.c +9 -4
@@ -189,11 +189,15 @@ void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb)spin_lock_irqsave (&queue->rx_queue.lock, flags); -__skb_queue_tail (&queue->rx_queue, skb); - - queue->rx_queue_len += skb->len; -if (queue->rx_queue_len > queue->rx_queue_max) +if (queue->rx_queue_len >= queue->rx_queue_max) {netif_tx_stop_queue (netdev_get_tx_queue (queue->vif->dev, queue->id)); +kfree_skb (skb); + queue->vif->dev->stats.rx_dropped++; + }else { +__skb_queue_tail (&queue->rx_queue, skb); + + queue->rx_queue_len += skb->len; + }spin_unlock_irqrestore (&queue->rx_queue.lock, flags); }
@@ -243,6 +247,7 @@ static void xenvif_rx_queue_drop_expired(struct xenvif_queue *queue)break ;xenvif_rx_dequeue (queue);kfree_skb (skb); + queue->vif->dev->stats.rx_dropped++; } }
drivers/net/xen-netfront.c +94 -31
249 lines not on this page · raw message
drivers/pci/msi.c +1 -1
@@ -840,7 +840,7 @@ out_free:free_msi_irqs (dev); out_disable: -pci_msix_clear_and_set_ctrl (dev,PCI_MSIX_FLAGS_ENABLE ,0 ); +pci_msix_clear_and_set_ctrl (dev,PCI_MSIX_FLAGS_MASKALL |PCI_MSIX_FLAGS_ENABLE ,0 );return ret; }
drivers/soc/tegra/fuse/fuse-tegra.c +1 -1
@@ -176,7 +176,7 @@ static struct platform_driver tegra_fuse_driver = { };module_platform_driver (tegra_fuse_driver); -bool __init tegra_fuse_read_spare (unsigned int spare) +u32 __init tegra_fuse_read_spare (unsigned int spare) {unsigned int offset = fuse->soc->info->spare + spare *4 ;
drivers/soc/tegra/fuse/fuse.h +1 -1
@@ -62,7 +62,7 @@ struct tegra_fuse {void tegra_init_revision (void );void tegra_init_apbmisc (void ); -bool __init tegra_fuse_read_spare (unsigned int spare); +u32 __init tegra_fuse_read_spare (unsigned int spare);u32 __init tegra_fuse_read_early (unsigned int offset);#ifdef CONFIG_ARCH_TEGRA_2x_SOC
drivers/tty/hvc/hvc_xen.c +27 -3
@@ -49,6 +49,8 @@ struct xencons_info {struct xenbus_device *xbdev;struct xencons_interface *intf;unsigned int evtchn; +XENCONS_RING_IDX out_cons; +unsigned int out_cons_same;struct hvc_struct *hvc;int irq;int vtermno;
@@ -150,6 +152,8 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len)XENCONS_RING_IDX cons, prod;int recv =0 ;struct xencons_info *xencons =vtermno_to_xencons (vtermno); +unsigned int eoiflag =0 ; +if (xencons ==NULL )return -EINVAL ; intf = xencons->intf;
@@ -169,7 +173,27 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len)mb ();/* read ring before consuming */ intf->in_cons = cons; -notify_daemon (xencons); +/* +* When to mark interrupt having been spurious: +* - there was no new data to be read, and +* - the backend did not consume some output bytes, and +* - the previous round with no read data didn't see consumed bytes +* (we might have a race with an interrupt being in flight while +* updating xencons->out_cons, so account for that by allowing one +* round without any visible reason) +*/ +if (intf->out_cons != xencons->out_cons) { + xencons->out_cons = intf->out_cons; + xencons->out_cons_same =0 ; + } +if (recv) { +notify_daemon (xencons); + }else if (xencons->out_cons_same++ >1 ) { + eoiflag =XEN_EOI_FLAG_SPURIOUS ; + } + +xen_irq_lateeoi (xencons->irq, eoiflag); +return recv; }
@@ -391,7 +415,7 @@ static int xencons_connect_backend(struct xenbus_device *dev,if (ret)return ret; info->evtchn = evtchn; - irq =bind_evtchn_to_irq (evtchn); + irq =bind_interdomain_evtchn_to_irq_lateeoi (dev->otherend_id, evtchn);if (irq <0 )return irq; info->irq = irq;
@@ -555,7 +579,7 @@ static int __init xen_hvc_init(void)return r; info =vtermno_to_xencons (HVC_COOKIE ); - info->irq =bind_evtchn_to_irq (info->evtchn); + info->irq =bind_evtchn_to_irq_lateeoi (info->evtchn); }if (info->irq <0 ) info->irq =0 ;/* NO_IRQ */
drivers/usb/gadget/composite.c +3 -3
@@ -1485,14 +1485,14 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)u8 endp;if (w_length >USB_COMP_EP0_BUFSIZ ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { - goto done; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (USB_COMP_EP0_BUFSIZ ); w_length =USB_COMP_EP0_BUFSIZ ; + }else { + goto done; } }
drivers/usb/gadget/legacy/dbgp.c +3 -3
@@ -345,14 +345,14 @@ static int dbgp_setup(struct usb_gadget *gadget,u16 len =0 ;if (length >DBGP_REQ_LEN ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { -return err; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (DBGP_REQ_LEN ); length =DBGP_REQ_LEN ; + }else { +return err; } }
drivers/usb/gadget/legacy/inode.c +3 -3
@@ -1335,14 +1335,14 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)u16 w_length =le16_to_cpu (ctrl->wLength);if (w_length >RBUF_SIZE ) { -if (ctrl->bRequestType ==USB_DIR_OUT ) { -return value; - }else { +if (ctrl->bRequestType &USB_DIR_IN ) {/* Cast away the const, we are going to overwrite on purpose. */ __le16 *temp = (__le16 *)&ctrl->wLength; *temp =cpu_to_le16 (RBUF_SIZE ); w_length =RBUF_SIZE ; + }else { +return value; } }
drivers/usb/serial/option.c +8 -0
@@ -1195,6 +1195,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1063, 0xff), /* Telit LN920 (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1070, 0xff), /* Telit FN990 (rmnet) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1071, 0xff), /* Telit FN990 (MBIM) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1072, 0xff), /* Telit FN990 (RNDIS) */ + .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990 (ECM) */ + .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
fs/nfsd/nfs4state.c +7 -2
@@ -844,6 +844,11 @@ hash_delegation_locked(struct nfs4_delegation *dp, struct nfs4_file *fp)return 0 ; } +static bool delegation_hashed (struct nfs4_delegation *dp) +{ +return !(list_empty (&dp->dl_perfile)); +} +static bool unhash_delegation_locked (struct nfs4_delegation *dp) {
@@ -851,7 +856,7 @@ unhash_delegation_locked(struct nfs4_delegation *dp)lockdep_assert_held (&state_lock); -if (list_empty (&dp->dl_perfile)) +if (!delegation_hashed (dp))return false; dp->dl_stid.sc_type =NFS4_CLOSED_DELEG_STID ;
@@ -3656,7 +3661,7 @@ static void nfsd4_cb_recall_prepare(struct nfsd4_callback *cb)* queued for a lease break. Don't queue it again. */ spin_lock (&state_lock); -if (dp->dl_time ==0 ) { +if (delegation_hashed (dp) && dp->dl_time ==0 ) { dp->dl_time =get_seconds ();list_add_tail (&dp->dl_recall_lru, &nn->del_recall_lru); }
kernel/time/timekeeping.c +1 -2
@@ -966,8 +966,7 @@ int do_settimeofday64(const struct timespec64 *ts)timekeeping_forward_now (tk); xt =tk_xtime (tk); - ts_delta.tv_sec = ts->tv_sec - xt.tv_sec; - ts_delta.tv_nsec = ts->tv_nsec - xt.tv_nsec; + ts_delta =timespec64_sub (*ts, xt);if (timespec64_compare (&tk->wall_to_monotonic, &ts_delta) >0 ) { ret = -EINVAL ;
net/mac80211/agg-tx.c +1 -1
@@ -109,7 +109,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata, mgmt->u.action.u.addba_req.start_seq_num =cpu_to_le16 (start_seq_num <<4 ); -ieee80211_tx_skb (sdata, skb); +ieee80211_tx_skb_tid (sdata, skb, tid); }void ieee80211_send_bar (struct ieee80211_vif *vif,u8 *ra,u16 tid,u16 ssn)
net/netlink/af_netlink.c +5 -0
@@ -1804,6 +1804,11 @@ static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)if (msg->msg_flags&MSG_OOB )return -EOPNOTSUPP ; +if (len ==0 ) { +pr_warn_once ("Zero length message leads to an empty skb\n" ); +return -ENODATA ; + } + err =scm_send (sock, msg, &scm, true);if (err <0 )return err;
net/nfc/netlink.c +4 -2
@@ -632,8 +632,10 @@ static int nfc_genl_dump_devices_done(struct netlink_callback *cb) {struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0 ]; -nfc_device_iter_exit (iter); -kfree (iter); +if (iter) { +nfc_device_iter_exit (iter); +kfree (iter); + }return 0 ; }
scripts/recordmcount.pl +1 -1
@@ -248,7 +248,7 @@ if ($arch eq "x86_64") { } elsif ($arch eq "s390" && $bits == 64) { if ($cc =~ /-DCC_USING_HOTPATCH/) { - $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*brcl\\s*0,[0-9a-f]+ <([^\+]*)>\$"; + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(bcrl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$"; $mcount_adjust = 0; } else { $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";