Linux 3.16.54
I'm announcing the release of the 3.16.54 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.53 is attached to this message.
Ben.
------------
.../devicetree/bindings/sound/cs42l56.txt | 2 +- Makefile | 2 +- arch/arm/mm/dump.c | 4 +- arch/arm64/kernel/vdso/gettimeofday.S | 3 +- arch/mips/kernel/ptrace.c | 17 ++ arch/parisc/kernel/syscall.S | 6 +- arch/powerpc/kernel/vio.c | 2 + arch/powerpc/platforms/powernv/opal-async.c | 6 +- arch/powerpc/platforms/powernv/setup.c | 2 +- arch/s390/include/asm/switch_to.h | 2 +- arch/s390/kernel/dis.c | 4 +- arch/s390/kernel/early.c | 4 +- arch/s390/kernel/process.c | 1 + arch/s390/kernel/runtime_instr.c | 4 +- arch/x86/include/asm/fixmap.h | 11 +- arch/x86/include/asm/pvclock.h | 15 +- arch/x86/include/asm/vdso.h | 19 +- arch/x86/kernel/alternative.c | 26 +- arch/x86/kernel/kvmclock.c | 16 +- arch/x86/kernel/pvclock.c | 68 ----- arch/x86/kvm/svm.c | 7 + arch/x86/kvm/vmx.c | 4 + arch/x86/kvm/x86.c | 5 +- arch/x86/kvm/x86.h | 2 + arch/x86/lib/x86-opcode-map.txt | 2 +- arch/x86/mm/kaiser.c | 7 +- arch/x86/platform/uv/uv_nmi.c | 1 + arch/x86/vdso/vclock_gettime.c | 103 ++++--- arch/x86/vdso/vdso-layout.lds.S | 45 ++- arch/x86/vdso/vdso2c.c | 15 +- arch/x86/vdso/vdso2c.h | 25 +- arch/x86/vdso/vma.c | 34 ++- block/blk-core.c | 3 + drivers/acpi/apei/ghes.c | 85 +----- drivers/char/ipmi/ipmi_msghandler.c | 10 +- drivers/char/tpm/tpm-dev.c | 6 + drivers/clk/tegra/clk-tegra30.c | 2 +- drivers/clk/ti/clk-dra7-atl.c | 3 +- drivers/crypto/caam/desc.h | 2 +- drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 +- drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 14 +- drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/radeon/atombios_dp.c | 38 ++- drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 + drivers/infiniband/ulp/srp/ib_srp.c | 23 +- drivers/infiniband/ulp/srpt/ib_srpt.c | 9 +- drivers/input/misc/adxl34x.c | 2 +- drivers/iommu/dmar.c | 7 +- drivers/iommu/intel-iommu.c | 10 + drivers/md/bcache/alloc.c | 3 +- drivers/md/bcache/request.c | 10 +- drivers/md/dm-bufio.c | 15 +- drivers/md/dm-table.c | 32 +- drivers/md/dm.c | 12 +- drivers/media/platform/omap/omap_vout.c | 3 +- drivers/media/rc/ir-lirc-codec.c | 9 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 3 +- drivers/mtd/nand/nand_base.c | 9 +- drivers/mtd/nand/omap2.c | 340 ++++++++++++++------- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 56 +--- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/wireless/p54/main.c | 7 +- drivers/net/wireless/rt2x00/rt2x00usb.c | 6 +- drivers/pci/pcie/aer/aerdrv_core.c | 9 +- drivers/platform/x86/sony-laptop.c | 14 +- drivers/rtc/interface.c | 16 +- drivers/scsi/bfa/bfad_debugfs.c | 5 +- drivers/staging/android/ashmem.c | 2 + drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +- drivers/staging/usbip/stub.h | 1 - drivers/staging/usbip/stub_dev.c | 4 +- drivers/staging/usbip/stub_rx.c | 66 ++-- drivers/staging/usbip/stub_tx.c | 13 +- drivers/staging/usbip/usbip_common.h | 1 + drivers/staging/usbip/userspace/Makefile.am | 3 +- .../staging/usbip/userspace/libsrc/vhci_driver.c | 8 +- drivers/staging/usbip/vhci_sysfs.c | 20 +- drivers/target/iscsi/iscsi_target.c | 49 ++- drivers/target/target_core_tmr.c | 10 + drivers/target/target_core_transport.c | 2 + drivers/usb/core/devio.c | 14 + drivers/usb/core/quirks.c | 3 + drivers/usb/serial/garmin_gps.c | 22 +- drivers/usb/serial/metro-usb.c | 11 +- drivers/usb/serial/qcserial.c | 1 + drivers/video/fbdev/udlfb.c | 10 +- fs/9p/vfs_inode.c | 3 + fs/9p/vfs_inode_dotl.c | 3 + fs/autofs4/waitq.c | 16 +- fs/binfmt_elf_fdpic.c | 2 + fs/btrfs/super.c | 4 +- fs/coda/upcall.c | 3 +- fs/ecryptfs/messaging.c | 7 +- fs/ext4/extents.c | 6 +- fs/f2fs/file.c | 5 + fs/f2fs/segment.c | 20 +- fs/isofs/isofs.h | 2 +- fs/isofs/rock.h | 2 +- fs/isofs/util.c | 2 +- fs/nfs/nfs4proc.c | 18 +- fs/nfs/nfs4trace.h | 8 +- fs/nfs/super.c | 2 +- fs/nilfs2/segment.c | 6 +- include/linux/blkdev.h | 1 + include/linux/dmar.h | 1 + include/linux/sched.h | 8 - include/net/sctp/sctp.h | 2 + include/net/sctp/structs.h | 8 +- include/target/target_core_base.h | 2 + kernel/extable.c | 2 + kernel/sched/core.c | 15 - kernel/trace/blktrace.c | 76 ++++- lib/int_sqrt.c | 3 + net/9p/client.c | 3 +- net/9p/trans_virtio.c | 13 +- net/bluetooth/l2cap_core.c | 20 +- net/ipv4/route.c | 14 +- net/l2tp/l2tp_core.c | 21 +- net/l2tp/l2tp_core.h | 3 + net/l2tp/l2tp_eth.c | 101 ++++-- net/l2tp/l2tp_ppp.c | 236 ++++++++------ net/netfilter/xt_TCPMSS.c | 6 +- net/nfc/core.c | 2 +- net/rds/rdma.c | 4 + net/sctp/ipv6.c | 160 +++++----- net/sctp/protocol.c | 12 +- net/sctp/socket.c | 33 +- net/sctp/transport.c | 4 +- net/sctp/ulpevent.c | 2 +- net/wireless/nl80211.c | 26 +- security/apparmor/domain.c | 53 +++- security/integrity/ima/ima_main.c | 4 + sound/core/seq/seq_clientmgr.c | 10 +- sound/core/seq/seq_clientmgr.h | 1 + sound/core/timer_compat.c | 12 +- sound/pci/hda/hda_intel.c | 3 + sound/usb/clock.c | 9 +- sound/usb/mixer.c | 15 +- 148 files changed, 1470 insertions(+), 1021 deletions(-)
Alan Stern (1):
USB: usbfs: compute urb->actual_length for isochronous
Alexander Popov (1):
usbip: fix NULL pointer dereference on errors
Alexander Potapenko (1):
sctp: fully initialize the IPv6 address in sctp_v6_to_addr()
Alexander Steffen (1):
tpm-dev-common: Reject too short writes
Alexandre Belloni (1):
rtc: set the alarm to the next expiring timer
Andreas Rohner (1):
nilfs2: fix race condition that causes file system corruption
Andrew F. Davis (1):
ASoC: cs42l56: Fix reset GPIO name in example DT binding
Andrey Konovalov (1):
p54: don't unregister leds when they are not initialized
Andy Lutomirski (4):
x86, vdso: Move the vvar area before the vdso text x86, vdso, pvclock: Simplify and speed up the vdso pvclock reader x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap x86/vdso: Remove pvclock fixmap machinery
Anna Schumaker (1):
NFS: Avoid RCU usage in tracepoints
Arnd Bergmann (4):
drm: gma500: fix logic error
Input: adxl34x - do not treat FIFO_MODE() as boolean
elf_fdpic: fix unused variable warning
isofs: fix timestamps beyond 2027
Bart Van Assche (3):
IB/srpt: Do not accept invalid initiator port names IB/srp: Avoid that a cable pull can trigger a kernel crash target/iscsi: Fix iSCSI task reassignment handling
Ben Hutchings (2):
usbip: tools: Install all headers needed for libusbip development Linux 3.16.54
Ben Seri (1):
Bluetooth: Prevent stack info leak from the EFS element.
Bernhard Rosenkraenzer (1):
USB: Add delay-init quirk for Corsair K70 LUX keyboards
Boshi Wang (1):
ima: fix hash algorithm initialization
Brent Taylor (1):
mtd: nand: Fix writing mtdoops to nand flash.
Brian King (6):
ixgbe: Fix skb list corruption on Power systems
i40e: Use smp_rmb rather than read_barrier_depends
ixgbevf: Use smp_rmb rather than read_barrier_depends
igbvf: Use smp_rmb rather than read_barrier_depends
igb: Use smp_rmb rather than read_barrier_depends
i40evf: Use smp_rmb rather than read_barrier_depends
Christian König (1):
drm/ttm: once more fix ttm_buffer_object_transfer
Chuck Lever (1):
nfs: Fix ugly referral attributes
Colin Ian King (3):
rtc: interface: ignore expired timers when enqueuing new timers
btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit
staging: rtl8188eu: avoid a null dereference on pmlmepriv
Coly Li (2):
bcache: check ca->alloc_thread initialized before wake up it
bcache: only permit to recovery read error when cache device is clean
Corey Minyard (1):
ipmi: fix unsigned long underflow
Dan Carpenter (2):
scsi: bfa: integer overflow in debugfs
eCryptfs: use after free in ecryptfs_release_messaging()
Dongho Sim (1):
f2fs: remove redundant lines in allocate_data_block
Doug Berger (1):
net: bcmgenet: enable loopback during UniMAC sw_reset
Douglas Fischer (1):
USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update
Eric Biggers (1):
dm bufio: fix integer overflow when limiting maximum cache size
Eric Dumazet (1):
netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
Eric W. Biederman (1):
net/sctp: Always set scope_id in sctp_inet6_skb_msgname
Gabriele Paoloni (1):
PCI/AER: Report non-fatal errors only to the affected endpoint
Guenter Roeck (1):
kaiser: Set _PAGE_NX only if supported
Guillaume Nault (5):
l2tp: ensure sessions are freed after their PPPOL2TP socket
l2tp: don't register sessions in l2tp_session_create()
l2tp: initialise l2tp_eth sessions before registering them
l2tp: protect sock pointer of struct pppol2tp_session with RCU
l2tp: initialise PPP sessions before registering them
Heiko Carstens (2):
s390/runtime instrumention: fix possible memory corruption
s390: fix transactional execution control register handling
Hou Tao (1):
dm: fix race between dm_get_from_kobject() and __dm_destroy()
Ingo Molnar (1):
x86/platform/uv: Include clocksource.h for clocksource_touch_watchdog()
Jaegeuk Kim (1):
f2fs: expose some sectors to user in inline data or dentry case
James Morse (2):
ACPI / APEI: Replace ioremap_page_range() with fixmap ACPI / APEI: Remove ghes_ioremap_area
Jan Harkes (1):
coda: fix 'kernel memory exposure attempt' in fsync
Jani Nikula (1):
drm/i915/bios: parse DDI ports also for CHV for HDMI DDC pin and DP AUX channel
Jason Gunthorpe (1):
sctp: Fixup v4mapped behaviour to comply with Sock API
Jens Axboe (1):
blktrace: fix unlocked access to init/start-stop/teardown
Joerg Roedel (1):
iommu/vt-d: Don't register bus-notifier under dmar_global_lock
Johan Hovold (5):
USB: serial: garmin_gps: fix I/O after failed probe and remove
USB: serial: garmin_gps: fix memory leak on probe errors
USB: serial: metro-usb: stop I/O after failed open
NFC: fix device-allocation error return
clk: ti: dra7-atl-clock: fix child-node lookups
Johannes Berg (1):
nl80211: don't expose wdev->ssid for most interfaces
John David Anglin (1):
parisc: Fix validity check of pointer size argument in new CAS implementation
John Johansen (1):
apparmor: ensure that undecidable profile attachments fail
Joshua Watt (1):
NFS: Fix typo in nomigration mount option
Juerg Haefliger (1):
Revert "x86: kvmclock: Disable use from vDSO if KPTI is enabled"
Ladi Prosek (1):
KVM: nVMX: set IDTR and GDTR limits when loading L1 host state
Ladislav Michl (1):
video: udlfb: Fix read EDID timeout
Lepton Wu (1):
kaiser: Set _PAGE_NX only if supported
Maciej W. Rozycki (1):
MIPS: Fix an n32 core file generation regset support regression
Majd Dibbiny (1):
IB/mlx5: Assign send CQ and recv CQ of UMR QP
Manasi Navare (1):
drm/i915/edp: Get the Panel Power Off timestamp after panel is off
Mark Bloch (1):
IB/mlx4: Increase maximal message size under UD QP
Mark Rutland (1):
arm64: vdso: fix clock_getres for 4GiB-aligned res
Markus Elfring (2):
media: omap_vout: Fix a possible null pointer dereference in omap_vout_open() platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill()
Masami Hiramatsu (1):
x86/decoder: Add new TEST instruction pattern
Mauro Carvalho Chehab (1):
cx231xx: Fix the max number of interfaces
Michał Mirosław (1):
clk: tegra: Fix cclk_lp divisor register
Mike Snitzer (1):
dm: discard support requires all targets in a table support discards
Mohamed Ghannam (2):
RDS: Heap OOB write in rds_message_alloc_sgs()
RDS: null pointer dereference in rds_atomic_free_op
Nadav Amit (2):
staging: lustre: ptlrpc: kfree used instead of kvfree
KVM: vmx: Inject #GP on invalid PAT CR
Nathan Lynch (1):
arm64: vdso: minor ABI fix for clock_getres
NeilBrown (2):
autofs: don't fail mount for transient error
autofs: fix careless error in recent commit
Nicholas Bellinger (3):
target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
iscsi-target: Fix non-immediate TMR reference leak
Paolo Bonzini (2):
KVM: SVM: obey guest PAT
x86: pvclock: Really remove the sched notifier for cross-cpu migrations
Peter Ujfalusi (1):
clk: ti: dra7-atl-clock: Fix of_node reference counting
Peter Zijlstra (1):
lib/int_sqrt: optimize small argument
Philip Derrin (1):
ARM: 8721/1: mm: dump: check hardware RO bit for LPAE
Radu Alexe (1):
crypto: caam - fix incorrect define
Roger Quadros (1):
mtd: nand: omap2: Fix subpage write
Roman Kapl (1):
drm/radeon: fix atombios on big endian
Sean Young (1):
media: rc: check for integer overflow
Shriya (1):
powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo
Shuah Khan (4):
usbip: fix stub_rx: get_pipe() to validate endpoint number
usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input
usbip: prevent vhci_hcd driver from leaking a socket pointer address
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
Stanislaw Gruszka (1):
rt2x00usb: mark device removed when get ENOENT usb error
Takashi Iwai (5):
ALSA: timer: Remove kernel warning at compat ioctl error paths
ALSA: usb-audio: Add sanity checks to FE parser
ALSA: usb-audio: Fix potential out-of-bound access at parsing SU
ALSA: usb-audio: Add sanity checks in v2 clock parsers
ALSA: seq: Make ioctls race-free
Theodore Ts'o (1):
ext4: fix interaction between i_size, fallocate, and delalloc after a crash
Tuomas Tynkkynen (2):
fs/9p: Compare qid.path in v9fs_test_inode
net/9p: Switch to wait_event_killable()
Tyrel Datwyler (1):
powerpc/pseries/vio: Dispose of virq mapping on vdevice unregister
Vasily Gorbik (1):
s390/disassembler: increase show_code buffer size
Vijendar Mukunda (1):
ALSA: hda: Add Raven PCI ID
Viktor Slavkovic (1):
staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl
Ville Syrjälä (1):
drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()
Waiman Long (1):
blktrace: Fix potential deadlock between delete & sysfs ops
William A. Kennington III (1):
powerpc/opal: Fix EBUSY bug in acquiring tokens
Xin Long (2):
route: update fnhe_expires for redirect when the fnhe exists
route: also update fnhe_genid when updating a route cache
Yunlong Song (1):
Revert "f2fs: handle dirty segments inside refresh_sit_entry"
Zhou Chengming (1):
kprobes, x86/alternatives: Use text_mutex to protect smp_alt_modules
Documentation/devicetree/bindings/sound/cs42l56.txt +1 -1
@@ -55,7 +55,7 @@ CS42L52 audio CODEC codec: codec@4b { compatible = "cirrus,cs42l56"; reg = <0x4b>; - gpio-reset = <&gpio 10 0>; + cirrus,gpio-nreset = <&gpio 10 0>; cirrus,chgfreq-divisor = <0x05>; cirrus.ain1_ref_cfg; cirrus,micbias-lvl = <5>;
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 53 +SUBLEVEL = 54 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/arm/mm/dump.c +2 -2
@@ -126,8 +126,8 @@ static const struct prot_bits section_bits[] = { .val = PMD_SECT_USER, .set = "USR", }, { - .mask = L_PMD_SECT_RDONLY, - .val = L_PMD_SECT_RDONLY, + .mask = L_PMD_SECT_RDONLY | PMD_SECT_AP2, + .val = L_PMD_SECT_RDONLY | PMD_SECT_AP2, .set = "ro", .clear = "RW",#elif __LINUX_ARM_ARCH__ >= 6
arch/arm64/kernel/vdso/gettimeofday.S +1 -2
@@ -174,8 +174,6 @@ ENDPROC(__kernel_clock_gettime) /* int __kernel_clock_getres(clockid_t clock_id, struct timespec *res); */ ENTRY(__kernel_clock_getres) .cfi_startproc - cbz w1, 3f - cmp w0, #CLOCK_REALTIME ccmp w0, #CLOCK_MONOTONIC, #0x4, ne b.ne 1f
@@ -188,6 +186,7 @@ ENTRY(__kernel_clock_getres) b.ne 4f ldr x2, 6f 2: + cbz x1, 3f stp xzr, x2, [x1] 3: /* res == NULL. */
arch/mips/kernel/ptrace.c +17 -0
@@ -522,6 +522,19 @@ static const struct user_regset_view user_mips64_view = { .n = ARRAY_SIZE(mips64_regsets), }; +#ifdef CONFIG_MIPS32_N32 + +static const struct user_regset_view user_mipsn32_view = { + .name ="mipsn32" , + .e_flags =EF_MIPS_ABI2 , + .e_machine =ELF_ARCH , + .ei_osabi =ELF_OSABI , + .regsets = mips64_regsets, + .n =ARRAY_SIZE (mips64_regsets), +}; + +#endif /* CONFIG_MIPS32_N32 */ +#endif /* CONFIG_64BIT */ const struct user_regset_view *task_user_regset_view (struct task_struct *task)
@@ -532,6 +545,10 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)#ifdef CONFIG_MIPS32_O32 if (test_tsk_thread_flag (task,TIF_32BIT_REGS ))return &user_mips_view; +#endif +#ifdef CONFIG_MIPS32_N32 +if (test_tsk_thread_flag (task,TIF_32BIT_ADDR )) +return &user_mipsn32_view;#endif return &user_mips64_view;#endif
arch/parisc/kernel/syscall.S +3 -3
@@ -690,15 +690,15 @@ ENTRY(linux_gateway_page) /* ELF32 Process entry path */ lws_compare_and_swap_2: #ifdef CONFIG_64BIT - /* Clip the input registers */ + /* Clip the input registers. We don't need to clip %r23 as we + only use it for word operations */ depdi 0, 31, 32, %r26 depdi 0, 31, 32, %r25 depdi 0, 31, 32, %r24 - depdi 0, 31, 32, %r23 #endif /* Check the validity of the size pointer */ - subi,>>= 4, %r23, %r0 + subi,>>= 3, %r23, %r0 b,n lws_exit_nosys /* Jump to the functions which will load the old and new values into
arch/powerpc/kernel/vio.c +2 -0
@@ -1572,6 +1572,8 @@ static struct device_attribute vio_dev_attrs[] = {void vio_unregister_device (struct vio_dev *viodev) {device_unregister (&viodev->dev); +if (viodev->family ==VDEVICE ) +irq_dispose_mapping (viodev->irq); }EXPORT_SYMBOL (vio_unregister_device);
arch/powerpc/platforms/powernv/opal-async.c +3 -3
@@ -38,18 +38,18 @@ int __opal_async_get_token(void)int token;spin_lock_irqsave (&opal_async_comp_lock, flags); - token =find_first_bit (opal_async_complete_map, opal_max_async_tokens); + token =find_first_zero_bit (opal_async_token_map, opal_max_async_tokens);if (token >= opal_max_async_tokens) { token = -EBUSY ; goto out; } -if (__test_and_set_bit (token, opal_async_token_map)) { +if (!__test_and_clear_bit (token, opal_async_complete_map)) { token = -EBUSY ; goto out; } -__clear_bit (token, opal_async_complete_map); +__set_bit (token, opal_async_token_map); out:spin_unlock_irqrestore (&opal_async_comp_lock, flags);
arch/powerpc/platforms/powernv/setup.c +1 -1
@@ -309,7 +309,7 @@ unsigned long pnv_get_proc_freq(unsigned int cpu) {unsigned long ret_freq; - ret_freq =cpufreq_quick_get (cpu) *1000ul ; + ret_freq =cpufreq_get (cpu) *1000ul ;/* * If the backend cpufreq driver does not exist,
arch/s390/include/asm/switch_to.h +1 -1
@@ -124,12 +124,12 @@ static inline void restore_access_regs(unsigned int *acrs)save_access_regs (&prev->thread.acrs[0 ]); \save_ri_cb (prev->thread.ri_cb); \ } \ +update_cr_regs (next); \if (next->mm) { \restore_fp_ctl (&next->thread.fp_regs.fpc); \restore_fp_regs (next->thread.fp_regs.fprs); \restore_access_regs (&next->thread.acrs[0 ]); \restore_ri_cb (next->thread.ri_cb, prev->thread.ri_cb); \ -update_cr_regs (next); \ } \ prev =__switch_to (prev,next); \ }while (0 )
arch/s390/kernel/dis.c +2 -2
@@ -1765,7 +1765,7 @@ void show_code(struct pt_regs *regs) {char *mode =user_mode (regs) ?"User" :"Krnl" ;unsigned char code[64 ]; -char buffer[64 ], *ptr; +char buffer[128 ], *ptr;mm_segment_t old_fs;unsigned long addr;int start, end, opsize, hops, i;
@@ -1828,7 +1828,7 @@ void show_code(struct pt_regs *regs) start += opsize;printk (buffer); ptr = buffer; - ptr +=sprintf (ptr,"\n " ); + ptr +=sprintf (ptr,"\n\t " ); hops++; }printk ("\n" );
arch/s390/kernel/early.c +3 -1
@@ -388,8 +388,10 @@ static __init void detect_machine_facilities(void) S390_lowcore.machine_flags |=MACHINE_FLAG_IDTE ;if (test_facility (40 )) S390_lowcore.machine_flags |=MACHINE_FLAG_LPP ; -if (test_facility (50 ) &&test_facility (73 )) +if (test_facility (50 ) &&test_facility (73 )) { S390_lowcore.machine_flags |=MACHINE_FLAG_TE ; +__ctl_set_bit (0 ,55 ); + }if (test_facility (66 )) S390_lowcore.machine_flags |=MACHINE_FLAG_RRBM ;if (test_facility (51 ))
arch/s390/kernel/process.c +1 -0
@@ -123,6 +123,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,memset (&p->thread.per_user,0 ,sizeof (p->thread.per_user));memset (&p->thread.per_event,0 ,sizeof (p->thread.per_event));clear_tsk_thread_flag (p,TIF_SINGLE_STEP ); + p->thread.per_flags =0 ;/* Initialize per thread user and system timer values */ ti =task_thread_info (p); ti->user_timer =0 ;
arch/s390/kernel/runtime_instr.c +2 -2
@@ -53,12 +53,14 @@ void exit_thread_runtime_instr(void) {struct task_struct *task = current; +preempt_disable ();if (!task->thread.ri_cb)return ;disable_runtime_instr ();kfree (task->thread.ri_cb); task->thread.ri_signum =0 ; task->thread.ri_cb =NULL ; +preempt_enable (); } static void runtime_instr_int_handler(struct ext_code ext_code,
@@ -100,9 +102,7 @@ SYSCALL_DEFINE2(s390_runtime_instr, int, command, int, signum)return -EOPNOTSUPP ;if (command ==S390_RUNTIME_INSTR_STOP ) { -preempt_disable ();exit_thread_runtime_instr (); -preempt_enable ();return 0 ; }
arch/x86/include/asm/fixmap.h +6 -5
@@ -19,7 +19,6 @@#include <asm/acpi.h> #include <asm/apicdef.h> #include <asm/page.h> -#include <asm/pvclock.h> #ifdef CONFIG_X86_32 #include <linux/threads.h> #include <asm/kmap_types.h>
@@ -70,10 +69,6 @@ enum fixed_addresses {FIX_HOLE , #elseVSYSCALL_PAGE = (FIXADDR_TOP -VSYSCALL_ADDR ) >>PAGE_SHIFT , -#ifdef CONFIG_PARAVIRT_CLOCK - PVCLOCK_FIXMAP_BEGIN, - PVCLOCK_FIXMAP_END = PVCLOCK_FIXMAP_BEGIN+PVCLOCK_VSYSCALL_NR_PAGES-1, -#endif #endifFIX_DBGP_BASE , FIX_EARLYCON_MEM_BASE,
@@ -103,6 +98,12 @@ enum fixed_addresses {#ifdef CONFIG_X86_INTEL_MID FIX_LNW_VRTC,#endif +#ifdef CONFIG_ACPI_APEI_GHES +/* Used for GHES mapping from assorted contexts */ +FIX_APEI_GHES_IRQ , +FIX_APEI_GHES_NMI , +#endif + __end_of_permanent_fixed_addresses,/*
arch/x86/include/asm/pvclock.h +9 -6
@@ -4,6 +4,15 @@#include <linux/clocksource.h> #include <asm/pvclock-abi.h> +#ifdef CONFIG_PARAVIRT_CLOCK +extern struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va (void ); +#else +static inline struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va (void ) +{ +return NULL ; +} +#endif +/* some helper functions for xen and kvm pv clock sources */ cycle_t pvclock_clocksource_read (struct pvclock_vcpu_time_info *src);u8 pvclock_read_flags (struct pvclock_vcpu_time_info *src);
@@ -95,14 +104,8 @@ unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,struct pvclock_vsyscall_time_info {struct pvclock_vcpu_time_info pvti; -u32 migrate_count; } __attribute__((__aligned__ (SMP_CACHE_BYTES )));#define PVTI_SIZE sizeof(struct pvclock_vsyscall_time_info) -#define PVCLOCK_VSYSCALL_NR_PAGES (((NR_CPUS-1)/(PAGE_SIZE/PVTI_SIZE))+1) - -int __init pvclock_init_vsyscall (struct pvclock_vsyscall_time_info *i, -int size); -struct pvclock_vcpu_time_info *pvclock_get_vsyscall_time_info (int cpu);#endif /* _ASM_X86_PVCLOCK_H */
arch/x86/include/asm/vdso.h +10 -9
@@ -18,15 +18,16 @@ struct vdso_image {unsigned long alt, alt_len; -unsigned long sym_end_mapping;/* Total size of the mapping */ - -unsigned long sym_vvar_page; -unsigned long sym_hpet_page; -unsigned long sym_VDSO32_NOTE_MASK; -unsigned long sym___kernel_sigreturn; -unsigned long sym___kernel_rt_sigreturn; -unsigned long sym___kernel_vsyscall; -unsigned long sym_VDSO32_SYSENTER_RETURN; +long sym_vvar_start;/* Negative offset to the vvar area */ + +long sym_vvar_page; +long sym_hpet_page; +long sym_pvclock_page; +long sym_VDSO32_NOTE_MASK; +long sym___kernel_sigreturn; +long sym___kernel_rt_sigreturn; +long sym___kernel_vsyscall; +long sym_VDSO32_SYSENTER_RETURN; };#ifdef CONFIG_X86_64
arch/x86/kernel/alternative.c +13 -13
@@ -409,7 +409,6 @@ static void alternatives_smp_lock(const s32 *start, const s32 *end, {const s32 *poff; -mutex_lock (&text_mutex);for (poff = start; poff < end; poff++) {u8 *ptr = (u8 *)poff + *poff;
@@ -419,7 +418,6 @@ static void alternatives_smp_lock(const s32 *start, const s32 *end,if (*ptr ==0x3e )text_poke (ptr, ((unsigned char []){0xf0 }),1 ); } -mutex_unlock (&text_mutex); } static void alternatives_smp_unlock(const s32 *start, const s32 *end,
@@ -427,7 +425,6 @@ static void alternatives_smp_unlock(const s32 *start, const s32 *end, {const s32 *poff; -mutex_lock (&text_mutex);for (poff = start; poff < end; poff++) {u8 *ptr = (u8 *)poff + *poff;
@@ -437,7 +434,6 @@ static void alternatives_smp_unlock(const s32 *start, const s32 *end,if (*ptr ==0xf0 )text_poke (ptr, ((unsigned char []){0x3E }),1 ); } -mutex_unlock (&text_mutex); }struct smp_alt_module {
@@ -456,8 +452,7 @@ struct smp_alt_module {struct list_head next; };static LIST_HEAD (smp_alt_modules); -static DEFINE_MUTEX (smp_alt); -static bool uniproc_patched = false;/* protected by smp_alt */ +static bool uniproc_patched = false;/* protected by text_mutex */ void __init_or_module alternatives_smp_module_add(struct module *mod, char *name,
@@ -466,7 +461,7 @@ void __init_or_module alternatives_smp_module_add(struct module *mod, {struct smp_alt_module *smp; -mutex_lock (&smp_alt); +mutex_lock (&text_mutex);if (!uniproc_patched) goto unlock;
@@ -493,14 +488,14 @@ void __init_or_module alternatives_smp_module_add(struct module *mod, smp_unlock:alternatives_smp_unlock (locks, locks_end, text, text_end); unlock: -mutex_unlock (&smp_alt); +mutex_unlock (&text_mutex); } void __init_or_module alternatives_smp_module_del(struct module *mod) {struct smp_alt_module *item; -mutex_lock (&smp_alt); +mutex_lock (&text_mutex);list_for_each_entry (item, &smp_alt_modules, next) {if (mod != item->mod)continue ;
@@ -508,7 +503,7 @@ void __init_or_module alternatives_smp_module_del(struct module *mod)kfree (item);break ; } -mutex_unlock (&smp_alt); +mutex_unlock (&text_mutex); }void alternatives_enable_smp (void )
@@ -518,7 +513,7 @@ void alternatives_enable_smp(void)/* Why bother if there are no other CPUs? */ BUG_ON (num_possible_cpus () ==1 ); -mutex_lock (&smp_alt); +mutex_lock (&text_mutex);if (uniproc_patched) {pr_info ("switching to SMP code\n" );
@@ -530,10 +525,13 @@ void alternatives_enable_smp(void) mod->text, mod->text_end); uniproc_patched = false; } -mutex_unlock (&smp_alt); +mutex_unlock (&text_mutex); } -/* Return 1 if the address range is reserved for smp-alternatives */ +/* +* Return 1 if the address range is reserved for SMP-alternatives. +* Must hold text_mutex. +*/ int alternatives_text_reserved (void *start,void *end) {struct smp_alt_module *mod;
@@ -541,6 +539,8 @@ int alternatives_text_reserved(void *start, void *end)u8 *text_start = start;u8 *text_end = end; +lockdep_assert_held (&text_mutex); +list_for_each_entry (mod, &smp_alt_modules, next) {if (mod->text > text_end || mod->text_end < text_start)continue ;
arch/x86/kernel/kvmclock.c +5 -11
@@ -24,7 +24,6 @@#include <linux/percpu.h> #include <linux/hardirq.h> #include <linux/memblock.h> -#include <linux/kaiser.h> #include <asm/x86_init.h> #include <asm/reboot.h>
@@ -44,6 +43,11 @@ early_param("no-kvmclock", parse_no_kvmclock);static struct pvclock_vsyscall_time_info *hv_clock;static struct pvclock_wall_clock wall_clock; +struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va (void ) +{ +return hv_clock; +} +/* * The wallclock is the time of day when we booted. Since then, some time may * have elapsed since the hypervisor wrote the data. So we try to account for
@@ -274,7 +278,6 @@ int __init kvm_setup_vsyscall_timeinfo(void) {#ifdef CONFIG_X86_64 int cpu; -int ret;u8 flags;struct pvclock_vcpu_time_info *vcpu_time;unsigned int size;
@@ -282,10 +285,6 @@ int __init kvm_setup_vsyscall_timeinfo(void)if (!hv_clock)return 0 ; -/* FIXME: Need to add pvclock pages to user-space page tables */ -if (kaiser_enabled) -return 0 ; - size =PAGE_ALIGN (sizeof (struct pvclock_vsyscall_time_info )*NR_CPUS );preempt_disable ();
@@ -299,11 +298,6 @@ int __init kvm_setup_vsyscall_timeinfo(void)return 1 ; } -if ((ret =pvclock_init_vsyscall (hv_clock, size))) { -preempt_enable (); -return ret; - } -preempt_enable (); kvm_clock.archdata.vclock_mode =VCLOCK_PVCLOCK ;
arch/x86/kernel/pvclock.c +0 -68
71 lines not on this page · raw message
arch/x86/kvm/svm.c +7 -0
@@ -3157,6 +3157,13 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)u32 ecx = msr->index;u64 data = msr->data;switch (ecx) { +case MSR_IA32_CR_PAT : +if (!kvm_mtrr_valid (vcpu,MSR_IA32_CR_PAT , data)) +return 1 ; + vcpu->arch.pat = data; + svm->vmcb->save.g_pat = data; +mark_dirty (svm->vmcb,VMCB_NPT ); +break ;case MSR_IA32_TSC :kvm_write_tsc (vcpu, msr);break ;
arch/x86/kvm/vmx.c +4 -0
@@ -2599,6 +2599,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)break ;case MSR_IA32_CR_PAT :if (vmcs_config.vmentry_ctrl &VM_ENTRY_LOAD_IA32_PAT ) { +if (!kvm_mtrr_valid (vcpu,MSR_IA32_CR_PAT , data)) +return 1 ;vmcs_write64 (GUEST_IA32_PAT , data); vcpu->arch.pat = data;break ;
@@ -8695,6 +8697,8 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,vmcs_writel (GUEST_SYSENTER_EIP , vmcs12->host_ia32_sysenter_eip);vmcs_writel (GUEST_IDTR_BASE , vmcs12->host_idtr_base);vmcs_writel (GUEST_GDTR_BASE , vmcs12->host_gdtr_base); +vmcs_write32 (GUEST_IDTR_LIMIT ,0xFFFF ); +vmcs_write32 (GUEST_GDTR_LIMIT ,0xFFFF );/* If not VM_EXIT_CLEAR_BNDCFGS, the L2 value propagates to L1. */ if (vmcs12->vm_exit_controls &VM_EXIT_CLEAR_BNDCFGS )
arch/x86/kvm/x86.c +3 -2
@@ -1742,7 +1742,7 @@ static bool valid_mtrr_type(unsigned t)return t <8 && (1 << t) &0x73 ;/* 0, 1, 4, 5, 6 */ } -static bool mtrr_valid (struct kvm_vcpu *vcpu,u32 msr,u64 data) +bool kvm_mtrr_valid (struct kvm_vcpu *vcpu,u32 msr,u64 data) {int i;
@@ -1768,12 +1768,13 @@ static bool mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)/* variable MTRRs */ return valid_mtrr_type (data &0xff ); } +EXPORT_SYMBOL_GPL (kvm_mtrr_valid);static int set_msr_mtrr (struct kvm_vcpu *vcpu,u32 msr,u64 data) {u64 *p = (u64 *)&vcpu->arch.mtrr_state.fixed_ranges; -if (!mtrr_valid (vcpu, msr, data)) +if (!kvm_mtrr_valid (vcpu, msr, data))return 1 ;if (msr == MSR_MTRRdefType) {
arch/x86/kvm/x86.h +2 -0
@@ -132,6 +132,8 @@ int kvm_write_guest_virt_system(struct x86_emulate_ctxt *ctxt, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception); +bool kvm_mtrr_valid (struct kvm_vcpu *vcpu,u32 msr,u64 data); +#define KVM_SUPPORTED_XCR0 (XSTATE_FP | XSTATE_SSE | XSTATE_YMM \ | XSTATE_BNDREGS | XSTATE_BNDCSR)extern u64 host_xcr0;
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -814,7 +814,7 @@ EndTable GrpTable: Grp3_1 0: TEST Eb,Ib -1: +1: TEST Eb,Ib 2: NOT Eb 3: NEG Eb 4: MUL AL,Eb
arch/x86/mm/kaiser.c +5 -2
@@ -195,6 +195,8 @@ static int kaiser_add_user_map(const void *__start_addr, unsigned long size,* requires that not to be #defined to 0): so mask it off here. */ flags &= ~_PAGE_GLOBAL; +if (!(__supported_pte_mask & _PAGE_NX)) + flags &= ~_PAGE_NX;for (; address < end_addr; address +=PAGE_SIZE ) { target_address =get_pa_from_mapping (address);
@@ -322,7 +324,7 @@ void __init kaiser_check_boottime_disable(void)*/ void __init kaiser_init (void ) { -int cpu, idx; +int cpu;if (!kaiser_enabled)return ;
@@ -428,7 +430,8 @@ pgd_t kaiser_set_shadow_pgd(pgd_t *pgdp, pgd_t pgd)* get out to userspace running on the kernel CR3, * userspace will crash instead of running. */ - pgd.pgd |= _PAGE_NX; +if (__supported_pte_mask & _PAGE_NX) + pgd.pgd |= _PAGE_NX; } }else if (!pgd.pgd) {/*
arch/x86/platform/uv/uv_nmi.c +1 -0
@@ -28,6 +28,7 @@#include <linux/nmi.h> #include <linux/sched.h> #include <linux/slab.h> +#include <linux/clocksource.h> #include <asm/apic.h> #include <asm/current.h>
arch/x86/vdso/vclock_gettime.c +53 -50
131 lines not on this page · raw message
arch/x86/vdso/vdso-layout.lds.S +20 -25
57 lines not on this page · raw message
arch/x86/vdso/vdso2c.c +10 -5
@@ -20,9 +20,10 @@ const char *outfilename;/* Symbols that we need in vdso2c. */ enum { + sym_vvar_start, sym_vvar_page, sym_hpet_page, - sym_end_mapping, + sym_pvclock_page, sym_VDSO_FAKE_SECTION_TABLE_START, sym_VDSO_FAKE_SECTION_TABLE_END, };
@@ -30,6 +31,7 @@ enum {const int special_pages[] = { sym_vvar_page, sym_hpet_page, + sym_pvclock_page, };struct vdso_sym {
@@ -38,9 +40,10 @@ struct vdso_sym { };struct vdso_sym required_syms[] = { + [sym_vvar_start] = {"vvar_start" , true}, [sym_vvar_page] = {"vvar_page" , true}, [sym_hpet_page] = {"hpet_page" , true}, - [sym_end_mapping] = {"end_mapping" , true}, + [sym_pvclock_page] = {"pvclock_page" , true}, [sym_VDSO_FAKE_SECTION_TABLE_START] = {"VDSO_FAKE_SECTION_TABLE_START" , false },
@@ -96,9 +99,11 @@ extern void bad_put_le(void);#define NSYMS (sizeof(required_syms) / sizeof(required_syms[0])) -#define BITSFUNC3 (name, bits) name##bits -#define BITSFUNC2 (name, bits) BITSFUNC3(name, bits) -#define BITSFUNC (name) BITSFUNC2(name, ELF_BITS) +#define BITSFUNC3 (name, bits, suffix) name##bits##suffix +#define BITSFUNC2 (name, bits, suffix) BITSFUNC3(name, bits, suffix) +#define BITSFUNC (name) BITSFUNC2(name, ELF_BITS, ) + +#define INT_BITS BITSFUNC2(int, ELF_BITS, _t)#define ELF_BITS_XFORM2 (bits, x) Elf##bits##_##x#define ELF_BITS_XFORM (bits, x) ELF_BITS_XFORM2(bits, x)
arch/x86/vdso/vdso2c.h +16 -9
@@ -132,7 +132,7 @@ static void BITSFUNC(go)(void *addr, size_t len, *alt_sec =NULL ;ELF (Dyn) *dyn =0 , *dyn_end =0 ;const char *secstrings; -uint64_t syms[NSYMS ] = {}; +INT_BITS syms[NSYMS ] = {}; struct BITSFUNC(fake_sections) fake_sections = {};
@@ -209,6 +209,13 @@ static void BITSFUNC(go)(void *addr, size_t len,fail ("duplicate symbol %s\n" , required_syms[k].name); } + +/* +* Careful: we use negative addresses, but +* st_value is unsigned, so we rely +* on syms[k] being a signed type of the +* correct width. +*/ syms[k] =GET_LE (&sym->st_value); } }
@@ -263,15 +270,15 @@ static void BITSFUNC(go)(void *addr, size_t len,if (syms[i] %4096 )fail ("%s must be a multiple of 4096\n" , required_syms[i].name); -if (syms[i] < data_size) -fail ("%s must be after the text mapping\n" , +if (syms[sym_vvar_start] > syms[i] +4096 ) +fail ("%s underruns begin_vvar\n" , required_syms[i].name); -if (syms[sym_end_mapping] < syms[i] +4096 ) -fail ("%s overruns end_mapping\n" , +if (syms[i] +4096 >0 ) +fail ("%s is on the wrong side of the vdso text\n" , required_syms[i].name); } -if (syms[sym_end_mapping] %4096 ) -fail ("end_mapping must be a multiple of 4096\n" ); +if (syms[sym_vvar_start] %4096 ) +fail ("vvar_begin must be a multiple of 4096\n" );if (!name) {fwrite (addr, load_size,1 , outfile);
@@ -311,8 +318,8 @@ static void BITSFUNC(go)(void *addr, size_t len, }for (i =0 ; i <NSYMS ; i++) {if (required_syms[i].export && syms[i]) -fprintf (outfile,"\t.sym_%s = 0x%" PRIx64",\n" , - required_syms[i].name, syms[i]); +fprintf (outfile,"\t.sym_%s = %" PRIi64",\n" , + required_syms[i].name, (int64_t )syms[i]); }fprintf (outfile,"};\n" ); }
arch/x86/vdso/vma.c +25 -9
@@ -11,6 +11,7 @@#include <linux/random.h> #include <linux/elf.h> #include <asm/vsyscall.h> +#include <asm/pvclock.h> #include <asm/vgtod.h> #include <asm/proto.h> #include <asm/vdso.h>
@@ -106,36 +107,39 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) {struct mm_struct *mm = current->mm;struct vm_area_struct *vma; -unsigned long addr; +unsigned long addr, text_start;int ret =0 ;static struct page *no_pages[] = {NULL };static struct vm_special_mapping vvar_mapping = { .name ="[vvar]" , .pages = no_pages, }; +struct pvclock_vsyscall_time_info *pvti;if (calculate_addr) { addr =vdso_addr (current->mm->start_stack, - image->sym_end_mapping); + image->size - image->sym_vvar_start); }else { addr =0 ; }down_write (&mm->mmap_sem); - addr =get_unmapped_area (NULL , addr, image->sym_end_mapping,0 ,0 ); + addr =get_unmapped_area (NULL , addr, + image->size - image->sym_vvar_start,0 ,0 );if (IS_ERR_VALUE (addr)) { ret = addr; goto up_fail; } - current->mm->context.vdso = (void __user *)addr; + text_start = addr - image->sym_vvar_start; + current->mm->context.vdso = (void __user *)text_start;/* * MAYWRITE to allow gdb to COW and set breakpoints */ vma = _install_special_mapping(mm, - addr, + text_start, image->size, VM_READ|VM_EXEC| VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC,
@@ -147,8 +151,8 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) } vma =_install_special_mapping (mm, - addr + image->size, - image->sym_end_mapping - image->size, + addr, + -image->sym_vvar_start,VM_READ , &vvar_mapping);
@@ -159,7 +163,7 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)if (image->sym_vvar_page) ret =remap_pfn_range (vma, - addr + image->sym_vvar_page, + text_start + image->sym_vvar_page,__pa_symbol (&__vvar_page) >>PAGE_SHIFT ,PAGE_SIZE ,PAGE_READONLY );
@@ -170,7 +174,7 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)#ifdef CONFIG_HPET_TIMER if (hpet_address && image->sym_hpet_page) { ret =io_remap_pfn_range (vma, - addr + image->sym_hpet_page, + text_start + image->sym_hpet_page, hpet_address >>PAGE_SHIFT ,PAGE_SIZE ,pgprot_noncached (PAGE_READONLY ));
@@ -180,6 +184,18 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr) }#endif + pvti =pvclock_pvti_cpu0_va (); +if (pvti && image->sym_pvclock_page) { + ret =remap_pfn_range (vma, + text_start + image->sym_pvclock_page, +__pa (pvti) >>PAGE_SHIFT , +PAGE_SIZE , +PAGE_READONLY ); + +if (ret) + goto up_fail; + } + up_fail:if (ret) current->mm->context.vdso =NULL ;
block/blk-core.c +3 -0
@@ -611,6 +611,9 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)kobject_init (&q->kobj, &blk_queue_ktype); +#ifdef CONFIG_BLK_DEV_IO_TRACE +mutex_init (&q->blk_trace_mutex); +#endif mutex_init (&q->sysfs_lock);spin_lock_init (&q->__queue_lock);
drivers/acpi/apei/ghes.c +16 -69
145 lines not on this page · raw message
drivers/char/ipmi/ipmi_msghandler.c +6 -4
@@ -4007,7 +4007,8 @@ smi_from_recv_msg(ipmi_smi_t intf, struct ipmi_recv_msg *recv_msg, }static void check_msg_timeout (ipmi_smi_t intf,struct seq_table *ent, -struct list_head *timeouts,long timeout_period, +struct list_head *timeouts, +unsigned long timeout_period,int slot,unsigned long *flags,unsigned int *waiting_msgs) {
@@ -4020,8 +4021,8 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,if (!ent->inuse)return ; - ent->timeout -= timeout_period; -if (ent->timeout >0 ) { +if (timeout_period < ent->timeout) { + ent->timeout -= timeout_period; (*waiting_msgs)++;return ; }
@@ -4088,7 +4089,8 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent, } } -static unsigned int ipmi_timeout_handler (ipmi_smi_t intf,long timeout_period) +static unsigned int ipmi_timeout_handler (ipmi_smi_t intf, +unsigned long timeout_period) {struct list_head timeouts;struct ipmi_recv_msg *msg, *msg2;
drivers/char/tpm/tpm-dev.c +6 -0
@@ -139,6 +139,12 @@ static ssize_t tpm_write(struct file *file, const char __user *buf,return -EFAULT ; } +if (in_size <6 || + in_size <be32_to_cpu (*((__be32 *) (priv->data_buffer +2 )))) { +mutex_unlock (&priv->buffer_mutex); +return -EINVAL ; + } +/* atomic tpm command send and result receive */ out_size =tpm_transmit (priv->chip, priv->data_buffer,sizeof (priv->data_buffer));
drivers/clk/tegra/clk-tegra30.c +1 -1
@@ -1060,7 +1060,7 @@ static void __init tegra30_super_clk_init(void)* U71 divider of cclk_lp. */ clk =tegra_clk_register_divider ("pll_p_out3_cclklp" ,"pll_p_out3" , - clk_base +SUPER_CCLKG_DIVIDER ,0 , + clk_base +SUPER_CCLKLP_DIVIDER ,0 ,TEGRA_DIVIDER_INT ,16 ,8 ,1 ,NULL );clk_register_clkdev (clk,"pll_p_out3_cclklp" ,NULL );
drivers/clk/ti/clk-dra7-atl.c +2 -1
@@ -262,7 +262,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)/* Get configuration for the ATL instances */ snprintf (prop,sizeof (prop),"atl%u" , i); - cfg_node =of_find_node_by_name (node, prop); + cfg_node =of_get_child_by_name (node, prop);if (cfg_node) { ret =of_property_read_u32 (cfg_node,"bws" , &cdesc->bws);
@@ -275,6 +275,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)atl_write (cinfo,DRA7_ATL_AWSMUX_REG (i), cdesc->aws); } +of_node_put (cfg_node); } cdesc->probed = true;
drivers/crypto/caam/desc.h +1 -1
@@ -1434,7 +1434,7 @@ struct sec4_sg_entry {#define MATH_SRC1_REG2 (0x02 << MATH_SRC1_SHIFT)#define MATH_SRC1_REG3 (0x03 << MATH_SRC1_SHIFT)#define MATH_SRC1_IMM (0x04 << MATH_SRC1_SHIFT) -#define MATH_SRC1_DPOVRD (0x07 << MATH_SRC0_SHIFT) +#define MATH_SRC1_DPOVRD (0x07 << MATH_SRC1_SHIFT)#define MATH_SRC1_INFIFO (0x0a << MATH_SRC1_SHIFT)#define MATH_SRC1_OUTFIFO (0x0b << MATH_SRC1_SHIFT)#define MATH_SRC1_ONE (0x0c << MATH_SRC1_SHIFT)
drivers/gpu/drm/gma500/mdfld_intel_display.c +1 -1
@@ -99,7 +99,7 @@ void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe)/* Wait for for the pipe enable to take effect. */ for (count =0 ; count <COUNT_MAX ; count++) { temp =REG_READ (map->conf); -if ((temp &PIPEACONF_PIPE_STATE ) ==1 ) +if (temp &PIPEACONF_PIPE_STATE )break ; } }
drivers/gpu/drm/i915/intel_bios.c +1 -1
@@ -1007,7 +1007,7 @@ static void parse_ddi_ports(struct drm_i915_private *dev_priv,struct drm_device *dev = dev_priv->dev;enum port port; -if (!HAS_DDI (dev)) +if (!HAS_DDI (dev) && !IS_CHERRYVIEW (dev))return ;if (!dev_priv->vbt.child_dev_num)
drivers/gpu/drm/i915/intel_display.c +9 -5
@@ -8662,13 +8662,10 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, {struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc); -enum transcoder cpu_transcoder = intel_crtc->config.cpu_transcoder; +enum transcoder cpu_transcoder;struct drm_display_mode *mode;struct intel_crtc_config pipe_config; -int htot =I915_READ (HTOTAL (cpu_transcoder)); -int hsync =I915_READ (HSYNC (cpu_transcoder)); -int vtot =I915_READ (VTOTAL (cpu_transcoder)); -int vsync =I915_READ (VSYNC (cpu_transcoder)); +u32 htot, hsync, vtot, vsync;enum pipe pipe = intel_crtc->pipe; mode =kzalloc (sizeof (*mode),GFP_KERNEL );
@@ -8690,6 +8687,13 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,i9xx_crtc_clock_get (intel_crtc, &pipe_config); mode->clock = pipe_config.port_clock / pipe_config.pixel_multiplier; + + cpu_transcoder = pipe_config.cpu_transcoder; + htot =I915_READ (HTOTAL (cpu_transcoder)); + hsync =I915_READ (HSYNC (cpu_transcoder)); + vtot =I915_READ (VTOTAL (cpu_transcoder)); + vsync =I915_READ (VSYNC (cpu_transcoder)); + mode->hdisplay = (htot &0xffff ) +1 ; mode->htotal = ((htot &0xffff0000 ) >>16 ) +1 ; mode->hsync_start = (hsync &0xffff ) +1 ;
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -1365,8 +1365,8 @@ void intel_edp_panel_off(struct intel_dp *intel_dp)I915_WRITE (pp_ctrl_reg, pp);POSTING_READ (pp_ctrl_reg); - intel_dp->last_power_cycle = jiffies;wait_panel_off (intel_dp); + intel_dp->last_power_cycle = jiffies;/* We got a reference when we enabled the VDD. */ power_domain =intel_display_port_power_domain (intel_encoder);
drivers/gpu/drm/radeon/atombios_dp.c +18 -20
@@ -45,34 +45,32 @@ static char *pre_emph_names[] = {/***** radeon AUX functions *****/ -/* Atom needs data in little endian format -* so swap as appropriate when copying data to -* or from atom. Note that atom operates on -* dw units. +/* Atom needs data in little endian format so swap as appropriate when copying +* data to or from atom. Note that atom operates on dw units. +* +* Use to_le=true when sending data to atom and provide at least +* ALIGN(num_bytes,4) bytes in the dst buffer. +* +* Use to_le=false when receiving data from atom and provide ALIGN(num_bytes,4) +* byes in the src buffer. */ void radeon_atom_copy_swap (u8 *dst,u8 *src,u8 num_bytes,bool to_le) {#ifdef __BIG_ENDIAN -u8 src_tmp[20 ], dst_tmp[20 ];/* used for byteswapping */ -u32 *dst32, *src32; +u32 src_tmp[5 ], dst_tmp[5 ];int i; +u8 align_num_bytes =ALIGN (num_bytes,4 ); -memcpy (src_tmp, src, num_bytes); - src32 = (u32 *)src_tmp; - dst32 = (u32 *)dst_tmp;if (to_le) { -for (i =0 ; i < ((num_bytes +3 ) /4 ); i++) - dst32[i] =cpu_to_le32 (src32[i]); -memcpy (dst, dst_tmp, num_bytes); +memcpy (src_tmp, src, num_bytes); +for (i =0 ; i < align_num_bytes /4 ; i++) + dst_tmp[i] =cpu_to_le32 (src_tmp[i]); +memcpy (dst, dst_tmp, align_num_bytes); }else { -u8 dws = num_bytes & ~3 ; -for (i =0 ; i < ((num_bytes +3 ) /4 ); i++) - dst32[i] =le32_to_cpu (src32[i]); -memcpy (dst, dst_tmp, dws); -if (num_bytes %4 ) { -for (i =0 ; i < (num_bytes %4 ); i++) - dst[dws+i] = dst_tmp[dws+i]; - } +memcpy (src_tmp, src, align_num_bytes); +for (i =0 ; i < align_num_bytes /4 ; i++) + dst_tmp[i] =le32_to_cpu (src_tmp[i]); +memcpy (dst, dst_tmp, num_bytes); }#else memcpy (dst, src, num_bytes);
drivers/gpu/drm/ttm/ttm_bo_util.c +1 -0
@@ -463,6 +463,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,INIT_LIST_HEAD (&fbo->lru);INIT_LIST_HEAD (&fbo->swap);INIT_LIST_HEAD (&fbo->io_reserve_lru); +mutex_init (&fbo->wu_mutex);drm_vma_node_reset (&fbo->vma_node);atomic_set (&fbo->cpu_writers,0 );
drivers/infiniband/hw/mlx4/qp.c +1 -1
@@ -1468,7 +1468,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, context->mtu_msgmax = (IB_MTU_4096 <<5 ) |ilog2 (dev->dev->caps.max_gso_sz); else - context->mtu_msgmax = (IB_MTU_4096 << 5) | 12; + context->mtu_msgmax = (IB_MTU_4096 << 5) | 13; }else if (attr_mask &IB_QP_PATH_MTU ) {if (attr->path_mtu <IB_MTU_256 || attr->path_mtu >IB_MTU_4096 ) { pr_err("path MTU (%u) is invalid\n",
drivers/infiniband/hw/mlx5/main.c +2 -0
@@ -1164,6 +1164,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev) qp->real_qp = qp; qp->uobject =NULL ; qp->qp_type =MLX5_IB_QPT_REG_UMR ; + qp->send_cq = init_attr->send_cq; + qp->recv_cq = init_attr->recv_cq; attr->qp_state =IB_QPS_INIT ; attr->port_num =1 ;
drivers/infiniband/ulp/srp/ib_srp.c +18 -5
@@ -600,12 +600,19 @@ static void srp_path_rec_completion(int status,static int srp_lookup_path (struct srp_target_port *target) { -int ret; +int ret = -ENODEV ; target->path.numb_path =1 ;init_completion (&target->done); +/* +* Avoid that the SCSI host can be removed by srp_remove_target() +* before srp_path_rec_completion() is called. +*/ +if (!scsi_host_get (target->scsi_host)) + goto out; + target->path_query_id = ib_sa_path_rec_get(&srp_sa_client, target->srp_host->srp_dev->dev, target->srp_host->port,
@@ -619,18 +626,24 @@ static int srp_lookup_path(struct srp_target_port *target)GFP_KERNEL , srp_path_rec_completion, target, &target->path_query); -if (target->path_query_id <0 ) -return target->path_query_id; + ret = target->path_query_id; +if (ret <0 ) + goto put; ret =wait_for_completion_interruptible (&target->done);if (ret <0 )return ret; -if (target->status <0 ) + ret = target->status; +if (ret <0 )shost_printk (KERN_WARNING , target->scsi_host,PFX "Path record query failed\n" ); -return target->status; +put: +scsi_host_put (target->scsi_host); + +out: +return ret; }static int srp_send_req (struct srp_target_port *target)
drivers/infiniband/ulp/srpt/ib_srpt.c +4 -5
@@ -3521,7 +3521,7 @@ static int srpt_parse_i_port_id(u8 i_port_id[16], const char *name) {const char *p;unsigned len, count, leading_zero_bytes; -int ret, rc; +int ret; p = name;if (strnicmp (p,"0x" ,2 ) ==0 )
@@ -3533,10 +3533,9 @@ static int srpt_parse_i_port_id(u8 i_port_id[16], const char *name) count =min (len /2 ,16U ); leading_zero_bytes =16 - count;memset (i_port_id,0 , leading_zero_bytes); - rc =hex2bin (i_port_id + leading_zero_bytes, p, count); -if (rc <0 ) -pr_debug ("hex2bin failed for srpt_parse_i_port_id: %d\n" , rc); - ret =0 ; + ret =hex2bin (i_port_id + leading_zero_bytes, p, count); +if (ret <0 ) +pr_debug ("hex2bin failed for srpt_parse_i_port_id: %d\n" , ret); out:return ret; }
drivers/input/misc/adxl34x.c +1 -1
@@ -796,7 +796,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,if (pdata->watermark) { ac->int_mask |=WATERMARK ; -if (!FIFO_MODE (pdata->fifo_mode)) +if (FIFO_MODE (pdata->fifo_mode) ==FIFO_BYPASS ) ac->pdata.fifo_mode |=FIFO_STREAM ; }else { ac->int_mask |=DATA_READY ;
drivers/iommu/dmar.c +5 -2
@@ -718,13 +718,16 @@ int __init dmar_dev_scope_init(void)dmar_free_pci_notify_info (info); } } - -bus_register_notifier (&pci_bus_type, &dmar_pci_bus_nb); }return dmar_dev_scope_status; } +void dmar_register_bus_notifier (void ) +{ +bus_register_notifier (&pci_bus_type, &dmar_pci_bus_nb); +} +int __init dmar_table_init (void ) {
drivers/iommu/intel-iommu.c +10 -0
@@ -4044,6 +4044,16 @@ int __init intel_iommu_init(void) goto out_free_dmar; } +up_write (&dmar_global_lock); + +/* +* The bus notifier takes the dmar_global_lock, so lockdep will +* complain later when we register it under the lock. +*/ +dmar_register_bus_notifier (); + +down_write (&dmar_global_lock); +if (no_iommu || dmar_disabled) goto out_free_dmar;
drivers/md/bcache/alloc.c +2 -1
@@ -406,7 +406,8 @@ long bch_bucket_alloc(struct cache *ca, unsigned reserve, bool wait)finish_wait (&ca->set->bucket_wait, &w); out: -wake_up_process (ca->alloc_thread); +if (ca->alloc_thread) +wake_up_process (ca->alloc_thread);trace_bcache_alloc (ca, reserve);
drivers/md/bcache/request.c +9 -1
@@ -698,8 +698,16 @@ static void cached_dev_read_error(struct closure *cl) { struct search *s = container_of(cl, struct search, cl);struct bio *bio = &s->bio.bio; + struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); -if (s->recoverable) { +/* +* If cache device is dirty (dc->has_dirty is non-zero), then +* recovery a failed read request from cached device may get a +* stale data back. So read failure recovery is only permitted +* when cache device is clean. +*/ +if (s->recoverable && + (dc && !atomic_read (&dc->has_dirty))) {/* Retry from the backing device: */ trace_bcache_read_retry (s->orig_bio);
drivers/md/dm-bufio.c +6 -9
@@ -888,7 +888,8 @@ static void __get_memory_limit(struct dm_bufio_client *c, buffers = c->minimum_buffers; *limit_buffers = buffers; - *threshold_buffers = buffers *DM_BUFIO_WRITEBACK_PERCENT /100 ; + *threshold_buffers =mult_frac (buffers, +DM_BUFIO_WRITEBACK_PERCENT ,100 ); }/*
@@ -1778,19 +1779,15 @@ static int __init dm_bufio_init(void)memset (&dm_bufio_caches,0 ,sizeof dm_bufio_caches);memset (&dm_bufio_cache_names,0 ,sizeof dm_bufio_cache_names); - mem = (__u64)((totalram_pages - totalhigh_pages) * -DM_BUFIO_MEMORY_PERCENT /100 ) <<PAGE_SHIFT ; + mem = (__u64 )mult_frac (totalram_pages - totalhigh_pages, +DM_BUFIO_MEMORY_PERCENT ,100 ) <<PAGE_SHIFT ;if (mem >ULONG_MAX ) mem =ULONG_MAX ;#ifdef CONFIG_MMU -/* -* Get the size of vmalloc space the same way as VMALLOC_TOTAL -* in fs/proc/internal.h -*/ -if (mem > (VMALLOC_END -VMALLOC_START ) *DM_BUFIO_VMALLOC_PERCENT /100 ) - mem = (VMALLOC_END -VMALLOC_START ) *DM_BUFIO_VMALLOC_PERCENT /100 ; +if (mem >mult_frac (VMALLOC_TOTAL ,DM_BUFIO_VMALLOC_PERCENT ,100 )) + mem =mult_frac (VMALLOC_TOTAL ,DM_BUFIO_VMALLOC_PERCENT ,100 );#endif dm_bufio_default_cache_size = mem;
drivers/md/dm-table.c +14 -18
@@ -1643,12 +1643,12 @@ void dm_table_run_md_queue_async(struct dm_table *t) }EXPORT_SYMBOL (dm_table_run_md_queue_async); -static int device_discard_capable (struct dm_target *ti,struct dm_dev *dev, -sector_t start,sector_t len,void *data) +static int device_not_discard_capable (struct dm_target *ti,struct dm_dev *dev, +sector_t start,sector_t len,void *data) {struct request_queue *q =bdev_get_queue (dev->bdev); -return q &&blk_queue_discard (q); +return q && !blk_queue_discard (q); }bool dm_table_supports_discards (struct dm_table *t)
@@ -1656,26 +1656,22 @@ bool dm_table_supports_discards(struct dm_table *t)struct dm_target *ti;unsigned i =0 ; -/* -* Unless any target used by the table set discards_supported, -* require at least one underlying device to support discards. -* t->devices includes internal dm devices such as mirror logs -* so we need to use iterate_devices here, which targets -* supporting discard selectively must provide. -*/ while (i <dm_table_get_num_targets (t)) { ti =dm_table_get_target (t, i++);if (!ti->num_discard_bios) -continue ; - -if (ti->discards_supported) -return 1 ; +return false; -if (ti->type->iterate_devices && - ti->type->iterate_devices (ti, device_discard_capable,NULL )) -return 1 ; +/* +* Either the target provides discard support (as implied by setting +* 'discards_supported') or it relies on _all_ data devices having +* discard support. +*/ +if (!ti->discards_supported && + (!ti->type->iterate_devices || + ti->type->iterate_devices (ti, device_not_discard_capable,NULL ))) +return false; } -return 0 ; +return true; }
drivers/md/dm.c +8 -4
@@ -2912,11 +2912,15 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj) md = container_of(kobj, struct mapped_device, kobj_holder.kobj); -if (test_bit (DMF_FREEING , &md->flags) || -dm_deleting_md (md)) -return NULL ; - +spin_lock (&_minor_lock); +if (test_bit (DMF_FREEING , &md->flags) ||dm_deleting_md (md)) { + md =NULL ; + goto out; + }dm_get (md); +out: +spin_unlock (&_minor_lock); +return md; }
drivers/media/platform/omap/omap_vout.c +2 -1
@@ -1017,11 +1017,12 @@ static int omap_vout_open(struct file *file)struct omap_vout_device *vout =NULL ; vout =video_drvdata (file); -v4l2_dbg (1 , debug, &vout->vid_dev->v4l2_dev,"Entering %s\n" , __func__);if (vout ==NULL )return -ENODEV ; +v4l2_dbg (1 , debug, &vout->vid_dev->v4l2_dev,"Entering %s\n" , __func__); +/* for now, we only support single open */ if (vout->opened)return -EBUSY ;
drivers/media/rc/ir-lirc-codec.c +6 -3
@@ -289,11 +289,14 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,if (!dev->max_timeout)return -ENOSYS ; +/* Check for multiply overflow */ +if (val >U32_MAX /1000 ) +return -EINVAL ; + tmp = val *1000 ; -if (tmp < dev->min_timeout || - tmp > dev->max_timeout) -return -EINVAL ; +if (tmp < dev->min_timeout || tmp > dev->max_timeout) +return -EINVAL ; dev->timeout = tmp;break ;
drivers/media/usb/cx231xx/cx231xx-cards.c +1 -2
@@ -1185,8 +1185,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface, dev->vbi_or_sliced_cc_mode =0 ;/* get maximum no.of IAD interfaces */ - assoc_desc = udev->actconfig->intf_assoc[0 ]; - dev->max_iad_interface_count = assoc_desc->bInterfaceCount; + dev->max_iad_interface_count = udev->config->desc.bNumInterfaces;/* init CIR module TBD */
drivers/mtd/nand/nand_base.c +6 -3
@@ -2466,15 +2466,18 @@ static int panic_nand_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const uint8_t *buf) { struct nand_chip *chip = mtd->priv; +int chipnr = (int )(to >> chip->chip_shift);struct mtd_oob_ops ops;int ret; -/* Wait for the device to get ready */ -panic_nand_wait (mtd, chip,400 ); -/* Grab the device */ panic_nand_get_device (chip, mtd,FL_WRITING ); + chip->select_chip (mtd, chipnr); + +/* Wait for the device to get ready */ +panic_nand_wait (mtd, chip,400 ); + ops.len = len; ops.datbuf = (uint8_t *)buf; ops.oobbuf =NULL ;
drivers/mtd/nand/omap2.c +225 -115
416 lines not on this page · raw message
drivers/net/ethernet/broadcom/genet/bcmgenet.c +10 -46
105 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -3047,7 +3047,7 @@ static bool i40e_clean_fdir_tx_irq(struct i40e_ring *tx_ring, int budget)break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* if the descriptor isn't done, no work yet to do */ if (!(eop_desc->cmd_type_offset_bsz &
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -1
@@ -657,7 +657,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* we have caught up to head, no work left to do */ if (tx_head == tx_desc)
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +1 -1
@@ -216,7 +216,7 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* we have caught up to head, no work left to do */ if (tx_head == tx_desc)
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
@@ -6360,7 +6360,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector)break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* if DD is not set pending work has not been completed */ if (!(eop_desc->wb.status &cpu_to_le32 (E1000_TXD_STAT_DD )))
drivers/net/ethernet/intel/igbvf/netdev.c +1 -1
@@ -808,7 +808,7 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* if DD is not set pending work has not been completed */ if (!(eop_desc->wb.status &cpu_to_le32 (E1000_TXD_STAT_DD )))
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
@@ -1086,7 +1086,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* if DD is not set pending work has not been completed */ if (!(eop_desc->wb.status &cpu_to_le32 (IXGBE_TXD_STAT_DD )))
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 -1
@@ -249,7 +249,7 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_q_vector *q_vector,break ;/* prevent any other reads prior to eop_desc */ -read_barrier_depends (); +smp_rmb ();/* if DD is not set pending work has not been completed */ if (!(eop_desc->wb.status &cpu_to_le32 (IXGBE_TXD_STAT_DD )))
drivers/net/wireless/p54/main.c +3 -4
@@ -851,12 +851,11 @@ void p54_unregister_common(struct ieee80211_hw *dev) {struct p54_common *priv = dev->priv; -#ifdef CONFIG_P54_LEDS -p54_unregister_leds (priv); -#endif /* CONFIG_P54_LEDS */ -if (priv->registered) { priv->registered = false; +#ifdef CONFIG_P54_LEDS +p54_unregister_leds (priv); +#endif /* CONFIG_P54_LEDS */ ieee80211_unregister_hw (dev); }
drivers/net/wireless/rt2x00/rt2x00usb.c +3 -3
@@ -62,7 +62,7 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,* -ENODEV: Device has disappeared, no point continuing. * All other errors: Try again. */ - else if (status == -ENODEV) { + else if (status == -ENODEV || status == -ENOENT) {clear_bit (DEVICE_STATE_PRESENT , &rt2x00dev->flags);break ; }
@@ -325,7 +325,7 @@ static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void *data) status =usb_submit_urb (entry_priv->urb,GFP_ATOMIC );if (status) { -if (status == -ENODEV ) +if (status == -ENODEV || status == -ENOENT )clear_bit (DEVICE_STATE_PRESENT , &rt2x00dev->flags);set_bit (ENTRY_DATA_IO_FAILED , &entry->flags);rt2x00lib_dmadone (entry);
@@ -414,7 +414,7 @@ static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void *data) status =usb_submit_urb (entry_priv->urb,GFP_ATOMIC );if (status) { -if (status == -ENODEV ) +if (status == -ENODEV || status == -ENOENT )clear_bit (DEVICE_STATE_PRESENT , &rt2x00dev->flags);set_bit (ENTRY_DATA_IO_FAILED , &entry->flags);rt2x00lib_dmadone (entry);
drivers/pci/pcie/aer/aerdrv_core.c +8 -1
@@ -360,7 +360,14 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev,* If the error is reported by an end point, we think this * error is related to the upstream link of the end point. */ -pci_walk_bus (dev->bus, cb, &result_data); +if (state == pci_channel_io_normal) +/* +* the error is non fatal so the bus is ok, just invoke +* the callback for the function that logged the error. +*/ +cb (dev, &result_data); +else +pci_walk_bus (dev->bus, cb, &result_data); }return result_data.result;
drivers/platform/x86/sony-laptop.c +8 -6
@@ -1654,17 +1654,19 @@ static int sony_nc_setup_rfkill(struct acpi_device *device,if (!rfk)return -ENOMEM ; -if (sony_call_snc_handle (sony_rfkill_handle,0x200 , &result) <0 ) { + err =sony_call_snc_handle (sony_rfkill_handle,0x200 , &result); +if (err <0 ) {rfkill_destroy (rfk); -return -1 ; +return err; } hwblock = !(result &0x1 ); -if (sony_call_snc_handle (sony_rfkill_handle, - sony_rfkill_address[nc_type], - &result) <0 ) { + err =sony_call_snc_handle (sony_rfkill_handle, + sony_rfkill_address[nc_type], + &result); +if (err <0 ) {rfkill_destroy (rfk); -return -1 ; +return err; } swblock = !(result &0x2 );
drivers/rtc/interface.c +15 -1
@@ -778,9 +778,23 @@ EXPORT_SYMBOL_GPL(rtc_irq_set_freq);*/ static int rtc_timer_enqueue (struct rtc_device *rtc,struct rtc_timer *timer) { +struct timerqueue_node *next =timerqueue_getnext (&rtc->timerqueue); +struct rtc_time tm; +ktime_t now; + timer->enabled =1 ; +__rtc_read_time (rtc, &tm); + now =rtc_tm_to_ktime (tm); + +/* Skip over expired timers */ +while (next) { +if (next->expires.tv64 >= now.tv64) +break ; + next =timerqueue_iterate_next (next); + } +timerqueue_add (&rtc->timerqueue, &timer->node); -if (&timer->node ==timerqueue_getnext (&rtc->timerqueue)) { +if (!next ||ktime_before (timer->node.expires, next->expires)) {struct rtc_wkalrm alarm;int err; alarm.time =rtc_ktime_to_tm (timer->node.expires);
drivers/scsi/bfa/bfad_debugfs.c +3 -2
@@ -254,7 +254,8 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf,struct bfad_s *bfad = port->bfad;struct bfa_s *bfa = &bfad->bfa;struct bfa_ioc_s *ioc = &bfa->ioc; -int addr, len, rc, i; +int addr, rc, i; +u32 len;u32 *regbuf;void __iomem *rb, *reg_addr;unsigned long flags;
@@ -274,7 +275,7 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf, } rc =sscanf (kern_buf,"%x:%x" , &addr, &len); -if (rc <2 ) { +if (rc <2 || len > (UINT_MAX >>2 )) {printk (KERN_INFO "bfad[%d]: %s failed to read user buf\n" , bfad->inst_no, __func__);
drivers/staging/android/ashmem.c +2 -0
@@ -758,10 +758,12 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg)break ;case ASHMEM_SET_SIZE : ret = -EINVAL ; +mutex_lock (&ashmem_mutex);if (!asma->file) { ret =0 ; asma->size = (size_t ) arg; } +mutex_unlock (&ashmem_mutex);break ;case ASHMEM_GET_SIZE : ret = asma->size;
drivers/staging/lustre/lustre/ptlrpc/sec.c +1 -1
@@ -867,7 +867,7 @@ void sptlrpc_request_out_callback(struct ptlrpc_request *req)if (req->rq_pool || !req->rq_reqbuf)return ; -OBD_FREE (req->rq_reqbuf, req->rq_reqbuf_len); +OBD_FREE_LARGE (req->rq_reqbuf, req->rq_reqbuf_len); req->rq_reqbuf =NULL ; req->rq_reqbuf_len =0 ; }
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -2
@@ -120,9 +120,8 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)void _rtw_free_mlme_priv (struct mlme_priv *pmlmepriv) { -rtw_free_mlme_priv_ie_data (pmlmepriv); -if (pmlmepriv) { +rtw_free_mlme_priv_ie_data (pmlmepriv);if (pmlmepriv->free_bss_buf)vfree (pmlmepriv->free_bss_buf); }
drivers/staging/usbip/stub.h +0 -1
@@ -33,7 +33,6 @@#define STUB_BUSID_ALLOC 3struct stub_device { -struct usb_interface *interface;struct usb_device *udev;struct usbip_device ud;
drivers/staging/usbip/stub_dev.c +2 -2
@@ -246,7 +246,7 @@ static void stub_device_reset(struct usbip_device *ud)dev_dbg (&udev->dev,"device reset" ); - ret =usb_lock_device_for_reset (udev, sdev->interface); + ret =usb_lock_device_for_reset (udev,NULL );if (ret <0 ) {dev_err (&udev->dev,"lock for reset\n" );spin_lock_irq (&ud->lock);
@@ -279,7 +279,7 @@ static void stub_device_unusable(struct usbip_device *ud)/** * stub_device_alloc - allocate a new stub_device struct -* @interface: usb_interface of a new device +* @udev: usb_device of a new device * * Allocates and initializes a new stub_device struct. */
drivers/staging/usbip/stub_rx.c +46 -20
137 lines not on this page · raw message
drivers/staging/usbip/stub_tx.c +10 -3
@@ -178,6 +178,13 @@ static int stub_send_ret_submit(struct stub_device *sdev)memset (&pdu_header,0 ,sizeof (pdu_header));memset (&msg,0 ,sizeof (msg)); +if (urb->actual_length >0 && !urb->transfer_buffer) { +dev_err (&sdev->udev->dev, +"urb: actual_length %d transfer_buffer null\n" , + urb->actual_length); +return -1 ; + } +if (usb_pipetype (urb->pipe) ==PIPE_ISOCHRONOUS ) iovnum =2 + urb->number_of_packets;else
@@ -233,7 +240,7 @@ static int stub_send_ret_submit(struct stub_device *sdev) }if (txsize !=sizeof (pdu_header) + urb->actual_length) { -dev_err (&sdev->interface->dev, +dev_err (&sdev->udev->dev,"actual length of urb %d does not match iso packet sizes %zu\n" , urb->actual_length, txsize-sizeof (pdu_header));
@@ -265,7 +272,7 @@ static int stub_send_ret_submit(struct stub_device *sdev) ret =kernel_sendmsg (sdev->ud.tcp_socket, &msg, iov, iovnum, txsize);if (ret != txsize) { -dev_err (&sdev->interface->dev, +dev_err (&sdev->udev->dev,"sendmsg failed!, retval %d for %zd\n" , ret, txsize);kfree (iov);
@@ -340,7 +347,7 @@ static int stub_send_ret_unlink(struct stub_device *sdev) ret =kernel_sendmsg (sdev->ud.tcp_socket, &msg, iov,1 , txsize);if (ret != txsize) { -dev_err (&sdev->interface->dev, +dev_err (&sdev->udev->dev,"sendmsg failed!, retval %d for %zd\n" , ret, txsize);usbip_event_add (&sdev->ud,SDEV_EVENT_ERROR_TCP );
drivers/staging/usbip/usbip_common.h +1 -0
@@ -261,6 +261,7 @@ struct usbip_device {/* lock for status */ spinlock_t lock; +int sockfd;struct socket *tcp_socket;struct task_struct *tcp_rx;
drivers/staging/usbip/userspace/Makefile.am +2 -1
@@ -1,6 +1,7 @@ SUBDIRS := libsrc src includedir = @includedir@/usbip include_HEADERS := $(addprefix libsrc/, \ - usbip_common.h vhci_driver.h usbip_host_driver.h) + usbip_common.h vhci_driver.h usbip_host_driver.h \ + list.h sysfs_utils.h) dist_man_MANS := $(addprefix doc/, usbip.8 usbipd.8)
drivers/staging/usbip/userspace/libsrc/vhci_driver.c +4 -4
@@ -55,12 +55,12 @@ static int parse_status(const char *value)while (*c !='\0' ) {int port, status, speed, devid; -unsigned long socket; +int sockfd;char lbusid[SYSFS_BUS_ID_SIZE ]; - ret =sscanf (c,"%d %d %d %x %lx %31s\n" , + ret =sscanf (c,"%d %d %d %x %u %31s\n" , &port, &status, &speed, - &devid, &socket, lbusid); + &devid, &sockfd, lbusid);if (ret <5 ) {dbg ("sscanf failed: %d" , ret);
@@ -69,7 +69,7 @@ static int parse_status(const char *value)dbg ("port %d status %d speed %d devid %x" , port, status, speed, devid); -dbg ("socket %lx lbusid %s" , socket, lbusid); +dbg ("sockfd %u lbusid %s" , sockfd, lbusid);/* if a device is connected, look at it */
drivers/staging/usbip/vhci_sysfs.c +13 -7
@@ -39,13 +39,18 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr,/* * output example: -* prt sta spd dev socket local_busid -* 000 004 000 000 c5a7bb80 1-2.3 -* 001 004 000 000 d8cee980 2-3.4 +* prt sta spd dev sockfd local_busid +* 000 004 000 000 3 1-2.3 +* 001 004 000 000 4 2-3.4 +* +* Output includes socket fd instead of socket pointer address to avoid +* leaking kernel memory address in: +* /sys/devices/platform/vhci_hcd.0/status and in debug output. +* The socket pointer address is not used at the moment and it was made +* visible as a convenient way to find IP address from socket pointer +* address by looking up /proc/net/{tcp,tcp6}. As this opens a security +* hole, the change is made to use sockfd instead. * -* IP address can be retrieved from a socket pointer address by looking -* up /proc/net/{tcp,tcp6}. Also, a userland program may remember a -* port number and its peer IP address. */ out +=sprintf (out,"prt sta spd bus dev socket local_busid\n" );
@@ -59,7 +64,7 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr,if (vdev->ud.status ==VDEV_ST_USED ) { out +=sprintf (out,"%03u %08x " , vdev->speed, vdev->devid); - out +=sprintf (out,"%16p " , vdev->ud.tcp_socket); + out +=sprintf (out,"%u" , vdev->ud.sockfd); out +=sprintf (out,"%s" ,dev_name (&vdev->udev->dev)); }else {
@@ -223,6 +228,7 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr, vdev->devid = devid; vdev->speed = speed; + vdev->ud.sockfd = sockfd; vdev->ud.tcp_socket = socket; vdev->ud.status =VDEV_ST_NOTASSIGNED ;
drivers/target/iscsi/iscsi_target.c +20 -29
90 lines not on this page · raw message
drivers/target/target_core_tmr.c +10 -0
@@ -141,6 +141,16 @@ static bool __target_check_io_state(struct se_cmd *se_cmd,spin_unlock (&se_cmd->t_state_lock);return false; } +if (se_cmd->transport_state &CMD_T_PRE_EXECUTE ) { +if (se_cmd->scsi_status) { +pr_debug ("Attempted to abort io tag: %u early failure" +" status: 0x%02x\n" , + se_cmd->se_tfo->get_task_tag (se_cmd), + se_cmd->scsi_status); +spin_unlock (&se_cmd->t_state_lock); +return false; + } + }if (sess->sess_tearing_down || se_cmd->cmd_wait_set) {pr_debug ("Attempted to abort io tag: %u already shutdown," " skipping\n" , se_cmd->se_tfo->get_task_tag (se_cmd));
drivers/target/target_core_transport.c +2 -0
@@ -1797,6 +1797,7 @@ void target_execute_cmd(struct se_cmd *cmd) } cmd->t_state =TRANSPORT_PROCESSING ; + cmd->transport_state &= ~CMD_T_PRE_EXECUTE ; cmd->transport_state |=CMD_T_ACTIVE |CMD_T_BUSY |CMD_T_SENT ;spin_unlock_irq (&cmd->t_state_lock);/*
@@ -2441,6 +2442,7 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, ret = -ESHUTDOWN ; goto out; } + se_cmd->transport_state |=CMD_T_PRE_EXECUTE ;list_add_tail (&se_cmd->se_cmd_list, &se_sess->sess_cmd_list); out:spin_unlock_irqrestore (&se_sess->sess_cmd_lock, flags);
drivers/usb/core/devio.c +14 -0
@@ -1650,6 +1650,18 @@ static int proc_unlinkurb(struct usb_dev_state *ps, void __user *arg)return 0 ; } +static void compute_isochronous_actual_length (struct urb *urb) +{ +unsigned int i; + +if (urb->number_of_packets >0 ) { + urb->actual_length =0 ; +for (i =0 ; i < urb->number_of_packets; i++) + urb->actual_length += + urb->iso_frame_desc[i].actual_length; + } +} +static int processcompl (struct async *as,void __user *__user *arg) {struct urb *urb = as->urb;
@@ -1657,6 +1669,7 @@ static int processcompl(struct async *as, void __user * __user *arg)void __user *addr = as->userurb;unsigned int i; +compute_isochronous_actual_length (urb);if (as->userbuffer && urb->actual_length) {if (copy_urb_data_to_user (as->userbuffer, urb)) goto err_out;
@@ -1826,6 +1839,7 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)void __user *addr = as->userurb;unsigned int i; +compute_isochronous_actual_length (urb);if (as->userbuffer && urb->actual_length) {if (copy_urb_data_to_user (as->userbuffer, urb))return -EFAULT ;
drivers/usb/core/quirks.c +3 -0
@@ -218,6 +218,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* Corsair Strafe RGB */ { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Corsair K70 LUX */ + { USB_DEVICE(0x1b1c, 0x1b36), .driver_info = USB_QUIRK_DELAY_INIT }, + /* MIDI keyboard WORLDE MINI */ { USB_DEVICE(0x1c75, 0x0204), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/serial/garmin_gps.c +19 -3
@@ -138,6 +138,7 @@ struct garmin_data {__u8 privpkt[4 *6 ];spinlock_t lock;struct list_head pktlist; +struct usb_anchor write_urbs; };
@@ -906,13 +907,19 @@ static int garmin_init_session(struct usb_serial_port *port) sizeof(GARMIN_START_SESSION_REQ), 0);if (status <0 ) -break ; + goto err_kill_urbs; }if (status >0 ) status =0 ; } +return status; + +err_kill_urbs: +usb_kill_anchored_urbs (&garmin_data_p->write_urbs); +usb_kill_urb (port->interrupt_in_urb); +return status; }
@@ -931,7 +938,6 @@ static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port)spin_unlock_irqrestore (&garmin_data_p->lock, flags);/* shutdown any bulk reads that might be going on */ -usb_kill_urb (port->write_urb);usb_kill_urb (port->read_urb);if (garmin_data_p->state ==STATE_RESET )
@@ -954,7 +960,7 @@ static void garmin_close(struct usb_serial_port *port)/* shutdown our urbs */ usb_kill_urb (port->read_urb); -usb_kill_urb (port->write_urb); +usb_kill_anchored_urbs (&garmin_data_p->write_urbs);/* keep reset state so we know that we must start a new session */ if (garmin_data_p->state !=STATE_RESET )
@@ -1038,12 +1044,14 @@ static int garmin_write_bulk(struct usb_serial_port *port, }/* send it down the pipe */ +usb_anchor_urb (urb, &garmin_data_p->write_urbs); status =usb_submit_urb (urb,GFP_ATOMIC );if (status) {dev_err (&port->dev,"%s - usb_submit_urb(write bulk) failed with status = %d\n" , __func__, status); count = status; +usb_unanchor_urb (urb);kfree (buffer); }
@@ -1402,9 +1410,16 @@ static int garmin_port_probe(struct usb_serial_port *port) garmin_data_p->state =0 ; garmin_data_p->flags =0 ; garmin_data_p->count =0 ; +init_usb_anchor (&garmin_data_p->write_urbs);usb_set_serial_port_data (port, garmin_data_p); status =garmin_init_session (port); +if (status) + goto err_free; + +return 0 ; +err_free: +kfree (garmin_data_p);return status; }
@@ -1414,6 +1429,7 @@ static int garmin_port_remove(struct usb_serial_port *port) {struct garmin_data *garmin_data_p =usb_get_serial_port_data (port); +usb_kill_anchored_urbs (&garmin_data_p->write_urbs);usb_kill_urb (port->interrupt_in_urb);del_timer_sync (&garmin_data_p->timer);kfree (garmin_data_p);
drivers/usb/serial/metro-usb.c +8 -3
@@ -217,7 +217,7 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)dev_err (&port->dev,"%s - failed submitting interrupt in urb, error code=%d\n" , __func__, result); - goto exit; +return result; }/* Send activate cmd to device */
@@ -226,11 +226,16 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)dev_err (&port->dev,"%s - failed to configure device, error code=%d\n" , __func__, result); - goto exit; + goto err_kill_urb; }dev_dbg (&port->dev,"%s - port open\n" , __func__); -exit: + +return 0 ; + +err_kill_urb: +usb_kill_urb (port->interrupt_in_urb); +return result; }
drivers/usb/serial/qcserial.c +1 -0
@@ -147,6 +147,7 @@ static const struct usb_device_id id_table[] = { {DEVICE_SWI(0x114f, 0x68a2)}, /* Sierra Wireless MC7750 */ {DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */ {DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */ + {DEVICE_SWI(0x1199, 0x901e)}, /* Sierra Wireless EM7355 QDL */ {DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */ {DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */ {DEVICE_SWI(0x1199, 0x9051)}, /* Netgear AirCard 340U */
drivers/video/fbdev/udlfb.c +5 -5
@@ -769,11 +769,11 @@ static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)for (i =0 ; i < len; i++) { ret =usb_control_msg (dev->udev, -usb_rcvctrlpipe (dev->udev,0 ), (0x02 ), - (0x80 | (0x02 <<5 )), i <<8 ,0xA1 , rbuf,2 , -HZ ); -if (ret <1 ) { -pr_err ("Read EDID byte %d failed err %x\n" , i, ret); +usb_rcvctrlpipe (dev->udev,0 ),0x02 , + (0x80 | (0x02 <<5 )), i <<8 ,0xA1 , + rbuf,2 ,USB_CTRL_GET_TIMEOUT ); +if (ret <2 ) { +pr_err ("Read EDID byte %d failed: %d\n" , i, ret); i--;break ; }
fs/9p/vfs_inode.c +3 -0
@@ -483,6 +483,9 @@ static int v9fs_test_inode(struct inode *inode, void *data)if (v9inode->qid.type != st->qid.type)return 0 ; + +if (v9inode->qid.path != st->qid.path) +return 0 ;return 1 ; }
fs/9p/vfs_inode_dotl.c +3 -0
@@ -87,6 +87,9 @@ static int v9fs_test_inode_dotl(struct inode *inode, void *data)if (v9inode->qid.type != st->qid.type)return 0 ; + +if (v9inode->qid.path != st->qid.path) +return 0 ;return 1 ; }
fs/autofs4/waitq.c +14 -2
@@ -87,7 +87,8 @@ static int autofs4_write(struct autofs_sb_info *sbi,spin_unlock_irqrestore (¤t->sighand->siglock, flags); } -return (bytes >0 ); +/* if 'wr' returned 0 (impossible) we assume -EIO (safe) */ +return bytes ==0 ?0 : wr <0 ? wr : -EIO ; } static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
@@ -101,6 +102,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, } pkt;struct file *pipe =NULL ;size_t pktsz; +int ret;DPRINTK ("wait id = 0x%08lx, name = %.*s, type=%d" , (unsigned long ) wq->wait_queue_token, wq->name.len, wq->name.name, type);
@@ -172,8 +174,18 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,mutex_unlock (&sbi->wq_mutex); -if (autofs4_write (sbi, pipe, &pkt, pktsz)) +switch (ret =autofs4_write (sbi, pipe, &pkt, pktsz)) { +case 0 : +break ; +case -ENOMEM : +case -ERESTARTSYS : +/* Just fail this one */ +autofs4_wait_release (sbi, wq->wait_queue_token, ret); +break ; +default :autofs4_catatonic_mode (sbi); +break ; + }fput (pipe); }
fs/binfmt_elf_fdpic.c +2 -0
@@ -1487,7 +1487,9 @@ static bool elf_fdpic_dump_segments(struct coredump_params *cprm)struct vm_area_struct *vma;for (vma = current->mm->mmap; vma; vma = vma->vm_next) { +#ifdef CONFIG_MMU unsigned long addr; +#endif if (!maydump (vma, cprm->mm_flags))continue ;
fs/btrfs/super.c +2 -2
@@ -185,7 +185,6 @@ static const char * const logtypes[] = {void btrfs_printk (const struct btrfs_fs_info *fs_info,const char *fmt, ...) { -struct super_block *sb = fs_info->sb;char lvl[4 ];struct va_format vaf;va_list args;
@@ -207,7 +206,8 @@ void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) vaf.fmt = fmt; vaf.va = &args; -printk ("%sBTRFS %s (device %s): %pV\n" , lvl, type, sb->s_id, &vaf); +printk ("%sBTRFS %s (device %s): %pV\n" , lvl, type, + fs_info ? fs_info->sb->s_id :"<unknown>" , &vaf);va_end (args); }
fs/coda/upcall.c +1 -2
@@ -446,8 +446,7 @@ int venus_fsync(struct super_block *sb, struct CodaFid *fid)UPARG (CODA_FSYNC ); inp->coda_fsync.VFid = *fid; - error =coda_upcall (coda_vcp (sb),sizeof (union inputArgs ), - &outsize, inp); + error =coda_upcall (coda_vcp (sb), insize, &outsize, inp);CODA_FREE (inp, insize);
Lines of this file are not shown. View the raw message.
kernel/trace/blktrace.c +60 -16
76 lines not on this page · raw message
net/l2tp/l2tp_eth.c +77 -24
101 lines not on this page · raw message
net/l2tp/l2tp_ppp.c +151 -85
236 lines not on this page · raw message
net/sctp/ipv6.c +86 -74
160 lines not on this page · raw message
security/apparmor/domain.c +37 -16
53 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.