Linux 4.4.91
Greg KH
maintainerI'm announcing the release of the 4.4.91 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:
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 ++++ Documentation/devicetree/bindings/iio/adc/avia-hx711.txt | 18 + Documentation/devicetree/bindings/vendor-prefixes.txt | 1 Makefile | 2 arch/arm/Kconfig-nommu | 3 arch/arm/boot/dts/r8a7790.dtsi | 12 - arch/arm/mach-at91/pm.c | 2 arch/arm/mach-bcm/bcm_kona_smc.c | 2 arch/arm/mach-cns3xxx/core.c | 2 arch/arm/mach-omap2/prm_common.c | 2 arch/arm/mach-omap2/vc.c | 2 arch/arm/mach-spear/time.c | 2 arch/mips/include/asm/irq.h | 15 + arch/mips/kernel/asm-offsets.c | 1 arch/mips/kernel/genex.S | 8 arch/mips/kernel/process.c | 56 ++++- arch/mips/kernel/vmlinux.lds.S | 2 arch/mips/lantiq/xway/sysctrl.c | 4 arch/mips/ralink/rt3883.c | 2 arch/parisc/kernel/perf.c | 94 +++++----- block/partitions/efi.c | 17 + drivers/ata/libata-transport.c | 9 drivers/extcon/extcon-axp288.c | 2 drivers/firmware/psci.c | 2 drivers/gpu/drm/amd/amdkfd/kfd_events.c | 4 drivers/hwmon/gl520sm.c | 25 +- drivers/i2c/busses/i2c-meson.c | 2 drivers/iio/adc/axp288_adc.c | 32 --- 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/iommu/io-pgtable-arm.c | 6 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/intel/igb/igb_main.c | 5 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/tty/goldfish.c | 2 drivers/usb/chipidea/otg.c | 17 + drivers/usb/serial/mos7720.c | 9 drivers/usb/serial/mos7840.c | 19 +- fs/gfs2/glock.c | 12 - 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 include/uapi/drm/drm_fourcc.h | 1 net/bridge/br_netlink.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 | 2 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 sound/soc/soc-dapm.c | 62 ++++++ sound/soc/soc-topology.c | 9 71 files changed, 559 insertions(+), 247 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
Andreas Klinger (1):
iio: adc: hx711: Add DT binding for avia,hx711
Arnd Bergmann (5):
MIPS: Lantiq: Fix another request_mem_region() return code check IB/qib: fix false-postive maybe-uninitialized warning
ARM: remove duplicate 'const' annotations'
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
Colin Ian King (1):
MIPS: ralink: Fix incorrect assignment on ralink_soc
Dan Carpenter (1):
GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next
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 4.4.91
Guenter Roeck (1):
hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes
Guilherme G Piccoli (1):
igb: re-assign hw address pointer on reset after PCI error
Gwendal Grignou (1):
libata: transport: Remove circular dependency at free time
Hans de Goede (2):
extcon: axp288: Use vbus-valid instead of -present to determine cable presence
iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications
Heiner Kallweit (2):
mmc: sdio: fix alignment issue in struct sdio_func
i2c: meson: fix wrong variable usage in meson_i2c_put_data
Ido Schimmel (1):
bridge: netlink: register netdevice before executing changelink
Jisheng Zhang (1):
drivers: firmware: psci: drop duplicate const from psci_of_match
Johan Hovold (2):
USB: serial: mos7720: fix control-message error handling
USB: serial: mos7840: fix control-message error handling
Kristian H. Kristensen (1):
drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define
Linus Walleij (2):
ASoC: dapm: handle probe deferrals
ASoC: dapm: fix some pointer error handling
Liping Zhang (2):
netfilter: invoke synchronize_rcu after set the _hook_ to NULL
netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max
Matt Redfearn (1):
MIPS: IRQ Stack: Unwind IRQ stack onto task stack
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
Oleksandr Tyshchenko (1):
iommu/io-pgtable-arm: Check for leaf entry before dereferencing it
Pan Bian (2):
drm/amdkfd: fix improper return value on error
team: fix memory leaks
Paul Burton (1):
MIPS: Ensure bss section ends on a long-aligned address
Peter Chen (1):
usb: chipidea: vbus event may exist before starting gadget
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
Simon Horman (1):
ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for msiof nodes
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>; + }; + }; + }; +};
Documentation/devicetree/bindings/iio/adc/avia-hx711.txt new file +18 -0
@@ -0,0 +1,18 @@ +* AVIA HX711 ADC chip for weight cells + Bit-banging driver + +Required properties: + - compatible: Should be "avia,hx711" + - sck-gpios: Definition of the GPIO for the clock + - dout-gpios: Definition of the GPIO for data-out + See Documentation/devicetree/bindings/gpio/gpio.txt + - avdd-supply: Definition of the regulator used as analog supply + +Example: +weight@0 { + compatible = "avia,hx711"; + sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + avdd-suppy = <&avdd>; +}; +
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -31,6 +31,7 @@ asahi-kasei Asahi Kasei Corp. atmel Atmel Corporation auo AU Optronics Corporation avago Avago Technologies +avia avia semiconductor avic Shanghai AVIC Optoelectronics Co., Ltd. axis Axis Communications AB bosch Bosch Sensortec GmbH
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 90 +SUBLEVEL = 91 EXTRAVERSION = NAME = Blurry Fish Butt
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/arm/boot/dts/r8a7790.dtsi +8 -4
@@ -1409,7 +1409,8 @@ }; msiof0: spi@e6e20000 { - compatible = "renesas,msiof-r8a7790"; + compatible = "renesas,msiof-r8a7790", + "renesas,rcar-gen2-msiof"; reg = <0 0xe6e20000 0 0x0064>; interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp0_clks R8A7790_CLK_MSIOF0>;
@@ -1422,7 +1423,8 @@ }; msiof1: spi@e6e10000 { - compatible = "renesas,msiof-r8a7790"; + compatible = "renesas,msiof-r8a7790", + "renesas,rcar-gen2-msiof"; reg = <0 0xe6e10000 0 0x0064>; interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp2_clks R8A7790_CLK_MSIOF1>;
@@ -1435,7 +1437,8 @@ }; msiof2: spi@e6e00000 { - compatible = "renesas,msiof-r8a7790"; + compatible = "renesas,msiof-r8a7790", + "renesas,rcar-gen2-msiof"; reg = <0 0xe6e00000 0 0x0064>; interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp2_clks R8A7790_CLK_MSIOF2>;
@@ -1448,7 +1451,8 @@ }; msiof3: spi@e6c90000 { - compatible = "renesas,msiof-r8a7790"; + compatible = "renesas,msiof-r8a7790", + "renesas,rcar-gen2-msiof"; reg = <0 0xe6c90000 0 0x0064>; interrupts = <0 159 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp2_clks R8A7790_CLK_MSIOF3>;
arch/arm/mach-at91/pm.c +1 -1
@@ -332,7 +332,7 @@ static void at91sam9_sdram_standby(void)at91_ramc_write (1 ,AT91_SDRAMC_LPR , saved_lpr1); } -static const struct of_device_id const ramc_ids[]__initconst = { +static const struct of_device_id ramc_ids[]__initconst = { { .compatible ="atmel,at91rm9200-sdramc" , .data = at91rm9200_standby }, { .compatible ="atmel,at91sam9260-sdramc" , .data = at91sam9_sdram_standby }, { .compatible ="atmel,at91sam9g45-ddramc" , .data = at91_ddr_standby },
arch/arm/mach-bcm/bcm_kona_smc.c +1 -1
@@ -33,7 +33,7 @@ struct bcm_kona_smc_data {unsigned result; }; -static const struct of_device_id const bcm_kona_smc_ids[]__initconst = { +static const struct of_device_id bcm_kona_smc_ids[]__initconst = { {.compatible ="brcm,kona-smc" }, {.compatible ="bcm,kona-smc" },/* deprecated name */ {},
arch/arm/mach-cns3xxx/core.c +1 -1
@@ -346,7 +346,7 @@ static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = { .power_off = csn3xxx_usb_power_off, }; -static const struct of_dev_auxdata const cns3xxx_auxdata[]__initconst = { +static const struct of_dev_auxdata cns3xxx_auxdata[]__initconst = { {"intel,usb-ehci" ,CNS3XXX_USB_BASE ,"ehci-platform" , &cns3xxx_usb_ehci_pdata }, {"intel,usb-ohci" ,CNS3XXX_USB_OHCI_BASE ,"ohci-platform" , &cns3xxx_usb_ohci_pdata }, {"cavium,cns3420-ahci" ,CNS3XXX_SATA2_BASE ,"ahci" ,NULL },
arch/arm/mach-omap2/prm_common.c +1 -1
@@ -706,7 +706,7 @@ static struct omap_prcm_init_data scrm_data __initdata = { };#endif -static const struct of_device_id const omap_prcm_dt_match_table[]__initconst = { +static const struct of_device_id omap_prcm_dt_match_table[]__initconst = { #ifdef CONFIG_SOC_AM33XX { .compatible ="ti,am3-prcm" , .data = &am3_prm_data }, #endif
arch/arm/mach-omap2/vc.c +1 -1
@@ -559,7 +559,7 @@ struct i2c_init_data {u8 hsscll_12; }; -static const struct i2c_init_data const omap4_i2c_timing_data[]__initconst = { +static const struct i2c_init_data omap4_i2c_timing_data[]__initconst = { { .load =50 , .loadbits =0x3 ,
arch/arm/mach-spear/time.c +1 -1
@@ -204,7 +204,7 @@ static void __init spear_clockevent_init(int irq)setup_irq (irq, &spear_timer_irq); } -static const struct of_device_id const timer_of_match[]__initconst = { +static const struct of_device_id timer_of_match[]__initconst = { { .compatible ="st,spear-timer" , }, { }, };
arch/mips/include/asm/irq.h +15 -0
@@ -18,9 +18,24 @@#include <irq.h> #define IRQ_STACK_SIZE THREAD_SIZE +#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long))extern void *irq_stack[NR_CPUS ]; +/* +* The highest address on the IRQ stack contains a dummy frame put down in +* genex.S (handle_int & except_vec_vi_handler) which is structured as follows: +* +* top ------------ +* | task sp | <- irq_stack[cpu] + IRQ_STACK_START +* ------------ +* | | <- First frame of IRQ context +* ------------ +* +* task sp holds a copy of the task stack pointer where the struct pt_regs +* from exception entry can be found. +*/ +static inline bool on_irq_stack (int cpu,unsigned long sp) {unsigned long low = (unsigned long )irq_stack[cpu];
arch/mips/kernel/asm-offsets.c +1 -0
@@ -102,6 +102,7 @@ void output_thread_info_defines(void)DEFINE (_THREAD_SIZE,THREAD_SIZE );DEFINE (_THREAD_MASK,THREAD_MASK );DEFINE (_IRQ_STACK_SIZE,IRQ_STACK_SIZE ); +DEFINE (_IRQ_STACK_START,IRQ_STACK_START );BLANK (); }
arch/mips/kernel/genex.S +6 -2
@@ -216,9 +216,11 @@ NESTED(handle_int, PT_SIZE, sp) beq t0, t1, 2f /* Switch to IRQ stack */ - li t1, _IRQ_STACK_SIZE + li t1, _IRQ_STACK_START PTR_ADD sp, t0, t1 + /* Save task's sp on IRQ stack so that unwinding can follow it */ + LONG_S s1, 0(sp) 2: jal plat_irq_dispatch
@@ -326,9 +328,11 @@ NESTED(except_vec_vi_handler, 0, sp) beq t0, t1, 2f /* Switch to IRQ stack */ - li t1, _IRQ_STACK_SIZE + li t1, _IRQ_STACK_START PTR_ADD sp, t0, t1 + /* Save task's sp on IRQ stack so that unwinding can follow it */ + LONG_S s1, 0(sp) 2: jalr v0
arch/mips/kernel/process.c +38 -18
77 lines not on this page · raw message
arch/mips/kernel/vmlinux.lds.S +1 -1
@@ -159,7 +159,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/mips/lantiq/xway/sysctrl.c +2 -2
@@ -469,8 +469,8 @@ void __init ltq_soc_init(void)panic ("Failed to load xbar nodes from devicetree" );if (of_address_to_resource (np_xbar,0 , &res_xbar))panic ("Failed to get xbar resources" ); -if (request_mem_region (res_xbar.start,resource_size (&res_xbar), - res_xbar.name) <0 ) +if (!request_mem_region (res_xbar.start,resource_size (&res_xbar), + res_xbar.name))panic ("Failed to get xbar resources" ); ltq_xbar_membase = ioremap_nocache(res_xbar.start,
arch/mips/ralink/rt3883.c +1 -1
@@ -144,5 +144,5 @@ void prom_soc_init(struct ralink_soc_info *soc_info) rt2880_pinmux_data = rt3883_pinmux_data; - ralink_soc ==RT3883_SOC ; + ralink_soc =RT3883_SOC ; }
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" );
drivers/ata/libata-transport.c +3 -6
@@ -224,7 +224,6 @@ static DECLARE_TRANSPORT_CLASS(ata_port_class,static void ata_tport_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -284,7 +283,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);
@@ -348,7 +347,6 @@ static DECLARE_TRANSPORT_CLASS(ata_link_class,static void ata_tlink_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -410,7 +408,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);
@@ -588,7 +586,6 @@ static DECLARE_TRANSPORT_CLASS(ata_dev_class,static void ata_tdev_release (struct device *dev) { -put_device (dev->parent); }/**
@@ -661,7 +658,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/extcon/extcon-axp288.c +1 -1
@@ -168,7 +168,7 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)return ret; } - vbus_attach = (pwr_stat &PS_STAT_VBUS_PRESENT ); + vbus_attach = (pwr_stat &PS_STAT_VBUS_VALID );if (!vbus_attach) goto notify_otg;
drivers/firmware/psci.c +1 -1
@@ -424,7 +424,7 @@ out_put_node:return err; } -static const struct of_device_id const psci_of_match[]__initconst = { +static const struct of_device_id psci_of_match[]__initconst = { { .compatible ="arm,psci" , .data = psci_0_1_init}, { .compatible ="arm,psci-0.2" , .data = psci_0_2_init}, { .compatible ="arm,psci-1.0" , .data = psci_0_2_init},
drivers/gpu/drm/amd/amdkfd/kfd_events.c +3 -1
@@ -739,8 +739,10 @@ int kfd_wait_on_events(struct kfd_process *p,struct kfd_event_data event_data;if (copy_from_user (&event_data, &events[i], -sizeof (struct kfd_event_data ))) +sizeof (struct kfd_event_data ))) { + ret = -EFAULT ; goto fail; + } ret =init_event_waiter (p, &event_waiters[i], event_data.event_id, i);
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/i2c/busses/i2c-meson.c +1 -1
@@ -175,7 +175,7 @@ static void meson_i2c_put_data(struct meson_i2c *i2c, char *buf, int len) wdata1 |= *buf++ << ((i -4 ) *8 );writel (wdata0, i2c->regs +REG_TOK_WDATA0 ); -writel (wdata0, i2c->regs +REG_TOK_WDATA1 ); +writel (wdata1, i2c->regs +REG_TOK_WDATA1 );dev_dbg (i2c->dev,"%s: data %08x %08x len %d\n" , __func__, wdata0, wdata1, len);
drivers/iio/adc/axp288_adc.c +1 -31
@@ -28,8 +28,6 @@#include <linux/iio/driver.h> #define AXP288_ADC_EN_MASK 0xF1 -#define AXP288_ADC_TS_PIN_GPADC 0xF2 -#define AXP288_ADC_TS_PIN_ON 0xF3enum axp288_adc_id {AXP288_ADC_TS ,
@@ -123,16 +121,6 @@ static int axp288_adc_read_channel(int *val, unsigned long address,return IIO_VAL_INT ; } -static int axp288_adc_set_ts (struct regmap *regmap,unsigned int mode, -unsigned long address) -{ -/* channels other than GPADC do not need to switch TS pin */ -if (address !=AXP288_GP_ADC_H ) -return 0 ; - -return regmap_write (regmap,AXP288_ADC_TS_PIN_CTRL , mode); -} -static int axp288_adc_read_raw (struct iio_dev *indio_dev,struct iio_chan_spec const *chan,int *val,int *val2,long mask)
@@ -143,16 +131,7 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,mutex_lock (&indio_dev->mlock);switch (mask) {case IIO_CHAN_INFO_RAW : -if (axp288_adc_set_ts (info->regmap,AXP288_ADC_TS_PIN_GPADC , - chan->address)) { -dev_err (&indio_dev->dev,"GPADC mode\n" ); - ret = -EINVAL ; -break ; - } ret =axp288_adc_read_channel (val, chan->address, info->regmap); -if (axp288_adc_set_ts (info->regmap,AXP288_ADC_TS_PIN_ON , - chan->address)) -dev_err (&indio_dev->dev,"TS pin restore\n" );break ;default : ret = -EINVAL ;
@@ -162,15 +141,6 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,return ret; } -static int axp288_adc_set_state (struct regmap *regmap) -{ -/* ADC should be always enabled for internal FG to function */ -if (regmap_write (regmap,AXP288_ADC_TS_PIN_CTRL ,AXP288_ADC_TS_PIN_ON )) -return -EIO ; - -return regmap_write (regmap,AXP20X_ADC_EN1 ,AXP288_ADC_EN_MASK ); -} -static const struct iio_info axp288_adc_iio_info = { .read_raw = &axp288_adc_read_raw, .driver_module =THIS_MODULE ,
@@ -199,7 +169,7 @@ static int axp288_adc_probe(struct platform_device *pdev)* Set ADC to enabled state at all time, including system suspend. * otherwise internal fuel gauge functionality may be affected. */ - ret =axp288_adc_set_state (axp20x->regmap); + ret =regmap_write (info->regmap,AXP20X_ADC_EN1 ,AXP288_ADC_EN_MASK );if (ret) {dev_err (&pdev->dev,"unable to enable ADC device\n" );return ret;
drivers/infiniband/hw/qib/qib_iba7322.c +1 -1
@@ -7097,7 +7097,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
@@ -1239,7 +1239,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;
@@ -1406,7 +1406,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 {
@@ -1491,7 +1491,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;
@@ -1533,7 +1533,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
@@ -160,11 +160,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; }
@@ -185,7 +185,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 ;
@@ -193,6 +192,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/iommu/io-pgtable-arm.c +5 -1
@@ -335,8 +335,12 @@ static int __arm_lpae_map(struct arm_lpae_io_pgtable *data, unsigned long iova,if (cfg->quirks &IO_PGTABLE_QUIRK_ARM_NS ) pte |=ARM_LPAE_PTE_NSTABLE ;__arm_lpae_set_pte (ptep, pte, cfg); - }else { + }else if (!iopte_leaf (pte, lvl)) { cptep =iopte_deref (pte, data); + }else { +/* We require an unmap first */ +WARN_ON (!selftest_running); +return -EEXIST ; }/* Rinse, repeat */
drivers/md/raid10.c +16 -3
@@ -1414,11 +1414,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
@@ -849,9 +849,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
@@ -266,7 +266,7 @@ static void sdio_release_func(struct device *dev)sdio_free_func_cis (func);kfree (func->info); - +kfree (func->tmpbuf);kfree (func); }
@@ -281,6 +281,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/intel/igb/igb_main.c +5 -0
@@ -7658,6 +7658,11 @@ static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev)pci_enable_wake (pdev, PCI_D3hot,0 );pci_enable_wake (pdev, PCI_D3cold,0 ); +/* In case of PCI error, adapter lose its HW address +* so we should re-assign it here. +*/ + hw->hw_addr = adapter->io_addr; +igb_reset (adapter);wr32 (E1000_WUS , ~0 ); result =PCI_ERS_RESULT_RECOVERED ;
drivers/net/ethernet/renesas/sh_eth.h +1 -1
@@ -339,7 +339,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
@@ -2343,8 +2343,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;
@@ -2611,8 +2613,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
@@ -364,7 +364,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/tty/goldfish.c +1 -1
@@ -293,7 +293,7 @@ static int goldfish_tty_probe(struct platform_device *pdev)return 0 ; 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/chipidea/otg.c +12 -5
@@ -134,9 +134,9 @@ void ci_handle_vbus_change(struct ci_hdrc *ci)if (!ci->is_otg)return ; -if (hw_read_otgsc (ci,OTGSC_BSV )) +if (hw_read_otgsc (ci,OTGSC_BSV ) && !ci->vbus_active)usb_gadget_vbus_connect (&ci->gadget); -else +else if (!hw_read_otgsc (ci,OTGSC_BSV ) && ci->vbus_active)usb_gadget_vbus_disconnect (&ci->gadget); }
@@ -175,14 +175,21 @@ static void ci_handle_id_switch(struct ci_hdrc *ci)ci_role_stop (ci); -if (role ==CI_ROLE_GADGET ) +if (role ==CI_ROLE_GADGET && +IS_ERR (ci->platdata->vbus_extcon.edev))/* -* wait vbus lower than OTGSC_BSV before connecting -* to host +* Wait vbus lower than OTGSC_BSV before connecting +* to host. If connecting status is from an external +* connector instead of register, we don't need to +* care vbus on the board, since it will not affect +* external connector status. */ hw_wait_vbus_lower_bsv (ci);ci_role_start (ci, role); +/* vbus change may have already occurred */ +if (role ==CI_ROLE_GADGET ) +ci_handle_vbus_change (ci); } }/**
drivers/usb/serial/mos7720.c +7 -2
@@ -234,11 +234,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; }
@@ -1490,10 +1501,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/gfs2/glock.c +7 -5
@@ -1798,16 +1798,18 @@ void gfs2_glock_exit(void)static void gfs2_glock_iter_next (struct gfs2_glock_iter *gi) { -do { - gi->gl =rhashtable_walk_next (&gi->hti); +while ((gi->gl =rhashtable_walk_next (&gi->hti))) {if (IS_ERR (gi->gl)) {if (PTR_ERR (gi->gl) == -EAGAIN )continue ; gi->gl =NULL ; +return ; } -/* Skip entries for other sb and dead entries */ - }while ((gi->gl) && ((gi->sdp != gi->gl->gl_name.ln_sbd) || -__lockref_is_dead (&gi->gl->gl_lockref))); +/* Skip entries for other sb and dead entries */ +if (gi->sdp == gi->gl->gl_name.ln_sbd && + !__lockref_is_dead (&gi->gl->gl_lockref)) +return ; + } }static void *gfs2_glock_seq_start (struct seq_file *seq,loff_t *pos)
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
@@ -69,8 +69,6 @@ static inline void kmem_free(const void *ptr) } -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
@@ -351,7 +351,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 */
@@ -378,11 +377,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
@@ -281,6 +281,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 ()))
@@ -407,6 +421,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 */
include/uapi/drm/drm_fourcc.h +1 -0
@@ -150,6 +150,7 @@/* Vendor Ids: */ #define DRM_FORMAT_MOD_NONE 0 +#define DRM_FORMAT_MOD_VENDOR_NONE 0#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01#define DRM_FORMAT_MOD_VENDOR_AMD 0x02#define DRM_FORMAT_MOD_VENDOR_NV 0x03
net/bridge/br_netlink.c +5 -2
@@ -1073,11 +1073,14 @@ static int br_dev_newlink(struct net *src_net, struct net_device *dev,spin_unlock_bh (&br->lock); } - err =br_changelink (dev, tb, data); + err =register_netdevice (dev);if (err)return err; -return register_netdevice (dev); + err =br_changelink (dev, tb, data); +if (err) +unregister_netdevice (dev); +return err; }static size_t br_get_size (const struct net_device *brdev)
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>
@@ -767,14 +768,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
@@ -2338,6 +2338,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
@@ -3415,6 +3415,7 @@ static void __exit ctnetlink_exit(void)#ifdef CONFIG_NETFILTER_NETLINK_GLUE_CT RCU_INIT_POINTER (nfnl_ct_hook,NULL );#endif +synchronize_rcu (); }module_init (ctnetlink_init);
net/netfilter/nf_nat_core.c +2 -0
@@ -892,6 +892,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 -1
@@ -611,8 +611,8 @@ 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 */ -rcu_barrier (); }module_init (cttimeout_init);
net/packet/af_packet.c +2 -0
@@ -3802,6 +3802,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
@@ -68,16 +68,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)
@@ -138,6 +128,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
@@ -626,6 +626,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
@@ -378,6 +378,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;unsigned int op_dmasg;
net/rds/send.c +3 -1
@@ -467,12 +467,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
@@ -2279,6 +2279,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] =
sound/soc/soc-dapm.c +62 -0
121 lines not on this page · raw message
sound/soc/soc-topology.c +9 -0
@@ -1481,6 +1481,15 @@ widget: widget =snd_soc_dapm_new_control (dapm, &template); else widget =snd_soc_dapm_new_control_unlocked (dapm, &template); +if (IS_ERR (widget)) { + ret =PTR_ERR (widget); +/* Do not nag about probe deferrals */ +if (ret != -EPROBE_DEFER ) +dev_err (tplg->dev, +"ASoC: failed to create widget %s controls (%d)\n" , + w->name, ret); + goto hdr_err; + }if (widget ==NULL ) {dev_err (tplg->dev,"ASoC: failed to create widget %s controls\n" , w->name);