Linux 3.16.47
I'm announcing the release of the 3.16.47 kernel.
All users of the 3.16 kernel series should upgrade.
The updated 3.16.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
The diff from 3.16.46 is attached to this message.
Ben.
------------
Makefile | 2 +- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 5 +- arch/arm/kvm/psci.c | 8 +- arch/arm64/include/asm/barrier.h | 12 ++- arch/arm64/include/asm/kvm_emulate.h | 6 ++ arch/arm64/include/asm/uaccess.h | 3 +- arch/arm64/kvm/sys_regs.c | 8 +- arch/metag/include/asm/uaccess.h | 49 +++++++----- arch/powerpc/include/asm/qe.h | 1 + arch/powerpc/kernel/eeh_driver.c | 19 ++++- arch/powerpc/kernel/sysfs.c | 6 ++ arch/powerpc/platforms/pseries/dlpar.c | 1 - arch/x86/boot/boot.h | 2 +- arch/x86/kernel/cpu/perf_event.h | 1 + arch/x86/kernel/cpu/perf_event_intel.c | 31 +++++--- arch/x86/mm/numa_32.c | 1 + arch/x86/mm/tlb.c | 4 +- arch/x86/um/ptrace_64.c | 2 +- drivers/Makefile | 1 + drivers/ata/libata-scsi.c | 8 ++ drivers/gpu/drm/drm_edid.c | 8 ++ drivers/hsi/clients/ssi_protocol.c | 5 +- drivers/iio/dac/ad7303.c | 6 +- drivers/iio/proximity/as3935.c | 3 +- drivers/infiniband/core/uverbs_cmd.c | 13 ++- drivers/infiniband/core/verbs.c | 8 +- drivers/infiniband/hw/mlx4/main.c | 1 + drivers/infiniband/ulp/ipoib/ipoib_fs.c | 9 ++- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 13 +++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 44 +++++++++-- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 3 - drivers/input/misc/twl4030-pwrbutton.c | 2 +- drivers/md/dm-bufio.c | 9 ++- drivers/md/dm-era-target.c | 8 +- drivers/md/dm-ioctl.c | 2 +- drivers/md/persistent-data/dm-btree.c | 8 +- drivers/media/i2c/soc_camera/ov2640.c | 6 +- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + drivers/media/rc/mceusb.c | 4 +- drivers/media/usb/cx231xx/cx231xx-audio.c | 41 +++++++--- drivers/media/usb/cx231xx/cx231xx-cards.c | 46 +++++++++-- drivers/media/usb/dvb-usb/dib0700_core.c | 3 + drivers/media/usb/dvb-usb/digitv.c | 4 + drivers/media/usb/dvb-usb/dw2102.c | 54 +++++++++++++ drivers/media/usb/dvb-usb/ttusb2.c | 19 +++++ drivers/media/usb/gspca/konica.c | 3 + drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 13 +-- drivers/media/usb/usbvision/usbvision-video.c | 9 ++- drivers/media/usb/uvc/uvc_video.c | 2 +- drivers/media/usb/zr364xx/zr364xx.c | 8 ++ drivers/mfd/omap-usb-tll.c | 2 +- drivers/mtd/nand/fsmc_nand.c | 9 ++- drivers/net/ethernet/broadcom/tg3.c | 4 - drivers/net/ethernet/freescale/ucc_geth.c | 8 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +- drivers/net/ethernet/mellanox/mlx4/mcg.c | 15 +++- drivers/net/ethernet/mellanox/mlx4/qp.c | 13 +++ drivers/net/virtio_net.c | 30 ++++++- drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 7 ++ drivers/net/wireless/mwifiex/pcie.c | 7 ++ drivers/net/wireless/zd1211rw/zd_usb.c | 3 + drivers/of/address.c | 2 +- drivers/pci/host/pcie-designware.c | 28 +++---- drivers/pci/pci-sysfs.c | 10 ++- drivers/pci/pci.c | 9 ++- drivers/pci/proc.c | 20 ++++- drivers/pci/quirks.c | 24 ++++++ drivers/pinctrl/sh-pfc/core.c | 3 + drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 18 +++-- drivers/power/isp1704_charger.c | 4 + drivers/power/lp8788-charger.c | 2 +- drivers/power/pda_power.c | 49 ++++++------ drivers/regulator/tps65023-regulator.c | 3 +- drivers/scsi/scsi_error.c | 18 +++++ drivers/scsi/sd.c | 27 ++++++- drivers/scsi/sd.h | 1 + drivers/staging/comedi/drivers/jr3_pci.c | 13 +-- drivers/staging/gdm724x/gdm_mux.c | 21 +---- drivers/staging/iio/light/tsl2x7x_core.c | 2 +- drivers/staging/media/lirc/lirc_serial.c | 4 +- drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- drivers/target/target_core_file.c | 3 +- drivers/tty/serial/omap-serial.c | 9 ++- drivers/tty/serial/sh-sci.c | 10 ++- drivers/usb/class/cdc-acm.c | 13 ++- drivers/usb/core/driver.c | 21 +++++ drivers/usb/core/file.c | 9 ++- drivers/usb/core/hub.c | 11 ++- drivers/usb/host/xhci-mem.c | 2 +- drivers/usb/misc/legousbtower.c | 38 ++++++--- drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++ drivers/vfio/vfio_iommu_type1.c | 92 ++++++++++------------ drivers/video/Makefile | 1 + drivers/video/fbdev/Kconfig | 2 - fs/ceph/xattr.c | 3 + fs/cifs/cifsfs.c | 15 +++- fs/cifs/cifsglob.h | 1 + fs/cifs/cifssmb.c | 3 + fs/cifs/misc.c | 2 +- fs/cifs/netmisc.c | 6 +- fs/cifs/smb2misc.c | 5 +- fs/cifs/smb2pdu.c | 14 +++- fs/dcache.c | 37 +++++++++ fs/debugfs/inode.c | 10 +-- fs/ext4/inode.c | 5 ++ fs/namei.c | 10 +-- fs/nfs/pagelist.c | 10 ++- fs/nfsd/vfs.c | 2 +- fs/notify/fanotify/fanotify_user.c | 26 ++++-- fs/notify/fsnotify.c | 8 +- fs/timerfd.c | 17 +++- fs/xattr.c | 2 +- include/linux/dcache.h | 7 ++ include/linux/fsnotify.h | 31 -------- include/linux/ima.h | 4 +- include/linux/mlx4/qp.h | 1 + include/scsi/scsi_driver.h | 1 + include/uapi/linux/netfilter/nf_conntrack_common.h | 9 +++ ipc/mqueue.c | 4 +- kernel/locking/lockdep.c | 4 +- kernel/padata.c | 2 +- kernel/trace/ftrace.c | 14 +++- net/bluetooth/hci_sock.c | 3 +- net/ipv4/ip_output.c | 7 +- net/ipv4/tcp_lp.c | 6 +- net/ipv4/udp.c | 2 +- net/ipv6/exthdrs.c | 1 + net/ipv6/ip6_output.c | 7 +- net/ipv6/ip6_tunnel.c | 4 +- net/ipv6/ndisc.c | 2 + net/ipv6/output_core.c | 8 +- net/netfilter/nf_conntrack_netlink.c | 60 ++++++++------ net/packet/af_packet.c | 13 ++- security/integrity/ima/ima.h | 4 +- security/integrity/ima/ima_appraise.c | 7 +- security/integrity/ima/ima_main.c | 14 ++-- tools/perf/builtin-inject.c | 2 + tools/perf/ui/browsers/hists.c | 2 +- 140 files changed, 1056 insertions(+), 445 deletions(-)
Adrian Salido (1):
dm ioctl: prevent stack leak in dm ioctl call
Ajay Kaher (1):
USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
Al Viro (1):
dentry name snapshots
Alex Williamson (1):
vfio/type1: Remove locked page accounting workqueue
Alexander Tsoy (1):
ath9k_htc: add device ID for Toshiba WLM-20U2/GN-1080
Alexey Brodkin (1):
usb: Make sure usb/phy/of gets built-in
Alyssa Milburn (4):
digitv: limit messages to buffer size
zr364xx: enforce minimum size when reading header
ttusb2: limit messages to buffer size
dw2102: limit messages to buffer size
Amir Goldstein (1):
fanotify: don't expose EOPENSTALE to userspace
Amitoj Kaur Chawla (1):
staging: gdm724x: gdm_mux: Remove create_workqueue()
Andrew Jones (1):
KVM: arm/arm64: fix races in kvm_psci_vcpu_on
Andy Lutomirski (1):
x86/mm: Fix flush_tlb_page() on Xen
Arnd Bergmann (2):
pvrusb2: reduce stack usage pvr2_eeprom_analyze()
fbdev: sti: don't select CONFIG_VT
Ashish Kalra (1):
x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
Bart Van Assche (1):
target/fileio: Fix zero-length READ and WRITE handling
Ben Hutchings (1):
Linux 3.16.47
Benjamin Coddington (1):
NFS: Use GFP_NOIO for two allocations in writeback
Bjorn Helgaas (2):
PCI: dwc: Unindent dw_handle_msi_irq() loop
PCI: Ignore write combining when mapping I/O port space
Brian Norris (1):
mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
Changbin Du (1):
perf hists browser: Fix typo in function switch_data_file
Christoph Hellwig (1):
libata: reject passthrough WRITE SAME requests
Christophe Leroy (1):
net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
Cong Wang (1):
mqueue: fix a use-after-free in sys_mq_notify()
Craig Gallek (1):
ip6_tunnel: Fix missing tunnel encapsulation limit option
Dan Carpenter (5):
PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq()
ath9k: off by one in ath9k_hw_nvram_read_array()
HSI: ssi_protocol: double free in ssip_pn_xmit()
staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
cifs: small underflow in cnvrtDosUnixTm()
Daniel Glöckner (1):
ima: accept previously set IMA_NEW_FILE
David Ahern (1):
net: ipv6: send unsolicited NA on admin up
David Carrillo-Cisneros (1):
perf inject: Don't proceed if perf_session__process_event() fails
David S. Miller (1):
ipv6: Need to export ipv6_push_frag_opts for tunneling now.
David Woodhouse (3):
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
PCI: Fix another sanity check bug in /proc/pci mmap
PCI: Only allow WC mmap on prefetchable resources
Dmitry Kasatkin (1):
ima: pass 'opened' flag to identify newly created files
Dmitry Tunin (1):
ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
Eric Biggers (1):
ext4: evict inline data when writing to memory map
Eric Dumazet (1):
tcp: fix wraparound issue in tcp_lp
Eva Rachel Retuya (1):
staging: iio: tsl2x7x_core: Fix standard deviation calculation
Fabian Frederick (1):
IPoIB: Remove unnecessary test for NULL before debugfs_remove()
Feras Daoud (1):
IB/ipoib: Update broadcast object if PKey value was changed in index 0
Frank Schaefer (1):
ov2640: fix vflip control
Geert Uytterhoeven (1):
pinctrl: sh-pfc: Update info pointer after SoC-specific init
Giedrius Statkevičius (1):
power: supply: lp8788: prevent out of bounds array access
Guenter Roeck (2):
usb: hub: Fix error loop seen after hub communication errors
usb: hub: Do not attempt to autosuspend disconnected devices
Hannes Reinecke (1):
scsi: scsi_error: count medium access timeout only once per EH run
Ian Abbott (2):
staging: comedi: jr3_pci: fix possible null pointer dereference
staging: comedi: jr3_pci: cope with jiffies wraparound
Jack Morgenstein (1):
IB/mlx4: Fix ib device initialization error flow
James Hogan (2):
metag/uaccess: Fix access_ok() metag/uaccess: Check access_ok in strncpy_from_user
Jason A. Donenfeld (1):
padata: free correct variable
Johan Hovold (12):
zd1211rw: fix NULL-deref at probe
mceusb: fix NULL-deref at probe
ath9k_htc: fix NULL-deref at probe
gspca: konica: add missing endpoint sanity check
dib0700: fix NULL-deref at probe
usbvision: fix NULL-deref at probe
cx231xx-cards: fix NULL-deref at probe
cx231xx-audio: fix init error path
cx231xx-audio: fix NULL-deref at probe
serial: omap: fix runtime-pm handling on unbind
serial: omap: suspend device on probe errors
staging: gdm724x: gdm_mux: fix use-after-free on module unload
Kamal Heib (1):
net/mlx4_en: Change the error print to debug print
Kan Liang (1):
perf/x86: Fix spurious NMI with PEBS Load Latency event
Kieran Bingham (1):
uvcvideo: Fix empty packet statistic
Laura Abbott (1):
x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
Leon Nardella (1):
ath9k_htc: Add new USB ID
Liping Zhang (2):
netfilter: ctnetlink: fix deadlock due to acquire _expect_lock twice
netfilter: ctnetlink: make it safer when updating ct->status
Ludovic Desroches (2):
ARM: dts: at91: sama5d3_xplained: fix ADC vref
ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
Luis Henriques (1):
ceph: fix memory leak in __ceph_setxattr()
Lukas Wunner (1):
PCI: Freeze PME scan before suspending devices
Maksim Salau (2):
usb: misc: legousbtower: Fix buffers on stack
usb: misc: legousbtower: Fix memory leak
Marc Zyngier (1):
arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses
Marek Szyprowski (1):
s5p-mfc: Fix unbalanced call to clock management
Marek Vasut (1):
USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
Mario Kleiner (1):
drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
Mark Rutland (2):
arm64: ensure extension of smp_store_release value
arm64: uaccess: ensure extension of access_ok() addr
Matt Ranostay (1):
iio: proximity: as3935: fix as3935_write
Michael J. Ruhl (2):
IB/core: If the MGID/MLID pair is not on the list return an error IB/core: For multicast functions, verify that LIDs are multicast LIDs
Michael S. Tsirkin (1):
virtio_net: fix support for small rings
Michael Trimarchi (1):
power: supply: pda_power: move from timer to delayed_work
Michal Hocko (1):
fs/xattr.c: zero out memory copied to userspace in getxattr
Mikulas Patocka (1):
dm bufio: avoid a possible ABBA deadlock
Nikolay Borisov (1):
lockdep: teach lockdep about memalloc_noio_save
Pan Bian (1):
power: supply: isp1704: Fix unchecked return value of devm_kzalloc
Pavel Roskin (1):
iio: dac: ad7303: fix channel description
Peter Chen (1):
usb: host: xhci: print correct command ring address
Rabin Vincent (1):
CIFS: fix oplock break deadlocks
Richard Cochran (1):
regulator: tps65023: Fix inverted core enable logic.
Richard Weinberger (1):
um: Fix PTRACE_POKEUSER on x86_64
Rob Herring (1):
of: fix sparse warning in of_pci_range_parser_one
Russell Currey (1):
powerpc/eeh: Avoid use after free in eeh_handle_special_event()
Sabrina Dubroca (1):
ipv6: avoid overflow of offset in ip6_find_1stfragopt
Sean Young (1):
serial_ir: iommap is a memory address, not bool
Sebastian Reichel (1):
Input: twl4030-pwrbutton - use correct device for irq request
Sergei Shtylyov (4):
pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data
pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal
pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data
pinctrl: sh-pfc: r8a7791: Fix IPSR comment typos
Shamir Rabinovitch (1):
IB/IPoIB: ibX: failed to create mcg debug file
Somasundaram Krishnasamy (1):
dm era: save spacemap metadata root after the pre-commit
Stefan Assmann (1):
PCI: Disable boot interrupt quirk for ASUS M2N-LR
Stephane Eranian (1):
perf/x86/pebs: Fix handling of PEBS buffer overflows
Steve French (2):
Set unicode flag on cifs echo request to avoid Mac error
SMB3: Work around mount failure when using SMB3 dialect to Macs
Steven Rostedt (VMware) (1):
ftrace: Fix removing of second function probe
Szymon Janc (1):
Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
Takatoshi Akiyama (1):
serial: sh-sci: Fix panic when serial console and DMA are enabled
Talat Batheesh (2):
net/mlx4_en: Avoid adding steering rules with invalid ring net/mlx4: Fix the check in attaching steering rules
Thomas Gleixner (1):
timerfd: Protect the might cancel mechanism proper
Thomas Petazzoni (1):
mtd: nand: fsmc: fix NAND width handling
Tobias Herzog (1):
cdc-acm: fix possible invalid access when processing notification
Tony Lindgren (1):
mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
Tyrel Datwyler (2):
powerpc/pseries: Fix of_node_put() underflow during DLPAR remove powerpc/sysfs: Fix reference leak of cpu device_nodes present at boot
Vinothkumar Raja (1):
dm btree: fix for dm_btree_find_lowest_key()
Willem de Bruijn (2):
packet: fix tp_reserve race in packet_set_ring
udp: consistently apply ufo or fragmentation
YueHaibing (1):
tg3: don't clear stats while tg3_close
Zheng Li (1):
ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 46 +SUBLEVEL = 47 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/arm/boot/dts/at91-sama5d3_xplained.dts +2 -3
@@ -141,9 +141,10 @@ }; adc0: adc@f8018000 { + atmel,adc-vref = <3300>; + atmel,adc-channels-used = <0xfe>; pinctrl-0 = < &pinctrl_adc0_adtrg - &pinctrl_adc0_ad0 &pinctrl_adc0_ad1 &pinctrl_adc0_ad2 &pinctrl_adc0_ad3
@@ -151,8 +152,6 @@ &pinctrl_adc0_ad5 &pinctrl_adc0_ad6 &pinctrl_adc0_ad7 - &pinctrl_adc0_ad8 - &pinctrl_adc0_ad9 >; status = "okay"; };
arch/arm/kvm/psci.c +7 -1
@@ -191,9 +191,10 @@ int kvm_psci_version(struct kvm_vcpu *vcpu)static int kvm_psci_0_2_call (struct kvm_vcpu *vcpu) { -int ret =1 ; +struct kvm *kvm = vcpu->kvm;unsigned long psci_fn = *vcpu_reg (vcpu,0 ) & ~((u32 )0 );unsigned long val; +int ret =1 ;switch (psci_fn) {case PSCI_0_2_FN_PSCI_VERSION :
@@ -213,7 +214,9 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)break ;case PSCI_0_2_FN_CPU_ON :case PSCI_0_2_FN64_CPU_ON : +mutex_lock (&kvm->lock); val =kvm_psci_vcpu_on (vcpu); +mutex_unlock (&kvm->lock);break ;case PSCI_0_2_FN_AFFINITY_INFO :case PSCI_0_2_FN64_AFFINITY_INFO :
@@ -269,6 +272,7 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)static int kvm_psci_0_1_call (struct kvm_vcpu *vcpu) { +struct kvm *kvm = vcpu->kvm;unsigned long psci_fn = *vcpu_reg (vcpu,0 ) & ~((u32 )0 );unsigned long val;
@@ -278,7 +282,9 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) val =PSCI_RET_SUCCESS ;break ;case KVM_PSCI_FN_CPU_ON : +mutex_lock (&kvm->lock); val =kvm_psci_vcpu_on (vcpu); +mutex_unlock (&kvm->lock);break ;case KVM_PSCI_FN_CPU_SUSPEND :case KVM_PSCI_FN_MIGRATE :
arch/arm64/include/asm/barrier.h +9 -3
@@ -58,17 +58,23 @@ do { \#define smp_rmb () dmb(ishld)#define smp_wmb () dmb(ishst) -#define smp_store_release (p, v) \ +#define smp_store_release (p, v) \ do { \ + union { typeof(*p) __val; char __c[1]; } __u = \ + { .__val = (__force typeof(*p)) (v) }; \ compiletime_assert_atomic_type(*p); \ switch (sizeof(*p)) { \ case 4: \ asm volatile ("stlr %w1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u32 *)__u.__c) \ + : "memory"); \ break; \ case 8: \ asm volatile ("stlr %1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u64 *)__u.__c) \ + : "memory"); \ break; \ } \ } while (0)
arch/arm64/include/asm/kvm_emulate.h +6 -0
@@ -187,6 +187,12 @@ static inline u8 kvm_vcpu_trap_get_fault(const struct kvm_vcpu *vcpu)return kvm_vcpu_get_hsr (vcpu) &ESR_EL2_FSC_TYPE ; } +static inline int kvm_vcpu_sys_get_rt (struct kvm_vcpu *vcpu) +{ +u32 esr =kvm_vcpu_get_hsr (vcpu); +return (esr >>5 ) &0x1f ; +} +static inline unsigned long kvm_vcpu_get_mpidr (struct kvm_vcpu *vcpu) {return vcpu_sys_reg (vcpu,MPIDR_EL1 );
arch/arm64/include/asm/uaccess.h +2 -1
@@ -89,11 +89,12 @@ static inline void set_fs(mm_segment_t fs)*/ #define __range_ok (addr, size) \ ({ \ + unsigned long __addr = (unsigned long __force)(addr); \ unsigned long flag, roksum; \ __chk_user_ptr(addr); \ asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \ : "=&r" (flag), "=&r" (roksum) \ - : "1" (addr), "Ir" (size), \ + : "1" (__addr), "Ir" (size), \ "r" (current_thread_info()->addr_limit) \ : "cc"); \ flag; \
arch/arm64/kvm/sys_regs.c +4 -4
@@ -504,12 +504,12 @@ int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run) {struct sys_reg_params params;u32 hsr =kvm_vcpu_get_hsr (vcpu); -int Rt2 = (hsr >>10 ) &0xf ; +int Rt2 = (hsr >>10 ) &0x1f ; params.is_aarch32 = true; params.is_32bit = false; params.CRm = (hsr >>1 ) &0xf ; - params.Rt = (hsr >>5 ) &0xf ; + params.Rt =kvm_vcpu_sys_get_rt (vcpu); params.is_write = ((hsr &1 ) ==0 ); params.Op0 =0 ;
@@ -554,7 +554,7 @@ int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run) params.is_aarch32 = true; params.is_32bit = true; params.CRm = (hsr >>1 ) &0xf ; - params.Rt = (hsr >>5 ) &0xf ; + params.Rt =kvm_vcpu_sys_get_rt (vcpu); params.is_write = ((hsr &1 ) ==0 ); params.CRn = (hsr >>10 ) &0xf ; params.Op0 =0 ;
@@ -629,7 +629,7 @@ int kvm_handle_sys_reg(struct kvm_vcpu *vcpu, struct kvm_run *run) params.CRn = (esr >>10 ) &0xf ; params.CRm = (esr >>1 ) &0xf ; params.Op2 = (esr >>17 ) &0x7 ; - params.Rt = (esr >>5 ) &0x1f ; + params.Rt =kvm_vcpu_sys_get_rt (vcpu); params.is_write = !(esr &1 );return emulate_sys_reg (vcpu, ¶ms);
arch/metag/include/asm/uaccess.h +31 -18
63 lines not on this page · raw message
arch/powerpc/include/asm/qe.h +1 -0
@@ -193,6 +193,7 @@ static inline int qe_alive_during_sleep(void)#define qe_muram_free cpm_muram_free#define qe_muram_addr cpm_muram_addr#define qe_muram_offset cpm_muram_offset +#define qe_muram_dma cpm_muram_dma/* Structure that defines QE firmware binary files. *
arch/powerpc/kernel/eeh_driver.c +15 -4
@@ -584,7 +584,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)*/ #define MAX_WAIT_FOR_RECOVERY 300 -static void eeh_handle_normal_event (struct eeh_pe *pe) +static bool eeh_handle_normal_event (struct eeh_pe *pe) {struct pci_bus *frozen_bus;int rc =0 ;
@@ -594,7 +594,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)if (!frozen_bus) {pr_err ("%s: Cannot find PCI bus for PHB#%d-PE#%x\n" , __func__, pe->phb->global_number, pe->addr); -return ; +return false; }eeh_pe_update_time_stamp (pe);
@@ -711,7 +711,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)pr_info ("EEH: Notify device driver to resume\n" );eeh_pe_dev_traverse (pe, eeh_report_resume,NULL ); -return ; +return false; excess_failures:/*
@@ -751,7 +751,11 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)pci_lock_rescan_remove ();pcibios_remove_pci_devices (frozen_bus);pci_unlock_rescan_remove (); + +/* The passed PE should no longer be used */ +return true; } +return false; }static void eeh_handle_special_event (void )
@@ -817,7 +821,14 @@ static void eeh_handle_special_event(void)*/ if (rc ==EEH_NEXT_ERR_FROZEN_PE || rc ==EEH_NEXT_ERR_FENCED_PHB ) { -eeh_handle_normal_event (pe); +/* +* eeh_handle_normal_event() can make the PE stale if it +* determines that the PE cannot possibly be recovered. +* Don't modify the PE state if that's the case. +*/ +if (eeh_handle_normal_event (pe)) +continue ; +eeh_pe_state_clear (pe,EEH_PE_RECOVERING ); }else {pci_lock_rescan_remove ();
arch/powerpc/kernel/sysfs.c +6 -0
@@ -672,6 +672,10 @@ static void register_cpu_online(unsigned int cpu)struct device_attribute *attrs, *pmc_attrs;int i, nattrs; +/* For cpus present at boot a reference was already grabbed in register_cpu() */ +if (!s->of_node) + s->of_node =of_get_cpu_node (cpu,NULL ); +#ifdef CONFIG_PPC64 if (cpu_has_feature (CPU_FTR_SMT ))device_create_file (s, &dev_attr_smt_snooze_delay);
@@ -825,6 +829,8 @@ static void unregister_cpu_online(unsigned int cpu) }#endif cacheinfo_cpu_offline (cpu); +of_node_put (s->of_node); + s->of_node =NULL ; }#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
arch/powerpc/platforms/pseries/dlpar.c +0 -1
@@ -298,7 +298,6 @@ int dlpar_detach_node(struct device_node *dn)if (rc)return rc; -of_node_put (dn);/* Must decrement the refcount */ return 0 ; }
arch/x86/boot/boot.h +1 -1
@@ -16,7 +16,7 @@#ifndef BOOT_BOOT_H #define BOOT_BOOT_H -#define STACK_SIZE 512/* Minimum number of bytes for stack */ +#define STACK_SIZE 1024/* Minimum number of bytes for stack */ #ifndef __ASSEMBLY__
arch/x86/kernel/cpu/perf_event.h +1 -0
@@ -79,6 +79,7 @@ struct amd_nb {/* The maximal number of PEBS events: */ #define MAX_PEBS_EVENTS 8 +#define PEBS_COUNTER_MASK ((1ULL << MAX_PEBS_EVENTS) - 1)/* * A debug store configuration.
arch/x86/kernel/cpu/perf_event_intel.c +22 -9
@@ -1401,21 +1401,34 @@ static int intel_pmu_handle_irq(struct pt_regs *regs) goto done; } +/* +* In case multiple PEBS events are sampled at the same time, +* it is possible to have GLOBAL_STATUS bit 62 set indicating +* PEBS buffer overflow and also seeing at most 3 PEBS counters +* having their bits set in the status register. This is a sign +* that there was at least one PEBS record pending at the time +* of the PMU interrupt. PEBS counters must only be processed +* via the drain_pebs() calls and not via the regular sample +* processing loop coming after that the function, otherwise +* phony regular samples may be generated in the sampling buffer +* not marked with the EXACT tag. Another possibility is to have +* one PEBS event and at least one non-PEBS event whic hoverflows +* while PEBS has armed. In this case, bit 62 of GLOBAL_STATUS will +* not be set, yet the overflow status bit for the PEBS counter will +* be on Skylake. +* +* To avoid this problem, we systematically ignore the PEBS-enabled +* counters from the GLOBAL_STATUS mask and we always process PEBS +* events via drain_pebs(). +*/ + status &= ~(cpuc->pebs_enabled &PEBS_COUNTER_MASK ); +/* * PEBS overflow sets bit 62 in the global status register */ if (__test_and_clear_bit (62 , (unsigned long *)&status)) { handled++; x86_pmu.drain_pebs (regs); -/* -* There are cases where, even though, the PEBS ovfl bit is set -* in GLOBAL_OVF_STATUS, the PEBS events may also have their -* overflow bits set for their counters. We must clear them -* here because they have been processed as exact samples in -* the drain_pebs() routine. They must not be processed again -* in the for_each_bit_set() loop for regular samples below. -*/ - status &= ~cpuc->pebs_enabled; status &= x86_pmu.intel_ctrl |GLOBAL_STATUS_TRACE_TOPAPMI ; }
arch/x86/mm/numa_32.c +1 -0
@@ -100,5 +100,6 @@ void __init initmem_init(void)printk (KERN_DEBUG "High memory starts at vaddr %08lx\n" , (ulong )pfn_to_kaddr (highstart_pfn)); + __vmalloc_start_set = true;setup_bootmem_allocator (); }
arch/x86/mm/tlb.c +1 -3
@@ -107,8 +107,6 @@ static void flush_tlb_func(void *info)if (this_cpu_read (cpu_tlbstate.state) ==TLBSTATE_OK ) {if (f->flush_end ==TLB_FLUSH_ALL )local_flush_tlb (); -else if (!f->flush_end) -__flush_tlb_single (f->flush_start);else {unsigned long addr; addr = f->flush_start;
@@ -248,7 +246,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long start) }if (cpumask_any_but (mm_cpumask (mm),smp_processor_id ()) < nr_cpu_ids) -flush_tlb_others (mm_cpumask (mm), mm, start,0UL ); +flush_tlb_others (mm_cpumask (mm), mm, start, start +PAGE_SIZE );preempt_enable (); }
arch/x86/um/ptrace_64.c +1 -1
@@ -120,7 +120,7 @@ int poke_user(struct task_struct *child, long addr, long data) else if ((addr >= offsetof(struct user, u_debugreg[0])) && (addr <= offsetof(struct user, u_debugreg[7]))) { addr -= offsetof(struct user, u_debugreg[0]); - addr = addr >>2 ; + addr = addr >>3 ;if ((addr ==4 ) || (addr ==5 ))return -EIO ; child->thread.arch.debugregs[addr] = data;
drivers/Makefile +1 -0
@@ -91,6 +91,7 @@ obj-$(CONFIG_USB_PHY) += usb/ obj-$(CONFIG_USB) += usb/ obj-$(CONFIG_PCI) += usb/ obj-$(CONFIG_USB_GADGET) += usb/ +obj-$(CONFIG_OF) += usb/ obj-$(CONFIG_SERIO) += input/serio/ obj-$(CONFIG_GAMEPORT) += input/gameport/ obj-$(CONFIG_INPUT) += input/
drivers/ata/libata-scsi.c +8 -0
@@ -3097,6 +3097,14 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)if (unlikely (!dev->dma_mode)) goto invalid_fld; +/* +* We only allow sending this command through the block layer, +* as it modifies the DATA OUT buffer, which would corrupt user +* memory for SG_IO commands. +*/ +if (unlikely (scmd->request->cmd_type !=REQ_TYPE_FS )) + goto invalid_fld; +if (unlikely (scmd->cmd_len <16 )) goto invalid_fld;scsi_16_lba_len (cdb, &block, &n_block);
drivers/gpu/drm/drm_edid.c +8 -0
@@ -74,6 +74,8 @@#define EDID_QUIRK_FORCE_12BPC (1 << 9)/* Force 6bpc */ #define EDID_QUIRK_FORCE_6BPC (1 << 10) +/* Force 10bpc */ +#define EDID_QUIRK_FORCE_10BPC (1 << 11)struct detailed_mode_closure {struct drm_connector *connector;
@@ -116,6 +118,9 @@ static struct edid_quirk { {"FCM" ,13600 ,EDID_QUIRK_PREFER_LARGE_75 | EDID_QUIRK_DETAILED_IN_CM }, +/* LGD panel of HP zBook 17 G2, eDP 10 bpc, but reports unknown bpc */ + { "LGD", 764, EDID_QUIRK_FORCE_10BPC }, +/* LG Philips LCD LP154W01-A5 */ { "LPL", 0, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE }, { "LPL", 0x2a00, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE },
@@ -3678,6 +3683,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)if (quirks &EDID_QUIRK_FORCE_8BPC ) connector->display_info.bpc =8 ; +if (quirks &EDID_QUIRK_FORCE_10BPC ) + connector->display_info.bpc =10 ; +if (quirks &EDID_QUIRK_FORCE_12BPC ) connector->display_info.bpc =12 ;
drivers/hsi/clients/ssi_protocol.c +3 -2
@@ -976,7 +976,7 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev) goto drop;/* Pad to 32-bits - FIXME: Revisit*/ if ((skb->len &3 ) &&skb_pad (skb,4 - (skb->len &3 ))) - goto drop; + goto inc_dropped;/* * Modem sends Phonet messages over SSI with its own endianess...
@@ -1028,8 +1028,9 @@ static int ssip_pn_xmit(struct sk_buff *skb, struct net_device *dev) drop2:hsi_free_msg (msg); drop: - dev->stats.tx_dropped++;dev_kfree_skb (skb); +inc_dropped: + dev->stats.tx_dropped++;return 0 ; }
drivers/iio/dac/ad7303.c +3 -3
@@ -184,9 +184,9 @@ static const struct iio_chan_spec_ext_info ad7303_ext_info[] = { .address = (chan), \ .scan_type = { \ .sign = 'u', \ - .realbits = '8', \ - .storagebits = '8', \ - .shift = '0', \ + .realbits = 8, \ + .storagebits = 8, \ + .shift = 0, \ }, \ .ext_info = ad7303_ext_info, \ }
drivers/iio/proximity/as3935.c +1 -2
@@ -50,7 +50,6 @@#define AS3935_TUNE_CAP 0x08#define AS3935_CALIBRATE 0x3D -#define AS3935_WRITE_DATA BIT(15)#define AS3935_READ_DATA BIT(14)#define AS3935_ADDRESS (x) ((x) << 8)
@@ -105,7 +104,7 @@ static int as3935_write(struct as3935_state *st, {u8 *buf = st->buf; - buf[0 ] = (AS3935_WRITE_DATA |AS3935_ADDRESS (reg)) >>8 ; + buf[0 ] =AS3935_ADDRESS (reg) >>8 ; buf[1 ] = val;return spi_write (st->spi, buf,2 );
drivers/infiniband/core/uverbs_cmd.c +9 -4
@@ -2577,6 +2577,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,struct ib_qp *qp;struct ib_uverbs_mcast_entry *mcast;int ret = -EINVAL ; +bool found = false;if (copy_from_user (&cmd, buf,sizeof cmd))return -EFAULT ;
@@ -2585,10 +2586,6 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,if (!qp)return -EINVAL ; - ret =ib_detach_mcast (qp, (union ib_gid *) cmd.gid, cmd.mlid); -if (ret) - goto out_put; - obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject);list_for_each_entry (mcast, &obj->mcast_list, list)
@@ -2596,9 +2593,17 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) {list_del (&mcast->list);kfree (mcast); + found = true;break ; } +if (!found) { + ret = -EINVAL ; + goto out_put; + } + + ret =ib_detach_mcast (qp, (union ib_gid *)cmd.gid, cmd.mlid); + out_put:put_qp_write (qp);
drivers/infiniband/core/verbs.c +6 -2
@@ -1346,7 +1346,9 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)if (!qp->device->attach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <0xC000 || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ; ret = qp->device->attach_mcast (qp, gid, lid);
@@ -1362,7 +1364,9 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)if (!qp->device->detach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <0xC000 || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ; ret = qp->device->detach_mcast (qp, gid, lid);
drivers/infiniband/hw/mlx4/main.c +1 -0
@@ -2281,6 +2281,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)mlx4_counter_free (ibdev->dev, ibdev->counters[i -1 ]); err_map: +mlx4_ib_free_eqs (dev, ibdev);iounmap (ibdev->uar_map); err_uar:
drivers/infiniband/ulp/ipoib/ipoib_fs.c +5 -4
@@ -281,10 +281,11 @@ void ipoib_delete_debug_files(struct net_device *dev) {struct ipoib_dev_priv *priv =netdev_priv (dev); -if (priv->mcg_dentry) -debugfs_remove (priv->mcg_dentry); -if (priv->path_dentry) -debugfs_remove (priv->path_dentry); +WARN_ONCE (!priv->mcg_dentry,"null mcg debug file\n" ); +WARN_ONCE (!priv->path_dentry,"null path debug file\n" ); +debugfs_remove (priv->mcg_dentry); +debugfs_remove (priv->path_dentry); + priv->mcg_dentry = priv->path_dentry =NULL ; }int ipoib_register_debugfs (void )
drivers/infiniband/ulp/ipoib/ipoib_ib.c +13 -0
@@ -961,6 +961,19 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)*/ priv->dev->broadcast[8 ] = priv->pkey >>8 ; priv->dev->broadcast[9 ] = priv->pkey &0xff ; + +/* +* Update the broadcast address in the priv->broadcast object, +* in case it already exists, otherwise no one will do that. +*/ +if (priv->broadcast) { +spin_lock_irq (&priv->lock); +memcpy (priv->broadcast->mcmember.mgid.raw, + priv->dev->broadcast +4 , +sizeof (union ib_gid )); +spin_unlock_irq (&priv->lock); + } +return 0 ; }
drivers/infiniband/ulp/ipoib/ipoib_main.c +39 -5
86 lines not on this page · raw message
drivers/infiniband/ulp/ipoib/ipoib_vlan.c +0 -3
@@ -86,8 +86,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, priv->parent = ppriv->dev; -ipoib_create_debug_files (priv->dev); -/* RTNL childs don't need proprietary sysfs entries */ if (type ==IPOIB_LEGACY_CHILD ) {if (ipoib_cm_add_mode_attr (priv->dev))
@@ -109,7 +107,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, sysfs_failed: result = -ENOMEM ; -ipoib_delete_debug_files (priv->dev);unregister_netdevice (priv->dev); register_failed:
drivers/input/misc/twl4030-pwrbutton.c +1 -1
@@ -70,7 +70,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev) pwr->phys ="twl4030_pwrbutton/input0" ; pwr->dev.parent = &pdev->dev; - err =devm_request_threaded_irq (&pwr->dev, irq,NULL , powerbutton_irq, + err =devm_request_threaded_irq (&pdev->dev, irq,NULL , powerbutton_irq,IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING ,"twl4030_pwrbutton" , pwr);if (err <0 ) {
drivers/md/dm-bufio.c +5 -4
@@ -873,10 +873,11 @@ static void __get_memory_limit(struct dm_bufio_client *c, {unsigned long buffers; -if (ACCESS_ONCE (dm_bufio_cache_size) != dm_bufio_cache_size_latch) { -mutex_lock (&dm_bufio_clients_lock); -__cache_size_refresh (); -mutex_unlock (&dm_bufio_clients_lock); +if (unlikely (ACCESS_ONCE (dm_bufio_cache_size) != dm_bufio_cache_size_latch)) { +if (mutex_trylock (&dm_bufio_clients_lock)) { +__cache_size_refresh (); +mutex_unlock (&dm_bufio_clients_lock); + } } buffers = dm_bufio_cache_size_per_client >>
drivers/md/dm-era-target.c +4 -4
@@ -957,15 +957,15 @@ static int metadata_commit(struct era_metadata *md) } } - r =save_sm_root (md); + r =dm_tm_pre_commit (md->tm);if (r) { -DMERR ("%s: save_sm_root failed" , __func__); +DMERR ("%s: pre commit failed" , __func__);return r; } - r =dm_tm_pre_commit (md->tm); + r =save_sm_root (md);if (r) { -DMERR ("%s: pre commit failed" , __func__); +DMERR ("%s: save_sm_root failed" , __func__);return r; }
drivers/md/dm-ioctl.c +1 -1
@@ -1839,7 +1839,7 @@ static int ctl_ioctl(uint command, struct dm_ioctl __user *user)if (r) goto out; - param->data_size =sizeof (*param); + param->data_size = offsetof(struct dm_ioctl , data); r =fn (param, input_param_size); if (unlikely(param->flags & DM_BUFFER_FULL_FLAG) &&
drivers/md/persistent-data/dm-btree.c +6 -2
@@ -804,8 +804,12 @@ static int find_key(struct ro_spine *s, dm_block_t block, bool find_highest,else *result_key =le64_to_cpu (ro_node (s)->keys[0 ]); -if (next_block || flags &INTERNAL_NODE ) - block =value64 (ro_node (s), i); +if (next_block || flags &INTERNAL_NODE ) { +if (find_highest) + block =value64 (ro_node (s), i); +else + block =value64 (ro_node (s),0 ); + } }while (flags &INTERNAL_NODE );
drivers/media/i2c/soc_camera/ov2640.c +4 -2
@@ -713,8 +713,10 @@ static int ov2640_s_ctrl(struct v4l2_ctrl *ctrl)switch (ctrl->id) {case V4L2_CID_VFLIP : - val = ctrl->val ?REG04_VFLIP_IMG :0x00 ; -return ov2640_mask_set (client,REG04 ,REG04_VFLIP_IMG , val); + val = ctrl->val ?REG04_VFLIP_IMG |REG04_VREF_EN :0x00 ; +return ov2640_mask_set (client,REG04 , +REG04_VFLIP_IMG |REG04_VREF_EN , val); +/* NOTE: REG04_VREF_EN: 1 line shift / even/odd line swap */ case V4L2_CID_HFLIP : val = ctrl->val ?REG04_HFLIP_IMG :0x00 ;return ov2640_mask_set (client,REG04 ,REG04_HFLIP_IMG , val);
drivers/media/platform/s5p-mfc/s5p_mfc.c +1 -0
@@ -169,6 +169,7 @@ static void s5p_mfc_watchdog_worker(struct work_struct *work) }s5p_mfc_clock_on (); ret =s5p_mfc_init_hw (dev); +s5p_mfc_clock_off ();if (ret)mfc_err ("Failed to reinit FW\n" ); }
drivers/media/rc/mceusb.c +2 -2
@@ -1299,8 +1299,8 @@ static int mceusb_dev_probe(struct usb_interface *intf, } } } -if (ep_in ==NULL ) { -dev_dbg (&intf->dev,"inbound and/or endpoint not found" ); +if (!ep_in || !ep_out) { +dev_dbg (&intf->dev,"required endpoints not found\n" );return -ENODEV ; }
drivers/media/usb/cx231xx/cx231xx-audio.c +28 -13
75 lines not on this page · raw message
drivers/media/usb/cx231xx/cx231xx-cards.c +40 -6
94 lines not on this page · raw message
drivers/media/usb/dvb-usb/dib0700_core.c +3 -0
@@ -769,6 +769,9 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)/* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ +if (intf->altsetting[0 ].desc.bNumEndpoints < rc_ep +1 ) +return -ENODEV ; + purb =usb_alloc_urb (0 ,GFP_KERNEL );if (purb ==NULL ) {err ("rc usb alloc urb failed" );
drivers/media/usb/dvb-usb/digitv.c +4 -0
@@ -30,6 +30,10 @@ static int digitv_ctrl_msg(struct dvb_usb_device *d, {int wo = (rbuf ==NULL || rlen ==0 );/* write-only */ u8 sndbuf[7 ],rcvbuf[7 ]; + +if (wlen >4 || rlen >4 ) +return -EIO ; +memset (sndbuf,0 ,7 );memset (rcvbuf,0 ,7 ); sndbuf[0 ] = cmd;
drivers/media/usb/dvb-usb/dw2102.c +54 -0
90 lines not on this page · raw message
drivers/media/usb/dvb-usb/ttusb2.c +19 -0
@@ -78,6 +78,9 @@ static int ttusb2_msg(struct dvb_usb_device *d, u8 cmd,u8 *s, *r =NULL ;int ret =0 ; +if (4 + rlen >64 ) +return -EIO ; + s =kzalloc (wlen+4 ,GFP_KERNEL );if (!s)return -ENOMEM ;
@@ -381,6 +384,22 @@ static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num write_read = i+1 < num && (msg[i+1 ].flags &I2C_M_RD ); read = msg[i].flags &I2C_M_RD ; +if (3 + msg[i].len >sizeof (obuf)) { +err ("i2c wr len=%d too high" , msg[i].len); +break ; + } +if (write_read) { +if (3 + msg[i+1 ].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i+1 ].len); +break ; + } + }else if (read) { +if (3 + msg[i].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i].len); +break ; + } + } + obuf[0 ] = (msg[i].addr <<1 ) | (write_read | read);if (read) obuf[1 ] =0 ;
drivers/media/usb/gspca/konica.c +3 -0
@@ -188,6 +188,9 @@ static int sd_start(struct gspca_dev *gspca_dev)return -EIO ; } +if (alt->desc.bNumEndpoints <2 ) +return -ENODEV ; + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize); n = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
drivers/media/usb/pvrusb2/pvrusb2-eeprom.c +4 -9
@@ -123,15 +123,10 @@ int pvr2_eeprom_analyze(struct pvr2_hdw *hdw)memset (&tvdata,0 ,sizeof (tvdata)); eeprom =pvr2_eeprom_fetch (hdw); -if (!eeprom)return -EINVAL ; - - { -struct i2c_client fake_client; -/* Newer version expects a useless client interface */ - fake_client.addr = hdw->eeprom_addr; - fake_client.adapter = &hdw->i2c_adap; -tveeprom_hauppauge_analog (&fake_client,&tvdata,eeprom); - } +if (!eeprom) +return -EINVAL ; + +tveeprom_hauppauge_analog (NULL , &tvdata, eeprom);trace_eeprom ("eeprom assumed v4l tveeprom module" );trace_eeprom ("eeprom direct call results:" );
drivers/media/usb/usbvision/usbvision-video.c +8 -1
@@ -1599,7 +1599,14 @@ static int usbvision_probe(struct usb_interface *intf, }for (i =0 ; i < usbvision->num_alt; i++) { -u16 tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. +u16 tmp; + +if (uif->altsetting[i].desc.bNumEndpoints <2 ) { + ret = -ENODEV ; + goto err_pkt; + } + + tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. wMaxPacketSize); usbvision->alt_max_pkt_size[i] = (tmp &0x07ff ) * (((tmp &0x1800 ) >>11 ) +1 );
drivers/media/usb/uvc/uvc_video.c +1 -1
@@ -810,7 +810,7 @@ static void uvc_video_stats_decode(struct uvc_streaming *stream,/* Update the packets counters. */ stream->stats.frame.nb_packets++; -if (len > header_size) +if (len <= header_size) stream->stats.frame.nb_empty++;if (data[1 ] &UVC_STREAM_ERR )
drivers/media/usb/zr364xx/zr364xx.c +8 -0
@@ -605,6 +605,14 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam, ptr = pdest = frm->lpvbits;if (frm->ulState ==ZR364XX_READ_IDLE ) { +if (purb->actual_length <128 ) { +/* header incomplete */ +dev_info (&cam->udev->dev, +"%s: buffer (%d bytes) too small to hold jpeg header. Discarding.\n" , + __func__, purb->actual_length); +return -EINVAL ; + } + frm->ulState =ZR364XX_READ_FRAME ; frm->cur_size =0 ;
drivers/mfd/omap-usb-tll.c +1 -1
@@ -376,8 +376,8 @@ int omap_tll_init(struct usbhs_omap_platform_data *pdata)* and use SDR Mode */ reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE - |OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF |OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE ); + reg |=OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF ; }else if (pdata->port_mode[i] ==OMAP_EHCI_PORT_MODE_HSIC ) {/*
drivers/mtd/nand/fsmc_nand.c +5 -4
@@ -874,18 +874,19 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,struct fsmc_nand_platform_data *pdata =dev_get_platdata (&pdev->dev);u32 val; -/* Set default NAND width to 8 bits */ - pdata->width =8 ; + pdata->options =0 ; +if (!of_property_read_u32 (np,"bank-width" , &val)) {if (val ==2 ) { - pdata->width =16 ; + pdata->options |=NAND_BUSWIDTH_16 ; }else if (val !=1 ) {dev_err (&pdev->dev,"invalid bank-width %u\n" , val);return -EINVAL ; } } +if (of_get_property (np,"nand-skip-bbtscan" ,NULL )) - pdata->options =NAND_SKIP_BBTSCAN ; + pdata->options |=NAND_SKIP_BBTSCAN ; pdata->nand_timings =devm_kzalloc (&pdev->dev,sizeof (*pdata->nand_timings),GFP_KERNEL );
drivers/net/ethernet/broadcom/tg3.c +0 -4
@@ -11709,10 +11709,6 @@ static int tg3_close(struct net_device *dev)tg3_stop (tp); -/* Clear stats across close / open calls */ -memset (&tp->net_stats_prev,0 ,sizeof (tp->net_stats_prev)); -memset (&tp->estats_prev,0 ,sizeof (tp->estats_prev)); -if (pci_device_is_present (tp->pdev)) {tg3_power_down_prepare (tp);
drivers/net/ethernet/freescale/ucc_geth.c +3 -5
@@ -2590,11 +2590,10 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) }else if (ugeth->ug_info->uf_info.bd_mem_part ==MEM_PART_MURAM ) {out_be32 (&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base, - (u32 )immrbar_virt_to_phys (ugeth-> - p_tx_bd_ring[i])); + (u32 )qe_muram_dma (ugeth->p_tx_bd_ring[i]));out_be32 (&ugeth->p_send_q_mem_reg->sqqd[i]. last_bd_completed_address, - (u32 )immrbar_virt_to_phys (endOfRing)); + (u32 )qe_muram_dma (endOfRing)); } }
@@ -2840,8 +2839,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) }else if (ugeth->ug_info->uf_info.bd_mem_part ==MEM_PART_MURAM ) {out_be32 (&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, - (u32 )immrbar_virt_to_phys (ugeth-> - p_rx_bd_ring[i])); + (u32 )qe_muram_dma (ugeth->p_rx_bd_ring[i])); }/* rest of fields handled by QE */ }
drivers/net/ethernet/mellanox/mlx4/en_rx.c +2 -1
@@ -993,7 +993,8 @@ void mlx4_en_calc_rx_buf(struct net_device *dev)en_dbg (DRV , priv,"Rx buffer scatter-list (effective-mtu:%d num_frags:%d):\n" , eff_mtu, priv->num_frags);for (i =0 ; i < priv->num_frags; i++) { - en_err(priv, + en_dbg(DRV, + priv, " frag:%d - size:%d prefix:%d align:%d stride:%d\n", i, priv->frag_info[i].frag_size,
drivers/net/ethernet/mellanox/mlx4/mcg.c +11 -4
@@ -35,6 +35,7 @@#include <linux/etherdevice.h> #include <linux/mlx4/cmd.h> +#include <linux/mlx4/qp.h> #include <linux/export.h> #include "mlx4.h"
@@ -889,16 +890,21 @@ int mlx4_flow_attach(struct mlx4_dev *dev,if (IS_ERR (mailbox))return PTR_ERR (mailbox); +if (!mlx4_qp_lookup (dev, rule->qpn)) { +mlx4_err_rule (dev,"QP doesn't exist\n" , rule); + ret = -EINVAL ; + goto out; + } +trans_rule_ctrl_to_hw (rule, mailbox->buf); size +=sizeof (struct mlx4_net_trans_rule_hw_ctrl );list_for_each_entry (cur, &rule->list, list) { ret =parse_trans_rule (dev, cur, mailbox->buf + size); -if (ret <0 ) { -mlx4_free_cmd_mailbox (dev, mailbox); -return ret; - } +if (ret <0 ) + goto out; + size += ret; }
@@ -910,6 +916,7 @@ int mlx4_flow_attach(struct mlx4_dev *dev,else if (ret)mlx4_err_rule (dev,"Fail to register network rule\n" , rule); +out:mlx4_free_cmd_mailbox (dev, mailbox);return ret;
drivers/net/ethernet/mellanox/mlx4/qp.c +13 -0
@@ -355,6 +355,19 @@ static void mlx4_qp_free_icm(struct mlx4_dev *dev, int qpn)__mlx4_qp_free_icm (dev, qpn); } +struct mlx4_qp *mlx4_qp_lookup (struct mlx4_dev *dev,u32 qpn) +{ +struct mlx4_qp_table *qp_table = &mlx4_priv (dev)->qp_table; +struct mlx4_qp *qp; + +spin_lock (&qp_table->lock); + + qp =__mlx4_qp_lookup (dev, qpn); + +spin_unlock (&qp_table->lock); +return qp; +} +int mlx4_qp_alloc (struct mlx4_dev *dev,int qpn,struct mlx4_qp *qp,gfp_t gfp) {struct mlx4_priv *priv =mlx4_priv (dev);
drivers/net/virtio_net.c +26 -4
@@ -27,6 +27,7 @@#include <linux/slab.h> #include <linux/cpu.h> #include <linux/average.h> +#include <net/route.h> static int napi_weight =NAPI_POLL_WEIGHT ;module_param (napi_weight, int,0444 );
@@ -92,6 +93,9 @@ struct receive_queue {/* RX: fragments + linear part + virtio header */ struct scatterlist sg[MAX_SKB_FRAGS +2 ]; +/* Min single buffer size for mergeable buffers case. */ +unsigned int min_buf_len; +/* Name of this receive queue: input.$index */ char name[40 ]; };
@@ -600,13 +604,14 @@ static int add_recvbuf_big(struct receive_queue *rq, gfp_t gfp)return err; } -static unsigned int get_mergeable_buf_len (struct ewma *avg_pkt_len) +static unsigned int get_mergeable_buf_len (struct receive_queue *rq, +struct ewma *avg_pkt_len) {const size_t hdr_len =sizeof (struct virtio_net_hdr_mrg_rxbuf );unsigned int len; len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), -GOOD_PACKET_LEN ,PAGE_SIZE - hdr_len); + rq->min_buf_len - hdr_len,PAGE_SIZE - hdr_len);return ALIGN (len,MERGEABLE_BUFFER_ALIGN ); }
@@ -618,7 +623,7 @@ static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp)int err;unsigned int len, hole; - len =get_mergeable_buf_len (&rq->mrg_avg_pkt_len); + len =get_mergeable_buf_len (rq, &rq->mrg_avg_pkt_len);if (unlikely (!skb_page_frag_refill (len, alloc_frag, gfp)))return -ENOMEM ;
@@ -1462,6 +1467,21 @@ static void virtnet_del_vqs(struct virtnet_info *vi)virtnet_free_queues (vi); } +/* How large should a single buffer be so a queue full of these can fit at +* least one full packet? +* Logic below assumes the mergeable buffer header is used. +*/ +static unsigned int mergeable_min_buf_len (struct virtnet_info *vi,struct virtqueue *vq) +{ +const unsigned int hdr_len =sizeof (struct virtio_net_hdr_mrg_rxbuf ); +unsigned int rq_size =virtqueue_get_vring_size (vq); +unsigned int packet_len =IP_MAX_MTU ; +unsigned int buf_len = hdr_len +ETH_HLEN +VLAN_HLEN + packet_len; +unsigned int min_buf_len =DIV_ROUND_UP (buf_len, rq_size); + +return max (min_buf_len, hdr_len); +} +static int virtnet_find_vqs (struct virtnet_info *vi) {vq_callback_t **callbacks;
@@ -1517,6 +1537,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)for (i =0 ; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq (i)]; + vi->rq[i].min_buf_len =mergeable_min_buf_len (vi, vi->rq[i].vq); vi->sq[i].vq = vqs[txq2vq (i)]; }
@@ -1601,7 +1622,8 @@ static ssize_t mergeable_rx_buffer_size_show(struct netdev_rx_queue *queue,BUG_ON (queue_index >= vi->max_queue_pairs); avg = &vi->rq[queue_index].mrg_avg_pkt_len; -return sprintf (buf,"%u\n" ,get_mergeable_buf_len (avg)); +return sprintf (buf,"%u\n" , +get_mergeable_buf_len (&vi->rq[queue_index], avg)); } static struct rx_queue_attribute mergeable_rx_buffer_size_attribute =
drivers/net/wireless/ath/ath9k/eeprom.c +1 -1
@@ -118,7 +118,7 @@ static bool ath9k_hw_nvram_read_blob(struct ath_hw *ah, u32 off, {u16 *blob_data; -if (off *sizeof (u16) > ah->eeprom_blob->size) +if (off *sizeof (u16) >= ah->eeprom_blob->size)return false; blob_data = (u16 *)ah->eeprom_blob->data;
drivers/net/wireless/ath/ath9k/hif_usb.c +7 -0
@@ -40,6 +40,8 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { { USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */ { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */ { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ + { USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */ + { USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */ { USB_DEVICE(0x0cf3, 0x7015), .driver_info = AR9287_USB }, /* Atheros */
@@ -58,6 +60,8 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { .driver_info = AR9280_USB }, /* Buffalo WLI-UV-AG300P */ { USB_DEVICE(0x04da, 0x3904), .driver_info = AR9280_USB }, + { USB_DEVICE(0x0930, 0x0a08), + .driver_info = AR9280_USB }, /* Toshiba WLM-20U2 and GN-1080 */ { USB_DEVICE(0x0cf3, 0x20ff), .driver_info = STORAGE_DEVICE },
@@ -1143,6 +1147,9 @@ static int send_eject_command(struct usb_interface *interface)u8 bulk_out_ep;int r; +if (iface_desc->desc.bNumEndpoints <2 ) +return -ENODEV ; +/* Find bulk out endpoint */ for (r =1 ; r >=0 ; r--) { endpoint = &iface_desc->endpoint[r].desc;
drivers/net/wireless/mwifiex/pcie.c +7 -0
@@ -905,6 +905,7 @@ static int mwifiex_pcie_delete_cmdrsp_buf(struct mwifiex_adapter *adapter)if (card && card->cmd_buf) {mwifiex_unmap_pci_memory (adapter, card->cmd_buf,PCI_DMA_TODEVICE ); +dev_kfree_skb_any (card->cmd_buf); }return 0 ; }
@@ -1446,6 +1447,11 @@ mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)return -1 ; card->cmd_buf = skb; +/* +* Need to keep a reference, since core driver might free up this +* buffer before we've unmapped it. +*/ +skb_get (skb);/* To send a command, the driver will: 1. Write the 64bit physical address of the data buffer to
@@ -1542,6 +1548,7 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)if (card->cmd_buf) {mwifiex_unmap_pci_memory (adapter, card->cmd_buf,PCI_DMA_TODEVICE ); +dev_kfree_skb_any (card->cmd_buf); card->cmd_buf =NULL ; }
drivers/net/wireless/zd1211rw/zd_usb.c +3 -0
@@ -1278,6 +1278,9 @@ static int eject_installer(struct usb_interface *intf)u8 bulk_out_ep;int r; +if (iface_desc->desc.bNumEndpoints <2 ) +return -ENODEV ; +/* Find bulk out endpoint */ for (r =1 ; r >=0 ; r--) { endpoint = &iface_desc->endpoint[r].desc;
drivers/of/address.c +1 -1
@@ -258,7 +258,7 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser,if (!parser->range || parser->range + parser->np > parser->end)return NULL ; - range->pci_space = parser->range[0 ]; + range->pci_space =be32_to_cpup (parser->range); range->flags =of_bus_pci_get_flags (parser->range); range->pci_addr =of_read_number (parser->range +1 , ns); range->cpu_addr = of_translate_address(parser->node,
drivers/pci/host/pcie-designware.c +14 -14
@@ -158,25 +158,25 @@ static struct irq_chip dw_msi_irq_chip = {/* MSI int handler */ irqreturn_t dw_handle_msi_irq (struct pcie_port *pp) { -unsigned long val; +u32 val;int i, pos, irq;irqreturn_t ret =IRQ_NONE ;for (i =0 ; i <MAX_MSI_CTRLS ; i++) {dw_pcie_rd_own_conf (pp,PCIE_MSI_INTR0_STATUS + i *12 ,4 , - (u32 *)&val); -if (val) { - ret =IRQ_HANDLED ; - pos =0 ; -while ((pos =find_next_bit (&val,32 , pos)) !=32 ) { - irq =irq_find_mapping (pp->irq_domain, - i *32 + pos); -dw_pcie_wr_own_conf (pp, -PCIE_MSI_INTR0_STATUS + i *12 , -4 ,1 << pos); -generic_handle_irq (irq); - pos++; - } + &val); +if (!val) +continue ; + + ret =IRQ_HANDLED ; + pos =0 ; +while ((pos =find_next_bit ((unsigned long *) &val,32 , + pos)) !=32 ) { + irq =irq_find_mapping (pp->irq_domain, i *32 + pos); +dw_pcie_wr_own_conf (pp,PCIE_MSI_INTR0_STATUS + i *12 , +4 ,1 << pos); +generic_handle_irq (irq); + pos++; } }
drivers/pci/pci-sysfs.c +7 -3
@@ -965,15 +965,19 @@ void pci_remove_legacy_files(struct pci_bus *b)int pci_mmap_fits (struct pci_dev *pdev,int resno,struct vm_area_struct *vma,enum pci_mmap_api mmap_api) { -unsigned long nr, start, size, pci_start; +unsigned long nr, start, size; +resource_size_t pci_start =0 , pci_end;if (pci_resource_len (pdev, resno) ==0 )return 0 ; nr =vma_pages (vma); start = vma->vm_pgoff; size = ((pci_resource_len (pdev, resno) -1 ) >>PAGE_SHIFT ) +1 ; - pci_start = (mmap_api ==PCI_MMAP_PROCFS ) ? -pci_resource_start (pdev, resno) >>PAGE_SHIFT :0 ; +if (mmap_api ==PCI_MMAP_PROCFS ) { +pci_resource_to_user (pdev, resno, &pdev->resource[resno], + &pci_start, &pci_end); + pci_start >>=PAGE_SHIFT ; + }if (start >= pci_start && start < pci_start + size && start + nr <= pci_start + size)return 1 ;
drivers/pci/pci.c +5 -4
@@ -1676,8 +1676,8 @@ static void pci_pme_list_scan(struct work_struct *work) } }if (!list_empty (&pci_pme_list)) -schedule_delayed_work (&pci_pme_work, -msecs_to_jiffies (PME_TIMEOUT )); +queue_delayed_work (system_freezable_wq, &pci_pme_work, +msecs_to_jiffies (PME_TIMEOUT ));mutex_unlock (&pci_pme_list_mutex); }
@@ -1737,8 +1737,9 @@ void pci_pme_active(struct pci_dev *dev, bool enable)mutex_lock (&pci_pme_list_mutex);list_add (&pme_dev->list, &pci_pme_list);if (list_is_singular (&pci_pme_list)) -schedule_delayed_work (&pci_pme_work, -msecs_to_jiffies (PME_TIMEOUT )); +queue_delayed_work (system_freezable_wq, + &pci_pme_work, +msecs_to_jiffies (PME_TIMEOUT ));mutex_unlock (&pci_pme_list_mutex); }else {mutex_lock (&pci_pme_list_mutex);
drivers/pci/proc.c +16 -4
@@ -231,23 +231,35 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) {struct pci_dev *dev =PDE_DATA (file_inode (file));struct pci_filp_private *fpriv = file->private_data; -int i, ret; +int i, ret, write_combine =0 , res_bit;if (!capable (CAP_SYS_RAWIO ))return -EPERM ; +if (fpriv->mmap_state == pci_mmap_io) + res_bit =IORESOURCE_IO ; +else + res_bit =IORESOURCE_MEM ; +/* Make sure the caller is mapping a real resource for this device */ for (i =0 ; i <PCI_ROM_RESOURCE ; i++) { -if (pci_mmap_fits (dev, i, vma,PCI_MMAP_PROCFS )) +if (dev->resource[i].flags & res_bit && +pci_mmap_fits (dev, i, vma,PCI_MMAP_PROCFS ))break ; }if (i >=PCI_ROM_RESOURCE )return -ENODEV ; +if (fpriv->mmap_state == pci_mmap_mem && + fpriv->write_combine) { +if (dev->resource[i].flags &IORESOURCE_PREFETCH ) + write_combine =1 ; +else +return -EINVAL ; + } ret =pci_mmap_page_range (dev, vma, - fpriv->mmap_state, - fpriv->write_combine); + fpriv->mmap_state, write_combine);if (ret <0 )return ret;
drivers/pci/quirks.c +24 -0
@@ -1637,6 +1637,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x260b , quirk_intel_pcie_pm);#ifdef CONFIG_X86_IO_APIC +static int dmi_disable_ioapicreroute (const struct dmi_system_id *d) +{ + noioapicreroute =1 ; +pr_info ("%s detected: disable boot interrupt reroute\n" , d->ident); + +return 0 ; +} + +static struct dmi_system_id boot_interrupt_dmi_table[] = { +/* +* Systems to exclude from boot interrupt reroute quirks +*/ + { + .callback = dmi_disable_ioapicreroute, + .ident ="ASUSTek Computer INC. M2N-LR" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTek Computer INC." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"M2N-LR" ), + }, + }, + {} +}; +/* * Boot interrupts on some chipsets cannot be turned off. For these chipsets, * remap the original interrupt in the linux kernel to the boot interrupt, so
@@ -1645,6 +1668,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm);*/ static void quirk_reroute_to_boot_interrupts_intel (struct pci_dev *dev) { +dmi_check_system (boot_interrupt_dmi_table);if (noioapicquirk || noioapicreroute)return ;
drivers/pinctrl/sh-pfc/core.c +3 -0
@@ -529,6 +529,9 @@ static int sh_pfc_probe(struct platform_device *pdev) ret = info->ops->init (pfc);if (ret <0 )return ret; + +/* .init() may have overridden pfc->info */ + info = pfc->info; }pinctrl_provide_dummies ();
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +11 -7
@@ -192,7 +192,7 @@ enum {/* IPSR6 */ FN_AUDIO_CLKB ,FN_STP_OPWM_0_B ,FN_MSIOF1_SCK_B , -FN_SCIF_CLK ,FN_BPFCLK_E , +FN_SCIF_CLK ,FN_DVC_MUTE ,FN_BPFCLK_E ,FN_AUDIO_CLKC ,FN_SCIFB0_SCK_C ,FN_MSIOF1_SYNC_B ,FN_RX2 ,FN_SCIFA2_RXD ,FN_FMIN_E , FN_AUDIO_CLKOUT, FN_MSIOF1_SS1_B, FN_TX2, FN_SCIFA2_TXD,
@@ -562,7 +562,7 @@ enum {/* IPSR6 */ AUDIO_CLKB_MARK ,STP_OPWM_0_B_MARK ,MSIOF1_SCK_B_MARK , -SCIF_CLK_MARK ,BPFCLK_E_MARK , +SCIF_CLK_MARK ,DVC_MUTE_MARK ,BPFCLK_E_MARK ,AUDIO_CLKC_MARK ,SCIFB0_SCK_C_MARK ,MSIOF1_SYNC_B_MARK ,RX2_MARK ,SCIFA2_RXD_MARK ,FMIN_E_MARK , AUDIO_CLKOUT_MARK, MSIOF1_SS1_B_MARK, TX2_MARK, SCIFA2_TXD_MARK,
@@ -999,14 +999,17 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MODSEL_DATA (IP4_12_10 ,SCL2 ,SEL_IIC2_0 ),PINMUX_IPSR_MODSEL_DATA (IP4_12_10 ,GPS_CLK_B ,SEL_GPS_1 ),PINMUX_IPSR_MODSEL_DATA (IP4_12_10 ,GLO_Q0_D ,SEL_GPS_3 ), +PINMUX_IPSR_MODSEL_DATA (IP4_12_10 ,HSCK1_E ,SEL_HSCIF1_4 ),PINMUX_IPSR_DATA (IP4_15_13 ,SSI_WS2 ),PINMUX_IPSR_MODSEL_DATA (IP4_15_13 ,SDA2 ,SEL_IIC2_0 ),PINMUX_IPSR_MODSEL_DATA (IP4_15_13 ,GPS_SIGN_B ,SEL_GPS_1 ),PINMUX_IPSR_MODSEL_DATA (IP4_15_13 ,RX2_E ,SEL_SCIF2_4 ),PINMUX_IPSR_MODSEL_DATA (IP4_15_13 ,GLO_Q1_D ,SEL_GPS_3 ), +PINMUX_IPSR_MODSEL_DATA (IP4_15_13 ,HCTS1_N_E ,SEL_HSCIF1_4 ),PINMUX_IPSR_DATA (IP4_18_16 ,SSI_SDATA2 ),PINMUX_IPSR_MODSEL_DATA (IP4_18_16 ,GPS_MAG_B ,SEL_GPS_1 ),PINMUX_IPSR_MODSEL_DATA (IP4_18_16 ,TX2_E ,SEL_SCIF2_4 ), +PINMUX_IPSR_MODSEL_DATA (IP4_18_16 ,HRTS1_N_E ,SEL_HSCIF1_4 ),PINMUX_IPSR_DATA (IP4_19 ,SSI_SCK34 ),PINMUX_IPSR_DATA (IP4_20 ,SSI_WS34 ), PINMUX_IPSR_DATA(IP4_21, SSI_SDATA3),
@@ -1079,6 +1082,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MODSEL_DATA (IP6_2_0 ,STP_OPWM_0_B ,SEL_SSP_1 ),PINMUX_IPSR_MODSEL_DATA (IP6_2_0 ,MSIOF1_SCK_B ,SEL_SOF1_1 ),PINMUX_IPSR_MODSEL_DATA (IP6_2_0 ,SCIF_CLK ,SEL_SCIF_0 ), +PINMUX_IPSR_DATA (IP6_2_0 ,DVC_MUTE ),PINMUX_IPSR_MODSEL_DATA (IP6_2_0 ,BPFCLK_E ,SEL_FM_4 ),PINMUX_IPSR_DATA (IP6_5_3 ,AUDIO_CLKC ), PINMUX_IPSR_MODSEL_DATA(IP6_5_3, SCIFB0_SCK_C, SEL_SCIFB_2),
@@ -1088,7 +1092,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MODSEL_DATA (IP6_5_3 ,FMIN_E ,SEL_FM_4 ),PINMUX_IPSR_DATA (IP6_7_6 ,AUDIO_CLKOUT ),PINMUX_IPSR_MODSEL_DATA (IP6_7_6 ,MSIOF1_SS1_B ,SEL_SOF1_1 ), -PINMUX_IPSR_MODSEL_DATA (IP6_5_3 ,TX2 ,SEL_SCIF2_0 ), +PINMUX_IPSR_MODSEL_DATA (IP6_7_6 ,TX2 ,SEL_SCIF2_0 ),PINMUX_IPSR_MODSEL_DATA (IP6_7_6 ,SCIFA2_TXD ,SEL_SCIFA2_0 ),PINMUX_IPSR_DATA (IP6_9_8 ,IRQ0 ), PINMUX_IPSR_MODSEL_DATA(IP6_9_8, SCIFB1_RXD_D, SEL_SCIFB1_3),
@@ -4956,7 +4960,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { }, {PINMUX_CFG_REG_VAR ("IPSR2" ,0xE6060028 ,32 , 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 3) { -/* IP2_31_20 [2] */ +/* IP2_31_30 [2] */ 0 ,0 ,0 ,0 ,/* IP2_29_27 [3] */ FN_EX_CS3_N, FN_ATADIR0_N, FN_MSIOF2_TXD,
@@ -4976,7 +4980,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {/* IP2_15_13 [3] */ FN_A24 ,FN_DREQ2 ,FN_IO3 ,FN_TX1 ,FN_SCIFA1_TXD ,0 ,0 ,0 , -/* IP2_12_0 [3] */ +/* IP2_12_10 [3] */ FN_A23 ,FN_IO2 ,FN_BPFCLK_B ,FN_RX0 ,FN_SCIFA0_RXD ,0 ,0 ,0 , /* IP2_9_7 [3] */
@@ -5145,7 +5149,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,/* IP6_2_0 [3] */ FN_AUDIO_CLKB ,FN_STP_OPWM_0_B ,FN_MSIOF1_SCK_B , -FN_SCIF_CLK ,0 ,FN_BPFCLK_E , +FN_SCIF_CLK ,FN_DVC_MUTE ,FN_BPFCLK_E , 0, 0, } }, { PINMUX_CFG_REG_VAR("IPSR7", 0xE606003C, 32,
@@ -5287,7 +5291,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {/* IP10_24_22 [3] */ FN_VI0_R1 ,FN_VI2_DATA2 ,FN_GLO_I1_B ,FN_TS_SCK0_C ,FN_ATAG1_N ,0 ,0 ,0 , -/* IP10_21_29 [3] */ +/* IP10_21_19 [3] */ FN_VI0_R0 ,FN_VI2_DATA1 ,FN_GLO_I0_B ,FN_TS_SDATA0_C ,FN_ATACS11_N , 0, 0, 0,
drivers/power/isp1704_charger.c +4 -0
@@ -415,6 +415,10 @@ static int isp1704_charger_probe(struct platform_device *pdev) pdata =devm_kzalloc (&pdev->dev,sizeof (struct isp1704_charger_data ),GFP_KERNEL ); +if (!pdata) { + ret = -ENOMEM ; + goto fail0; + } pdata->enable_gpio = gpio;dev_info (&pdev->dev,"init gpio %d\n" , pdata->enable_gpio);
drivers/power/lp8788-charger.c +1 -1
@@ -642,7 +642,7 @@ static ssize_t lp8788_show_eoc_time(struct device *dev, {struct lp8788_charger *pchg =dev_get_drvdata (dev);char *stime[] = {"400ms" ,"5min" ,"10min" ,"15min" , -"20min" ,"25min" ,"30min" "No timeout" }; +"20min" ,"25min" ,"30min" ,"No timeout" };u8 val;lp8788_read_byte (pchg->lp,LP8788_CHG_EOC , &val);
drivers/power/pda_power.c +27 -22
109 lines not on this page · raw message
drivers/regulator/tps65023-regulator.c +1 -2
@@ -293,8 +293,7 @@ static int tps_65023_probe(struct i2c_client *client,/* Enable setting output voltage by I2C */ regmap_update_bits (tps->regmap,TPS65023_REG_CON_CTRL2 , -TPS65023_REG_CTRL2_CORE_ADJ , -TPS65023_REG_CTRL2_CORE_ADJ ); +TPS65023_REG_CTRL2_CORE_ADJ ,0 );return 0 ; }
drivers/scsi/scsi_error.c +18 -0
@@ -223,6 +223,23 @@ scsi_abort_command(struct scsi_cmnd *scmd)return SUCCESS ; } +/** +* scsi_eh_reset - call into ->eh_action to reset internal counters +* @scmd: scmd to run eh on. +* +* The scsi driver might be carrying internal state about the +* devices, so we need to call into the driver to reset the +* internal state once the error handler is started. +*/ +static void scsi_eh_reset (struct scsi_cmnd *scmd) +{ +if (scmd->request->cmd_type ==REQ_TYPE_FS ) { +struct scsi_driver *sdrv =scsi_cmd_to_driver (scmd); +if (sdrv->eh_reset) + sdrv->eh_reset (scmd); + } +} +/** * scsi_eh_scmd_add - add scsi cmd to error handling. * @scmd: scmd to run eh on.
@@ -252,6 +269,7 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int eh_flag)if (scmd->eh_eflags &SCSI_EH_ABORT_SCHEDULED ) eh_flag &= ~SCSI_EH_CANCEL_CMD ; scmd->eh_eflags |= eh_flag; +scsi_eh_reset (scmd);list_add_tail (&scmd->eh_entry, &shost->eh_cmd_q); shost->host_failed++;scsi_eh_wakeup (shost);
drivers/scsi/sd.c +26 -1
@@ -112,6 +112,7 @@ static void sd_rescan(struct device *);static int sd_init_command (struct scsi_cmnd *SCpnt);static void sd_uninit_command (struct scsi_cmnd *SCpnt);static int sd_done (struct scsi_cmnd *); +static void sd_eh_reset (struct scsi_cmnd *);static int sd_eh_action (struct scsi_cmnd *,int );static void sd_read_capacity (struct scsi_disk *sdkp,unsigned char *buffer);static void scsi_disk_release (struct device *cdev);
@@ -509,6 +510,7 @@ static struct scsi_driver sd_template = { .uninit_command = sd_uninit_command, .done = sd_done, .eh_action = sd_eh_action, + .eh_reset = sd_eh_reset, };/*
@@ -1535,6 +1537,26 @@ static const struct block_device_operations sd_fops = { .unlock_native_capacity = sd_unlock_native_capacity, }; +/** +* sd_eh_reset - reset error handling callback +* @scmd: sd-issued command that has failed +* +* This function is called by the SCSI midlayer before starting +* SCSI EH. When counting medium access failures we have to be +* careful to register it only only once per device and SCSI EH run; +* there might be several timed out commands which will cause the +* 'max_medium_access_timeouts' counter to trigger after the first +* SCSI EH run already and set the device to offline. +* So this function resets the internal counter before starting SCSI EH. +**/ +static void sd_eh_reset (struct scsi_cmnd *scmd) +{ +struct scsi_disk *sdkp =scsi_disk (scmd->request->rq_disk); + +/* New SCSI EH run, reset gate variable */ + sdkp->ignore_medium_access_errors = false; +} +/** * sd_eh_action - error handling callback * @scmd: sd-issued command that has failed
@@ -1564,7 +1586,10 @@ static int sd_eh_action(struct scsi_cmnd *scmd, int eh_disp)* process of recovering or has it suffered an internal failure * that prevents access to the storage medium. */ - sdkp->medium_access_timed_out++; +if (!sdkp->ignore_medium_access_errors) { + sdkp->medium_access_timed_out++; + sdkp->ignore_medium_access_errors = true; + }/* * If the device keeps failing read/write commands but TEST UNIT
drivers/scsi/sd.h +1 -0
@@ -90,6 +90,7 @@ struct scsi_disk { unsigned lbpvpd : 1; unsigned ws10 : 1; unsigned ws16 : 1; + unsigned ignore_medium_access_errors : 1; };#define to_scsi_disk (obj) container_of(obj,struct scsi_disk,dev)
drivers/staging/comedi/drivers/jr3_pci.c +7 -6
@@ -608,7 +608,7 @@ static void jr3_pci_poll_dev(unsigned long data) s = &dev->subdevices[i]; spriv = s->private; -if (now > spriv->next_time_min) { +if (time_after_eq (now, spriv->next_time_min)) {struct jr3_pci_poll_delay sub_delay; sub_delay =jr3_pci_poll_subdevice (s);
@@ -726,11 +726,12 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, s->insn_read = jr3_pci_ai_insn_read; spriv =jr3_pci_alloc_spriv (dev, s); -if (spriv) { -/* Channel specific range and maxdata */ - s->range_table_list = spriv->range_table_list; - s->maxdata_list = spriv->maxdata_list; - } +if (!spriv) +return -ENOMEM ; + +/* Channel specific range and maxdata */ + s->range_table_list = spriv->range_table_list; + s->maxdata_list = spriv->maxdata_list; }/* Reset DSP card */
drivers/staging/gdm724x/gdm_mux.c +4 -17
@@ -26,8 +26,6 @@#include "gdm_mux.h" -static struct workqueue_struct *mux_rx_wq; -static u16 packet_type[TTY_MAX_COUNT ] = {0xF011 ,0xF010 };#define USB_DEVICE_CDC_DATA (vid, pid) \
@@ -277,7 +275,7 @@ static void gdm_mux_rcv_complete(struct urb *urb) r->len = r->urb->actual_length;spin_lock_irqsave (&rx->to_host_lock, flags);list_add_tail (&r->to_host_list, &rx->to_host_list); -queue_work (mux_rx_wq, &mux_dev->work_rx.work); +schedule_work (&mux_dev->work_rx.work);spin_unlock_irqrestore (&rx->to_host_lock, flags); } }
@@ -604,6 +602,8 @@ static int gdm_mux_suspend(struct usb_interface *intf, pm_message_t pm_msg) mux_dev = tty_dev->priv_dev; rx = &mux_dev->rx; +cancel_work_sync (&mux_dev->work_rx.work); +if (mux_dev->usb_state !=PM_NORMAL ) {pr_err ("usb suspend - invalid state\n" );return -1 ;
@@ -659,13 +659,6 @@ static struct usb_driver gdm_mux_driver = {static int __init gdm_usb_mux_init (void ) { - - mux_rx_wq =create_workqueue ("mux_rx_wq" ); -if (mux_rx_wq ==NULL ) { -pr_err ("work queue create fail\n" ); -return -1 ; - } -register_lte_tty_driver ();return usb_register (&gdm_mux_driver);
@@ -673,14 +666,8 @@ static int __init gdm_usb_mux_init(void) static void __exit gdm_usb_mux_exit(void) { -unregister_lte_tty_driver (); - -if (mux_rx_wq) { -flush_workqueue (mux_rx_wq); -destroy_workqueue (mux_rx_wq); - } -usb_deregister (&gdm_mux_driver); +unregister_lte_tty_driver (); }module_init (gdm_usb_mux_init);
drivers/staging/iio/light/tsl2x7x_core.c +1 -1
@@ -849,7 +849,7 @@ void tsl2x7x_prox_calculate(int *data, int length, tmp = data[i] - statP->mean; sample_sum += tmp * tmp; } - statP->stddev =int_sqrt ((long )sample_sum)/length; + statP->stddev =int_sqrt ((long )sample_sum / length); }/**
drivers/staging/media/lirc/lirc_serial.c +2 -2
@@ -105,7 +105,7 @@ struct lirc_serial {static int type;static int io;static int irq; -static bool iommap; +static ulong iommap;static int ioshift;static bool softcarrier =1 ;static bool share_irq;
@@ -1205,7 +1205,7 @@ module_param(io, int, S_IRUGO);MODULE_PARM_DESC (io,"I/O address base (0x3f8 or 0x2f8)" );/* some architectures (e.g. intel xscale) have memory mapped registers */ -module_param (iommap, bool,S_IRUGO ); +module_param (iommap, ulong,S_IRUGO );MODULE_PARM_DESC (iommap,"physical base for memory mapped I/O" " (0 = no memory mapped io)" );
drivers/staging/rtl8188eu/core/rtw_ap.c +1 -1
@@ -881,7 +881,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)return _FAIL; -if (len >MAX_IE_SZ ) +if (len <0 || len >MAX_IE_SZ )return _FAIL; pbss_network->IELength = len;
drivers/target/target_core_file.c +1 -2
@@ -743,8 +743,7 @@ fd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; } -if (ret) -target_complete_cmd (cmd,SAM_STAT_GOOD ); +target_complete_cmd (cmd,SAM_STAT_GOOD );return 0 ; }
drivers/tty/serial/omap-serial.c +7 -2
@@ -1741,7 +1741,8 @@ static int serial_omap_probe(struct platform_device *pdev)return 0 ; err_add_port: -pm_runtime_put (&pdev->dev); +pm_runtime_dont_use_autosuspend (&pdev->dev); +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev); err_rs485: err_port_line:
@@ -1754,9 +1755,13 @@ static int serial_omap_remove(struct platform_device *dev) {struct uart_omap_port *up =platform_get_drvdata (dev); +pm_runtime_get_sync (up->dev); + +uart_remove_one_port (&serial_omap_reg, &up->port); + +pm_runtime_dont_use_autosuspend (up->dev);pm_runtime_put_sync (up->dev);pm_runtime_disable (up->dev); -uart_remove_one_port (&serial_omap_reg, &up->port);pm_qos_remove_request (&up->pm_qos_request);device_init_wakeup (&dev->dev, false);
drivers/tty/serial/sh-sci.c +6 -4
@@ -1715,11 +1715,13 @@ static int sci_startup(struct uart_port *port)dev_dbg (port->dev,"%s(%d)\n" , __func__, port->line); +sci_request_dma (port); + ret =sci_request_irq (s); -if (unlikely (ret <0 )) +if (unlikely (ret <0 )) { +sci_free_dma (port);return ret; - -sci_request_dma (port); + }spin_lock_irqsave (&port->lock, flags);sci_start_tx (port);
@@ -1741,8 +1743,8 @@ static void sci_shutdown(struct uart_port *port)sci_stop_tx (port);spin_unlock_irqrestore (&port->lock, flags); -sci_free_dma (port);sci_free_irq (s); +sci_free_dma (port); } static unsigned int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
drivers/usb/class/cdc-acm.c +9 -4
@@ -312,6 +312,12 @@ static void acm_ctrl_irq(struct urb *urb)break ;case USB_CDC_NOTIFY_SERIAL_STATE : +if (le16_to_cpu (dr->wLength) !=2 ) { +dev_dbg (&acm->control->dev, +"%s - malformed serial state\n" , __func__); +break ; + } + newctrl =get_unaligned_le16 (data);if (!acm->clocal && (acm->ctrlin & ~newctrl &ACM_CTRL_DCD )) {
@@ -348,11 +354,10 @@ static void acm_ctrl_irq(struct urb *urb)default :dev_dbg (&acm->control->dev, -"%s - unknown notification %d received: index %d " -"len %d data0 %d data1 %d\n" , +"%s - unknown notification %d received: index %d len %d\n" , __func__, - dr->bNotificationType, dr->wIndex, - dr->wLength, data[0 ], data[1 ]); + dr->bNotificationType, dr->wIndex, dr->wLength); +break ; } exit:
drivers/usb/core/driver.c +21 -0
@@ -1331,6 +1331,24 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)*/ if (udev->parent && !PMSG_IS_AUTO (msg)) status =0 ; + +/* +* If the device is inaccessible, don't try to resume +* suspended interfaces and just return the error. +*/ +if (status && status != -EBUSY ) { +int err; +u16 devstat; + + err =usb_get_status (udev,USB_RECIP_DEVICE ,0 , + &devstat); +if (err) { +dev_err (&udev->dev, +"Failed to suspend device, error %d\n" , + status); + goto done; + } + } }/* If the suspend failed, resume interfaces that did get suspended */
@@ -1767,6 +1785,9 @@ static int autosuspend_check(struct usb_device *udev)int w, i;struct usb_interface *intf; +if (udev->state ==USB_STATE_NOTATTACHED ) +return -ENODEV ; +/* Fail if autosuspend is disabled, or any interfaces are in use, or * any interface drivers require remote wakeup but it isn't available. */
drivers/usb/core/file.c +7 -2
@@ -26,6 +26,7 @@#define MAX_USB_MINORS 256static const struct file_operations *usb_minors[MAX_USB_MINORS ];static DECLARE_RWSEM (minor_rwsem); +static DEFINE_MUTEX (init_usb_class_mutex);static int usb_open (struct inode *inode,struct file *file) {
@@ -108,8 +109,9 @@ static void release_usb_class(struct kref *kref)static void destroy_usb_class (void ) { -if (usb_class) -kref_put (&usb_class->kref, release_usb_class); +mutex_lock (&init_usb_class_mutex); +kref_put (&usb_class->kref, release_usb_class); +mutex_unlock (&init_usb_class_mutex); }int usb_major_init (void )
@@ -171,7 +173,10 @@ int usb_register_dev(struct usb_interface *intf,if (intf->minor >=0 )return -EADDRINUSE ; +mutex_lock (&init_usb_class_mutex); retval =init_usb_class (); +mutex_unlock (&init_usb_class_mutex); +if (retval)return retval;
drivers/usb/core/hub.c +10 -1
@@ -1044,6 +1044,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) portstatus = portchange =0 ; status =hub_port_status (hub, port1, &portstatus, &portchange); +if (status) + goto abort; +if (udev || (portstatus &USB_PORT_STAT_CONNECTION ))dev_dbg (&port_dev->dev,"status %04x change %04x\n" , portstatus, portchange);
@@ -1176,7 +1179,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Scan all ports that need attention */ kick_khubd (hub); - + abort:/* Allow autosuspend if it was suppressed */ if (type <=HUB_INIT3 )usb_autopm_put_interface_async (to_usb_interface (hub->intfdev));
@@ -2066,6 +2069,12 @@ void usb_disconnect(struct usb_device **pdev)dev_info (&udev->dev,"USB disconnect, device number %d\n" , udev->devnum); +/* +* Ensure that the pm runtime code knows that the USB device +* is in the process of being disconnected. +*/ +pm_runtime_barrier (&udev->dev); +usb_lock_device (udev);hub_disconnect_children (udev);
drivers/usb/host/xhci-mem.c +1 -1
@@ -2459,7 +2459,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) (xhci->cmd_ring->first_seg->dma & (u64 ) ~CMD_RING_RSVD_BITS ) | xhci->cmd_ring->cycle_state;xhci_dbg_trace (xhci, trace_xhci_dbg_init, -"// Setting command ring address to 0x%x" , val); +"// Setting command ring address to 0x%016llx" , val_64);xhci_write_64 (xhci, val_64, &xhci->op_regs->cmd_ring);xhci_dbg_cmd_ptrs (xhci);
drivers/usb/misc/legousbtower.c +28 -10
@@ -317,9 +317,16 @@ static int tower_open (struct inode *inode, struct file *file)int subminor;int retval =0 ;struct usb_interface *interface; -struct tower_reset_reply reset_reply; +struct tower_reset_reply *reset_reply;int result; + reset_reply =kmalloc (sizeof (*reset_reply),GFP_KERNEL ); + +if (!reset_reply) { + retval = -ENOMEM ; + goto exit; + } +nonseekable_open (inode, file); subminor =iminor (inode);
@@ -364,8 +371,8 @@ static int tower_open (struct inode *inode, struct file *file)USB_TYPE_VENDOR |USB_DIR_IN |USB_RECIP_DEVICE ,0 ,0 , - &reset_reply, -sizeof (reset_reply), + reset_reply, +sizeof (*reset_reply), 1000);if (result <0 ) { dev_err(&dev->udev->dev,
@@ -406,6 +413,7 @@ static int tower_open (struct inode *inode, struct file *file)mutex_unlock (&dev->lock); exit: +kfree (reset_reply);return retval; }
@@ -808,7 +816,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_devicestruct lego_usb_tower *dev =NULL ;struct usb_host_interface *iface_desc;struct usb_endpoint_descriptor * endpoint; -struct tower_get_version_reply get_version_reply; +struct tower_get_version_reply *get_version_reply =NULL ;int i;int retval = -ENOMEM ;int result;
@@ -898,6 +906,13 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device dev->interrupt_in_interval = interrupt_in_interval ? interrupt_in_interval : dev->interrupt_in_endpoint->bInterval; dev->interrupt_out_interval = interrupt_out_interval ? interrupt_out_interval : dev->interrupt_out_endpoint->bInterval; + get_version_reply =kmalloc (sizeof (*get_version_reply),GFP_KERNEL ); + +if (!get_version_reply) { + retval = -ENOMEM ; + goto error; + } +/* get the firmware version and log it */ result = usb_control_msg (udev, usb_rcvctrlpipe(udev, 0),
@@ -905,18 +920,19 @@ static int tower_probe (struct usb_interface *interface, const struct usb_deviceUSB_TYPE_VENDOR |USB_DIR_IN |USB_RECIP_DEVICE ,0 ,0 , - &get_version_reply, -sizeof (get_version_reply), + get_version_reply, +sizeof (*get_version_reply), 1000);if (result <0 ) {dev_err (idev,"LEGO USB Tower get version control request failed\n" ); retval = result; goto error; } -dev_info (&interface->dev,"LEGO USB Tower firmware version is %d.%d " -"build %d\n" , get_version_reply.major, - get_version_reply.minor, -le16_to_cpu (get_version_reply.build_no)); +dev_info (&interface->dev, +"LEGO USB Tower firmware version is %d.%d build %d\n" , + get_version_reply->major, + get_version_reply->minor, +le16_to_cpu (get_version_reply->build_no));/* we can register the device now, as it is ready */ usb_set_intfdata (interface, dev);
@@ -937,9 +953,11 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device USB_MAJOR, dev->minor); exit: +kfree (get_version_reply);return retval; error: +kfree (get_version_reply);tower_delete (dev);return retval; }
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -886,6 +886,7 @@ static const struct usb_device_id id_table_combined[] = { {USB_DEVICE_AND_INTERFACE_INFO (MICROCHIP_VID ,MICROCHIP_USB_BOARD_PID ,USB_CLASS_VENDOR_SPEC , USB_SUBCLASS_VENDOR_SPEC, 0x00) }, + { USB_DEVICE_INTERFACE_NUMBER(ACTEL_VID, MICROSEMI_ARROW_SF2PLUS_BOARD_PID, 2) }, { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -873,6 +873,12 @@#define FIC_VID 0x1457#define FIC_NEO1973_DEBUG_PID 0x5118 +/* +* Actel / Microsemi +*/ +#define ACTEL_VID 0x1514 +#define MICROSEMI_ARROW_SF2PLUS_BOARD_PID 0x2008 +/* Olimex */ #define OLIMEX_VID 0x15BA#define OLIMEX_ARM_USB_OCD_PID 0x0003
drivers/vfio/vfio_iommu_type1.c +40 -52
143 lines not on this page · raw message
drivers/video/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_VGASTATE) += vgastate.o obj-$(CONFIG_HDMI) += hdmi.o obj-$(CONFIG_VT) += console/ +obj-$(CONFIG_FB_STI) += console/ obj-$(CONFIG_LOGO) += logo/ obj-y += backlight/
drivers/video/fbdev/Kconfig +0 -2
@@ -650,8 +650,6 @@ config FB_STI select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select STI_CONSOLE - select VT default y ---help--- STI refers to the HP "Standard Text Interface" which is a set of
fs/ceph/xattr.c +3 -0
@@ -369,6 +369,7 @@ static int __set_xattr(struct ceph_inode_info *ci,if (update_xattr) {int err =0 ; +if (xattr && (flags &XATTR_CREATE )) err = -EEXIST ;else if (!xattr && (flags &XATTR_REPLACE ))
@@ -376,12 +377,14 @@ static int __set_xattr(struct ceph_inode_info *ci,if (err) {kfree (name);kfree (val); +kfree (*newxattr);return err; }if (update_xattr <0 ) {if (xattr)__remove_xattr (ci, xattr);kfree (name); +kfree (*newxattr);return 0 ; } }
fs/cifs/cifsfs.c +13 -2
@@ -86,6 +86,7 @@ extern mempool_t *cifs_req_poolp;extern mempool_t *cifs_mid_poolp;struct workqueue_struct *cifsiod_wq; +struct workqueue_struct *cifsoplockd_wq;/* * Bumps refcount for cifs super block.
@@ -1210,9 +1211,16 @@ init_cifs(void) goto out_clean_proc; } + cifsoplockd_wq =alloc_workqueue ("cifsoplockd" , +WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 ); +if (!cifsoplockd_wq) { + rc = -ENOMEM ; + goto out_destroy_cifsiod_wq; + } + rc =cifs_fscache_register ();if (rc) - goto out_destroy_wq; + goto out_destroy_cifsoplockd_wq; rc =cifs_init_inodecache ();if (rc)
@@ -1260,7 +1268,9 @@ init_cifs(void)cifs_destroy_inodecache (); out_unreg_fscache:cifs_fscache_unregister (); -out_destroy_wq: +out_destroy_cifsoplockd_wq: +destroy_workqueue (cifsoplockd_wq); +out_destroy_cifsiod_wq:destroy_workqueue (cifsiod_wq); out_clean_proc:cifs_proc_clean ();
@@ -1283,6 +1293,7 @@ exit_cifs(void)cifs_destroy_mids ();cifs_destroy_inodecache ();cifs_fscache_unregister (); +destroy_workqueue (cifsoplockd_wq);destroy_workqueue (cifsiod_wq);cifs_proc_clean (); }
fs/cifs/cifsglob.h +1 -0
@@ -1581,6 +1581,7 @@ void cifs_oplock_break(struct work_struct *work);extern const struct slow_work_ops cifs_oplock_break_ops;extern struct workqueue_struct *cifsiod_wq; +extern struct workqueue_struct *cifsoplockd_wq;extern mempool_t *cifs_mid_poolp;
fs/cifs/cifssmb.c +3 -0
@@ -720,6 +720,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)if (rc)return rc; +if (server->capabilities &CAP_UNICODE ) + smb->hdr.Flags2 |=SMBFLG2_UNICODE ; +/* set up echo request */ smb->hdr.Tid =0xffff ; smb->hdr.WordCount =1 ;
fs/cifs/misc.c +1 -1
@@ -483,7 +483,7 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv)CIFS_INODE_DOWNGRADE_OPLOCK_TO_L2 , &pCifsInode->flags); -queue_work (cifsiod_wq, +queue_work (cifsoplockd_wq, &netfile->oplock_break); netfile->oplock_break_cancelled = false;
fs/cifs/netmisc.c +3 -3
@@ -966,10 +966,10 @@ struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset)cifs_dbg (VFS ,"illegal hours %d\n" , st->Hours); days = sd->Day; month = sd->Month; -if ((days >31 ) || (month >12 )) { +if (days <1 || days >31 || month <1 || month >12 ) {cifs_dbg (VFS ,"illegal date, month %d day: %d\n" , month, days); -if (month >12 ) - month =12 ; + days =clamp (days,1 ,31 ); + month =clamp (month,1 ,12 ); } month -=1 ; days += total_days_of_prev_months[month];
fs/cifs/smb2misc.c +3 -2
@@ -447,7 +447,7 @@ smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp,else cfile->oplock_break_cancelled = true; -queue_work (cifsiod_wq, &cfile->oplock_break); +queue_work (cifsoplockd_wq, &cfile->oplock_break);kfree (lw);return true; }
@@ -591,7 +591,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)CIFS_INODE_DOWNGRADE_OPLOCK_TO_L2 , &cinode->flags);spin_unlock (&cfile->file_info_lock); -queue_work (cifsiod_wq, &cfile->oplock_break); +queue_work (cifsoplockd_wq, + &cfile->oplock_break);spin_unlock (&tcon->open_file_lock);spin_unlock (&cifs_tcp_ses_lock);
fs/cifs/smb2pdu.c +11 -3
@@ -524,8 +524,12 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) }if (rsplen !=sizeof (struct validate_negotiate_info_rsp )) { -cifs_dbg (VFS ,"invalid size of protocol negotiate response\n" ); -return -EIO ; +cifs_dbg (VFS ,"invalid protocol negotiate response size: %d\n" , + rsplen); + +/* relax check since Mac returns max bufsize allowed on ioctl */ +if (rsplen > CIFSMaxBufSize) +return -EIO ; }/* check validate negotiate info response matches what we got earlier */
@@ -1293,8 +1297,12 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,* than one credit. Windows typically sets this smaller, but for some * ioctls it may be useful to allow server to send more. No point * limiting what the server can send as long as fits in one credit +* Unfortunately - we can not handle more than CIFS_MAX_MSG_SIZE +* (by default, note that it can be overridden to make max larger) +* in responses (except for read responses which can be bigger. +* We may want to bump this limit up */ - req->MaxOutputResponse =cpu_to_le32 (0xFF00 );/* < 64K uses 1 credit */ + req->MaxOutputResponse =cpu_to_le32 (CIFSMaxBufSize);if (is_fsctl) req->Flags =cpu_to_le32 (SMB2_0_IOCTL_IS_FSCTL );
fs/dcache.c +37 -0
@@ -244,6 +244,43 @@ static void __d_free(struct rcu_head *head)kmem_cache_free (dentry_cache, dentry); } +void take_dentry_name_snapshot (struct name_snapshot *name,struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +if (unlikely (dname_external (dentry))) { +u32 len; +char *p; + +for (;;) { + len = dentry->d_name.len; +spin_unlock (&dentry->d_lock); + + p =kmalloc (len +1 ,GFP_KERNEL | __GFP_NOFAIL); + +spin_lock (&dentry->d_lock); +if (dentry->d_name.len <= len) +break ; +kfree (p); + } +memcpy (p, dentry->d_name.name, dentry->d_name.len +1 ); +spin_unlock (&dentry->d_lock); + + name->name = p; + }else { +memcpy (name->inline_name, dentry->d_iname,DNAME_INLINE_LEN ); +spin_unlock (&dentry->d_lock); + name->name = name->inline_name; + } +} +EXPORT_SYMBOL (take_dentry_name_snapshot); + +void release_dentry_name_snapshot (struct name_snapshot *name) +{ +if (unlikely (name->name != name->inline_name)) +kfree (name->name); +} +EXPORT_SYMBOL (release_dentry_name_snapshot); +static void dentry_free (struct dentry *dentry) {WARN_ON (!hlist_unhashed (&dentry->d_u.d_alias));
fs/debugfs/inode.c +5 -5
@@ -620,7 +620,7 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, {int error;struct dentry *dentry =NULL , *trap; -const char *old_name; +struct name_snapshot old_name; trap =lock_rename (new_dir, old_dir);/* Source or destination directories don't exist? */
@@ -635,19 +635,19 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,if (IS_ERR (dentry) || dentry == trap || dentry->d_inode) goto exit; - old_name =fsnotify_oldname_init (old_dentry->d_name.name); +take_dentry_name_snapshot (&old_name, old_dentry); error =simple_rename (old_dir->d_inode, old_dentry, new_dir->d_inode, dentry);if (error) { -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name); goto exit; }d_move (old_dentry, dentry); -fsnotify_move (old_dir->d_inode, new_dir->d_inode, old_name, +fsnotify_move (old_dir->d_inode, new_dir->d_inode, old_name.name,S_ISDIR (old_dentry->d_inode->i_mode),NULL , old_dentry); -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name);unlock_rename (new_dir, old_dir);dput (dentry);return old_dentry;
fs/ext4/inode.c +5 -0
@@ -5273,6 +5273,11 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)sb_start_pagefault (inode->i_sb);file_update_time (vma->vm_file); + + ret =ext4_convert_inline_data (inode); +if (ret) + goto out_ret; +/* Delalloc case is easy... */ if (test_opt(inode->i_sb, DELALLOC) && !ext4_should_journal_data(inode) &&
fs/namei.c +5 -5
@@ -3086,7 +3086,7 @@ static int do_last(struct nameidata *nd, struct path *path, error =open_check_o_direct (file);if (error) goto exit_fput; - error =ima_file_check (file, op->acc_mode); + error =ima_file_check (file, op->acc_mode, *opened);if (error) goto exit_fput;
@@ -4082,11 +4082,11 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, {int error;bool is_dir =d_is_dir (old_dentry); -const unsigned char *old_name;struct inode *source = old_dentry->d_inode;struct inode *target = new_dentry->d_inode;bool new_is_dir = false;unsigned max_links = new_dir->i_sb->s_max_links; +struct name_snapshot old_name;if (source == target)return 0 ;
@@ -4136,7 +4136,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,if (error)return error; - old_name =fsnotify_oldname_init (old_dentry->d_name.name); +take_dentry_name_snapshot (&old_name, old_dentry);dget (new_dentry);if (!is_dir || (flags &RENAME_EXCHANGE ))lock_two_nondirectories (source, target);
@@ -4195,14 +4195,14 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,mutex_unlock (&target->i_mutex);dput (new_dentry);if (!error) { -fsnotify_move (old_dir, new_dir, old_name, is_dir, +fsnotify_move (old_dir, new_dir, old_name.name, is_dir, !(flags &RENAME_EXCHANGE ) ? target :NULL , old_dentry);if (flags &RENAME_EXCHANGE ) {fsnotify_move (new_dir, old_dir, old_dentry->d_name.name, new_is_dir,NULL , new_dentry); } } -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name);return error; }
fs/nfs/pagelist.c +7 -3
@@ -29,13 +29,14 @@static struct kmem_cache *nfs_page_cachep;static const struct rpc_call_ops nfs_pgio_common_ops; -static bool nfs_pgarray_set (struct nfs_page_array *p,unsigned int pagecount) +static bool nfs_pgarray_set (struct nfs_page_array *p,unsigned int pagecount, +gfp_t gfp_flags) { p->npages = pagecount;if (pagecount <=ARRAY_SIZE (p->page_array)) p->pagevec = p->page_array;else { - p->pagevec =kcalloc (pagecount,sizeof (struct page *),GFP_KERNEL ); + p->pagevec =kcalloc (pagecount,sizeof (struct page *), gfp_flags);if (!p->pagevec) p->npages =0 ; }
@@ -739,9 +740,12 @@ int nfs_generic_pgio(struct nfs_pageio_descriptor *desc,struct list_head *head = &desc->pg_list;struct nfs_commit_info cinfo;unsigned int pagecount, pageused; +gfp_t gfp_flags =GFP_KERNEL ; pagecount =nfs_page_array_len (desc->pg_base, desc->pg_count); -if (!nfs_pgarray_set (&hdr->page_array, pagecount)) +if (desc->pg_rw_ops->rw_mode ==FMODE_WRITE ) + gfp_flags =GFP_NOIO ; +if (!nfs_pgarray_set (&hdr->page_array, pagecount, gfp_flags))return nfs_pgio_error (desc, hdr);nfs_init_cinfo (&cinfo, desc->pg_inode, desc->pg_dreq);
fs/nfsd/vfs.c +1 -1
@@ -736,7 +736,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, host_err =PTR_ERR (*filp); *filp =NULL ; }else { - host_err =ima_file_check (*filp, may_flags); + host_err =ima_file_check (*filp, may_flags,0 );if (may_flags &NFSD_MAY_64BIT_COOKIE ) (*filp)->f_mode |=FMODE_64BITHASH ;
fs/notify/fanotify/fanotify_user.c +18 -8
@@ -294,27 +294,37 @@ static ssize_t fanotify_read(struct file *file, char __user *buf, } ret =copy_event_to_user (group, kevent, buf); +if (unlikely (ret == -EOPENSTALE )) { +/* +* We cannot report events with stale fd so drop it. +* Setting ret to 0 will continue the event loop and +* do the right thing if there are no more events to +* read (i.e. return bytes read, -EAGAIN or wait). +*/ + ret =0 ; + } +/* * Permission events get queued to wait for response. Other * events can be destroyed now. */ if (!(kevent->mask &FAN_ALL_PERM_EVENTS )) {fsnotify_destroy_event (group, kevent); -if (ret <0 ) -break ; }else {#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS -if (ret <0 ) { +if (ret <=0 ) {FANOTIFY_PE (kevent)->response =FAN_DENY ;wake_up (&group->fanotify_data.access_waitq); -break ; + }else { +spin_lock (&group->fanotify_data.access_lock); +list_add_tail (&kevent->list, + &group->fanotify_data.access_list); +spin_unlock (&group->fanotify_data.access_lock); } -spin_lock (&group->fanotify_data.access_lock); -list_add_tail (&kevent->list, - &group->fanotify_data.access_list); -spin_unlock (&group->fanotify_data.access_lock);#endif } +if (ret <0 ) +break ; buf += ret; count -= ret; }
fs/notify/fsnotify.c +6 -2
@@ -105,16 +105,20 @@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)if (unlikely (!fsnotify_inode_watches_children (p_inode)))__fsnotify_update_child_dentry_flags (p_inode);else if (p_inode->i_fsnotify_mask & mask) { +struct name_snapshot name; +/* we are notifying a parent so come up with the new mask which * specifies these are events which came from a child. */ mask |=FS_EVENT_ON_CHILD ; +take_dentry_name_snapshot (&name, dentry);if (path) ret =fsnotify (p_inode, mask, path,FSNOTIFY_EVENT_PATH , - dentry->d_name.name,0 ); + name.name,0 );else ret =fsnotify (p_inode, mask, dentry->d_inode,FSNOTIFY_EVENT_INODE , - dentry->d_name.name,0 ); + name.name,0 ); +release_dentry_name_snapshot (&name); }dput (parent);
fs/timerfd.c +14 -3
@@ -39,6 +39,7 @@ struct timerfd_ctx {int clockid;struct rcu_head rcu;struct list_head clist; +spinlock_t cancel_lock;bool might_cancel; };
@@ -111,7 +112,7 @@ void timerfd_clock_was_set(void)rcu_read_unlock (); } -static void timerfd_remove_cancel (struct timerfd_ctx *ctx) +static void __timerfd_remove_cancel (struct timerfd_ctx *ctx) {if (ctx->might_cancel) { ctx->might_cancel = false;
@@ -121,6 +122,13 @@ static void timerfd_remove_cancel(struct timerfd_ctx *ctx) } } +static void timerfd_remove_cancel (struct timerfd_ctx *ctx) +{ +spin_lock (&ctx->cancel_lock); +__timerfd_remove_cancel (ctx); +spin_unlock (&ctx->cancel_lock); +} +static bool timerfd_canceled (struct timerfd_ctx *ctx) {if (!ctx->might_cancel || ctx->moffs.tv64 !=KTIME_MAX )
@@ -131,6 +139,7 @@ static bool timerfd_canceled(struct timerfd_ctx *ctx)static void timerfd_setup_cancel (struct timerfd_ctx *ctx,int flags) { +spin_lock (&ctx->cancel_lock);if ((ctx->clockid ==CLOCK_REALTIME || ctx->clockid ==CLOCK_REALTIME_ALARM ) && (flags &TFD_TIMER_ABSTIME ) && (flags &TFD_TIMER_CANCEL_ON_SET )) {
@@ -140,9 +149,10 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags)list_add_rcu (&ctx->clist, &cancel_list);spin_unlock (&cancel_lock); } - }else if (ctx->might_cancel) { -timerfd_remove_cancel (ctx); + }else { +__timerfd_remove_cancel (ctx); } +spin_unlock (&ctx->cancel_lock); }static ktime_t timerfd_get_remaining (struct timerfd_ctx *ctx)
@@ -326,6 +336,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)return -ENOMEM ;init_waitqueue_head (&ctx->wqh); +spin_lock_init (&ctx->cancel_lock); ctx->clockid = clockid;if (isalarm (ctx))
fs/xattr.c +1 -1
@@ -455,7 +455,7 @@ getxattr(struct dentry *d, const char __user *name, void __user *value, size =XATTR_SIZE_MAX ; kvalue =kzalloc (size,GFP_KERNEL | __GFP_NOWARN);if (!kvalue) { - vvalue =vmalloc (size); + vvalue =vzalloc (size);if (!vvalue)return -ENOMEM ; kvalue = vvalue;
include/linux/dcache.h +7 -0
@@ -530,4 +530,11 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) return upper; } +struct name_snapshot { +const char *name; +char inline_name[DNAME_INLINE_LEN ]; +}; +void take_dentry_name_snapshot (struct name_snapshot *,struct dentry *); +void release_dentry_name_snapshot (struct name_snapshot *); +#endif /* __LINUX_DCACHE_H */
include/linux/fsnotify.h +0 -31
@@ -310,35 +310,4 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) } } -#if defined(CONFIG_FSNOTIFY )/* notify helpers */ - -/* -* fsnotify_oldname_init - save off the old filename before we change it -*/ -static inline const unsigned char *fsnotify_oldname_init (const unsigned char *name) -{ -return kstrdup (name,GFP_KERNEL ); -} - -/* -* fsnotify_oldname_free - free the name we got from fsnotify_oldname_init -*/ -static inline void fsnotify_oldname_free (const unsigned char *old_name) -{ -kfree (old_name); -} - -#else /* CONFIG_FSNOTIFY */ - -static inline const char *fsnotify_oldname_init (const unsigned char *name) -{ -return NULL ; -} - -static inline void fsnotify_oldname_free (const unsigned char *old_name) -{ -} - -#endif /* CONFIG_FSNOTIFY */ -#endif /* _LINUX_FS_NOTIFY_H */
include/linux/ima.h +2 -2
@@ -15,7 +15,7 @@ struct linux_binprm;#ifdef CONFIG_IMA extern int ima_bprm_check (struct linux_binprm *bprm); -extern int ima_file_check (struct file *file,int mask); +extern int ima_file_check (struct file *file,int mask,int opened);extern void ima_file_free (struct file *file);extern int ima_file_mmap (struct file *file,unsigned long prot);extern int ima_module_check (struct file *file);
@@ -26,7 +26,7 @@ static inline int ima_bprm_check(struct linux_binprm *bprm)return 0 ; } -static inline int ima_file_check (struct file *file,int mask) +static inline int ima_file_check (struct file *file,int mask,int opened) {return 0 ; }
include/linux/mlx4/qp.h +1 -0
@@ -429,6 +429,7 @@ struct mlx4_update_qp_params {u8 smac_index; }; +struct mlx4_qp *mlx4_qp_lookup (struct mlx4_dev *dev,u32 qpn);int mlx4_update_qp (struct mlx4_dev *dev,struct mlx4_qp *qp,enum mlx4_update_qp_attr attr,struct mlx4_update_qp_params *params);
include/scsi/scsi_driver.h +1 -0
@@ -17,6 +17,7 @@ struct scsi_driver {void (*uninit_command)(struct scsi_cmnd *);int (*done)(struct scsi_cmnd *);int (*eh_action)(struct scsi_cmnd *,int ); +void (*eh_reset)(struct scsi_cmnd *); };#define to_scsi_driver (drv) \ container_of((drv), struct scsi_driver, gendrv)
include/uapi/linux/netfilter/nf_conntrack_common.h +9 -0
@@ -91,6 +91,15 @@ enum ip_conntrack_status {/* Conntrack got a helper explicitly attached via CT target. */ IPS_HELPER_BIT =13 ,IPS_HELPER = (1 <<IPS_HELPER_BIT ), + +/* Be careful here, modifying these bits can make things messy, +* so don't let users modify them directly. +*/ +IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK |IPS_NAT_MASK | +IPS_EXPECTED |IPS_CONFIRMED |IPS_DYING | +IPS_SEQ_ADJUST |IPS_TEMPLATE ), + + __IPS_MAX_BIT = 14, };/* Connection tracking event types */
ipc/mqueue.c +3 -1
@@ -1239,8 +1239,10 @@ SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, timeo =MAX_SCHEDULE_TIMEOUT ; ret =netlink_attachskb (sock, nc, &timeo,NULL ); -if (ret ==1 ) +if (ret ==1 ) { + sock =NULL ; goto retry; + }if (ret) { sock =NULL ; nc =NULL ;
kernel/locking/lockdep.c +3 -1
@@ -2724,6 +2724,8 @@ static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)if (unlikely (!debug_locks))return ; + gfp_mask =memalloc_noio_flags (gfp_mask); +/* no reclaim without waiting on it */ if (!(gfp_mask & __GFP_WAIT))return ;
@@ -3644,7 +3646,7 @@ EXPORT_SYMBOL_GPL(lock_is_held);void lockdep_set_current_reclaim_state (gfp_t gfp_mask) { - current->lockdep_reclaim_gfp = gfp_mask; + current->lockdep_reclaim_gfp =memalloc_noio_flags (gfp_mask); }void lockdep_clear_current_reclaim_state (void )
kernel/padata.c +1 -1
@@ -356,7 +356,7 @@ static int padata_setup_cpumasks(struct parallel_data *pd,cpumask_and (pd->cpumask.pcpu, pcpumask, cpu_online_mask);
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_netlink.c +35 -25
60 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.