Linux 3.18.123
Greg KH
maintainerI'm announcing the release of the 3.18.123 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
------------
Makefile | 2 - arch/arm/mach-hisi/hotplug.c | 33 +++++++++++------ arch/mips/ath79/setup.c | 1 arch/mips/include/asm/io.h | 8 ++-- arch/mips/include/asm/mach-ath79/ath79.h | 1 arch/mips/kernel/process.c | 1 arch/mips/loongson/common/cs5536/cs5536_ohci.c | 2 - arch/mips/mm/c-r4k.c | 6 ++- arch/openrisc/kernel/process.c | 2 - arch/powerpc/platforms/powernv/opal.c | 2 - arch/powerpc/platforms/pseries/ras.c | 2 - arch/powerpc/sysdev/mpic_msgr.c | 2 - arch/x86/mm/fault.c | 2 - block/cfq-iosched.c | 3 + block/partitions/aix.c | 13 ++++-- drivers/ata/libahci.c | 2 + drivers/bluetooth/Kconfig | 1 drivers/gpio/gpio-ml-ioh.c | 3 + drivers/gpu/drm/panel/panel-s6e8aa0.c | 2 - drivers/i2c/busses/i2c-xiic.c | 4 ++ drivers/infiniband/core/cma.c | 12 +++--- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 + drivers/macintosh/via-pmu.c | 9 ++-- drivers/md/dm-kcopyd.c | 2 + drivers/md/raid5.c | 6 +++ drivers/mfd/sm501.c | 1 drivers/mfd/ti_am335x_tscadc.c | 3 - drivers/mtd/maps/solutionengine.c | 6 +-- drivers/mtd/mtdchar.c | 10 +++-- drivers/net/ethernet/cisco/enic/enic_main.c | 2 - drivers/net/ethernet/marvell/mvneta.c | 1 drivers/net/wireless/ath/ath10k/mac.c | 7 +++ drivers/net/xen-netfront.c | 24 +++++------- drivers/parport/parport_sunbpp.c | 8 +++- drivers/pci/host/pci-mvebu.c | 2 - drivers/platform/x86/asus-nb-wmi.c | 1 drivers/platform/x86/toshiba_acpi.c | 3 + drivers/rtc/rtc-bq4802.c | 4 ++ drivers/s390/block/dasd_eckd.c | 7 ++- drivers/s390/net/qeth_core_main.c | 3 + drivers/s390/net/qeth_core_sys.c | 1 drivers/scsi/3w-9xxx.c | 6 ++- drivers/scsi/3w-sas.c | 3 + drivers/scsi/3w-xxxx.c | 2 + drivers/scsi/aic94xx/aic94xx_init.c | 4 +- drivers/staging/comedi/drivers/ni_mio_common.c | 3 + drivers/staging/rts5208/rtsx_scsi.c | 2 - drivers/staging/rts5208/xd.c | 2 - drivers/target/target_core_transport.c | 5 +- drivers/tty/rocket.c | 2 - drivers/uio/uio.c | 3 - drivers/usb/class/cdc-wdm.c | 2 - drivers/usb/core/hcd-pci.c | 2 - drivers/usb/core/message.c | 11 +++++ drivers/usb/core/quirks.c | 3 + drivers/usb/host/u132-hcd.c | 2 - drivers/usb/host/xhci.c | 3 + drivers/usb/misc/uss720.c | 4 +- drivers/usb/misc/yurex.c | 5 +- drivers/usb/serial/io_ti.h | 2 - drivers/usb/serial/ti_usb_3410_5052.h | 2 - drivers/usb/storage/scsiglue.c | 9 ++++ drivers/usb/storage/unusual_devs.h | 7 +++ drivers/video/fbdev/core/modedb.c | 41 ++++++++++++++++------ drivers/video/fbdev/goldfishfb.c | 1 drivers/video/fbdev/omap/omapfb_main.c | 2 - drivers/video/fbdev/via/viafbdev.c | 3 + fs/binfmt_elf.c | 2 - fs/btrfs/dev-replace.c | 6 +++ fs/btrfs/extent-tree.c | 2 - fs/btrfs/relocation.c | 23 ++++++------ fs/cifs/cifs_debug.c | 8 ++++ fs/cifs/readdir.c | 11 ++++- fs/cifs/smb2misc.c | 7 +++ fs/cifs/smb2pdu.c | 27 ++++++++------ fs/f2fs/super.c | 21 ++++++++++- fs/fat/cache.c | 19 ++++++---- fs/fat/fat.h | 5 ++ fs/fat/fatent.c | 6 +-- fs/gfs2/bmap.c | 2 - fs/hfs/brec.c | 7 ++- fs/hfsplus/super.c | 4 +- fs/pstore/ram_core.c | 17 +++++++-- fs/reiserfs/reiserfs.h | 2 - include/linux/mm_types.h | 2 - include/linux/sched.h | 2 - include/linux/vmacache.h | 5 -- kernel/audit_watch.c | 12 +++++- kernel/fork.c | 19 +++++++--- lib/debugobjects.c | 7 ++- mm/debug.c | 4 +- mm/fadvise.c | 8 +++- mm/huge_memory.c | 2 - mm/vmacache.c | 36 ------------------- net/9p/trans_virtio.c | 3 + net/bluetooth/hidp/core.c | 2 - net/dcb/dcbnl.c | 11 +++-- net/irda/af_irda.c | 13 ++++++ net/mac80211/cfg.c | 2 - net/mac80211/key.c | 24 ++++++++---- net/netfilter/ipvs/ip_vs_core.c | 15 +++++--- net/netfilter/x_tables.c | 4 +- net/xfrm/xfrm_policy.c | 5 ++ scripts/depmod.sh | 4 +- scripts/mod/modpost.c | 8 ++-- sound/core/pcm_lib.c | 14 +++++-- sound/isa/msnd/msnd_pinnacle.c | 4 +- sound/soc/codecs/wm8994.c | 1 sound/usb/quirks-table.h | 3 + tools/hv/hv_kvp_daemon.c | 2 - tools/perf/arch/powerpc/util/skip-callchain-idx.c | 10 +++-- tools/testing/selftests/powerpc/harness.c | 18 ++++++--- 112 files changed, 489 insertions(+), 257 deletions(-)
Aaron Knister (1):
IB/ipoib: Avoid a race condition between start_xmit and cm_rep_handler
Aleh Filipovich (1):
platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
Andreas Gruenbacher (1):
gfs2: Special-case rindex for gfs2_grow
Andrey Ryabinin (1):
mm/fadvise.c: fix signed overflow UBSAN complaint
Anton Vasilyev (4):
tty: rocket: Fix possible buffer overwrite on register_PCI
scsi: 3ware: fix return 0 on the error path of probe
gpio: ml-ioh: Fix buffer underwrite on probe error path
video: goldfishfb: fix memory leak on driver remove
Arnd Bergmann (1):
reiserfs: change j_timestamp type to time64_t
Ben Hutchings (1):
USB: yurex: Fix buffer over-read in yurex_write()
Bin Yang (1):
pstore: Fix incorrect persistent ram buffer mapping
BingJing Chang (1):
md/raid5: fix data corruption of replacements after originals dropped
Breno Leitao (1):
selftests/powerpc: Kill child processes on SIGINT
Chao Yu (1):
f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize
Chas Williams (1):
Fixes: Commit 86af955d02bb ("mm: numa: avoid waiting on freed migrated pages")
Dan Carpenter (7):
powerpc: Fix size calculation using resource_size()
scsi: aic94xx: fix an error code in aic94xx_init()
uio: potential double frees if __uio_register_device() fails
fbdev: omapfb: off by one in omapfb_register_client()
cifs: prevent integer overflow in nxt_dir_entry()
CIFS: fix wrapping bugs in num_entries() drm/panel: type promotion bug in s6e8aa0_read_mtp_id()
Daniel Micay (1):
staging/rts5208: Fix read overflow in memcpy
Eric Dumazet (1):
netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user
Ernesto A. Fernández (1):
hfs: prevent crash on exit from failed search
Felix Fietkau (1):
MIPS: ath79: fix system restart
Finn Thain (1):
macintosh/via-pmu: Add missing mmio accessors
Fredrik Noring (1):
fbdev: Distinguish between interlaced and progressive modes
Govindarajulu Varadarajan (1):
enic: do not call enic_change_mtu in enic_probe
Greg Kroah-Hartman (1):
Linux 3.18.123
Guenter Roeck (1):
mfd: sm501: Set coherent_dma_mask when creating subdevices
Gustavo A. R. Silva (1):
ASoC: wm8994: Fix missing break in switch
Ian Abbott (1):
staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice
Jann Horn (2):
fork: don't copy inconsistent signal handler state to child
mtdchar: fix overflows in adjustment of count
Jean-Philippe Brucker (1):
net/9p: fix error path of p9_virtio_probe
Jia-Ju Bai (4):
staging: rt5208: Fix a sleep-in-atomic bug in xd_copy_page
usb: host: u132-hcd: Fix a sleep-in-atomic-context bug in u132_get_frame()
usb: misc: uss720: Fix two sleep-in-atomic-context bugs
usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()
Joel Fernandes (Google) (1):
debugobjects: Make stack check warning more informative
Joerg Roedel (1):
x86/mm: Remove in_nmi() warning from vmalloc_fault()
Johan Hedberg (1):
Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV
Johan Hovold (2):
USB: serial: io_ti: fix array underflow in completion handler
USB: serial: ti_usb_3410_5052: fix array underflow in completion handler
John Pittman (1):
dm kcopyd: avoid softlockup in run_complete_job
Juergen Gross (1):
xen/netfront: fix waiting for xenbus state change
Julia Lawall (1):
parport: sunbpp: fix error return code
Julian Wiedmann (2):
s390/qeth: fix race in used-buffer accounting s390/qeth: reset layer2 attribute on layer switch
K. Y. Srinivasan (1):
Tools: hv: Fix a bug in the key delete code
Linus Torvalds (1):
mm: get rid of vmacache_flush_all() entirely
Maciej W. Rozycki (1):
binfmt_elf: Respect error return from `regset->active'
Mahesh Salgaonkar (1):
powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX.
Manikanta Pubbisetty (1):
mac80211: restrict delayed tailroom needed decrement
Marcel Holtmann (1):
Bluetooth: hidp: Fix handling of strncpy for hid->name information
Mathias Nyman (3):
xhci: Fix use-after-free in xhci_free_virt_device
usb: Don't die twice if PCI xhci host is not responding in resume
usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()
Mauricio Faria de Oliveira (2):
partitions/aix: append null character to print data from disk partitions/aix: fix usage of uninitialized lv_info and lvname structures
Mike Christie (1):
scsi: target: fix __transport_register_session locking
Misono Tomohiro (1):
btrfs: replace: Reset on-disk dev stats value after replace
Nicholas Mc Guire (2):
ARM: hisi: handle of_iomap and fix missing of_node_put
ARM: hisi: check of_iomap and fix missing of_node_put
Nicholas Piggin (1):
powerpc/powernv: opal_put_chars partial write fix
OGAWA Hirofumi (1):
fat: validate ->i_start before using
Parav Pandit (1):
RDMA/cma: Protect cma dev list with lock
Paul Burton (3):
MIPS: Fix ISA virt/bus conversion for non-zero PHYS_OFFSET
MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON
MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads
Petr Machata (1):
net: dcb: For wild-card lookups, use priority -1, not 0
Qu Wenruo (2):
btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
btrfs: Don't remove block group that still has pinned down bytes
Randy Dunlap (5):
scripts: modpost: check memory allocation results
kbuild: make missing $DEPMOD a Warning instead of an Error mtd/maps: fix solutionengine.c printk format warnings fbdev/via: fix defined but not used warning platform/x86: toshiba_acpi: Fix defined but not used build warnings
Ritesh Harjani (1):
cfq: Give a chance for arming slice idle timer in case of group_idle
Ronnie Sahlberg (1):
cifs: check if SMB2 PDU size has been padded and suppress the warning
Ronny Chevalier (1):
audit: fix use-after-free in audit_add_watch
Sandipan Das (2):
perf powerpc: Fix callchain ip filtering when return address is in a register perf powerpc: Fix callchain ip filtering
Shubhrajyoti Datta (1):
i2c: xiic: Make the start and the byte count write atomic
Srinivas Pandruvada (1):
ata: libahci: Correct setting of DEVSLP register
Stefan Haberland (1):
s390/dasd: fix hanging offline processing due to canceled worker
Steve French (2):
smb3: fix reset of bytes read and written stats
SMB3: Number of requests sent should be displayed for SMB3 not just CIFS
Sven Eckelmann (1):
ath10k: prevent active scans on potential unusable channels
Takashi Iwai (2):
ALSA: msnd: Fix the default sample sizes
ALSA: usb-audio: Fix multiple definitions in AU0828_DEVICE() macro
Tan Hu (1):
ipvs: fix race between ip_vs_conn_new() and ip_vs_del_dest()
Tetsuo Handa (1):
hfsplus: don't return 0 when fill_super() failed
Thomas Petazzoni (1):
PCI: mvebu: Fix I/O space end address calculation
Tim Anderson (1):
USB: Add quirk to support DJI CineSSD
Timo Wischer (1):
ALSA: pcm: Fix snd_interval_refine first/last with open min/max
Tyler Hicks (2):
irda: Fix memory leak caused by repeated binds of irda socket
irda: Only insert new objects into the global database via setsockopt
Vegard Nossum (2):
kthread: Fix use-after-free if kthread fork fails
kthread: fix boot hang (regression) on MIPS/OpenRISC
Yelena Krivosheev (1):
net: mvneta: fix mtu change on port without link
YueHaibing (1):
xfrm: fix 'passing zero to ERR_PTR()' warning
Zhouyang Jia (1):
rtc: bq4802: add error handling for devm_ioremap
Zumeng Chen (1):
mfd: ti_am335x_tscadc: Fix struct clk memory leak
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 122 +SUBLEVEL = 123 EXTRAVERSION = NAME = Diseased Newt
arch/arm/mach-hisi/hotplug.c +22 -11
@@ -145,13 +145,20 @@ static int hi3xxx_hotplug_init(void)struct device_node *node; node =of_find_compatible_node (NULL ,NULL ,"hisilicon,sysctrl" ); -if (node) { - ctrl_base =of_iomap (node,0 ); - id =HI3620_CTRL ; -return 0 ; +if (!node) { + id =ERROR_CTRL ; +return -ENOENT ; } - id =ERROR_CTRL ; -return -ENOENT ; + + ctrl_base =of_iomap (node,0 ); +of_node_put (node); +if (!ctrl_base) { + id =ERROR_CTRL ; +return -ENOMEM ; + } + + id =HI3620_CTRL ; +return 0 ; }void hi3xxx_set_cpu (int cpu,bool enable)
@@ -170,11 +177,15 @@ static bool hix5hd2_hotplug_init(void)struct device_node *np; np =of_find_compatible_node (NULL ,NULL ,"hisilicon,cpuctrl" ); -if (np) { - ctrl_base =of_iomap (np,0 ); -return true; - } -return false; +if (!np) +return false; + + ctrl_base =of_iomap (np,0 ); +of_node_put (np); +if (!ctrl_base) +return false; + +return true; }void hix5hd2_set_cpu (int cpu,bool enable)
arch/mips/ath79/setup.c +1 -0
@@ -40,6 +40,7 @@ static char ath79_sys_type[ATH79_SYS_TYPE_LEN];static void ath79_restart (char *command) { +local_irq_disable ();ath79_device_reset_set (AR71XX_RESET_FULL_CHIP );for (;;)if (cpu_wait)
arch/mips/include/asm/io.h +4 -4
@@ -141,14 +141,14 @@ static inline void * phys_to_virt(unsigned long address)/* * ISA I/O bus memory addresses are 1:1 with the physical address. */ -static inline unsigned long isa_virt_to_bus (volatile void * address) +static inline unsigned long isa_virt_to_bus (volatile void *address) { -return (unsigned long )address -PAGE_OFFSET ; +return virt_to_phys (address); } -static inline void *isa_bus_to_virt (unsigned long address) +static inline void *isa_bus_to_virt (unsigned long address) { -return (void *)(address +PAGE_OFFSET ); +return phys_to_virt (address); }#define isa_page_to_bus page_to_phys
arch/mips/include/asm/mach-ath79/ath79.h +1 -0
@@ -132,6 +132,7 @@ static inline u32 ath79_pll_rr(unsigned reg)static inline void ath79_reset_wr (unsigned reg,u32 val) {__raw_writel (val, ath79_reset_base + reg); + (void )__raw_readl (ath79_reset_base + reg);/* flush */ }static inline u32 ath79_reset_rr (unsigned reg)
arch/mips/kernel/process.c +0 -1
@@ -87,7 +87,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,struct thread_info *ti =task_thread_info (p);struct pt_regs *childregs, *regs =current_pt_regs ();unsigned long childksp; - p->set_child_tid = p->clear_child_tid =NULL ; childksp = (unsigned long )task_stack_page (p) +THREAD_SIZE -32 ;
arch/mips/loongson/common/cs5536/cs5536_ohci.c +1 -1
@@ -138,7 +138,7 @@ u32 pci_ohci_read_reg(int reg)break ;case PCI_OHCI_INT_REG :_rdmsr (DIVIL_MSR_REG (PIC_YSEL_LOW ), &hi, &lo); -if ((lo &0x00000f00 ) ==CS5536_USB_INTR ) +if (((lo >>PIC_YSEL_LOW_USB_SHIFT ) &0xf ) ==CS5536_USB_INTR ) conf_data =1 ;break ;default :
arch/mips/mm/c-r4k.c +4 -2
@@ -703,7 +703,8 @@ static void r4k_flush_icache_range(unsigned long start, unsigned long end)static void r4k_dma_cache_wback_inv (unsigned long addr,unsigned long size) {/* Catch bad driver code */ -BUG_ON (size ==0 ); +if (WARN_ON (size ==0 )) +return ;preempt_disable ();if (cpu_has_inclusive_pcaches) {
@@ -736,7 +737,8 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size)static void r4k_dma_cache_inv (unsigned long addr,unsigned long size) {/* Catch bad driver code */ -BUG_ON (size ==0 ); +if (WARN_ON (size ==0 )) +return ;preempt_disable ();if (cpu_has_inclusive_pcaches) {
arch/openrisc/kernel/process.c +0 -2
@@ -152,8 +152,6 @@ copy_thread(unsigned long clone_flags, unsigned long usp, top_of_kernel_stack = sp; - p->set_child_tid = p->clear_child_tid =NULL ; -/* Locate userspace context on stack... */ sp -=STACK_FRAME_OVERHEAD ;/* redzone */ sp -=sizeof (struct pt_regs );
arch/powerpc/platforms/powernv/opal.c +1 -1
@@ -452,7 +452,7 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len)/* Closed or other error drop */ if (rc !=OPAL_SUCCESS && rc !=OPAL_BUSY && rc !=OPAL_BUSY_EVENT ) { - written = total_len; + written += total_len;break ; }if (rc ==OPAL_SUCCESS ) {
arch/powerpc/platforms/pseries/ras.c +1 -1
@@ -309,7 +309,7 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)int len, error_log_length; error_log_length =8 +rtas_error_extended_log_length (h); - len =max_t (int, error_log_length,RTAS_ERROR_LOG_MAX ); + len =min_t (int, error_log_length,RTAS_ERROR_LOG_MAX );memset (global_mce_data_buf,0 ,RTAS_ERROR_LOG_MAX );memcpy (global_mce_data_buf, h, len); errhdr = (struct rtas_error_log *)global_mce_data_buf;
arch/powerpc/sysdev/mpic_msgr.c +1 -1
@@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)/* IO map the message register block. */ of_address_to_resource (np,0 , &rsrc); - msgr_block_addr =ioremap (rsrc.start, rsrc.end - rsrc.start); + msgr_block_addr =ioremap (rsrc.start,resource_size (&rsrc));if (!msgr_block_addr) {dev_err (&dev->dev,"Failed to iomap MPIC message registers" );return -EFAULT ;
arch/x86/mm/fault.c +0 -2
@@ -271,8 +271,6 @@ static noinline int vmalloc_fault(unsigned long address)if (!(address >=VMALLOC_START && address <VMALLOC_END ))return -1 ; -WARN_ON_ONCE (in_nmi ()); -/* * Synchronize this task's top level page-table * with the 'reference' page table.
block/cfq-iosched.c +2 -1
@@ -2728,7 +2728,8 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)* for devices that support queuing, otherwise we still have a problem * with sync vs async workloads. */ -if (blk_queue_nonrot (cfqd->queue) && cfqd->hw_tag) +if (blk_queue_nonrot (cfqd->queue) && cfqd->hw_tag && + !cfqd->cfq_group_idle)return ;WARN_ON (!RB_EMPTY_ROOT (&cfqq->sort_list));
block/partitions/aix.c +9 -4
@@ -177,7 +177,7 @@ int aix_partition(struct parsed_partitions *state)u32 vgda_sector =0 ;u32 vgda_len =0 ;int numlvs =0 ; -struct pvd *pvd; +struct pvd *pvd =NULL ;struct lv_info {unsigned short pps_per_lv;unsigned short pps_found;
@@ -231,10 +231,11 @@ int aix_partition(struct parsed_partitions *state)if (lvip[i].pps_per_lv) foundlvs +=1 ; } +/* pvd loops depend on n[].name and lvip[].pps_per_lv */ + pvd =alloc_pvd (state, vgda_sector +17 ); }put_dev_sector (sect); } - pvd =alloc_pvd (state, vgda_sector +17 );if (pvd) {int numpps =be16_to_cpu (pvd->pp_count);int psn_part1 =be32_to_cpu (pvd->psn_part1);
@@ -281,10 +282,14 @@ int aix_partition(struct parsed_partitions *state) next_lp_ix +=1 ; }for (i =0 ; i < state->limit; i +=1 ) -if (lvip[i].pps_found && !lvip[i].lv_is_contiguous) +if (lvip[i].pps_found && !lvip[i].lv_is_contiguous) { +char tmp[sizeof (n[i].name) +1 ];// null char + +snprintf (tmp,sizeof (tmp),"%s" , n[i].name);pr_warn ("partition %s (%u pp's found) is " "not contiguous\n" , - n[i].name, lvip[i].pps_found); + tmp, lvip[i].pps_found); + }kfree (pvd); }kfree (n);
drivers/ata/libahci.c +2 -0
@@ -2052,6 +2052,8 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep) deto =20 ; } +/* Make dito, mdat, deto bits to 0s */ + devslp &= ~GENMASK_ULL (24 ,2 ); devslp |= ((dito << PORT_DEVSLP_DITO_OFFSET) | (mdat << PORT_DEVSLP_MDAT_OFFSET) | (deto << PORT_DEVSLP_DETO_OFFSET) |
drivers/bluetooth/Kconfig +1 -0
@@ -85,6 +85,7 @@ config BT_HCIUART_LL config BT_HCIUART_3WIRE bool "Three-wire UART (H5) protocol support" depends on BT_HCIUART + depends on BT_HCIUART_SERDEV help The HCI Three-wire UART Transport Layer makes it possible to user the Bluetooth HCI over a serial port interface. The HCI
drivers/gpio/gpio-ml-ioh.c +2 -1
@@ -495,9 +495,10 @@ err_irq_alloc_descs: chip = chip_save; err_gpiochip_add: + chip = chip_save;while (--i >=0 ) { - chip--;gpiochip_remove (&chip->gpio); + chip++; }kfree (chip_save);
drivers/gpu/drm/panel/panel-s6e8aa0.c +1 -1
@@ -835,7 +835,7 @@ static void s6e8aa0_read_mtp_id(struct s6e8aa0 *ctx)int ret, i; ret =s6e8aa0_dcs_read (ctx,0xd1 , id,ARRAY_SIZE (id)); -if (ret <ARRAY_SIZE (id) || id[0 ] ==0x00 ) { +if (ret <0 || ret <ARRAY_SIZE (id) || id[0 ] ==0x00 ) {dev_err (ctx->dev,"read id failed\n" ); ctx->error = -EIO ;return ;
drivers/i2c/busses/i2c-xiic.c +4 -0
@@ -500,6 +500,7 @@ static void xiic_start_recv(struct xiic_i2c *i2c) {u8 rx_watermark;struct i2c_msg *msg = i2c->rx_msg = i2c->tx_msg; +unsigned long flags;/* Clear and enable Rx full interrupt. */ xiic_irq_clr_en (i2c,XIIC_INTR_RX_FULL_MASK |XIIC_INTR_TX_ERROR_MASK );
@@ -515,6 +516,7 @@ static void xiic_start_recv(struct xiic_i2c *i2c) rx_watermark =IIC_RX_FIFO_DEPTH ;xiic_setreg8 (i2c,XIIC_RFD_REG_OFFSET , rx_watermark -1 ); +local_irq_save (flags);if (!(msg->flags &I2C_M_NOSTART ))/* write the address */ xiic_setreg16(i2c, XIIC_DTR_REG_OFFSET,
@@ -525,6 +527,8 @@ static void xiic_start_recv(struct xiic_i2c *i2c)xiic_setreg16 (i2c,XIIC_DTR_REG_OFFSET , msg->len | ((i2c->nmsgs ==1 ) ?XIIC_TX_DYN_STOP_MASK :0 )); +local_irq_restore (flags); +if (i2c->nmsgs ==1 )/* very last, enable bus not busy as well */ xiic_irq_clr_en (i2c,XIIC_INTR_BNB_MASK );
drivers/infiniband/core/cma.c +7 -5
@@ -434,6 +434,7 @@ static int cma_resolve_ib_dev(struct rdma_id_private *id_priv) dgid = (union ib_gid *) &addr->sib_addr; pkey =ntohs (addr->sib_pkey); +mutex_lock (&lock);list_for_each_entry (cur_dev, &dev_list, list) {if (rdma_node_get_transport (cur_dev->device->node_type) !=RDMA_TRANSPORT_IB )continue ;
@@ -455,18 +456,19 @@ static int cma_resolve_ib_dev(struct rdma_id_private *id_priv) cma_dev = cur_dev; sgid = gid; id_priv->id.port_num = p; + goto found; } } } } - -if (!cma_dev) -return -ENODEV ; +mutex_unlock (&lock); +return -ENODEV ; found:cma_attach_to_dev (id_priv, cma_dev); - addr = (struct sockaddr_ib *)cma_src_addr (id_priv); -memcpy (&addr->sib_addr, &sgid,sizeof sgid); +mutex_unlock (&lock); + addr = (struct sockaddr_ib *)cma_src_addr (id_priv); +memcpy (&addr->sib_addr, &sgid,sizeof (sgid));cma_translate_ib (addr, &id_priv->id.route.addr.dev_addr);return 0 ; }
drivers/infiniband/ulp/ipoib/ipoib_cm.c +2 -0
@@ -997,12 +997,14 @@ static int ipoib_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *evenskb_queue_head_init (&skqueue); +netif_tx_lock_bh (p->dev);spin_lock_irq (&priv->lock);set_bit (IPOIB_FLAG_OPER_UP , &p->flags);if (p->neigh)while ((skb =__skb_dequeue (&p->neigh->queue)))__skb_queue_tail (&skqueue, skb);spin_unlock_irq (&priv->lock); +netif_tx_unlock_bh (p->dev);while ((skb =__skb_dequeue (&skqueue))) { skb->dev = p->dev;
drivers/macintosh/via-pmu.c +5 -4
@@ -527,8 +527,9 @@ init_pmu(void)int timeout;struct adb_request req; -out_8 (&via[B ], via[B ] |TREQ );/* negate TREQ */ -out_8 (&via[DIRB ], (via[DIRB ] |TREQ ) & ~TACK );/* TACK in, TREQ out */ +/* Negate TREQ. Set TACK to input and TREQ to output. */ +out_8 (&via[B ],in_8 (&via[B ]) |TREQ ); +out_8 (&via[DIRB ], (in_8 (&via[DIRB ]) |TREQ ) & ~TACK );pmu_request (&req,NULL ,2 ,PMU_SET_INTR_MASK , pmu_intr_mask); timeout =100000 ;
@@ -1450,8 +1451,8 @@ pmu_sr_intr(void)struct adb_request *req;int bite =0 ; -if (via[B ] &TREQ ) { -printk (KERN_ERR "PMU: spurious SR intr (%x)\n" , via[B ]); +if (in_8 (&via[B ]) &TREQ ) { +printk (KERN_ERR "PMU: spurious SR intr (%x)\n" ,in_8 (&via[B ]));out_8 (&via[IFR ],SR_INT );return NULL ; }
drivers/md/dm-kcopyd.c +2 -0
@@ -454,6 +454,8 @@ static int run_complete_job(struct kcopyd_job *job)if (atomic_dec_and_test (&kc->nr_jobs))wake_up (&kc->destroyq); +cond_resched (); +return 0 ; }
drivers/md/raid5.c +6 -0
@@ -3703,6 +3703,12 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s) s->failed++;if (rdev && !test_bit (Faulty, &rdev->flags)) do_recovery =1 ; +else if (!rdev) { + rdev =rcu_dereference ( + conf->disks[i].replacement); +if (rdev && !test_bit (Faulty, &rdev->flags)) + do_recovery =1 ; + } } }if (test_bit (STRIPE_SYNCING , &sh->state)) {
drivers/mfd/sm501.c +1 -0
@@ -714,6 +714,7 @@ sm501_create_subdev(struct sm501_devdata *sm, char *name, smdev->pdev.name = name; smdev->pdev.id = sm->pdev_id; smdev->pdev.dev.parent = sm->dev; + smdev->pdev.dev.coherent_dma_mask =0xffffffff ;if (res_count) { smdev->pdev.resource = (struct resource *)(smdev+1 );
drivers/mfd/ti_am335x_tscadc.c +1 -2
@@ -227,14 +227,13 @@ static int ti_tscadc_probe(struct platform_device *pdev)* The TSC_ADC_SS controller design assumes the OCP clock is * at least 6x faster than the ADC clock. */ - clk =clk_get (&pdev->dev,"adc_tsc_fck" ); + clk =devm_clk_get (&pdev->dev,"adc_tsc_fck" );if (IS_ERR (clk)) {dev_err (&pdev->dev,"failed to get TSC fck\n" ); err =PTR_ERR (clk); goto err_disable_clk; } clock_rate =clk_get_rate (clk); -clk_put (clk); tscadc->clk_div = clock_rate /ADC_CLK ;/* TSCADC_CLKDIV needs to be configured to the value minus 1 */
drivers/mtd/maps/solutionengine.c +3 -3
@@ -59,9 +59,9 @@ static int __init init_soleng_maps(void)return -ENXIO ; } } -printk (KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n" , - soleng_flash_map.phys &0x1fffffff , - soleng_eprom_map.phys &0x1fffffff ); +printk (KERN_NOTICE "Solution Engine: Flash at 0x%pap, EPROM at 0x%pap\n" , + &soleng_flash_map.phys, + &soleng_eprom_map.phys); flash_mtd->owner =THIS_MODULE ; eprom_mtd =do_map_probe ("map_rom" , &soleng_eprom_map);
drivers/mtd/mtdchar.c +7 -3
@@ -190,8 +190,12 @@ static ssize_t mtdchar_read(struct file *file, char __user *buf, size_t count,pr_debug ("MTD_read\n" ); -if (*ppos + count > mtd->size) - count = mtd->size - *ppos; +if (*ppos + count > mtd->size) { +if (*ppos < mtd->size) + count = mtd->size - *ppos; +else + count =0 ; + }if (!count)return 0 ;
@@ -276,7 +280,7 @@ static ssize_t mtdchar_write(struct file *file, const char __user *buf, size_t cpr_debug ("MTD_write\n" ); -if (*ppos == mtd->size) +if (*ppos >= mtd->size)return -ENOSPC ;if (*ppos + count > mtd->size)
drivers/net/ethernet/cisco/enic/enic_main.c +1 -1
@@ -2496,7 +2496,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)*/ enic->port_mtu = enic->config.mtu; - (void )enic_change_mtu (netdev, enic->port_mtu); err =enic_set_mac_addr (netdev, enic->mac_addr);if (err) {
@@ -2545,6 +2544,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->features |=NETIF_F_HIGHDMA ; netdev->priv_flags |=IFF_UNICAST_FLT ; + netdev->mtu = enic->port_mtu; err =register_netdev (netdev);if (err) {
drivers/net/ethernet/marvell/mvneta.c +0 -1
@@ -2477,7 +2477,6 @@ static int mvneta_change_mtu(struct net_device *dev, int mtu) }mvneta_start_dev (pp); -mvneta_port_up (pp);netdev_update_features (dev);
drivers/net/wireless/ath/ath10k/mac.c +7 -0
@@ -1728,6 +1728,13 @@ static int ath10k_update_channel_list(struct ath10k *ar) passive = channel->flags &IEEE80211_CHAN_NO_IR ; ch->passive = passive; +/* the firmware is ignoring the "radar" flag of the +* channel and is scanning actively using Probe Requests +* on "Radar detection"/DFS channels which are not +* marked as "available" +*/ + ch->passive |= ch->chan_radar; + ch->freq = channel->center_freq; ch->min_power =0 ; ch->max_power = channel->max_power *2 ;
drivers/net/xen-netfront.c +10 -14
@@ -85,8 +85,7 @@ struct netfront_cb {/* IRQ name is queue name with "-tx" or "-rx" appended */ #define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3) -static DECLARE_WAIT_QUEUE_HEAD (module_load_q); -static DECLARE_WAIT_QUEUE_HEAD (module_unload_q); +static DECLARE_WAIT_QUEUE_HEAD (module_wq);struct netfront_stats {u64 rx_packets;
@@ -1360,11 +1359,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)netif_carrier_off (netdev);xenbus_switch_state (dev, XenbusStateInitialising); -wait_event (module_load_q, -xenbus_read_driver_state (dev->otherend) != - XenbusStateClosed && -xenbus_read_driver_state (dev->otherend) != - XenbusStateUnknown); +wait_event (module_wq, +xenbus_read_driver_state (dev->otherend) != + XenbusStateClosed && +xenbus_read_driver_state (dev->otherend) != + XenbusStateUnknown);return netdev; exit:
@@ -2068,15 +2067,14 @@ static void netback_changed(struct xenbus_device *dev,dev_dbg (&dev->dev,"%s\n" ,xenbus_strstate (backend_state)); +wake_up_all (&module_wq); +switch (backend_state) {case XenbusStateInitialising:case XenbusStateInitialised:case XenbusStateReconfiguring:case XenbusStateReconfigured: -break ; -case XenbusStateUnknown: -wake_up_all (&module_unload_q);break ;case XenbusStateInitWait:
@@ -2092,12 +2090,10 @@ static void netback_changed(struct xenbus_device *dev,break ;case XenbusStateClosed: -wake_up_all (&module_unload_q);if (dev->state == XenbusStateClosed)break ;/* Missed the backend's CLOSING state -- fallthrough */ case XenbusStateClosing: -wake_up_all (&module_unload_q);xenbus_frontend_closed (dev);break ; }
@@ -2321,14 +2317,14 @@ static int xennet_remove(struct xenbus_device *dev) if (xenbus_read_driver_state(dev->otherend) != XenbusStateClosed) { xenbus_switch_state(dev, XenbusStateClosing); - wait_event(module_unload_q, + wait_event(module_wq, xenbus_read_driver_state(dev->otherend) == XenbusStateClosing || xenbus_read_driver_state(dev->otherend) == XenbusStateUnknown); xenbus_switch_state(dev, XenbusStateClosed); - wait_event(module_unload_q, + wait_event(module_wq, xenbus_read_driver_state(dev->otherend) == XenbusStateClosed || xenbus_read_driver_state(dev->otherend) ==
drivers/parport/parport_sunbpp.c +6 -2
@@ -286,12 +286,16 @@ static int bpp_probe(struct platform_device *op) ops =kmemdup (&parport_sunbpp_ops,sizeof (struct parport_operations ),GFP_KERNEL ); -if (!ops) +if (!ops) { + err = -ENOMEM ; goto out_unmap; + }dprintk (("register_port\n" )); -if (!(p =parport_register_port ((unsigned long )base, irq, dma, ops))) +if (!(p =parport_register_port ((unsigned long )base, irq, dma, ops))) { + err = -ENOMEM ; goto out_free_ops; + } p->size = size; p->dev = &op->dev;
drivers/pci/host/pci-mvebu.c +1 -1
@@ -940,7 +940,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev) pcie->realio.start =PCIBIOS_MIN_IO ; pcie->realio.end =min_t (resource_size_t,IO_SPACE_LIMIT , -resource_size (&pcie->io)); +resource_size (&pcie->io) -1 ); }else pcie->realio = pcie->io;
drivers/platform/x86/asus-nb-wmi.c +1 -0
@@ -365,6 +365,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0xC4, { KEY_KBDILLUMUP } }, { KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } }, { KE_IGNORE, 0xC6, }, /* Ambient Light Sensor notification */ + { KE_KEY, 0xFA, { KEY_PROG2 } }, /* Lid flip action */ { KE_END, 0}, };
drivers/platform/x86/toshiba_acpi.c +2 -1
@@ -41,6 +41,7 @@#define TOSHIBA_ACPI_VERSION "0.20"#define PROC_INTERFACE_VERSION 1 +#include <linux/compiler.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h>
@@ -1233,7 +1234,7 @@ static const struct file_operations keys_proc_fops = { .write = keys_proc_write, }; -static int version_proc_show (struct seq_file *m,void *v) +static int __maybe_unused version_proc_show (struct seq_file *m,void *v) {seq_printf (m,"driver: %s\n" ,TOSHIBA_ACPI_VERSION );seq_printf (m,"proc_interface: %d\n" ,PROC_INTERFACE_VERSION );
drivers/rtc/rtc-bq4802.c +4 -0
@@ -164,6 +164,10 @@ static int bq4802_probe(struct platform_device *pdev) }else if (p->r->flags &IORESOURCE_MEM ) { p->regs =devm_ioremap (&pdev->dev, p->r->start,resource_size (p->r)); +if (!p->regs){ + err = -ENOMEM ; + goto out; + } p->read = bq4802_read_mem; p->write = bq4802_write_mem; }else {
drivers/s390/block/dasd_eckd.c +5 -2
@@ -2066,8 +2066,11 @@ static int dasd_eckd_basic_to_ready(struct dasd_device *device)static int dasd_eckd_online_to_ready (struct dasd_device *device) { -cancel_work_sync (&device->reload_device); -cancel_work_sync (&device->kick_validate); +if (cancel_work_sync (&device->reload_device)) +dasd_put_device (device); +if (cancel_work_sync (&device->kick_validate)) +dasd_put_device (device); +return 0 ; };
drivers/s390/net/qeth_core_main.c +2 -1
@@ -3489,13 +3489,14 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index, qdio_flags =QDIO_FLAG_SYNC_OUTPUT ;if (atomic_read (&queue->set_pci_flags_count)) qdio_flags |=QDIO_FLAG_PCI_OUT ; +atomic_add (count, &queue->used_buffers); + rc =do_QDIO (CARD_DDEV (queue->card), qdio_flags, queue->queue_no, index, count);if (queue->card->options.performance_stats) queue->card->perf_stats.outbound_do_qdio_time +=qeth_get_micros () - queue->card->perf_stats.outbound_do_qdio_start_time; -atomic_add (count, &queue->used_buffers);if (rc) { queue->card->stats.tx_errors += count;/* ignore temporary SIGA errors without busy condition */
drivers/s390/net/qeth_core_sys.c +1 -0
@@ -456,6 +456,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,if (card->discipline) { card->discipline->remove (card->gdev);qeth_core_free_discipline (card); + card->options.layer2 =-1 ; } rc =qeth_core_load_discipline (card, newdis);
drivers/scsi/3w-9xxx.c +5 -1
@@ -2057,6 +2057,7 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)if (twa_initialize_device_extension (tw_dev)) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x25 ,"Failed to initialize device extension" ); + retval = -ENOMEM ; goto out_free_device_extension; }
@@ -2079,6 +2080,7 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) tw_dev->base_addr =ioremap (mem_addr, mem_len);if (!tw_dev->base_addr) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x35 ,"Failed to ioremap" ); + retval = -ENOMEM ; goto out_release_mem_region; }
@@ -2086,8 +2088,10 @@ static int twa_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)TW_DISABLE_INTERRUPTS (tw_dev);/* Initialize the card */ -if (twa_reset_sequence (tw_dev,0 )) +if (twa_reset_sequence (tw_dev,0 )) { + retval = -ENOMEM ; goto out_iounmap; + }/* Set host specific parameters */ if ((pdev->device == PCI_DEVICE_ID_3WARE_9650SE) ||
drivers/scsi/3w-sas.c +3 -0
@@ -1613,6 +1613,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)if (twl_initialize_device_extension (tw_dev)) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x1a ,"Failed to initialize device extension" ); + retval = -ENOMEM ; goto out_free_device_extension; }
@@ -1627,6 +1628,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) tw_dev->base_addr =pci_iomap (pdev,1 ,0 );if (!tw_dev->base_addr) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x1c ,"Failed to ioremap" ); + retval = -ENOMEM ; goto out_release_mem_region; }
@@ -1636,6 +1638,7 @@ static int twl_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)/* Initialize the card */ if (twl_reset_sequence (tw_dev,0 )) {TW_PRINTK (tw_dev->host,TW_DRIVER ,0x1d ,"Controller reset failed during probe" ); + retval = -ENOMEM ; goto out_iounmap; }
drivers/scsi/3w-xxxx.c +2 -0
@@ -2291,6 +2291,7 @@ static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)if (tw_initialize_device_extension (tw_dev)) {printk (KERN_WARNING "3w-xxxx: Failed to initialize device extension." ); + retval = -ENOMEM ; goto out_free_device_extension; }
@@ -2305,6 +2306,7 @@ static int tw_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) tw_dev->base_addr =pci_resource_start (pdev,0 );if (!tw_dev->base_addr) {printk (KERN_WARNING "3w-xxxx: Failed to get io address." ); + retval = -ENOMEM ; goto out_release_mem_region; }
drivers/scsi/aic94xx/aic94xx_init.c +3 -1
@@ -1047,8 +1047,10 @@ static int __init aic94xx_init(void) aic94xx_transport_template =sas_domain_attach_transport (&aic94xx_transport_functions); -if (!aic94xx_transport_template) +if (!aic94xx_transport_template) { + err = -ENOMEM ; goto out_destroy_caches; + } err =pci_register_driver (&aic94xx_pci_driver);if (err)
drivers/staging/comedi/drivers/ni_mio_common.c +2 -1
@@ -5601,11 +5601,11 @@ static int ni_E_init(struct comedi_device *dev,/* Digital I/O (PFI) subdevice */ s = &dev->subdevices[NI_PFI_DIO_SUBDEV ]; s->type =COMEDI_SUBD_DIO ; - s->subdev_flags =SDF_READABLE |SDF_WRITABLE |SDF_INTERNAL ; s->maxdata =1 ;if (devpriv->is_m_series) { s->n_chan =16 ; s->insn_bits = ni_pfi_insn_bits; + s->subdev_flags =SDF_READABLE |SDF_WRITABLE |SDF_INTERNAL ;ni_writew (dev, s->state, M_Offset_PFI_DO);for (i =0 ; i <NUM_PFI_OUTPUT_SELECT_REGS ; ++i) {
@@ -5614,6 +5614,7 @@ static int ni_E_init(struct comedi_device *dev, } }else { s->n_chan =10 ; + s->subdev_flags =SDF_INTERNAL ; } s->insn_config = ni_pfi_insn_config;
drivers/staging/rts5208/rtsx_scsi.c +1 -1
@@ -539,7 +539,7 @@ static int inquiry(struct scsi_cmnd *srb, struct rtsx_chip *chip)if (sendbytes >8 ) {memcpy (buf, inquiry_buf,8 ); -memcpy (buf +8 , inquiry_string, sendbytes -8 ); +strncpy (buf +8 , inquiry_string, sendbytes -8 );if (pro_formatter_flag) {/* Additional Length */ buf[4 ] =0x33 ;
drivers/staging/rts5208/xd.c +1 -1
@@ -1095,7 +1095,7 @@ static int xd_copy_page(struct rtsx_chip *chip, u32 old_blk, u32 new_blk, reg =0 ;rtsx_read_register (chip,XD_CTL , ®);if (reg & (XD_ECC1_ERROR |XD_ECC2_ERROR )) { -wait_timeout (100 ); +mdelay (100 );if (detect_card_cd (chip,XD_CARD ) !=STATUS_SUCCESS ) {
drivers/target/target_core_transport.c +3 -2
@@ -323,6 +323,7 @@ void __transport_register_session( void *fabric_sess_ptr) {unsigned char buf[PR_REG_ISID_LEN ]; +unsigned long flags; se_sess->se_tpg = se_tpg; se_sess->fabric_sess_ptr = fabric_sess_ptr;
@@ -345,7 +346,7 @@ void __transport_register_session( }kref_get (&se_nacl->acl_kref); -spin_lock_irq (&se_nacl->nacl_sess_lock); +spin_lock_irqsave (&se_nacl->nacl_sess_lock, flags);/* * The se_nacl->nacl_sess pointer will be set to the * last active I_T Nexus for each struct se_node_acl.
@@ -354,7 +355,7 @@ void __transport_register_session(list_add_tail (&se_sess->sess_acl_list, &se_nacl->acl_sess_list); -spin_unlock_irq (&se_nacl->nacl_sess_lock); +spin_unlock_irqrestore (&se_nacl->nacl_sess_lock, flags); }list_add_tail (&se_sess->sess_list, &se_tpg->tpg_sess_list);
drivers/tty/rocket.c +1 -1
@@ -1928,7 +1928,7 @@ static __init int register_PCI(int i, struct pci_dev *dev)ByteIO_t UPCIRingInd =0 ;if (!dev || !pci_match_id (rocket_pci_ids, dev) || -pci_enable_device (dev)) +pci_enable_device (dev) || i >=NUM_BOARDS )return 0 ; rcktpt_io_addr[i] =pci_resource_start (dev,0 );
drivers/uio/uio.c +1 -2
@@ -832,8 +832,6 @@ int __uio_register_device(struct module *owner,if (ret) goto err_uio_dev_add_attributes; - info->uio_dev = idev; -if (info->irq && (info->irq !=UIO_IRQ_CUSTOM )) { ret =devm_request_irq (idev->dev, info->irq, uio_interrupt, info->irq_flags, info->name, idev);
@@ -841,6 +839,7 @@ int __uio_register_device(struct module *owner, goto err_request_irq; } + info->uio_dev = idev;return 0 ; err_request_irq:
drivers/usb/class/cdc-wdm.c +1 -1
@@ -452,7 +452,7 @@ static int clear_wdm_read_flag(struct wdm_device *desc)set_bit (WDM_RESPONDING , &desc->flags);spin_unlock_irq (&desc->iuspin); - rv =usb_submit_urb (desc->response,GFP_KERNEL ); + rv =usb_submit_urb (desc->response,GFP_ATOMIC );spin_lock_irq (&desc->iuspin);if (rv) { dev_err(&desc->intf->dev,
drivers/usb/core/hcd-pci.c +0 -2
@@ -530,8 +530,6 @@ static int resume_common(struct device *dev, int event) event == PM_EVENT_RESTORE);if (retval) {dev_err (dev,"PCI post-resume error %d!\n" , retval); -if (hcd->shared_hcd) -usb_hc_died (hcd->shared_hcd);usb_hc_died (hcd); } }
drivers/usb/core/message.c +11 -0
@@ -1282,6 +1282,11 @@ void usb_enable_interface(struct usb_device *dev,* is submitted that needs that bandwidth. Some other operating systems * allocate bandwidth early, when a configuration is chosen. * +* xHCI reserves bandwidth and configures the alternate setting in +* usb_hcd_alloc_bandwidth(). If it fails the original interface altsetting +* may be disabled. Drivers cannot rely on any particular alternate +* setting being in effect after a failure. +* * This call is synchronous, and may not be used in an interrupt context. * Also, drivers must not change altsettings while urbs are scheduled for * endpoints in that interface; all such urbs must first be completed
@@ -1317,6 +1322,12 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) alternate);return -EINVAL ; } +/* +* usb3 hosts configure the interface in usb_hcd_alloc_bandwidth, +* including freeing dropped endpoint ring buffers. +* Make sure the interface endpoints are flushed before that +*/ +usb_disable_interface (dev, iface, false);/* Make sure we have enough bandwidth for this alternate interface. * Remove the current alt setting and add the new alt setting.
drivers/usb/core/quirks.c +3 -0
@@ -249,6 +249,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x2040, 0x7200), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* DJI CineSSD */ + { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM }, + /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/host/u132-hcd.c +1 -1
@@ -2569,7 +2569,7 @@ static int u132_get_frame(struct usb_hcd *hcd) }else {int frame =0 ;dev_err (&u132->platform_dev->dev,"TODO: u132_get_frame\n" ); -msleep (100 ); +mdelay (100 );return frame; } }
drivers/usb/host/xhci.c +3 -0
@@ -3630,6 +3630,9 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) }spin_lock_irqsave (&xhci->lock, flags); + + virt_dev->udev =NULL ; +/* Don't disable the slot if the host controller is dead. */ state =readl (&xhci->op_regs->status); if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
drivers/usb/misc/uss720.c +2 -2
@@ -392,7 +392,7 @@ static unsigned char parport_uss720_frob_control(struct parport *pp, unsigned ch mask &=0x0f ; val &=0x0f ; d = (priv->reg[1 ] & (~mask)) ^ val; -if (set_1284_register (pp,2 , d,GFP_KERNEL )) +if (set_1284_register (pp,2 , d,GFP_ATOMIC ))return 0 ; priv->reg[1 ] = d;return d &0xf ;
@@ -402,7 +402,7 @@ static unsigned char parport_uss720_read_status(struct parport *pp) {unsigned char ret; -if (get_1284_register (pp,1 , &ret,GFP_KERNEL )) +if (get_1284_register (pp,1 , &ret,GFP_ATOMIC ))return 0 ;return ret &0xf8 ; }
drivers/usb/misc/yurex.c +3 -2
@@ -437,13 +437,13 @@ static ssize_t yurex_write(struct file *file, const char *user_buffer, size_t co {struct usb_yurex *dev;int i, set =0 , retval =0 ; -char buffer[16 ]; +char buffer[16 +1 ];char *data = buffer;unsigned long long c, c2 =0 ;signed long timeout =0 ;DEFINE_WAIT (wait); - count =min (sizeof (buffer), count); + count =min (sizeof (buffer) -1 , count); dev = file->private_data;/* verify that we actually have some data to write */
@@ -462,6 +462,7 @@ static ssize_t yurex_write(struct file *file, const char *user_buffer, size_t co retval = -EFAULT ; goto error; } + buffer[count] =0 ;memset (dev->cntl_buffer,CMD_PADDING ,YUREX_BUF_SIZE );switch (buffer[0 ]) {
drivers/usb/serial/io_ti.h +1 -1
@@ -178,7 +178,7 @@ struct ump_interrupt { } __attribute__((packed)); -#define TIUMP_GET_PORT_FROM_CODE (c) (((c) >> 4) - 3) +#define TIUMP_GET_PORT_FROM_CODE (c) (((c) >> 6) & 0x01)#define TIUMP_GET_FUNC_FROM_CODE (c) ((c) & 0x0f)#define TIUMP_INTERRUPT_CODE_LSR 0x03#define TIUMP_INTERRUPT_CODE_MSR 0x04
drivers/usb/serial/ti_usb_3410_5052.h +1 -1
@@ -223,7 +223,7 @@ struct ti_interrupt { } __attribute__((packed));/* Interrupt codes */ -#define TI_GET_PORT_FROM_CODE (c) (((c) >> 4) - 3) +#define TI_GET_PORT_FROM_CODE (c) (((c) >> 6) & 0x01)#define TI_GET_FUNC_FROM_CODE (c) ((c) & 0x0f)#define TI_CODE_HARDWARE_ERROR 0xFF#define TI_CODE_DATA_ERROR 0x03
drivers/usb/storage/scsiglue.c +9 -0
@@ -341,6 +341,15 @@ static int queuecommand_lck(struct scsi_cmnd *srb,return 0 ; } +if ((us->fflags &US_FL_NO_ATA_1X ) && + (srb->cmnd[0 ] ==ATA_12 || srb->cmnd[0 ] ==ATA_16 )) { +memcpy (srb->sense_buffer, usb_stor_sense_invalidCDB, +sizeof (usb_stor_sense_invalidCDB)); + srb->result =SAM_STAT_CHECK_CONDITION ; +done (srb); +return 0 ; + } +/* enqueue the command and wake up the control thread */ srb->scsi_done = done; us->srb = srb;
drivers/usb/storage/unusual_devs.h +7 -0
@@ -2188,6 +2188,13 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, "Micro Mini 1GB", USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), +/* Reported-by: Tim Anderson <[email protected]> */ +UNUSUAL_DEV (0x2ca3 ,0x0031 ,0x0000 ,0x9999 , +"DJI" , +"CineSSD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_NO_ATA_1X), +/* * Nick Bowler <[email protected]> * SCSI stack spams (otherwise harmless) error messages.
drivers/video/fbdev/core/modedb.c +30 -11
74 lines not on this page · raw message
drivers/video/fbdev/goldfishfb.c +1 -0
@@ -301,6 +301,7 @@ static int goldfish_fb_remove(struct platform_device *pdev)dma_free_coherent (&pdev->dev, framesize, (void *)fb->fb.screen_base, fb->fb.fix.smem_start);iounmap (fb->reg_base); +kfree (fb);return 0 ; }
drivers/video/fbdev/omap/omapfb_main.c +1 -1
@@ -982,7 +982,7 @@ int omapfb_register_client(struct omapfb_notifier_block *omapfb_nb, {int r; -if ((unsigned )omapfb_nb->plane_idx >OMAPFB_PLANE_NUM ) +if ((unsigned )omapfb_nb->plane_idx >=OMAPFB_PLANE_NUM )return -EINVAL ;if (!notifier_inited) {
drivers/video/fbdev/via/viafbdev.c +2 -1
@@ -19,6 +19,7 @@* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <linux/compiler.h> #include <linux/module.h> #include <linux/seq_file.h> #include <linux/slab.h>
@@ -1468,7 +1469,7 @@ static const struct file_operations viafb_vt1636_proc_fops = {#endif /* CONFIG_FB_VIA_DIRECT_PROCFS */ -static int viafb_sup_odev_proc_show (struct seq_file *m,void *v) +static int __maybe_unused viafb_sup_odev_proc_show (struct seq_file *m,void *v) {via_odev_to_seq (m, supported_odev_map[ viaparinfo->shared->chip_info.gfx_chip_name]);
fs/binfmt_elf.c +1 -1
@@ -1552,7 +1552,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,const struct user_regset *regset = &view->regsets[i];do_thread_regset_writeback (t->task, regset);if (regset->core_note_type && regset->get && - (!regset->active || regset->active (t->task, regset))) { + (!regset->active || regset->active (t->task, regset) >0 )) {int ret;size_t size = regset->n * regset->size;void *data =kmalloc (size,GFP_KERNEL );
fs/btrfs/dev-replace.c +6 -0
@@ -583,6 +583,12 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,btrfs_rm_dev_replace_unblocked (fs_info); +/* +* Increment dev_stats_ccnt so that btrfs_run_dev_stats() will +* update on-disk dev stats value during commit transaction +*/ +atomic_inc (&tgt_device->dev_stats_ccnt); +/* * this is again a consistent state where no dev_replace procedure * is running, the target device is part of the filesystem, the
fs/btrfs/extent-tree.c +1 -1
@@ -9487,7 +9487,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)/* Don't want to race with allocators so take the groups_sem */ down_write (&space_info->groups_sem);spin_lock (&block_group->lock); -if (block_group->reserved || +if (block_group->reserved || block_group->pinned ||btrfs_block_group_used (&block_group->item) || block_group->ro) {/*
fs/btrfs/relocation.c +12 -11
@@ -1311,18 +1311,19 @@ static void __del_reloc_root(struct btrfs_root *root)struct mapping_node *node =NULL ;struct reloc_control *rc = root->fs_info->reloc_ctl; -spin_lock (&rc->reloc_root_tree.lock); - rb_node =tree_search (&rc->reloc_root_tree.rb_root, - root->node->start); -if (rb_node) { - node = rb_entry(rb_node, struct mapping_node, rb_node); -rb_erase (&node->rb_node, &rc->reloc_root_tree.rb_root); +if (rc) { +spin_lock (&rc->reloc_root_tree.lock); + rb_node =tree_search (&rc->reloc_root_tree.rb_root, + root->node->start); +if (rb_node) { + node = rb_entry(rb_node, struct mapping_node, rb_node); +rb_erase (&node->rb_node, &rc->reloc_root_tree.rb_root); + } +spin_unlock (&rc->reloc_root_tree.lock); +if (!node) +return ; +BUG_ON ((struct btrfs_root *)node->data != root); } -spin_unlock (&rc->reloc_root_tree.lock); - -if (!node) -return ; -BUG_ON ((struct btrfs_root *)node->data != root);spin_lock (&root->fs_info->trans_lock);list_del_init (&root->root_list);
fs/cifs/cifs_debug.c +8 -0
@@ -271,6 +271,10 @@ static ssize_t cifs_stats_proc_write(struct file *file,atomic_set (&totBufAllocCount,0 );atomic_set (&totSmBufAllocCount,0 );#endif /* CONFIG_CIFS_STATS2 */ +spin_lock (&GlobalMid_Lock); + GlobalMaxActiveXid =0 ; + GlobalCurrentXid =0 ; +spin_unlock (&GlobalMid_Lock);spin_lock (&cifs_tcp_ses_lock);list_for_each (tmp1, &cifs_tcp_ses_list) { server = list_entry(tmp1, struct TCP_Server_Info,
@@ -283,6 +287,10 @@ static ssize_t cifs_stats_proc_write(struct file *file, struct cifs_tcon, tcon_list);atomic_set (&tcon->num_smbs_sent,0 ); +spin_lock (&tcon->stat_lock); + tcon->bytes_read =0 ; + tcon->bytes_written =0 ; +spin_unlock (&tcon->stat_lock);if (server->ops->clear_stats) server->ops->clear_stats (tcon); }
fs/cifs/readdir.c +9 -2
@@ -366,8 +366,15 @@ static char *nxt_dir_entry(char *old_entry, char *end_of_smb, int level) new_entry = old_entry +sizeof (FIND_FILE_STANDARD_INFO ) + pfData->FileNameLength; - }else - new_entry = old_entry +le32_to_cpu (pDirInfo->NextEntryOffset); + }else { +u32 next_offset =le32_to_cpu (pDirInfo->NextEntryOffset); + +if (old_entry + next_offset < old_entry) { +cifs_dbg (VFS ,"invalid offset %u\n" , next_offset); +return NULL ; + } + new_entry = old_entry + next_offset; + }cifs_dbg (FYI ,"new entry %p old entry %p\n" , new_entry, old_entry);/* validate that new_entry is not past end of SMB */ if (new_entry >= end_of_smb) {
fs/cifs/smb2misc.c +7 -0
@@ -182,6 +182,13 @@ smb2_check_message(char *buf, unsigned int length)if (clc_len ==4 + len +1 )return 0 ; +/* +* Some windows servers (win2016) will pad also the final +* PDU in a compound to 8 bytes. +*/ +if (((clc_len +7 ) & ~7 ) == len) +return 0 ; +/* * MacOS server pads after SMB2.1 write response with 3 bytes * of junk. Other servers match RFC1001 len to actual
fs/cifs/smb2pdu.c +16 -11
@@ -301,7 +301,7 @@ small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon,smb2_hdr_assemble ((struct smb2_hdr *) *request_buf, smb2_command, tcon);if (tcon !=NULL ) { -#ifdef CONFIG_CIFS_STATS2 +#ifdef CONFIG_CIFS_STATS uint16_t com_code =le16_to_cpu (smb2_command);cifs_stats_inc (&tcon->stats.smb2_stats.smb2_com_sent[com_code]);#endif
@@ -2188,33 +2188,38 @@ num_entries(char *bufstart, char *end_of_buf, char **lastentry, size_t size)int len;unsigned int entrycount =0 ;unsigned int next_offset =0 ; -FILE_DIRECTORY_INFO *entryptr; +char *entryptr; +FILE_DIRECTORY_INFO *dir_info;if (bufstart ==NULL )return 0 ; - entryptr = (FILE_DIRECTORY_INFO *)bufstart; + entryptr = bufstart;while (1 ) { - entryptr = (FILE_DIRECTORY_INFO *) - ((char *)entryptr + next_offset); - -if ((char *)entryptr + size > end_of_buf) { +if (entryptr + next_offset < entryptr || + entryptr + next_offset > end_of_buf || + entryptr + next_offset + size > end_of_buf) {cifs_dbg (VFS ,"malformed search entry would overflow\n" );break ; } - len =le32_to_cpu (entryptr->FileNameLength); -if ((char *)entryptr + len + size > end_of_buf) { + entryptr = entryptr + next_offset; + dir_info = (FILE_DIRECTORY_INFO *)entryptr; + + len =le32_to_cpu (dir_info->FileNameLength); +if (entryptr + len < entryptr || + entryptr + len > end_of_buf || + entryptr + len + size > end_of_buf) {cifs_dbg (VFS ,"directory entry name would overflow frame end of buf %p\n" , end_of_buf);break ; } - *lastentry = (char *)entryptr; + *lastentry = entryptr; entrycount++; - next_offset =le32_to_cpu (entryptr->NextEntryOffset); + next_offset =le32_to_cpu (dir_info->NextEntryOffset);if (!next_offset)break ; }
fs/f2fs/super.c +19 -2
@@ -933,12 +933,17 @@ static int sanity_check_ckpt(struct f2fs_sb_info *sbi)struct f2fs_super_block *raw_super =F2FS_RAW_SUPER (sbi);struct f2fs_checkpoint *ckpt =F2FS_CKPT (sbi);unsigned int main_segs, blocks_per_seg; +unsigned int sit_segs, nat_segs; +unsigned int sit_bitmap_size, nat_bitmap_size; +unsigned int log_blocks_per_seg;int i; total =le32_to_cpu (raw_super->segment_count); fsmeta =le32_to_cpu (raw_super->segment_count_ckpt); - fsmeta +=le32_to_cpu (raw_super->segment_count_sit); - fsmeta +=le32_to_cpu (raw_super->segment_count_nat); + sit_segs =le32_to_cpu (raw_super->segment_count_sit); + fsmeta += sit_segs; + nat_segs =le32_to_cpu (raw_super->segment_count_nat); + fsmeta += nat_segs; fsmeta +=le32_to_cpu (ckpt->rsvd_segment_count); fsmeta +=le32_to_cpu (raw_super->segment_count_ssa);
@@ -959,6 +964,18 @@ static int sanity_check_ckpt(struct f2fs_sb_info *sbi)return 1 ; } + sit_bitmap_size =le32_to_cpu (ckpt->sit_ver_bitmap_bytesize); + nat_bitmap_size =le32_to_cpu (ckpt->nat_ver_bitmap_bytesize); + log_blocks_per_seg =le32_to_cpu (raw_super->log_blocks_per_seg); + +if (sit_bitmap_size != ((sit_segs /2 ) << log_blocks_per_seg) /8 || + nat_bitmap_size != ((nat_segs /2 ) << log_blocks_per_seg) /8 ) { +f2fs_msg (sbi->sb,KERN_ERR , +"Wrong bitmap size: sit: %u, nat:%u" , + sit_bitmap_size, nat_bitmap_size); +return 1 ; + } +if (unlikely (f2fs_cp_error (sbi))) {f2fs_msg (sbi->sb,KERN_ERR ,"A bug case: need to run fsck" );return 1 ;
fs/fat/cache.c +12 -7
@@ -226,7 +226,8 @@ static inline void cache_init(struct fat_cache_id *cid, int fclus, int dclus)int fat_get_cluster (struct inode *inode,int cluster,int *fclus,int *dclus) {struct super_block *sb = inode->i_sb; -const int limit = sb->s_maxbytes >>MSDOS_SB (sb)->cluster_bits; +struct msdos_sb_info *sbi =MSDOS_SB (sb); +const int limit = sb->s_maxbytes >> sbi->cluster_bits;struct fat_entry fatent;struct fat_cache_id cid;int nr;
@@ -235,6 +236,12 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) *fclus =0 ; *dclus =MSDOS_I (inode)->i_start; +if (!fat_valid_entry (sbi, *dclus)) { +fat_fs_error_ratelimit (sb, +"%s: invalid start cluster (i_pos %lld, start %08x)" , + __func__,MSDOS_I (inode)->i_pos, *dclus); +return -EIO ; + }if (cluster ==0 )return 0 ;
@@ -251,9 +258,8 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)/* prevent the infinite loop of cluster chain */ if (*fclus > limit) {fat_fs_error_ratelimit (sb, -"%s: detected the cluster chain loop" -" (i_pos %lld)" , __func__, -MSDOS_I (inode)->i_pos); +"%s: detected the cluster chain loop (i_pos %lld)" , + __func__,MSDOS_I (inode)->i_pos); nr = -EIO ; goto out; }
@@ -263,9 +269,8 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus) goto out; else if (nr == FAT_ENT_FREE) {fat_fs_error_ratelimit (sb, -"%s: invalid cluster chain (i_pos %lld)" , - __func__, -MSDOS_I (inode)->i_pos); +"%s: invalid cluster chain (i_pos %lld)" , + __func__,MSDOS_I (inode)->i_pos); nr = -EIO ; goto out; } else if (nr == FAT_ENT_EOF) {
fs/fat/fat.h +5 -0
@@ -347,6 +347,11 @@ static inline void fatent_brelse(struct fat_entry *fatent) fatent->fat_inode =NULL ; } +static inline bool fat_valid_entry (struct msdos_sb_info *sbi,int entry) +{ +return FAT_START_ENT <= entry && entry < sbi->max_cluster; +} +extern void fat_ent_access_init (struct super_block *sb);extern int fat_ent_read (struct inode *inode,struct fat_entry *fatent,int entry);
fs/fat/fatent.c +3 -3
@@ -26,7 +26,7 @@ static void fat12_ent_blocknr(struct super_block *sb, int entry, {struct msdos_sb_info *sbi =MSDOS_SB (sb);int bytes = entry + (entry >>1 ); -WARN_ON (entry <FAT_START_ENT || sbi->max_cluster <= entry); +WARN_ON (!fat_valid_entry (sbi, entry)); *offset = bytes & (sb->s_blocksize -1 ); *blocknr = sbi->fat_start + (bytes >> sb->s_blocksize_bits); }
@@ -36,7 +36,7 @@ static void fat_ent_blocknr(struct super_block *sb, int entry, {struct msdos_sb_info *sbi =MSDOS_SB (sb);int bytes = (entry << sbi->fatent_shift); -WARN_ON (entry <FAT_START_ENT || sbi->max_cluster <= entry); +WARN_ON (!fat_valid_entry (sbi, entry)); *offset = bytes & (sb->s_blocksize -1 ); *blocknr = sbi->fat_start + (bytes >> sb->s_blocksize_bits); }
@@ -356,7 +356,7 @@ int fat_ent_read(struct inode *inode, struct fat_entry *fatent, int entry)int err, offset;sector_t blocknr; -if (entry <FAT_START_ENT || sbi->max_cluster <= entry) { +if (!fat_valid_entry (sbi, entry)) {fatent_brelse (fatent);fat_fs_error (sb,"invalid access to FAT (entry 0x%08x)" , entry);return -EIO ;
fs/gfs2/bmap.c +1 -1
@@ -1476,7 +1476,7 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset, end_of_file = (i_size_read (&ip->i_inode) + sdp->sd_sb.sb_bsize -1 ) >> shift; lblock = offset >> shift; lblock_stop = (offset + len + sdp->sd_sb.sb_bsize -1 ) >> shift; -if (lblock_stop > end_of_file) +if (lblock_stop > end_of_file && ip !=GFS2_I (sdp->sd_rindex))return 1 ; size = (lblock_stop - lblock) << shift;
fs/hfs/brec.c +4 -3
@@ -74,9 +74,10 @@ int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len)if (!fd->bnode) {if (!tree->root)hfs_btree_inc_height (tree); - fd->bnode =hfs_bnode_find (tree, tree->leaf_head); -if (IS_ERR (fd->bnode)) -return PTR_ERR (fd->bnode); + node =hfs_bnode_find (tree, tree->leaf_head); +if (IS_ERR (node)) +return PTR_ERR (node); + fd->bnode = node; fd->record =-1 ; } new_node =NULL ;
fs/hfsplus/super.c +3 -1
@@ -518,8 +518,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)hfsplus_cat_build_key (sb, fd.search_key,HFSPLUS_ROOT_CNID , &str);if (!hfs_brec_read (&fd, &entry,sizeof (entry))) {hfs_find_exit (&fd); -if (entry.type !=cpu_to_be16 (HFSPLUS_FOLDER )) +if (entry.type !=cpu_to_be16 (HFSPLUS_FOLDER )) { + err = -EINVAL ; goto out_put_root; + } inode =hfsplus_iget (sb,be32_to_cpu (entry.folder.id));if (IS_ERR (inode)) { err =PTR_ERR (inode);
fs/pstore/ram_core.c +14 -3
@@ -414,7 +414,12 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size, vaddr =vmap (pages, page_count,VM_MAP , prot);kfree (pages); -return vaddr; +/* +* Since vmap() uses page granularity, we must add the offset +* into the page here, to get the byte granularity address +* into the mapping to represent the actual "start" location. +*/ +return vaddr +offset_in_page (start); } static void *persistent_ram_iomap(phys_addr_t start, size_t size,
@@ -436,6 +441,11 @@ static void *persistent_ram_iomap(phys_addr_t start, size_t size,else va =ioremap_wc (start, size); +/* +* Since request_mem_region() and ioremap() are byte-granularity +* there is no need handle anything special like we do when the +* vmap() case in persistent_ram_vmap() above. +*/ return va; }
@@ -456,7 +466,7 @@ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,return -ENOMEM ; } - prz->buffer = prz->vaddr +offset_in_page (start); + prz->buffer = prz->vaddr; prz->buffer_size = size -sizeof (struct persistent_ram_buffer );return 0 ;
@@ -503,7 +513,8 @@ void persistent_ram_free(struct persistent_ram_zone *prz)if (prz->vaddr) {if (pfn_valid (prz->paddr >>PAGE_SHIFT )) { -vunmap (prz->vaddr); +/* We must vunmap() at page-granularity. */ +vunmap (prz->vaddr -offset_in_page (prz->paddr)); }else {iounmap (prz->vaddr);release_mem_region (prz->paddr, prz->size);
fs/reiserfs/reiserfs.h +1 -1
@@ -266,7 +266,7 @@ struct reiserfs_journal_list {struct mutex j_commit_mutex;unsigned int j_trans_id; -time_t j_timestamp; +time64_t j_timestamp;/* write-only but useful for crash dump analysis */ struct reiserfs_list_bitmap *j_list_bitmap;struct buffer_head *j_commit_bh;/* commit buffer head */ struct reiserfs_journal_cnode *j_realblock;
include/linux/mm_types.h +1 -1
@@ -345,7 +345,7 @@ struct kioctx_table;struct mm_struct {struct vm_area_struct *mmap;/* list of VMAs */ struct rb_root mm_rb; -u32 vmacache_seqnum;/* per-thread vmacache */ +u64 vmacache_seqnum;/* per-thread vmacache */ #ifdef CONFIG_MMU unsigned long (*get_unmapped_area) (struct file *filp, unsigned long addr, unsigned long len,
include/linux/sched.h +1 -1
@@ -1315,7 +1315,7 @@ struct task_struct { unsigned brk_randomized:1;#endif /* per-thread vma caching */ -u32 vmacache_seqnum; +u64 vmacache_seqnum;struct vm_area_struct *vmacache[VMACACHE_SIZE ];#if defined(SPLIT_RSS_COUNTING )struct task_rss_stat rss_stat;
include/linux/vmacache.h +0 -5
@@ -15,7 +15,6 @@ static inline void vmacache_flush(struct task_struct *tsk)memset (tsk->vmacache,0 ,sizeof (tsk->vmacache)); } -extern void vmacache_flush_all (struct mm_struct *mm);extern void vmacache_update (unsigned long addr,struct vm_area_struct *newvma);extern struct vm_area_struct *vmacache_find (struct mm_struct *mm,unsigned long addr);
@@ -29,10 +28,6 @@ extern struct vm_area_struct *vmacache_find_exact(struct mm_struct *mm,static inline void vmacache_invalidate (struct mm_struct *mm) { mm->vmacache_seqnum++; - -/* deal with overflows */ -if (unlikely (mm->vmacache_seqnum ==0 )) -vmacache_flush_all (mm); }#endif /* __LINUX_VMACACHE_H */
kernel/audit_watch.c +11 -1
@@ -414,6 +414,13 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list)struct path parent_path;int h, ret =0 ; +/* +* When we will be calling audit_add_to_parent, krule->watch might have +* been updated and watch might have been freed. +* So we need to keep a reference of watch. +*/ +audit_get_watch (watch); +mutex_unlock (&audit_filter_mutex);/* Avoid calling path_lookup under audit_filter_mutex. */
@@ -422,8 +429,10 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list)/* caller expects mutex locked */ mutex_lock (&audit_filter_mutex); -if (ret) +if (ret) { +audit_put_watch (watch);return ret; + }/* either find an old parent or attach a new one */ parent =audit_find_parent (parent_path.dentry->d_inode);
@@ -444,6 +453,7 @@ int audit_add_watch(struct audit_krule *krule, struct list_head **list) *list = &audit_inode_hash[h]; error:path_put (&parent_path); +audit_put_watch (watch);return ret; }
kernel/fork.c +14 -5
@@ -1014,7 +1014,9 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)if (!sig)return -ENOMEM ;atomic_set (&sig->count,1 ); +spin_lock_irq (¤t->sighand->siglock);memcpy (sig->action, current->sighand->action,sizeof (sig->action)); +spin_unlock_irq (¤t->sighand->siglock);return 0 ; }
@@ -1241,6 +1243,18 @@ static struct task_struct *copy_process(unsigned long clone_flags,if (!p) goto fork_out; +/* +* This _must_ happen before we call free_task(), i.e. before we jump +* to any of the bad_fork_* labels. This is to avoid freeing +* p->set_child_tid which is (ab)used as a kthread's data pointer for +* kernel threads (PF_KTHREAD). +*/ + p->set_child_tid = (clone_flags &CLONE_CHILD_SETTID ) ? child_tidptr :NULL ; +/* +* Clear TID on mm_release()? +*/ + p->clear_child_tid = (clone_flags &CLONE_CHILD_CLEARTID ) ? child_tidptr :NULL ; +ftrace_graph_init_task (p);rt_mutex_init_task (p);
@@ -1404,11 +1418,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, goto bad_fork_cleanup_io; } - p->set_child_tid = (clone_flags &CLONE_CHILD_SETTID ) ? child_tidptr :NULL ; -/* -* Clear TID on mm_release()? -*/ - p->clear_child_tid = (clone_flags &CLONE_CHILD_CLEARTID ) ? child_tidptr :NULL ;#ifdef CONFIG_BLOCK p->plug =NULL ;#endif
lib/debugobjects.c +5 -2
@@ -295,9 +295,12 @@ static void debug_object_is_on_stack(void *addr, int onstack) limit++;if (is_on_stack) -pr_warn ("object is on stack, but not annotated\n" ); +pr_warn ("object %p is on stack %p, but NOT annotated.\n" , addr, +task_stack_page (current));else -pr_warn ("object is not on stack, but annotated\n" ); +pr_warn ("object %p is NOT on stack %p, but annotated.\n" , addr, +task_stack_page (current)); +WARN_ON (1 ); }
mm/debug.c +2 -2
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(dump_vma);void dump_mm (const struct mm_struct *mm) { - pr_emerg("mm %p mmap %p seqnum %d task_size %lu\n" + pr_emerg("mm %p mmap %p seqnum %llu task_size %lu\n" #ifdef CONFIG_MMU "get_unmapped_area %p\n" #endif
@@ -196,7 +196,7 @@ void dump_mm(const struct mm_struct *mm)#endif "%s" ,/* This is here to hold the comma */ - mm, mm->mmap, mm->vmacache_seqnum, mm->task_size, + mm, mm->mmap, (long long ) mm->vmacache_seqnum, mm->task_size, #ifdef CONFIG_MMU mm->get_unmapped_area, #endif
mm/fadvise.c +6 -2
@@ -66,8 +66,12 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice) goto out; } -/* Careful about overflows. Len == 0 means "as much as possible" */ - endbyte = offset + len; +/* +* Careful about overflows. Len == 0 means "as much as possible". Use +* unsigned math because signed overflows are undefined and UBSan +* complains. +*/ + endbyte = (u64 )offset + (u64 )len;if (!len || endbyte < len) endbyte =-1 ;else
mm/huge_memory.c +1 -1
@@ -1329,12 +1329,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,/* Migration could have started since the pmd_trans_migrating check */ if (!page_locked) { + page_nid =-1 ;if (!get_page_unless_zero (page)) goto out_unlock;spin_unlock (ptl);wait_on_page_locked (page);put_page (page); - page_nid =-1 ; goto out; }
mm/vmacache.c +0 -36
@@ -5,42 +5,6 @@#include <linux/mm.h> #include <linux/vmacache.h> -/* -* Flush vma caches for threads that share a given mm. -* -* The operation is safe because the caller holds the mmap_sem -* exclusively and other threads accessing the vma cache will -* have mmap_sem held at least for read, so no extra locking -* is required to maintain the vma cache. -*/ -void vmacache_flush_all (struct mm_struct *mm) -{ -struct task_struct *g, *p; - -/* -* Single threaded tasks need not iterate the entire -* list of process. We can avoid the flushing as well -* since the mm's seqnum was increased and don't have -* to worry about other threads' seqnum. Current's -* flush will occur upon the next lookup. -*/ -if (atomic_read (&mm->mm_users) ==1 ) -return ; - -rcu_read_lock (); -for_each_process_thread (g, p) { -/* -* Only flush the vmacache pointers as the -* mm seqnum is already set and curr's will -* be set upon invalidation when the next -* lookup is done. -*/ -if (mm == p->mm) -vmacache_flush (p); - } -rcu_read_unlock (); -} -/* * This task may be accessing a foreign mm via (for example) * get_user_pages()->find_vma(). The vmacache is task-local and this
net/9p/trans_virtio.c +2 -1
@@ -537,7 +537,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) chan->vq =virtio_find_single_vq (vdev, req_done,"requests" );if (IS_ERR (chan->vq)) { err =PTR_ERR (chan->vq); - goto out_free_vq; + goto out_free_chan; } chan->vq->vdev->priv = chan;spin_lock_init (&chan->lock);
@@ -590,6 +590,7 @@ out_free_tag:kfree (tag); out_free_vq: vdev->config->del_vqs (vdev); +out_free_chan:kfree (chan); fail:return err;
net/bluetooth/hidp/core.c +1 -1
@@ -763,7 +763,7 @@ static int hidp_setup_hid(struct hidp_session *session, hid->version = req->version; hid->country = req->country; -strncpy (hid->name, req->name,sizeof (req->name) -1 ); +strncpy (hid->name, req->name,sizeof (hid->name));snprintf (hid->phys,sizeof (hid->phys),"%pMR" , &l2cap_pi (session->ctrl_sock->sk)->chan->src);
net/dcb/dcbnl.c +7 -4
@@ -1728,7 +1728,7 @@ static struct dcb_app_type *dcb_app_lookup(const struct dcb_app *app,if (itr->app.selector == app->selector && itr->app.protocol == app->protocol && itr->ifindex == ifindex && - (!prio || itr->app.priority == prio)) + ((prio ==-1 ) || itr->app.priority == prio))return itr; }
@@ -1763,7 +1763,8 @@ u8 dcb_getapp(struct net_device *dev, struct dcb_app *app)u8 prio =0 ;spin_lock_bh (&dcb_lock); -if ((itr =dcb_app_lookup (app, dev->ifindex,0 ))) + itr =dcb_app_lookup (app, dev->ifindex,-1 ); +if (itr) prio = itr->app.priority;spin_unlock_bh (&dcb_lock);
@@ -1791,7 +1792,8 @@ int dcb_setapp(struct net_device *dev, struct dcb_app *new)spin_lock_bh (&dcb_lock);/* Search for existing match and replace */ -if ((itr =dcb_app_lookup (new, dev->ifindex,0 ))) { + itr =dcb_app_lookup (new, dev->ifindex,-1 ); +if (itr) {if (new->priority) itr->app.priority = new->priority;else {
@@ -1824,7 +1826,8 @@ u8 dcb_ieee_getapp_mask(struct net_device *dev, struct dcb_app *app)u8 prio =0 ;spin_lock_bh (&dcb_lock); -if ((itr =dcb_app_lookup (app, dev->ifindex,0 ))) + itr =dcb_app_lookup (app, dev->ifindex,-1 ); +if (itr) prio |=1 << itr->app.priority;spin_unlock_bh (&dcb_lock);
net/irda/af_irda.c +12 -1
@@ -785,6 +785,13 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)return -EINVAL ;lock_sock (sk); + +/* Ensure that the socket is not already bound */ +if (self->ias_obj) { + err = -EINVAL ; + goto out; + } +#ifdef CONFIG_IRDA_ULTRA /* Special care for Ultra sockets */ if ((sk->sk_type == SOCK_DGRAM) &&
@@ -2044,7 +2051,11 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, err = -EINVAL ; goto out; } -irias_insert_object (ias_obj); + +/* Only insert newly allocated objects */ +if (free_ias) +irias_insert_object (ias_obj); +kfree (ias_opt);break ;case IRLMP_IAS_DEL :
net/mac80211/cfg.c +1 -1
@@ -276,7 +276,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev, goto out_unlock; } -ieee80211_key_free (key, true); +ieee80211_key_free (key, sdata->vif.type ==NL80211_IFTYPE_STATION ); ret =0 ; out_unlock:
net/mac80211/key.c +15 -9
@@ -515,11 +515,15 @@ int ieee80211_key_link(struct ieee80211_key *key, {struct ieee80211_local *local = sdata->local;struct ieee80211_key *old_key; -int idx, ret; -bool pairwise; - - pairwise = key->conf.flags &IEEE80211_KEY_FLAG_PAIRWISE ; - idx = key->conf.keyidx; +int idx = key->conf.keyidx; +bool pairwise = key->conf.flags &IEEE80211_KEY_FLAG_PAIRWISE ; +/* +* We want to delay tailroom updates only for station - in that +* case it helps roaming speed, but in other cases it hurts and +* can cause warnings to appear. +*/ +bool delay_tailroom = sdata->vif.type ==NL80211_IFTYPE_STATION ; +int ret;mutex_lock (&sdata->local->key_mtx);
@@ -547,14 +551,14 @@ int ieee80211_key_link(struct ieee80211_key *key,increment_tailroom_need_count (sdata);ieee80211_key_replace (sdata, sta, pairwise, old_key, key); -ieee80211_key_destroy (old_key, true); +ieee80211_key_destroy (old_key, delay_tailroom);ieee80211_debugfs_key_add (key);if (!local->wowlan) { ret =ieee80211_key_enable_hw_accel (key);if (ret) -ieee80211_key_free (key, true); +ieee80211_key_free (key, delay_tailroom); }else { ret =0 ; }
@@ -705,7 +709,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local,ieee80211_key_replace (key->sdata, key->sta, key->conf.flags &IEEE80211_KEY_FLAG_PAIRWISE , key,NULL ); -__ieee80211_key_destroy (key, true); +__ieee80211_key_destroy (key, key->sdata->vif.type == +NL80211_IFTYPE_STATION ); }for (i =0 ; i <NUM_DEFAULT_KEYS ; i++) {
@@ -715,7 +720,8 @@ void ieee80211_free_sta_keys(struct ieee80211_local *local,ieee80211_key_replace (key->sdata, key->sta, key->conf.flags &IEEE80211_KEY_FLAG_PAIRWISE , key,NULL ); -__ieee80211_key_destroy (key, true); +__ieee80211_key_destroy (key, key->sdata->vif.type == +NL80211_IFTYPE_STATION ); }mutex_unlock (&local->key_mtx);
net/netfilter/ipvs/ip_vs_core.c +11 -4
@@ -1692,13 +1692,20 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)if (cp->dest && !(cp->dest->flags &IP_VS_DEST_F_AVAILABLE )) {/* the destination server is not available */ -if (sysctl_expire_nodest_conn (ipvs)) { +__u32 flags = cp->flags; + +/* when timer already started, silently drop the packet.*/ +if (timer_pending (&cp->timer)) +__ip_vs_conn_put (cp); +else +ip_vs_conn_put (cp); + +if (sysctl_expire_nodest_conn (ipvs) && + !(flags &IP_VS_CONN_F_ONE_PACKET )) {/* try to expire the connection immediately */ ip_vs_conn_expire_now (cp); } -/* don't restart its timer, and silently -drop the packet. */ -__ip_vs_conn_put (cp); +return NF_DROP ; }
net/netfilter/x_tables.c +2 -2
@@ -877,7 +877,7 @@ void *xt_copy_counters_from_user(const void __user *user, unsigned int len,if (copy_from_user (&compat_tmp, user,sizeof (compat_tmp)) !=0 )return ERR_PTR (-EFAULT ); -strlcpy (info->name, compat_tmp.name,sizeof (info->name)); +memcpy (info->name, compat_tmp.name,sizeof (info->name) -1 ); info->num_counters = compat_tmp.num_counters; user +=sizeof (compat_tmp); }else
@@ -890,9 +890,9 @@ void *xt_copy_counters_from_user(const void __user *user, unsigned int len,if (copy_from_user (info, user,sizeof (*info)) !=0 )return ERR_PTR (-EFAULT ); - info->name[sizeof (info->name) -1 ] ='\0' ; user +=sizeof (*info); } + info->name[sizeof (info->name) -1 ] ='\0' ; size =sizeof (struct xt_counters ); size *= info->num_counters;
net/xfrm/xfrm_policy.c +4 -1
@@ -1809,7 +1809,10 @@ xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols,/* Try to instantiate a bundle */ err =xfrm_tmpl_resolve (pols, num_pols, fl, xfrm, family);if (err <=0 ) { -if (err !=0 && err != -EAGAIN ) +if (err ==0 ) +return NULL ; + +if (err != -EAGAIN )XFRM_INC_STATS (net,LINUX_MIB_XFRMOUTPOLERROR );return ERR_PTR (err); }
scripts/depmod.sh +2 -2
@@ -15,9 +15,9 @@ if ! test -r System.map ; then fi if [ -z $(command -v $DEPMOD) ]; then - echo "'make modules_install' requires $DEPMOD. Please install it." >&2 + echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2 echo "This is probably in the kmod package." >&2 - exit 1 + exit 0 fi # older versions of depmod don't support -P <symbol-prefix>
scripts/mod/modpost.c +4 -4
@@ -647,7 +647,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info,if (ELF_ST_TYPE (sym->st_info) ==STT_SPARC_REGISTER )break ;if (symname[0 ] =='.' ) { -char *munged =strdup (symname); +char *munged =NOFAIL (strdup (symname)); munged[0 ] ='_' ; munged[1 ] =toupper (munged[1 ]); symname = munged;
@@ -1248,7 +1248,7 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr,static char *sec2annotation (const char *s) {if (match (s, init_exit_sections)) { -char *p =malloc (20 ); +char *p =NOFAIL (malloc (20 ));char *r = p; *p++ ='_' ;
@@ -1268,7 +1268,7 @@ static char *sec2annotation(const char *s)strcat (p," " );return r; }else { -return strdup ("" ); +return NOFAIL (strdup ("" )); } }
@@ -1826,7 +1826,7 @@ void buf_write(struct buffer *buf, const char *s, int len) {if (buf->size - buf->pos < len) { buf->size += len +SZ ; - buf->p =realloc (buf->p, buf->size); + buf->p =NOFAIL (realloc (buf->p, buf->size)); }strncpy (buf->p + buf->pos, s, len); buf->pos += len;
sound/core/pcm_lib.c +10 -4
@@ -714,27 +714,33 @@ EXPORT_SYMBOL(snd_interval_refine);static int snd_interval_refine_first (struct snd_interval *i) { +const unsigned int last_max = i->max; +if (snd_BUG_ON (snd_interval_empty (i)))return -EINVAL ;if (snd_interval_single (i))return 0 ; i->max = i->min; - i->openmax = i->openmin; -if (i->openmax) +if (i->openmin) i->max++; +/* only exclude max value if also excluded before refine */ + i->openmax = (i->openmax && i->max >= last_max);return 1 ; }static int snd_interval_refine_last (struct snd_interval *i) { +const unsigned int last_min = i->min; +if (snd_BUG_ON (snd_interval_empty (i)))return -EINVAL ;if (snd_interval_single (i))return 0 ; i->min = i->max; - i->openmin = i->openmax; -if (i->openmin) +if (i->openmax) i->min--; +/* only exclude min value if also excluded before refine */ + i->openmin = (i->openmin && i->min <= last_min);return 1 ; }
sound/isa/msnd/msnd_pinnacle.c +2 -2
@@ -82,10 +82,10 @@static void set_default_audio_parameters (struct snd_msnd *chip) { - chip->play_sample_size =DEFSAMPLESIZE ; + chip->play_sample_size =snd_pcm_format_width (DEFSAMPLESIZE ); chip->play_sample_rate =DEFSAMPLERATE ; chip->play_channels =DEFCHANNELS ; - chip->capture_sample_size =DEFSAMPLESIZE ; + chip->capture_sample_size =snd_pcm_format_width (DEFSAMPLESIZE ); chip->capture_sample_rate =DEFSAMPLERATE ; chip->capture_channels =DEFCHANNELS ; }
sound/soc/codecs/wm8994.c +1 -0
@@ -2427,6 +2427,7 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai,snd_soc_update_bits (codec,WM8994_POWER_MANAGEMENT_2 ,WM8994_OPCLK_ENA ,0 ); } +break ;default :return -EINVAL ;
sound/usb/quirks-table.h +2 -1
@@ -2910,7 +2910,8 @@ YAMAHA_DEVICE(0x7010, "UB99"),*/ #define AU0828_DEVICE (vid, pid, vname, pname) { \ - USB_DEVICE_VENDOR_SPEC(vid, pid), \ + .idVendor = vid, \ + .idProduct = pid, \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ USB_DEVICE_ID_MATCH_INT_CLASS | \ USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
tools/hv/hv_kvp_daemon.c +1 -1
@@ -289,7 +289,7 @@ static int kvp_key_delete(int pool, const char *key, int key_size)* Found a match; just move the remaining * entries up. */ -if (i == num_records) { +if (i == (num_records -1 )) { kvp_file_info[pool].num_records--;kvp_update_file (pool);return 0 ;
tools/perf/arch/powerpc/util/skip-callchain-idx.c +7 -3
@@ -58,9 +58,13 @@ static int check_return_reg(int ra_regno, Dwarf_Frame *frame) }/* -* Check if return address is on the stack. +* Check if return address is on the stack. If return address +* is in a register (typically R0), it is yet to be saved on +* the stack. */ -if (nops !=0 || ops !=NULL ) +if ((nops !=0 || ops !=NULL ) && + !(nops ==1 && ops[0 ].atom == DW_OP_regx && + ops[0 ].number2 ==0 && ops[0 ].offset ==0 ))return 0 ;/*
@@ -233,7 +237,7 @@ int arch_skip_callchain_idx(struct machine *machine, struct thread *thread,if (!chain || chain->nr <3 )return skip_slot; - ip = chain->ips[2 ]; + ip = chain->ips[1 ];thread__find_addr_location (thread, machine,PERF_RECORD_MISC_USER ,MAP__FUNCTION , ip, &al);
tools/testing/selftests/powerpc/harness.c +12 -6
@@ -81,13 +81,13 @@ wait:return status; } -static void alarm_handler (int signum) +static void sig_handler (int signum) { -/* Jut wake us up from waitpid */ +/* Just wake us up from waitpid */ } -static struct sigaction alarm_action = { - .sa_handler = alarm_handler, +static struct sigaction sig_action = { + .sa_handler = sig_handler, };int test_harness (int (test_function )(void ),char *name)
@@ -97,8 +97,14 @@ int test_harness(int (test_function)(void), char *name)test_start (name);test_set_git_version (GIT_VERSION ); -if (sigaction (SIGALRM , &alarm_action,NULL )) { -perror ("sigaction" ); +if (sigaction (SIGINT , &sig_action,NULL )) { +perror ("sigaction (sigint)" ); +test_error (name); +return 1 ; + } + +if (sigaction (SIGALRM , &sig_action,NULL )) { +perror ("sigaction (sigalrm)" );test_error (name);return 1 ; }