Linux 3.18.74
Greg KH
maintainerI'm announcing the release of the 3.18.74 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt | 46 ++++ Makefile | 2 arch/arm/Kconfig-nommu | 3 arch/mips/kernel/vmlinux.lds.S | 2 arch/parisc/kernel/perf.c | 94 +++++----- block/partitions/efi.c | 17 + crypto/algif_skcipher.c | 14 - drivers/ata/libata-transport.c | 9 drivers/hwmon/gl520sm.c | 25 +- drivers/infiniband/hw/qib/qib_iba7322.c | 2 drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 10 - drivers/md/raid10.c | 19 +- drivers/media/pci/ttpci/av7110_hw.c | 8 drivers/media/pci/ttpci/av7110_hw.h | 12 - drivers/media/platform/exynos-gsc/gsc-core.c | 2 drivers/mmc/core/sdio_bus.c | 12 + drivers/net/ethernet/renesas/sh_eth.h | 2 drivers/net/team/team.c | 8 drivers/net/usb/Kconfig | 2 drivers/net/usb/plusb.c | 15 + drivers/staging/nvec/nvec_ps2.c | 4 drivers/tty/goldfish.c | 2 drivers/usb/serial/mos7720.c | 9 drivers/usb/serial/mos7840.c | 19 +- fs/xfs/kmem.c | 18 - fs/xfs/kmem.h | 2 fs/xfs/xfs_itable.c | 6 include/linux/audit.h | 20 ++ include/linux/mmc/sdio_func.h | 2 lib/mpi/mpi-pow.c | 7 net/compat.c | 17 + net/core/dev.c | 3 net/ipv4/netfilter/nf_nat_snmp_basic.c | 1 net/netfilter/nf_conntrack_ecache.c | 2 net/netfilter/nf_conntrack_netlink.c | 1 net/netfilter/nf_nat_core.c | 2 net/netfilter/nfnetlink_cthelper.c | 20 +- net/netfilter/nfnetlink_cttimeout.c | 1 net/packet/af_packet.c | 2 net/rds/ib_cm.c | 47 +++-- net/rds/ib_send.c | 25 +- net/rds/rdma.c | 10 + net/rds/rds.h | 1 net/rds/send.c | 4 sound/pci/au88x0/au88x0_core.c | 3 46 files changed, 365 insertions(+), 175 deletions(-)
Afzal Mohammed (1):
ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM
Alden Tondettar (1):
partitions/efi: Fix integer overflow in GPT size calculation
Alexander Potapenko (1):
net/packet: check length in getsockopt() called with PACKET_HDRLEN
Andrey Ryabinin (1):
mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
Arnd Bergmann (3):
IB/qib: fix false-postive maybe-uninitialized warning
ALSA: au88x0: avoid theoretical uninitialized access
ttpci: address stringop overflow warning
Arvind Yadav (1):
parisc: perf: Fix potential NULL pointer dereference
Bartosz Golaszewski (1):
drm: bridge: add DT bindings for TI ths8135
Christophe JAILLET (1):
tty: goldfish: Fix a parameter of a call to free_irq
Darrick J. Wong (1):
xfs: remove kmem_zalloc_greedy
Feras Daoud (3):
IB/ipoib: Fix deadlock over vlan_mutex
IB/ipoib: rtnl_unlock can not come after free_netdev IB/ipoib: Replace list_del of the neigh->list with list_del_init
Greg Kroah-Hartman (1):
Linux 3.18.74
Guenter Roeck (1):
hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes
Gwendal Grignou (1):
libata: transport: Remove circular dependency at free time
Heiner Kallweit (1):
mmc: sdio: fix alignment issue in struct sdio_func
Herbert Xu (1):
crypto: algif_skcipher - Load TX SG list after waiting
Johan Hovold (2):
USB: serial: mos7720: fix control-message error handling
USB: serial: mos7840: fix control-message error handling
Liping Zhang (2):
netfilter: invoke synchronize_rcu after set the _hook_ to NULL
netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max
Myungho Jung (1):
net: core: Prevent from dereferencing null pointer when releasing SKB
Niklas Söderlund (1):
sh_eth: use correct name for ECMR_MPDE bit
Pan Bian (1):
team: fix memory leaks
Paul Burton (1):
MIPS: Ensure bss section ends on a long-aligned address
Peng Fan (1):
staging: nvec: remove duplicated const
Richard Guy Briggs (1):
audit: log 32-bit socketcalls
Roman Spychała (1):
usb: plusb: Add support for PL-27A1
Santosh Shilimkar (1):
RDS: RDMA: Fix the composite message user notification
Shaohua Li (1):
md/raid10: submit bio directly to replacement disk
Thibault Saunier (1):
exynos-gsc: Do not swap cb/cr for semi planar formats
Zhu Yanjun (1):
rds: ib: add error handle
Greg KH
maintainerDocumentation/devicetree/bindings/display/bridge/ti,ths8135.txt new file +46 -0
@@ -0,0 +1,46 @@ +THS8135 Video DAC +----------------- + +This is the binding for Texas Instruments THS8135 Video DAC bridge. + +Required properties: + +- compatible: Must be "ti,ths8135" + +Required nodes: + +This device has two video ports. Their connections are modelled using the OF +graph bindings specified in Documentation/devicetree/bindings/graph.txt. + +- Video port 0 for RGB input +- Video port 1 for VGA output + +Example +------- + +vga-bridge { + compatible = "ti,ths8135"; + #address-cells = <1>; + #size-cells = <0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <&lcdc_out_vga>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <&vga_con_in>; + }; + }; + }; +};
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 73 +SUBLEVEL = 74 EXTRAVERSION = NAME = Diseased Newt
arch/arm/Kconfig-nommu +1 -2
@@ -34,8 +34,7 @@ config PROCESSOR_ID used instead of the auto-probing which utilizes the register. config REMAP_VECTORS_TO_RAM - bool 'Install vectors to the beginning of RAM' if DRAM_BASE - depends on DRAM_BASE + bool 'Install vectors to the beginning of RAM' help The kernel needs to change the hardware exception vectors. In nommu mode, the hardware exception vectors are normally
arch/mips/kernel/vmlinux.lds.S +1 -1
@@ -141,7 +141,7 @@ SECTIONS * Force .bss to 64K alignment so that .bss..swapper_pg_dir * gets that alignment. .sbss should be empty, so there will be * no holes after __init_end. */ - BSS_SECTION(0, 0x10000, 0) + BSS_SECTION(0, 0x10000, 8) _end = . ;
arch/parisc/kernel/perf.c +49 -45
281 lines not on this page · raw message
block/partitions/efi.c +12 -5
@@ -293,7 +293,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,if (!gpt)return NULL ; - count =le32_to_cpu (gpt->num_partition_entries) * + count = (size_t )le32_to_cpu (gpt->num_partition_entries) *le32_to_cpu (gpt->sizeof_partition_entry);if (!count)return NULL ;
@@ -352,7 +352,7 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, gpt_header **gpt, gpt_entry **ptes) {u32 crc, origcrc; -u64 lastlba; +u64 lastlba, pt_size;if (!ptes)return 0 ;
@@ -434,13 +434,20 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba, goto fail; } +/* Sanity check partition table size */ + pt_size = (u64 )le32_to_cpu ((*gpt)->num_partition_entries) * +le32_to_cpu ((*gpt)->sizeof_partition_entry); +if (pt_size >KMALLOC_MAX_SIZE ) { +pr_debug ("GUID Partition Table is too large: %llu > %lu bytes\n" , + (unsigned long long )pt_size,KMALLOC_MAX_SIZE ); + goto fail; + } +if (!(*ptes =alloc_read_gpt_entries (state, *gpt))) goto fail;/* Check the GUID Partition Entry Array CRC */ - crc =efi_crc32 ((const unsigned char *) (*ptes), -le32_to_cpu ((*gpt)->num_partition_entries) * -le32_to_cpu ((*gpt)->sizeof_partition_entry)); + crc =efi_crc32 ((const unsigned char *) (*ptes), pt_size);if (crc !=le32_to_cpu ((*gpt)->partition_entry_array_crc32)) {pr_debug ("GUID Partitition Entry Array CRC check failed.\n" );
crypto/algif_skcipher.c +7 -7
@@ -448,13 +448,6 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,char __user *from = iov->iov_base;while (seglen) { - sgl =list_first_entry (&ctx->tsgl, - struct skcipher_sg_list, list); - sg = sgl->sg; - -while (!sg->length) - sg++; - used = ctx->used;if (!used) { err =skcipher_wait_for_data (sk, flags);
@@ -476,6 +469,13 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,if (!used) goto free; + sgl =list_first_entry (&ctx->tsgl, + struct skcipher_sg_list, list); + sg = sgl->sg; + +while (!sg->length) + sg++; +ablkcipher_request_set_crypt (&ctx->req, sg, ctx->rsgl.sg, used, ctx->iv);
drivers/ata/libata-transport.c +3 -6
@@ -223,7 +223,6 @@ static DECLARE_TRANSPORT_CLASS(ata_port_class,static void ata_tport_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -283,7 +282,7 @@ int ata_tport_add(struct device *parent,device_initialize (dev); dev->type = &ata_port_type; - dev->parent =get_device (parent); + dev->parent = parent; dev->release = ata_tport_release;dev_set_name (dev,"ata%d" , ap->print_id);transport_setup_device (dev);
@@ -347,7 +346,6 @@ static DECLARE_TRANSPORT_CLASS(ata_link_class,static void ata_tlink_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -409,7 +407,7 @@ int ata_tlink_add(struct ata_link *link)int error;device_initialize (dev); - dev->parent =get_device (&ap->tdev); + dev->parent = &ap->tdev; dev->release = ata_tlink_release;if (ata_is_host_link (link))dev_set_name (dev,"link%d" , ap->print_id);
@@ -587,7 +585,6 @@ static DECLARE_TRANSPORT_CLASS(ata_dev_class,static void ata_tdev_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -660,7 +657,7 @@ static int ata_tdev_add(struct ata_device *ata_dev)int error;device_initialize (dev); - dev->parent =get_device (&link->tdev); + dev->parent = &link->tdev; dev->release = ata_tdev_release;if (ata_is_host_link (link))dev_set_name (dev,"dev%d.%d" , ap->print_id,ata_dev->devno);
drivers/hwmon/gl520sm.c +16 -9
@@ -208,11 +208,13 @@ static ssize_t get_cpu_vid(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR(cpu0_vid, S_IRUGO, get_cpu_vid, NULL); -#define VDD_FROM_REG (val) (((val) * 95 + 2) / 4) -#define VDD_TO_REG (val) clamp_val((((val) * 4 + 47) / 95), 0, 255) +#define VDD_FROM_REG (val) DIV_ROUND_CLOSEST((val) * 95, 4) +#define VDD_CLAMP (val) clamp_val(val, 0, 255 * 95 / 4) +#define VDD_TO_REG (val) DIV_ROUND_CLOSEST(VDD_CLAMP(val) * 4, 95) -#define IN_FROM_REG (val) ((val) * 19) -#define IN_TO_REG (val) clamp_val((((val) + 9) / 19), 0, 255) +#define IN_FROM_REG (val) ((val) * 19) +#define IN_CLAMP (val) clamp_val(val, 0, 255 * 19) +#define IN_TO_REG (val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19)static ssize_t get_in_input (struct device *dev,struct device_attribute *attr,char *buf)
@@ -349,8 +351,13 @@ static SENSOR_DEVICE_ATTR(in4_max, S_IRUGO | S_IWUSR,#define DIV_FROM_REG (val) (1 << (val))#define FAN_FROM_REG (val, div) ((val) == 0 ? 0 : (480000 / ((val) << (div)))) -#define FAN_TO_REG (val, div) ((val) <= 0 ? 0 : \ - clamp_val((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255)) + +#define FAN_BASE (div) (480000 >> (div)) +#define FAN_CLAMP (val, div) clamp_val(val, FAN_BASE(div) / 255, \ + FAN_BASE(div)) +#define FAN_TO_REG (val, div) ((val) == 0 ? 0 : \ + DIV_ROUND_CLOSEST(480000, \ + FAN_CLAMP(val, div) << (div)))static ssize_t get_fan_input (struct device *dev,struct device_attribute *attr,char *buf)
@@ -513,9 +520,9 @@ static SENSOR_DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR, static DEVICE_ATTR(fan1_off, S_IRUGO | S_IWUSR, get_fan_off, set_fan_off); -#define TEMP_FROM_REG (val) (((val) - 130) * 1000) -#define TEMP_TO_REG (val) clamp_val(((((val) < 0 ? \ - (val) - 500 : (val) + 500) / 1000) + 130), 0, 255) +#define TEMP_FROM_REG (val) (((val) - 130) * 1000) +#define TEMP_CLAMP (val) clamp_val(val, -130000, 125000) +#define TEMP_TO_REG (val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 130)static ssize_t get_temp_input (struct device *dev,struct device_attribute *attr,char *buf)
drivers/infiniband/hw/qib/qib_iba7322.c +1 -1
@@ -7078,7 +7078,7 @@ static void qib_7322_txchk_change(struct qib_devdata *dd, u32 start,unsigned long flags;while (wait) { -unsigned long shadow; +unsigned long shadow =0 ;int cstart, previ =-1 ;/*
drivers/infiniband/ulp/ipoib/ipoib_main.c +4 -4
@@ -958,7 +958,7 @@ static void __ipoib_reap_neigh(struct ipoib_dev_priv *priv)rcu_dereference_protected (neigh->hnext, lockdep_is_held(&priv->lock)));/* remove from path/mc list */ -list_del (&neigh->list); +list_del_init (&neigh->list);call_rcu (&neigh->rcu, ipoib_neigh_reclaim); }else { np = &neigh->hnext;
@@ -1121,7 +1121,7 @@ void ipoib_neigh_free(struct ipoib_neigh *neigh)rcu_dereference_protected (neigh->hnext, lockdep_is_held(&priv->lock)));/* remove from parent list */ -list_del (&neigh->list); +list_del_init (&neigh->list);call_rcu (&neigh->rcu, ipoib_neigh_reclaim);return ; }else {
@@ -1206,7 +1206,7 @@ void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid)rcu_dereference_protected (neigh->hnext, lockdep_is_held(&priv->lock)));/* remove from parent list */ -list_del (&neigh->list); +list_del_init (&neigh->list);call_rcu (&neigh->rcu, ipoib_neigh_reclaim); }else { np = &neigh->hnext;
@@ -1248,7 +1248,7 @@ static void ipoib_flush_neighs(struct ipoib_dev_priv *priv)rcu_dereference_protected (neigh->hnext, lockdep_is_held(&priv->lock)));/* remove from path/mc list */ -list_del (&neigh->list); +list_del_init (&neigh->list);call_rcu (&neigh->rcu, ipoib_neigh_reclaim); } }
drivers/infiniband/ulp/ipoib/ipoib_vlan.c +7 -3
@@ -162,11 +162,11 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) out:up_write (&ppriv->vlan_rwsem); +rtnl_unlock (); +if (result)free_netdev (priv->dev); -rtnl_unlock (); -return result; }
@@ -187,7 +187,6 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)list_for_each_entry_safe (priv, tpriv, &ppriv->child_intfs, list) {if (priv->pkey == pkey && priv->child_type ==IPOIB_LEGACY_CHILD ) { -unregister_netdevice (priv->dev);list_del (&priv->list); dev = priv->dev;break ;
@@ -195,6 +194,11 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey) }up_write (&ppriv->vlan_rwsem); +if (dev) { +ipoib_dbg (ppriv,"delete child vlan %s\n" , dev->name); +unregister_netdevice (dev); + } +rtnl_unlock ();if (dev) {
drivers/md/raid10.c +16 -3
@@ -1514,11 +1514,24 @@ retry_write: mbio->bi_private = r10_bio;atomic_inc (&r10_bio->remaining); + + cb =blk_check_plugged (raid10_unplug, mddev, +sizeof (*plug)); +if (cb) + plug = container_of(cb, struct raid10_plug_cb, + cb); +else + plug =NULL ;spin_lock_irqsave (&conf->device_lock, flags); -bio_list_add (&conf->pending_bio_list, mbio); - conf->pending_count++; +if (plug) { +bio_list_add (&plug->pending, mbio); + plug->pending_cnt++; + }else { +bio_list_add (&conf->pending_bio_list, mbio); + conf->pending_count++; + }spin_unlock_irqrestore (&conf->device_lock, flags); -if (!mddev_check_plugged (mddev)) +if (!plug)md_wakeup_thread (mddev->thread); } }
drivers/media/pci/ttpci/av7110_hw.c +4 -4
@@ -56,11 +56,11 @@by Nathan Laredo <[email protected]> */ int av7110_debiwrite (struct av7110 *av7110,u32 config, -int addr,u32 val,int count) +int addr,u32 val,unsigned int count) {struct saa7146_dev *dev = av7110->dev; -if (count <=0 || count >32764 ) { +if (count >32764 ) {printk ("%s: invalid count %d\n" , __func__, count);return -1 ; }
@@ -78,12 +78,12 @@ int av7110_debiwrite(struct av7110 *av7110, u32 config,return 0 ; } -u32 av7110_debiread (struct av7110 *av7110,u32 config,int addr,int count) +u32 av7110_debiread (struct av7110 *av7110,u32 config,int addr,unsigned int count) {struct saa7146_dev *dev = av7110->dev;u32 result =0 ; -if (count >32764 || count <=0 ) { +if (count >32764 ) {printk ("%s: invalid count %d\n" , __func__, count);return 0 ; }
drivers/media/pci/ttpci/av7110_hw.h +6 -6
@@ -377,14 +377,14 @@ extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,/* DEBI (saa7146 data extension bus interface) access */ extern int av7110_debiwrite (struct av7110 *av7110,u32 config, -int addr,u32 val,int count); +int addr,u32 val,unsigned int count);extern u32 av7110_debiread (struct av7110 *av7110,u32 config, -int addr,int count); +int addr,unsigned int count);/* DEBI during interrupt */ /* single word writes */ -static inline void iwdebi (struct av7110 *av7110,u32 config,int addr,u32 val,int count) +static inline void iwdebi (struct av7110 *av7110,u32 config,int addr,u32 val,unsigned int count) {av7110_debiwrite (av7110, config, addr, val, count); }
@@ -397,7 +397,7 @@ static inline void mwdebi(struct av7110 *av7110, u32 config, int addr,av7110_debiwrite (av7110, config, addr,0 , count); } -static inline u32 irdebi (struct av7110 *av7110,u32 config,int addr,u32 val,int count) +static inline u32 irdebi (struct av7110 *av7110,u32 config,int addr,u32 val,unsigned int count) {u32 res;
@@ -408,7 +408,7 @@ static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, i }/* DEBI outside interrupts, only for count <= 4! */ -static inline void wdebi (struct av7110 *av7110,u32 config,int addr,u32 val,int count) +static inline void wdebi (struct av7110 *av7110,u32 config,int addr,u32 val,unsigned int count) {unsigned long flags;
@@ -417,7 +417,7 @@ static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, ispin_unlock_irqrestore (&av7110->debilock, flags); } -static inline u32 rdebi (struct av7110 *av7110,u32 config,int addr,u32 val,int count) +static inline u32 rdebi (struct av7110 *av7110,u32 config,int addr,u32 val,unsigned int count) {unsigned long flags;u32 res;
drivers/media/platform/exynos-gsc/gsc-core.c +0 -2
@@ -846,9 +846,7 @@ int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,if ((frame->fmt->pixelformat ==V4L2_PIX_FMT_VYUY ) || (frame->fmt->pixelformat ==V4L2_PIX_FMT_YVYU ) || - (frame->fmt->pixelformat ==V4L2_PIX_FMT_NV61 ) || (frame->fmt->pixelformat ==V4L2_PIX_FMT_YVU420 ) || - (frame->fmt->pixelformat ==V4L2_PIX_FMT_NV21 ) || (frame->fmt->pixelformat ==V4L2_PIX_FMT_YVU420M ))swap (addr->cb, addr->cr);
drivers/mmc/core/sdio_bus.c +11 -1
@@ -265,7 +265,7 @@ static void sdio_release_func(struct device *dev)sdio_free_func_cis (func);kfree (func->info); - +kfree (func->tmpbuf);kfree (func); }
@@ -280,6 +280,16 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)if (!func)return ERR_PTR (-ENOMEM ); +/* +* allocate buffer separately to make sure it's properly aligned for +* DMA usage (incl. 64 bit DMA) +*/ + func->tmpbuf =kmalloc (4 ,GFP_KERNEL ); +if (!func->tmpbuf) { +kfree (func); +return ERR_PTR (-ENOMEM ); + } + func->card = card;device_initialize (&func->dev);
drivers/net/ethernet/renesas/sh_eth.h +1 -1
@@ -326,7 +326,7 @@ enum FELIC_MODE_BIT {ECMR_DPAD =0x00200000 ,ECMR_RZPF =0x00100000 ,ECMR_ZPF =0x00080000 ,ECMR_PFR =0x00040000 ,ECMR_RXF =0x00020000 ,ECMR_TXF =0x00010000 ,ECMR_MCT =0x00002000 ,ECMR_PRCEF =0x00001000 , -ECMR_PMDE =0x00000200 ,ECMR_RE =0x00000040 ,ECMR_TE =0x00000020 , +ECMR_MPDE =0x00000200 ,ECMR_RE =0x00000040 ,ECMR_TE =0x00000020 ,ECMR_RTM =0x00000010 ,ECMR_ILB =0x00000008 ,ECMR_ELB =0x00000004 , ECMR_DM = 0x00000002, ECMR_PRM = 0x00000001, };
drivers/net/team/team.c +6 -2
@@ -2331,8 +2331,10 @@ start_again: hdr =genlmsg_put (skb, portid, seq, &team_nl_family, flags |NLM_F_MULTI ,TEAM_CMD_OPTIONS_GET ); -if (!hdr) +if (!hdr) { +nlmsg_free (skb);return -EMSGSIZE ; + }if (nla_put_u32 (skb,TEAM_ATTR_TEAM_IFINDEX , team->dev->ifindex)) goto nla_put_failure;
@@ -2599,8 +2601,10 @@ start_again: hdr =genlmsg_put (skb, portid, seq, &team_nl_family, flags |NLM_F_MULTI ,TEAM_CMD_PORT_LIST_GET ); -if (!hdr) +if (!hdr) { +nlmsg_free (skb);return -EMSGSIZE ; + }if (nla_put_u32 (skb,TEAM_ATTR_TEAM_IFINDEX , team->dev->ifindex)) goto nla_put_failure;
drivers/net/usb/Kconfig +1 -1
@@ -350,7 +350,7 @@ config USB_NET_NET1080 optionally with LEDs that indicate traffic config USB_NET_PLUSB - tristate "Prolific PL-2301/2302/25A1 based cables" + tristate "Prolific PL-2301/2302/25A1/27A1 based cables" # if the handshake/init/reset problems, from original 'plusb', # are ever resolved ... then remove "experimental" depends on USB_USBNET
drivers/net/usb/plusb.c +13 -2
@@ -102,7 +102,7 @@ static int pl_reset(struct usbnet *dev) }static const struct driver_info prolific_info = { - .description ="Prolific PL-2301/PL-2302/PL-25A1" , + .description ="Prolific PL-2301/PL-2302/PL-25A1/PL-27A1" , .flags =FLAG_POINTTOPOINT |FLAG_NO_SETINT ,/* some PL-2302 versions seem to fail usb_set_interface() */ .reset = pl_reset,
@@ -139,6 +139,17 @@ static const struct usb_device_id products [] = {* Host-to-Host Cable */ .driver_info = (unsigned long) &prolific_info, + +}, + +/* super speed cables */ +{ + USB_DEVICE(0x067b, 0x27a1), /* PL-27A1, no eeprom +* also: goobay Active USB 3.0 +* Data Link, +* Unitek Y-3501 +*/ + .driver_info = (unsigned long) &prolific_info, }, { }, // END
@@ -158,5 +169,5 @@ static struct usb_driver plusb_driver = {module_usb_driver (plusb_driver);MODULE_AUTHOR ("David Brownell" ); -MODULE_DESCRIPTION ("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver" ); +MODULE_DESCRIPTION ("Prolific PL-2301/2302/25A1/27A1 USB Host to Host Link Driver" );MODULE_LICENSE ("GPL" );
drivers/staging/nvec/nvec_ps2.c +2 -2
@@ -165,8 +165,8 @@ static int nvec_mouse_resume(struct device *dev) }#endif -static const SIMPLE_DEV_PM_OPS(nvec_mouse_pm_ops, nvec_mouse_suspend, - nvec_mouse_resume); +static SIMPLE_DEV_PM_OPS(nvec_mouse_pm_ops, nvec_mouse_suspend, + nvec_mouse_resume);static struct platform_driver nvec_mouse_driver = { .probe = nvec_mouse_probe,
drivers/tty/goldfish.c +1 -1
@@ -295,7 +295,7 @@ static int goldfish_tty_probe(struct platform_device *pdev)tty_unregister_device (goldfish_tty_driver, i); err_tty_register_device_failed: -free_irq (irq, pdev); +free_irq (irq, qtty); err_request_irq_failed: goldfish_tty_current_line_count--;if (goldfish_tty_current_line_count ==0 )
drivers/usb/serial/mos7720.c +7 -2
@@ -236,11 +236,16 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum, status =usb_control_msg (usbdev, pipe, request, requesttype, value, index, buf,1 ,MOS_WDR_TIMEOUT ); -if (status ==1 ) +if (status ==1 ) { *data = *buf; -else if (status <0 ) + }else {dev_err (&usbdev->dev,"mos7720: usb_control_msg() failed: %d\n" , status); +if (status >=0 ) + status = -EIO ; + *data =0 ; + } +kfree (buf);return status;
drivers/usb/serial/mos7840.c +15 -4
@@ -285,9 +285,15 @@ static int mos7840_get_reg_sync(struct usb_serial_port *port, __u16 reg, ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ),MCS_RDREQ ,MCS_RD_RTYPE ,0 , reg, buf,VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); +if (ret <VENDOR_READ_LENGTH ) { +if (ret >=0 ) + ret = -EIO ; + goto out; + } + *val = buf[0 ];dev_dbg (&port->dev,"%s offset is %x, return val %x\n" , __func__, reg, *val); - +out:kfree (buf);return ret; }
@@ -353,8 +359,13 @@ static int mos7840_get_uart_reg(struct usb_serial_port *port, __u16 reg, ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ),MCS_RDREQ ,MCS_RD_RTYPE , Wval, reg, buf,VENDOR_READ_LENGTH ,MOS_WDR_TIMEOUT ); +if (ret <VENDOR_READ_LENGTH ) { +if (ret >=0 ) + ret = -EIO ; + goto out; + } *val = buf[0 ]; - +out:kfree (buf);return ret; }
@@ -1518,10 +1529,10 @@ static int mos7840_tiocmget(struct tty_struct *tty)return -ENODEV ; status =mos7840_get_uart_reg (port,MODEM_STATUS_REGISTER , &msr); -if (status !=1 ) +if (status <0 )return -EIO ; status =mos7840_get_uart_reg (port,MODEM_CONTROL_REGISTER , &mcr); -if (status !=1 ) +if (status <0 )return -EIO ; result = ((mcr &MCR_DTR ) ?TIOCM_DTR :0 ) | ((mcr &MCR_RTS ) ?TIOCM_RTS :0 )
fs/xfs/kmem.c +0 -18
@@ -24,24 +24,6 @@#include "kmem.h" #include "xfs_message.h" -/* -* Greedy allocation. May fail and may return vmalloced memory. -*/ -void * -kmem_zalloc_greedy (size_t *size,size_t minsize,size_t maxsize) -{ -void *ptr; -size_t kmsize = maxsize; - -while (!(ptr =vzalloc (kmsize))) { -if ((kmsize >>=1 ) <= minsize) - kmsize = minsize; - } -if (ptr) - *size = kmsize; -return ptr; -} -void *kmem_alloc (size_t size,xfs_km_flags_t flags) {
fs/xfs/kmem.h +0 -2
@@ -66,8 +66,6 @@ extern void *kmem_realloc(const void *, size_t, size_t, xfs_km_flags_t);extern void kmem_free (const void *); -extern void *kmem_zalloc_greedy (size_t *,size_t ,size_t ); -static inline void *kmem_zalloc (size_t size,xfs_km_flags_t flags) {
fs/xfs/xfs_itable.c +2 -4
@@ -356,7 +356,6 @@ xfs_bulkstat(xfs_agino_t agino;/* inode # in allocation group */ xfs_agnumber_t agno;/* allocation group number */ xfs_btree_cur_t *cur;/* btree cursor for ialloc btree */ -size_t irbsize;/* size of irec buffer in bytes */ xfs_inobt_rec_incore_t *irbuf;/* start of irec buffer */ int nirbuf;/* size of irbuf */ int ubcount;/* size of user's buffer */
@@ -383,11 +382,10 @@ xfs_bulkstat( *ubcountp =0 ; *done =0 ; - irbuf =kmem_zalloc_greedy (&irbsize,PAGE_SIZE ,PAGE_SIZE *4 ); + irbuf =kmem_zalloc_large (PAGE_SIZE *4 ,KM_SLEEP );if (!irbuf)return -ENOMEM ; - - nirbuf = irbsize /sizeof (*irbuf); + nirbuf = (PAGE_SIZE *4 ) /sizeof (*irbuf);/* * Loop over the allocation groups, starting from the last
include/linux/audit.h +20 -0
@@ -273,6 +273,20 @@ static inline int audit_socketcall(int nargs, unsigned long *args)return __audit_socketcall (nargs, args);return 0 ; } + +static inline int audit_socketcall_compat (int nargs,u32 *args) +{ +unsigned long a[AUDITSC_ARGS ]; +int i; + +if (audit_dummy_context ()) +return 0 ; + +for (i =0 ; i < nargs; i++) + a[i] = (unsigned long )args[i]; +return __audit_socketcall (nargs, a); +} +static inline int audit_sockaddr (int len,void *addr) {if (unlikely (!audit_dummy_context ()))
@@ -398,6 +412,12 @@ static inline int audit_socketcall(int nargs, unsigned long *args) {return 0 ; } + +static inline int audit_socketcall_compat (int nargs,u32 *args) +{ +return 0 ; +} +static inline void audit_fd_pair (int fd1,int fd2) { }static inline int audit_sockaddr (int len,void *addr)
include/linux/mmc/sdio_func.h +1 -1
@@ -53,7 +53,7 @@ struct sdio_func {unsigned int state;/* function state */ #define SDIO_STATE_PRESENT (1<<0)/* present in sysfs */ -u8 tmpbuf[4 ];/* DMA:able scratch buffer */ +u8 *tmpbuf;/* DMA:able scratch buffer */ unsigned num_info;/* number of info strings */ const char **info;/* info strings */
lib/mpi/mpi-pow.c +6 -1
@@ -64,8 +64,13 @@ int mpi_powm(MPI res, MPI base, MPI exp, MPI mod)if (!esize) {/* Exponent is zero, result is 1 mod MOD, i.e., 1 or 0 * depending on if MOD equals 1. */ - rp[0 ] =1 ; res->nlimbs = (msize ==1 && mod->d[0 ] ==1 ) ?0 :1 ; +if (res->nlimbs) { +if (mpi_resize (res,1 ) <0 ) + goto enomem; + rp = res->d; + rp[0 ] =1 ; + } res->sign =0 ; goto leave; }
net/compat.c +14 -3
@@ -22,6 +22,7 @@#include <linux/filter.h> #include <linux/compat.h> #include <linux/security.h> +#include <linux/audit.h> #include <linux/export.h> #include <net/scm.h>
@@ -796,14 +797,24 @@ COMPAT_SYSCALL_DEFINE5(recvmmsg, int, fd, struct compat_mmsghdr __user *, mmsg, COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args) { -int ret; -u32 a[6 ]; +u32 a[AUDITSC_ARGS ]; +unsigned int len;u32 a0, a1; +int ret;if (call <SYS_SOCKET || call >SYS_SENDMMSG )return -EINVAL ; -if (copy_from_user (a, args, nas[call])) + len = nas[call]; +if (len >sizeof (a)) +return -EINVAL ; + +if (copy_from_user (a, args, len))return -EFAULT ; + + ret =audit_socketcall_compat (len /sizeof (a[0 ]), a); +if (ret) +return ret; + a0 = a[0 ]; a1 = a[1 ];
net/core/dev.c +3 -0
@@ -2225,6 +2225,9 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason) {unsigned long flags; +if (unlikely (!skb)) +return ; +if (likely (atomic_read (&skb->users) ==1 )) {smp_rmb ();atomic_set (&skb->users,0 );
net/ipv4/netfilter/nf_nat_snmp_basic.c +1 -0
@@ -1304,6 +1304,7 @@ static int __init nf_nat_snmp_basic_init(void) static void __exit nf_nat_snmp_basic_fini(void) {RCU_INIT_POINTER (nf_nat_snmp_hook,NULL ); +synchronize_rcu ();nf_conntrack_helper_unregister (&snmp_trap_helper); }
net/netfilter/nf_conntrack_ecache.c +2 -0
@@ -200,6 +200,7 @@ void nf_conntrack_unregister_notifier(struct net *net,BUG_ON (notify != new);RCU_INIT_POINTER (net->ct.nf_conntrack_event_cb,NULL );mutex_unlock (&nf_ct_ecache_mutex); +/* synchronize_rcu() is called from ctnetlink_exit. */ }EXPORT_SYMBOL_GPL (nf_conntrack_unregister_notifier);
@@ -236,6 +237,7 @@ void nf_ct_expect_unregister_notifier(struct net *net,BUG_ON (notify != new);RCU_INIT_POINTER (net->ct.nf_expect_event_cb,NULL );mutex_unlock (&nf_ct_ecache_mutex); +/* synchronize_rcu() is called from ctnetlink_exit. */ }EXPORT_SYMBOL_GPL (nf_ct_expect_unregister_notifier);
net/netfilter/nf_conntrack_netlink.c +1 -0
@@ -3242,6 +3242,7 @@ static void __exit ctnetlink_exit(void)#ifdef CONFIG_NETFILTER_NETLINK_QUEUE_CT RCU_INIT_POINTER (nfq_ct_hook,NULL );#endif +synchronize_rcu (); }module_init (ctnetlink_init);
net/netfilter/nf_nat_core.c +2 -0
@@ -888,6 +888,8 @@ static void __exit nf_nat_cleanup(void)#ifdef CONFIG_XFRM RCU_INIT_POINTER (nf_nat_decode_session_hook,NULL );#endif +synchronize_rcu (); +for (i =0 ; i <NFPROTO_NUMPROTO ; i++)kfree (nf_nat_l4protos[i]);synchronize_net ();
net/netfilter/nfnetlink_cthelper.c +11 -9
@@ -161,6 +161,7 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,int i, ret;struct nf_conntrack_expect_policy *expect_policy;struct nlattr *tb[NFCTH_POLICY_SET_MAX +1 ]; +unsigned int class_max; ret =nla_parse_nested (tb,NFCTH_POLICY_SET_MAX , attr, nfnl_cthelper_expect_policy_set);
@@ -170,19 +171,18 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,if (!tb[NFCTH_POLICY_SET_NUM ])return -EINVAL ; - helper->expect_class_max = -ntohl (nla_get_be32 (tb[NFCTH_POLICY_SET_NUM ])); - -if (helper->expect_class_max !=0 && - helper->expect_class_max >NF_CT_MAX_EXPECT_CLASSES ) + class_max =ntohl (nla_get_be32 (tb[NFCTH_POLICY_SET_NUM ])); +if (class_max ==0 ) +return -EINVAL ; +if (class_max >NF_CT_MAX_EXPECT_CLASSES )return -EOVERFLOW ; expect_policy =kzalloc (sizeof (struct nf_conntrack_expect_policy ) * - helper->expect_class_max,GFP_KERNEL ); + class_max,GFP_KERNEL );if (expect_policy ==NULL )return -ENOMEM ; -for (i=0 ; i<helper->expect_class_max; i++) { +for (i =0 ; i < class_max; i++) {if (!tb[NFCTH_POLICY_SET +i]) goto err;
@@ -191,6 +191,8 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,if (ret <0 ) goto err; } + + helper->expect_class_max = class_max -1 ; helper->expect_policy = expect_policy;return 0 ; err:
@@ -377,10 +379,10 @@ nfnl_cthelper_dump_policy(struct sk_buff *skb, goto nla_put_failure;if (nla_put_be32 (skb,NFCTH_POLICY_SET_NUM , -htonl (helper->expect_class_max))) +htonl (helper->expect_class_max +1 ))) goto nla_put_failure; -for (i=0 ; i<helper->expect_class_max; i++) { +for (i =0 ; i < helper->expect_class_max +1 ; i++) { nest_parms2 =nla_nest_start (skb, (NFCTH_POLICY_SET +i) |NLA_F_NESTED );if (nest_parms2 ==NULL )
net/netfilter/nfnetlink_cttimeout.c +1 -0
@@ -578,6 +578,7 @@ static void __exit cttimeout_exit(void)#ifdef CONFIG_NF_CONNTRACK_TIMEOUT RCU_INIT_POINTER (nf_ct_timeout_find_get_hook,NULL );RCU_INIT_POINTER (nf_ct_timeout_put_hook,NULL ); +synchronize_rcu ();#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */ }
net/packet/af_packet.c +2 -0
@@ -3482,6 +3482,8 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,case PACKET_HDRLEN :if (len >sizeof (int )) len =sizeof (int ); +if (len <sizeof (int )) +return -EINVAL ;if (copy_from_user (&val, optval, len))return -EFAULT ;switch (val) {
net/rds/ib_cm.c +36 -11
112 lines not on this page · raw message
net/rds/ib_send.c +15 -10
@@ -102,16 +102,6 @@ static void rds_ib_send_complete(struct rds_message *rm,complete (rm, notify_status); } -static void rds_ib_send_unmap_data (struct rds_ib_connection *ic, -struct rm_data_op *op, -int wc_status) -{ -if (op->op_nents) -ib_dma_unmap_sg (ic->i_cm_id->device, - op->op_sg, op->op_nents, -DMA_TO_DEVICE ); -} -static void rds_ib_send_unmap_rdma (struct rds_ib_connection *ic,struct rm_rdma_op *op,int wc_status)
@@ -172,6 +162,21 @@ static void rds_ib_send_unmap_atomic(struct rds_ib_connection *ic,rds_ib_stats_inc (s_ib_atomic_fadd); } +static void rds_ib_send_unmap_data (struct rds_ib_connection *ic, +struct rm_data_op *op, +int wc_status) +{ + struct rds_message *rm = container_of(op, struct rds_message, data); + +if (op->op_nents) +ib_dma_unmap_sg (ic->i_cm_id->device, + op->op_sg, op->op_nents, +DMA_TO_DEVICE ); + +if (rm->rdma.op_active && rm->data.op_notify) +rds_ib_send_unmap_rdma (ic, &rm->rdma, wc_status); +} +/* * Unmap the resources associated with a struct send_work. *
net/rds/rdma.c +10 -0
@@ -625,6 +625,16 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, } op->op_notifier->n_user_token = args->user_token; op->op_notifier->n_status =RDS_RDMA_SUCCESS ; + +/* Enable rmda notification on data operation for composite +* rds messages and make sure notification is enabled only +* for the data operation which follows it so that application +* gets notified only after full message gets delivered. +*/ +if (rm->data.op_sg) { + rm->rdma.op_notify =0 ; + rm->data.op_notify = !!(args->flags &RDS_RDMA_NOTIFY_ME ); + } }/* The cookie contains the R_Key of the remote memory region, and
net/rds/rds.h +1 -0
@@ -360,6 +360,7 @@ struct rds_message { } rdma;struct rm_data_op {unsigned int op_active:1 ; +unsigned int op_notify:1 ;unsigned int op_nents;unsigned int op_count;struct scatterlist *op_sg;
net/rds/send.c +3 -1
@@ -425,12 +425,14 @@ void rds_rdma_send_complete(struct rds_message *rm, int status)struct rm_rdma_op *ro;struct rds_notifier *notifier;unsigned long flags; +unsigned int notify =0 ;spin_lock_irqsave (&rm->m_rs_lock, flags); + notify = rm->rdma.op_notify | rm->data.op_notify; ro = &rm->rdma;if (test_bit (RDS_MSG_ON_SOCK , &rm->m_flags) && - ro->op_active && ro->op_notify && ro->op_notifier) { + ro->op_active && notify && ro->op_notifier) { notifier = ro->op_notifier; rs = rm->m_rs;sock_hold (rds_rs_to_sk (rs));
sound/pci/au88x0/au88x0_core.c +3 -0
@@ -2273,6 +2273,9 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir, } else { int src[2], mix[2]; + if (nr_ch < 1) + return -EINVAL; + /* Get SRC and MIXER hardware resources. */ for (i = 0; i < nr_ch; i++) { if ((mix[i] =