Linux 4.4.3
Greg KH
maintainerI'm announcing the release of the 4.4.3 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
MAINTAINERS | 4 Makefile | 2 arch/arm/boot/dts/armada-388-gp.dts | 10 - arch/arm/boot/dts/at91-sama5d4_xplained.dts | 8 + arch/arm/boot/dts/at91-sama5d4ek.dts | 11 ++ arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 1 arch/arm/boot/dts/omap5-board-common.dtsi | 33 ++++++ arch/arm/boot/dts/sama5d4.dtsi | 2 arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 37 +++---- arch/arm/common/icst.c | 9 + arch/arm/mach-omap2/sleep34xx.S | 61 +++++------ arch/arm/mach-omap2/sleep44xx.S | 25 +++- arch/arm64/mm/dma-mapping.c | 4 arch/arm64/mm/pageattr.c | 3 arch/m32r/kernel/setup.c | 3 arch/powerpc/include/asm/eeh.h | 1 arch/powerpc/kernel/eeh_driver.c | 3 arch/powerpc/kernel/eeh_pe.c | 35 +++--- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 arch/powerpc/kvm/powerpc.c | 20 +-- arch/powerpc/platforms/powernv/eeh-powernv.c | 5 arch/powerpc/platforms/powernv/pci-ioda.c | 1 arch/powerpc/platforms/powernv/pci.c | 26 ++++ arch/powerpc/platforms/powernv/pci.h | 1 arch/x86/include/asm/pgtable_types.h | 6 - arch/x86/lib/copy_user_64.S | 142 +++++++++++++++++++-------- arch/x86/mm/fault.c | 15 ++ arch/x86/mm/pageattr.c | 4 drivers/hwspinlock/hwspinlock_core.c | 4 drivers/iio/accel/Kconfig | 1 drivers/iio/adc/Kconfig | 1 drivers/iio/adc/ti_am335x_adc.c | 2 drivers/iio/dac/mcp4725.c | 1 drivers/iio/imu/adis_buffer.c | 2 drivers/iio/inkern.c | 2 drivers/iio/light/acpi-als.c | 6 - drivers/iio/light/ltr501.c | 2 drivers/iio/pressure/mpl115.c | 2 drivers/input/mouse/elantech.c | 2 drivers/input/mouse/vmmouse.c | 13 +- drivers/input/serio/i8042-x86ia64io.h | 7 + drivers/iommu/amd_iommu.c | 2 drivers/iommu/dmar.c | 2 drivers/iommu/intel-iommu.c | 2 drivers/iommu/intel-svm.c | 37 +++++-- drivers/iommu/intel_irq_remapping.c | 2 drivers/nvdimm/namespace_devs.c | 53 ++++++++++ drivers/nvdimm/region_devs.c | 56 ---------- drivers/phy/phy-twl4030-usb.c | 14 +- drivers/platform/x86/intel_scu_ipcutil.c | 2 drivers/scsi/device_handler/scsi_dh_rdac.c | 4 drivers/scsi/scsi_devinfo.c | 2 drivers/scsi/scsi_sysfs.c | 6 - drivers/scsi/sd.c | 7 - drivers/scsi/sg.c | 2 drivers/scsi/sr.c | 4 drivers/staging/speakup/selection.c | 5 drivers/target/iscsi/iscsi_target_configfs.c | 16 ++- drivers/tty/pty.c | 21 +++ drivers/tty/serial/8250/8250_pci.c | 50 +++++++++ drivers/tty/serial/omap-serial.c | 8 + drivers/usb/host/xhci-ring.c | 10 - drivers/usb/host/xhci.c | 4 fs/btrfs/backref.c | 10 + fs/btrfs/delayed-inode.c | 3 fs/btrfs/delayed-inode.h | 2 fs/btrfs/disk-io.c | 1 fs/btrfs/inode.c | 16 ++- fs/btrfs/ioctl.c | 119 ++++++++++++++++++---- fs/btrfs/volumes.c | 28 +++-- fs/cifs/cifs_debug.c | 2 fs/cifs/cifs_debug.h | 9 - fs/cifs/cifsencrypt.c | 2 fs/cifs/connect.c | 2 fs/cifs/readdir.c | 1 fs/cifs/transport.c | 6 - fs/devpts/inode.c | 20 +++ fs/ext4/balloc.c | 7 - fs/ext4/ialloc.c | 6 - fs/ext4/move_extent.c | 15 ++ fs/ext4/resize.c | 2 fs/hugetlbfs/inode.c | 19 ++- fs/nfs/flexfilelayout/flexfilelayout.c | 8 - fs/nfs/inode.c | 54 +++++++--- fs/nfs/nfs4proc.c | 2 fs/overlayfs/copy_up.c | 41 ++++--- fs/overlayfs/inode.c | 13 ++ fs/overlayfs/readdir.c | 3 fs/overlayfs/super.c | 5 fs/proc/array.c | 2 fs/proc/base.c | 21 ++- fs/proc/namespaces.c | 4 fs/proc/task_mmu.c | 7 - fs/timerfd.c | 2 fs/udf/inode.c | 15 ++ fs/udf/unicode.c | 21 +++ fs/xfs/libxfs/xfs_format.h | 2 fs/xfs/libxfs/xfs_inode_buf.c | 12 +- fs/xfs/xfs_buf.c | 17 +++ fs/xfs/xfs_trans_ail.c | 1 include/linux/compiler.h | 2 include/linux/devpts_fs.h | 4 include/linux/intel-iommu.h | 3 include/linux/ptrace.h | 24 ++++ include/linux/radix-tree.h | 22 +++- include/linux/rmap.h | 14 -- include/linux/tracepoint.h | 5 ipc/shm.c | 53 ++++++++-- kernel/events/core.c | 2 kernel/futex.c | 7 + kernel/futex_compat.c | 2 kernel/kcmp.c | 4 kernel/memremap.c | 2 kernel/module.c | 28 +++-- kernel/ptrace.c | 39 +++++-- kernel/sys.c | 20 +-- kernel/time/itimer.c | 2 kernel/time/posix-timers.c | 2 lib/dma-debug.c | 2 lib/dump_stack.c | 7 - lib/klist.c | 6 - lib/radix-tree.c | 12 +- lib/string_helpers.c | 63 ++++++++--- mm/memcontrol.c | 11 +- mm/memory-failure.c | 2 mm/mlock.c | 2 mm/mmap.c | 89 ++++++++++------ mm/pgtable-generic.c | 4 mm/process_vm_access.c | 2 net/sunrpc/xprtsock.c | 49 +++------ scripts/bloat-o-meter | 8 - security/commoncap.c | 7 + sound/core/pcm_native.c | 16 ++- sound/core/seq/seq_memory.c | 13 +- sound/core/seq/seq_ports.c | 13 +- sound/pci/hda/hda_intel.c | 4 tools/lib/traceevent/event-parse.c | 5 tools/perf/util/parse-events.c | 3 tools/perf/util/session.c | 2 virt/kvm/arm/arch_timer.c | 9 + 140 files changed, 1307 insertions(+), 585 deletions(-)
Adam Ford (1):
ARM: dts: Fix wl12xx missing clocks that cause hangs
Adrian Hunter (1):
perf tools: tracepoint_error() can receive e=NULL, robustify it
Akinobu Mita (1):
iio: pressure: mpl115: fix temperature offset sign
Alan Stern (1):
SCSI: fix crashes in sd and sr runtime PM
Alexandre Belloni (1):
ARM: dts: at91: sama5d4 xplained: properly mux phy interrupt
Alexey Kardashevskiy (1):
powerpc/ioda: Set "read" permission when "write" is set
Andre Przywara (1):
KVM: arm/arm64: Fix reference to uninitialised VGIC
Andrew Elble (1):
nfs: Fix race in __update_open_stateid()
Andrew Gabbasov (2):
udf: Prevent buffer overrun with multi-byte characters
udf: Check output buffer length when converting name to CS0
Anton Protopopov (1):
cifs: fix erroneous return value
Arnd Bergmann (1):
tracing: Fix freak link error caused by branch tracer
Aurélien Francillon (1):
Input: i8042 - add Fujitsu Lifebook U745 to the nomux list
Baoquan He (1):
iommu/amd: Correct the wrong setting of alias DTE in do_attach
Benjamin Tissoires (1):
Input: elantech - mark protocols v2 and v3 as semi-mt
CQ Tang (1):
iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG
Dan Carpenter (2):
iio: inkern: fix a NULL dereference on error
intel_scu_ipcutil: underflow in scu_reg_access()
Dan Williams (1):
libnvdimm: fix namespace object confusion in is_uuid_busy()
Darrick J. Wong (1):
libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct
Dave Chinner (3):
xfs: inode recovery readahead can race with inode buffer creation Revert "xfs: clear PF_NOFREEZE for xfsaild kthread"
xfs: log mount failures don't wait for buffers to be released
David Sterba (3):
btrfs: handle invalid num_stripes in sys_array
Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"
btrfs: properly set the termination value of ctx->pos in readdir
David Woodhouse (2):
iommu/vt-d: Fix mm refcounting to hold mm_count not mm_users iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts
Dmitry Torokhov (1):
Input: vmmouse - fix absolute device registration
Eric Dumazet (1):
dump_stack: avoid potential deadlocks
Eryu Guan (1):
ext4: don't read blocks from disk after extents being swapped
Filipe Manana (5):
Btrfs: fix fitrim discarding device area reserved for boot loader's use
Btrfs: fix invalid page accesses in extent_same (dedup) ioctl
Btrfs: fix page reading in extent_same ioctl leading to csum errors
Btrfs: fix hang on extent buffer lock caused by the inode_paths ioctl
Btrfs: fix direct IO requests not reporting IO error to user space
Gabriele Mazzotta (1):
iio: light: acpi-als: Report data as processed
Gavin Shan (3):
powerpc/eeh: Fix PE location code
powerpc/eeh: Fix stale cached primary bus
powerpc/powernv: Fix stale PE primary bus
Greg Kroah-Hartman (1):
Linux 4.4.3
Greg Kurz (1):
KVM: PPC: Fix ONE_REG AltiVec support
H. Nikolaus Schaller (1):
ARM: dts: omap5-board-common: enable rtc and charging of backup battery
Hannes Reinecke (1):
scsi_dh_rdac: always retry MODE SELECT on command lock violation
Herton R. Krzesinski (2):
pty: fix possible use after free of tty->driver_data
pty: make sure super_block is still valid in final /dev/tty close
Insu Yun (1):
ext4: fix potential integer overflow
James Bottomley (3):
klist: fix starting point removed bug in klist iterators
scsi: fix soft lockup in scsi_remove_target() on module removal
string_helpers: fix precision loss for some inputs
Jamie Bainbridge (1):
cifs: Ratelimit kernel log messages
Jan Beulich (1):
x86/mm: Fix types used in pgprot cacheability flags translations
Jan Kara (1):
ext4: fix scheduling in atomic on group checksum failure
Jann Horn (1):
ptrace: use fsuid, fsgid, effective creds for fs access checks
Jeremy McNicoll (2):
tty: Add support for PCIe WCH382 2S multi-IO card iommu/vt-d: Don't skip PCI devices when disabling IOTLB
Jonathan Cameron (1):
iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
Kirill A. Shutemov (4):
drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration
mm: fix mlock accouting
mm: fix regression in remap_file_pages() emulation ipc/shm: handle removed segments gracefully in shm_mmap()
Konstantin Khlebnikov (3):
mm: replace vma_lock_anon_vma with anon_vma_lock_read/write
radix-tree: fix oops after radix_tree_iter_retry
ovl: check dentry positiveness in ovl_cleanup_whiteouts()
Lars-Peter Clausen (1):
iio: adis_buffer: Fix out-of-bounds memory access
Laura Abbott (1):
dma-debug: switch check from _text to _stext
Linus Walleij (3):
ARM: 8519/1: ICST: try other dividends than 1
ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz()
ARM: nomadik: fix up SD/MMC DT settings
Luis R. Rodriguez (1):
modules: fix modparam async_probe request
Marek Szyprowski (1):
arm64: dma-mapping: fix handling of devices registered before arch_initcall
Markus Elfring (1):
iio-light: Use a signed return type for ltr501_match_samp_freq()
Martijn Coenen (1):
memcg: only free spare array when readers are done
Mateusz Guzik (1):
prctl: take mmap sem for writing to protect against others
Mathias Nyman (2):
Revert "xhci: don't finish a TD if we get a short-transfer event mid TD"
xhci: Fix list corruption in urb dequeue at host removal
Matt Fleming (1):
x86/mm/pat: Avoid truncation when converting cpa->numpages to address
Matthew Wilcox (2):
radix-tree: fix race in gang lookup
drivers/hwspinlock: fix race between radix tree insertion and lookup
Michael Holzheu (1):
numa: fix /proc/<pid>/numa_maps for hugetlbfs on s390
Mika Penttilä (1):
arm64: mm: avoid calling apply_to_page_range on empty range
Mika Westerberg (2):
serial: 8250_pci: Add Intel Broadwell ports
SCSI: Add Marvell Console to VPD blacklist
Mike Christie (1):
scsi: add Synology to 1024 sector blacklist
Mike Kravetz (1):
fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list()
Miklos Szeredi (3):
ovl: allow zero size xattr
ovl: root: copy attr
ovl: setattr: check permissions before copy-up
Mohamed Jamsheeth Hajanajubudeen (1):
ARM: dts: at91: sama5d4: fix instance id of DBGU
Naoya Horiguchi (1):
mm: soft-offline: check return value in second __get_any_page() call
Nicholas Bellinger (1):
iscsi-target: Fix potential dead-lock during node acl delete
Nicolas Ferre (1):
ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type
Peter Hurley (2):
staging/speakup: Use tty_ldisc_ref() for paste kworker
serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)
Rabin Vincent (1):
cifs: fix race between call_async() and reconnect()
Ravi Bangoria (1):
perf kvm record/report: 'unprocessable sample' error while recording/reporting guest data
Rich Felker (1):
MAINTAINERS: return arch/sh to maintained state, with new maintainers
Rusty Russell (1):
module: wrapper for symbol name.
Sergey Senozhatsky (1):
scripts/bloat-o-meter: fix python3 syntax error
Steven Rostedt (1):
tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines
Steven Rostedt (Red Hat) (1):
tracepoints: Do not trace when cpu is offline
Sudip Mukherjee (1):
m32r: fix m32104ut_defconfig build fail
Takashi Iwai (4):
ALSA: hda - Cancel probe work instead of flush at remove
ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream
ALSA: seq: Fix leak of pool buffer at concurrent writes
ALSA: seq: Fix double port list deletion
Thomas Gleixner (4):
futex: Drop refcount if requeue_pi() acquired the rtmutex
timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper
posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper
itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper
Thomas Huth (1):
KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8
Thomas Petazzoni (1):
ARM: mvebu: remove duplicated regulator definition in Armada 388 GP
Tony Lindgren (8):
phy: twl4030-usb: Relase usb phy on unload
phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload
ARM: dts: Fix omap5 PMIC control lines for RTC writes
ARM: OMAP2+: Fix wait_dll_lock_timed for rodata
ARM: OMAP2+: Fix l2_inv_api_params for rodata
ARM: OMAP2+: Fix l2dis_3630 for rodata
ARM: OMAP2+: Fix save_secure_ram_context for rodata
ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata
Toshi Kani (4):
x86/uaccess/64: Make the __copy_user_nocache() assembly code more readable x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache() x86/mm: Fix vmalloc_fault() to handle large pages properly devm_memremap_release(): fix memremap'd addr handling
Trond Myklebust (4):
NFS: Fix attribute cache revalidation pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh() pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
SUNRPC: Fixup socket wait for memory
Vasily Averin (1):
cifs_dbg() outputs an uninitialized buffer in cifs_readdir()
Vegard Nossum (3):
iio: add HAS_IOMEM dependency to VF610_ADC
iio: add IIO_TRIGGER dependency to STK8BA50
udf: limit the maximum number of indirect extents in a row
Vineet Gupta (1):
mm,thp: khugepaged: call pte flush at the time of collapse
Vito Caputo (1):
ovl: use a minimal buffer in ovl_copy_xattr
Wenyou Yang (1):
ARM: dts: at91: sama5d4ek: add phy address and IRQ for macb0
Yong Li (1):
iio: dac: mcp4725: set iio name property in sysfs
Greg KH
maintainerMAINTAINERS +3 -1
@@ -10289,9 +10289,11 @@ S: Maintained F: drivers/net/ethernet/dlink/sundance.c SUPERH +M: Yoshinori Sato <[email protected]> +M: Rich Felker <[email protected]> L: [email protected] Q: http://patchwork.kernel.org/project/linux-sh/list/ -S: Orphan +S: Maintained F: Documentation/sh/ F: arch/sh/ F: drivers/sh/
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/armada-388-gp.dts +0 -10
@@ -303,16 +303,6 @@ gpio = <&expander0 4 GPIO_ACTIVE_HIGH>; }; - reg_usb2_1_vbus: v5-vbus1 { - compatible = "regulator-fixed"; - regulator-name = "v5.0-vbus1"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - enable-active-high; - regulator-always-on; - gpio = <&expander0 4 GPIO_ACTIVE_HIGH>; - }; - reg_sata0: pwr-sata0 { compatible = "regulator-fixed"; regulator-name = "pwr_en_sata0";
arch/arm/boot/dts/at91-sama5d4_xplained.dts +7 -1
@@ -86,10 +86,12 @@ macb0: ethernet@f8020000 { phy-mode = "rmii"; status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>; phy0: ethernet-phy@1 { interrupt-parent = <&pioE>; - interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; reg = <1>; }; };
@@ -152,6 +154,10 @@ atmel,pins = <AT91_PIOE 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; }; + pinctrl_macb0_phy_irq: macb0_phy_irq_0 { + atmel,pins = + <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; + }; }; }; };
arch/arm/boot/dts/at91-sama5d4ek.dts +11 -0
@@ -160,8 +160,15 @@ }; macb0: ethernet@f8020000 { + pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>; phy-mode = "rmii"; status = "okay"; + + ethernet-phy@1 { + reg = <0x1>; + interrupt-parent = <&pioE>; + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; + }; }; mmc1: mmc@fc000000 {
@@ -193,6 +200,10 @@ pinctrl@fc06a000 { board { + pinctrl_macb0_phy_irq: macb0_phy_irq { + atmel,pins = + <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; + }; pinctrl_mmc0_cd: mmc0_cd { atmel,pins = <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
arch/arm/boot/dts/logicpd-torpedo-som.dtsi +1 -0
@@ -122,6 +122,7 @@ interrupt-parent = <&gpio5>; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */ ref-clock-frequency = <26000000>; + tcxo-clock-frequency = <26000000>; }; };
arch/arm/boot/dts/omap5-board-common.dtsi +33 -0
@@ -130,6 +130,16 @@ }; }; +&gpio8 { + /* TI trees use GPIO instead of msecure, see also muxing */ + p234 { + gpio-hog; + gpios = <10 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "gpio8_234/msecure"; + }; +}; + &omap5_pmx_core { pinctrl-names = "default"; pinctrl-0 = <
@@ -213,6 +223,13 @@ >; }; + /* TI trees use GPIO mode; msecure mode does not work reliably? */ + palmas_msecure_pins: palmas_msecure_pins { + pinctrl-single,pins = < + OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE6) /* gpio8_234 */ + >; + }; + usbhost_pins: pinmux_usbhost_pins { pinctrl-single,pins = < 0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
@@ -278,6 +295,12 @@ &usbhost_wkup_pins >; + palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins { + pinctrl-single,pins = < + OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */ + >; + }; + usbhost_wkup_pins: pinmux_usbhost_wkup_pins { pinctrl-single,pins = < 0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
@@ -345,6 +368,8 @@ interrupt-controller; #interrupt-cells = <2>; ti,system-power-controller; + pinctrl-names = "default"; + pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>; extcon_usb3: palmas_usb { compatible = "ti,palmas-usb-vid";
@@ -358,6 +383,14 @@ #clock-cells = <0>; }; + rtc { + compatible = "ti,palmas-rtc"; + interrupt-parent = <&palmas>; + interrupts = <8 IRQ_TYPE_NONE>; + ti,backup-battery-chargeable; + ti,backup-battery-charge-high-current; + }; + palmas_pmic { compatible = "ti,palmas-pmic"; interrupt-parent = <&palmas>;
arch/arm/boot/dts/sama5d4.dtsi +1 -1
@@ -1342,7 +1342,7 @@ dbgu: serial@fc069000 { compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; reg = <0xfc069000 0x200>; - interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; + interrupts = <45 IRQ_TYPE_LEVEL_HIGH 7>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_dbgu>; clocks = <&dbgu_clk>;
arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +20 -17
@@ -127,22 +127,14 @@ }; mmcsd_default_mode: mmcsd_default { mmcsd_default_cfg1 { - /* MCCLK */ - pins = "GPIO8_B10"; - ste,output = <0>; - }; - mmcsd_default_cfg2 { - /* MCCMDDIR, MCDAT0DIR, MCDAT31DIR, MCDATDIR2 */ - pins = "GPIO10_C11", "GPIO15_A12", - "GPIO16_C13", "GPIO23_D15"; - ste,output = <1>; - }; - mmcsd_default_cfg3 { - /* MCCMD, MCDAT3-0, MCMSFBCLK */ - pins = "GPIO9_A10", "GPIO11_B11", - "GPIO12_A11", "GPIO13_C12", - "GPIO14_B12", "GPIO24_C15"; - ste,input = <1>; + /* + * MCCLK, MCCMDDIR, MCDAT0DIR, MCDAT31DIR, MCDATDIR2 + * MCCMD, MCDAT3-0, MCMSFBCLK + */ + pins = "GPIO8_B10", "GPIO9_A10", "GPIO10_C11", "GPIO11_B11", + "GPIO12_A11", "GPIO13_C12", "GPIO14_B12", "GPIO15_A12", + "GPIO16_C13", "GPIO23_D15", "GPIO24_C15"; + ste,output = <2>; }; }; };
@@ -802,10 +794,21 @@ clock-names = "mclk", "apb_pclk"; interrupt-parent = <&vica>; interrupts = <22>; - max-frequency = <48000000>; + max-frequency = <400000>; bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; + full-pwr-cycle; + /* + * The STw4811 circuit used with the Nomadik strictly + * requires that all of these signal direction pins be + * routed and used for its 4-bit levelshifter. + */ + st,sig-dir-dat0; + st,sig-dir-dat2; + st,sig-dir-dat31; + st,sig-dir-cmd; + st,sig-pin-fbclk; pinctrl-names = "default"; pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; vmmc-supply = <&vmmc_regulator>;
arch/arm/common/icst.c +7 -2
@@ -16,7 +16,7 @@*/ #include <linux/module.h> #include <linux/kernel.h> - +#include <asm/div64.h> #include <asm/hardware/icst.h> /*
@@ -29,7 +29,11 @@ EXPORT_SYMBOL(icst525_s2div);unsigned long icst_hz (const struct icst_params *p,struct icst_vco vco) { -return p->ref *2 * (vco.v +8 ) / ((vco.r +2 ) * p->s2div[vco.s]); +u64 dividend = p->ref *2 * (u64)(vco.v +8 ); +u32 divisor = (vco.r +2 ) * p->s2div[vco.s]; + +do_div (dividend, divisor); +return (unsigned long )dividend; }EXPORT_SYMBOL (icst_hz);
@@ -58,6 +62,7 @@ icst_hz_to_vco(const struct icst_params *p, unsigned long freq)if (f > p->vco_min && f <= p->vco_max)break ; + i++; }while (i <8 );if (i >=8 )
arch/arm/mach-omap2/sleep34xx.S +30 -31
139 lines not on this page · raw message
arch/arm/mach-omap2/sleep44xx.S +17 -8
@@ -29,12 +29,6 @@ dsb .endm -ppa_zero_params: - .word 0x0 - -ppa_por_params: - .word 1, 0 - #ifdef CONFIG_ARCH_OMAP4 /*
@@ -266,7 +260,9 @@ ENTRY(omap4_cpu_resume) beq skip_ns_smp_enable ppa_actrl_retry: mov r0, #OMAP4_PPA_CPU_ACTRL_SMP_INDEX - adr r3, ppa_zero_params @ Pointer to parameters + adr r1, ppa_zero_params_offset + ldr r3, [r1] + add r3, r3, r1 @ Pointer to ppa_zero_params mov r1, #0x0 @ Process ID mov r2, #0x4 @ Flag mov r6, #0xff
@@ -303,7 +299,9 @@ skip_ns_smp_enable: ldr r0, =OMAP4_PPA_L2_POR_INDEX ldr r1, =OMAP44XX_SAR_RAM_BASE ldr r4, [r1, #L2X0_PREFETCH_CTRL_OFFSET] - adr r3, ppa_por_params + adr r1, ppa_por_params_offset + ldr r3, [r1] + add r3, r3, r1 @ Pointer to ppa_por_params str r4, [r3, #0x04] mov r1, #0x0 @ Process ID mov r2, #0x4 @ Flag
@@ -328,6 +326,8 @@ skip_l2en: #endif b cpu_resume @ Jump to generic resume +ppa_por_params_offset: + .long ppa_por_params - . ENDPROC(omap4_cpu_resume) #endif /* CONFIG_ARCH_OMAP4 */
@@ -380,4 +380,13 @@ ENTRY(omap_do_wfi) nop ldmfd sp!, {pc} +ppa_zero_params_offset: + .long ppa_zero_params - . ENDPROC(omap_do_wfi) + + .data +ppa_zero_params: + .word 0 + +ppa_por_params: + .word 1, 0
arch/arm64/mm/dma-mapping.c +4 -0
@@ -933,6 +933,10 @@ static int __init __iommu_dma_init(void) ret =register_iommu_dma_ops_notifier (&platform_bus_type);if (!ret) ret =register_iommu_dma_ops_notifier (&amba_bustype); + +/* handle devices queued before this arch_initcall */ +if (!ret) +__iommu_attach_notifier (NULL ,BUS_NOTIFY_ADD_DEVICE ,NULL );return ret; }arch_initcall (__iommu_dma_init);
arch/arm64/mm/pageattr.c +3 -0
@@ -57,6 +57,9 @@ static int change_memory_common(unsigned long addr, int numpages,if (end <MODULES_VADDR || end >=MODULES_END )return -EINVAL ; +if (!numpages) +return 0 ; + data.set_mask = set_mask; data.clear_mask = clear_mask;
arch/m32r/kernel/setup.c +3 -0
@@ -81,7 +81,10 @@ static struct resource code_resource = { };unsigned long memory_start; +EXPORT_SYMBOL (memory_start); +unsigned long memory_end; +EXPORT_SYMBOL (memory_end);void __init setup_arch (char **);int get_cpuinfo (char *);
arch/powerpc/include/asm/eeh.h +1 -0
@@ -81,6 +81,7 @@ struct pci_dn;#define EEH_PE_KEEP (1 << 8)/* Keep PE on hotplug */ #define EEH_PE_CFG_RESTRICTED (1 << 9)/* Block config on error */ #define EEH_PE_REMOVED (1 << 10)/* Removed permanently */ +#define EEH_PE_PRI_BUS (1 << 11)/* Cached primary bus */ struct eeh_pe {int type;/* PE type: PHB/Bus/Device */
arch/powerpc/kernel/eeh_driver.c +3 -0
@@ -564,6 +564,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)*/ eeh_pe_state_mark (pe,EEH_PE_KEEP );if (bus) { +eeh_pe_state_clear (pe,EEH_PE_PRI_BUS );pci_lock_rescan_remove ();pcibios_remove_pci_devices (bus);pci_unlock_rescan_remove ();
@@ -803,6 +804,7 @@ perm_error:* the their PCI config any more. */ if (frozen_bus) { +eeh_pe_state_clear (pe,EEH_PE_PRI_BUS );eeh_pe_dev_mode_mark (pe,EEH_DEV_REMOVED );pci_lock_rescan_remove ();
@@ -886,6 +888,7 @@ static void eeh_handle_special_event(void)continue ;/* Notify all devices to be down */ +eeh_pe_state_clear (pe,EEH_PE_PRI_BUS ); bus =eeh_pe_bus_get (phb_pe);eeh_pe_dev_traverse (pe, eeh_report_failure,NULL );
arch/powerpc/kernel/eeh_pe.c +16 -19
@@ -883,32 +883,29 @@ void eeh_pe_restore_bars(struct eeh_pe *pe)const char *eeh_pe_loc_get (struct eeh_pe *pe) {struct pci_bus *bus =eeh_pe_bus_get (pe); -struct device_node *dn =pci_bus_to_OF_node (bus); +struct device_node *dn;const char *loc =NULL ; -if (!dn) - goto out; +while (bus) { + dn =pci_bus_to_OF_node (bus); +if (!dn) { + bus = bus->parent; +continue ; + } -/* PHB PE or root PE ? */ -if (pci_is_root_bus (bus)) { - loc =of_get_property (dn,"ibm,loc-code" ,NULL ); -if (!loc) +if (pci_is_root_bus (bus)) loc =of_get_property (dn,"ibm,io-base-loc-code" ,NULL ); +else + loc =of_get_property (dn,"ibm,slot-location-code" , +NULL ); +if (loc) - goto out; +return loc; -/* Check the root port */ - dn = dn->child; -if (!dn) - goto out; + bus = bus->parent; } - loc =of_get_property (dn,"ibm,loc-code" ,NULL ); -if (!loc) - loc =of_get_property (dn,"ibm,slot-location-code" ,NULL ); - -out: -return loc ? loc :"N/A" ; +return "N/A" ; }/**
@@ -931,7 +928,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe) bus = pe->phb->bus; }else if (pe->type &EEH_PE_BUS || pe->type &EEH_PE_DEVICE ) { -if (pe->bus) { +if (pe->state &EEH_PE_PRI_BUS ) { bus = pe->bus; goto out; }
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -1
@@ -2153,7 +2153,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S) /* Emulate H_SET_DABR/X on P8 for the sake of compat mode guests */ 2: rlwimi r5, r4, 5, DAWRX_DR | DAWRX_DW - rlwimi r5, r4, 1, DAWRX_WT + rlwimi r5, r4, 2, DAWRX_WT clrrdi r4, r4, 3 std r4, VCPU_DAWR(r3) std r5, VCPU_DAWRX(r3)
arch/powerpc/kvm/powerpc.c +10 -10
@@ -919,21 +919,17 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) r = -ENXIO ; break; } - vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ] = val.vval; + val.vval = vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ];break ;case KVM_REG_PPC_VSCR :if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { r = -ENXIO ;break ; } - vcpu->arch.vr.vscr.u[3 ] =set_reg_val (reg->id, val); + val =get_reg_val (reg->id, vcpu->arch.vr.vscr.u[3 ]);break ;case KVM_REG_PPC_VRSAVE : -if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { - r = -ENXIO ; -break ; - } - vcpu->arch.vrsave =set_reg_val (reg->id, val); + val =get_reg_val (reg->id, vcpu->arch.vrsave);break ;#endif /* CONFIG_ALTIVEC */ default :
@@ -974,17 +970,21 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) r = -ENXIO ; break; } - val.vval = vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ]; + vcpu->arch.vr.vr[reg->id -KVM_REG_PPC_VR0 ] = val.vval;break ;case KVM_REG_PPC_VSCR :if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { r = -ENXIO ;break ; } - val =get_reg_val (reg->id, vcpu->arch.vr.vscr.u[3 ]); + vcpu->arch.vr.vscr.u[3 ] =set_reg_val (reg->id, val);break ;case KVM_REG_PPC_VRSAVE : - val =get_reg_val (reg->id, vcpu->arch.vrsave); +if (!cpu_has_feature (CPU_FTR_ALTIVEC )) { + r = -ENXIO ; +break ; + } + vcpu->arch.vrsave =set_reg_val (reg->id, val);break ;#endif /* CONFIG_ALTIVEC */ default :
arch/powerpc/platforms/powernv/eeh-powernv.c +4 -1
@@ -444,9 +444,12 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)* PCI devices of the PE are expected to be removed prior * to PE reset. */ -if (!edev->pe->bus) +if (!(edev->pe->state &EEH_PE_PRI_BUS )) { edev->pe->bus =pci_find_bus (hose->global_number, pdn->busno); +if (edev->pe->bus) + edev->pe->state |=EEH_PE_PRI_BUS ; + }/* * Enable EEH explicitly so that we will do EEH check
arch/powerpc/platforms/powernv/pci-ioda.c +1 -0
@@ -3034,6 +3034,7 @@ static void pnv_pci_ioda_shutdown(struct pci_controller *hose)static const struct pci_controller_ops pnv_pci_ioda_controller_ops = { .dma_dev_setup = pnv_pci_dma_dev_setup, + .dma_bus_setup = pnv_pci_dma_bus_setup, #ifdef CONFIG_PCI_MSI .setup_msi_irqs = pnv_setup_msi_irqs, .teardown_msi_irqs = pnv_teardown_msi_irqs,
arch/powerpc/platforms/powernv/pci.c +26 -0
@@ -601,6 +601,9 @@ int pnv_tce_build(struct iommu_table *tbl, long index, long npages,u64 rpn =__pa (uaddr) >> tbl->it_page_shift;long i; +if (proto_tce &TCE_PCI_WRITE ) + proto_tce |=TCE_PCI_READ ; +for (i =0 ; i < npages; i++) {unsigned long newtce = proto_tce | ((rpn + i) << tbl->it_page_shift);
@@ -622,6 +625,9 @@ int pnv_tce_xchg(struct iommu_table *tbl, long index,BUG_ON (*hpa & ~IOMMU_PAGE_MASK (tbl)); +if (newtce &TCE_PCI_WRITE ) + newtce |=TCE_PCI_READ ; + oldtce =xchg (pnv_tce (tbl, idx),cpu_to_be64 (newtce)); *hpa =be64_to_cpu (oldtce) & ~(TCE_PCI_READ |TCE_PCI_WRITE ); *direction =iommu_tce_direction (oldtce);
@@ -762,6 +768,26 @@ void pnv_pci_dma_dev_setup(struct pci_dev *pdev) phb->dma_dev_setup (phb, pdev); } +void pnv_pci_dma_bus_setup (struct pci_bus *bus) +{ +struct pci_controller *hose = bus->sysdata; +struct pnv_phb *phb = hose->private_data; +struct pnv_ioda_pe *pe; + +list_for_each_entry (pe, &phb->ioda.pe_list, list) { +if (!(pe->flags & (PNV_IODA_PE_BUS |PNV_IODA_PE_BUS_ALL ))) +continue ; + +if (!pe->pbus) +continue ; + +if (bus->number == ((pe->rid >>8 ) &0xFF )) { + pe->pbus = bus; +break ; + } + } +} +void pnv_pci_shutdown (void ) {struct pci_controller *hose;
arch/powerpc/platforms/powernv/pci.h +1 -0
@@ -235,6 +235,7 @@ extern void pnv_pci_reset_secondary_bus(struct pci_dev *dev);extern int pnv_eeh_phb_reset (struct pci_controller *hose,int option);extern void pnv_pci_dma_dev_setup (struct pci_dev *pdev); +extern void pnv_pci_dma_bus_setup (struct pci_bus *bus);extern int pnv_setup_msi_irqs (struct pci_dev *pdev,int nvec,int type);extern void pnv_teardown_msi_irqs (struct pci_dev *pdev);
arch/x86/include/asm/pgtable_types.h +2 -4
@@ -363,20 +363,18 @@ static inline enum page_cache_mode pgprot2cachemode(pgprot_t pgprot) }static inline pgprot_t pgprot_4k_2_large (pgprot_t pgprot) { +pgprotval_t val =pgprot_val (pgprot);pgprot_t new; -unsigned long val; - val =pgprot_val (pgprot);pgprot_val (new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));return new; }static inline pgprot_t pgprot_large_2_4k (pgprot_t pgprot) { +pgprotval_t val =pgprot_val (pgprot);pgprot_t new; -unsigned long val; - val =pgprot_val (pgprot);pgprot_val (new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) | ((val & _PAGE_PAT_LARGE) >> (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
arch/x86/lib/copy_user_64.S +101 -41
178 lines not on this page · raw message
arch/x86/mm/fault.c +11 -4
@@ -287,6 +287,9 @@ static noinline int vmalloc_fault(unsigned long address)if (!pmd_k)return -1 ; +if (pmd_huge (*pmd_k)) +return 0 ; + pte_k =pte_offset_kernel (pmd_k, address);if (!pte_present (*pte_k))return -1 ;
@@ -360,8 +363,6 @@ void vmalloc_sync_all(void)* 64-bit: * * Handle a fault on the vmalloc area -* -* This assumes no large pages in there. */ static noinline int vmalloc_fault(unsigned long address) {
@@ -403,17 +404,23 @@ static noinline int vmalloc_fault(unsigned long address)if (pud_none (*pud_ref))return -1 ; -if (pud_none (*pud) ||pud_page_vaddr (*pud) !=pud_page_vaddr (*pud_ref)) +if (pud_none (*pud) ||pud_pfn (*pud) !=pud_pfn (*pud_ref))BUG (); +if (pud_huge (*pud)) +return 0 ; + pmd =pmd_offset (pud, address); pmd_ref =pmd_offset (pud_ref, address);if (pmd_none (*pmd_ref))return -1 ; -if (pmd_none (*pmd) ||pmd_page (*pmd) !=pmd_page (*pmd_ref)) +if (pmd_none (*pmd) ||pmd_pfn (*pmd) !=pmd_pfn (*pmd_ref))BUG (); +if (pmd_huge (*pmd)) +return 0 ; + pte_ref =pte_offset_kernel (pmd_ref, address);if (!pte_present (*pte_ref))return -1 ;
arch/x86/mm/pageattr.c +2 -2
@@ -33,7 +33,7 @@ struct cpa_data {pgd_t *pgd;pgprot_t mask_set;pgprot_t mask_clr; -int numpages; +unsigned long numpages;int flags;unsigned long pfn; unsigned force_split : 1;
@@ -1345,7 +1345,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)* CPA operation. Either a large page has been * preserved or a single page update happened. */ -BUG_ON (cpa->numpages > numpages); +BUG_ON (cpa->numpages > numpages || !cpa->numpages); numpages -= cpa->numpages;if (cpa->flags & (CPA_PAGES_ARRAY |CPA_ARRAY )) cpa->curpage++;
drivers/hwspinlock/hwspinlock_core.c +4 -0
@@ -313,6 +313,10 @@ int of_hwspin_lock_get_id(struct device_node *np, int index) hwlock =radix_tree_deref_slot (slot);if (unlikely (!hwlock))continue ; +if (radix_tree_is_indirect_ptr (hwlock)) { + slot =radix_tree_iter_retry (&iter); +continue ; + }if (hwlock->bank->dev->of_node == args.np) { ret =0 ;
drivers/iio/accel/Kconfig +1 -0
@@ -173,6 +173,7 @@ config STK8312 config STK8BA50 tristate "Sensortek STK8BA50 3-Axis Accelerometer Driver" depends on I2C + depends on IIO_TRIGGER help Say yes here to get support for the Sensortek STK8BA50 3-axis accelerometer.
drivers/iio/adc/Kconfig +1 -0
@@ -372,6 +372,7 @@ config TWL6030_GPADC config VF610_ADC tristate "Freescale vf610 ADC driver" depends on OF + depends on HAS_IOMEM select IIO_BUFFER select IIO_TRIGGERED_BUFFER help
drivers/iio/adc/ti_am335x_adc.c +1 -1
@@ -289,7 +289,7 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev, goto error_kfifo_free; indio_dev->setup_ops = setup_ops; - indio_dev->modes |=INDIO_BUFFER_HARDWARE ; + indio_dev->modes |=INDIO_BUFFER_SOFTWARE ;return 0 ;
drivers/iio/dac/mcp4725.c +1 -0
@@ -300,6 +300,7 @@ static int mcp4725_probe(struct i2c_client *client, data->client = client; indio_dev->dev.parent = &client->dev; + indio_dev->name = id->name; indio_dev->info = &mcp4725_info; indio_dev->channels = &mcp4725_channel; indio_dev->num_channels =1 ;
drivers/iio/imu/adis_buffer.c +1 -1
@@ -43,7 +43,7 @@ int adis_update_scan_mode(struct iio_dev *indio_dev,return -ENOMEM ; rx = adis->buffer; - tx = rx + indio_dev->scan_bytes; + tx = rx + scan_count;spi_message_init (&adis->msg);
drivers/iio/inkern.c +2 -0
@@ -351,6 +351,8 @@ EXPORT_SYMBOL_GPL(iio_channel_get);void iio_channel_release (struct iio_channel *channel) { +if (!channel) +return ;iio_device_put (channel->indio_dev);kfree (channel); }
drivers/iio/light/acpi-als.c +4 -2
@@ -54,7 +54,9 @@ static const struct iio_chan_spec acpi_als_channels[] = { .realbits = 32, .storagebits = 32, }, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), +/* _RAW is here for backward ABI compatibility */ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_PROCESSED), }, };
@@ -152,7 +154,7 @@ static int acpi_als_read_raw(struct iio_dev *indio_dev,s32 temp_val;int ret; -if (mask !=IIO_CHAN_INFO_RAW ) +if ((mask !=IIO_CHAN_INFO_PROCESSED ) && (mask !=IIO_CHAN_INFO_RAW ))return -EINVAL ;/* we support only illumination (_ALI) so far. */
drivers/iio/light/ltr501.c +1 -1
@@ -180,7 +180,7 @@ static const struct ltr501_samp_table ltr501_ps_samp_table[] = { {500000, 2000000} }; -static unsigned int ltr501_match_samp_freq (const struct ltr501_samp_table *tab, +static int ltr501_match_samp_freq (const struct ltr501_samp_table *tab,int len,int val,int val2) {int i, freq;
drivers/iio/pressure/mpl115.c +1 -1
@@ -117,7 +117,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev, *val = ret >>6 ;return IIO_VAL_INT ;case IIO_CHAN_INFO_OFFSET : - *val =605 ; + *val =-605 ; *val2 =750000 ;return IIO_VAL_INT_PLUS_MICRO ;case IIO_CHAN_INFO_SCALE :
drivers/input/mouse/elantech.c +1 -1
@@ -1222,7 +1222,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)input_set_abs_params (dev,ABS_TOOL_WIDTH ,ETP_WMIN_V2 ,ETP_WMAX_V2 ,0 ,0 ); } -input_mt_init_slots (dev,2 ,0 ); +input_mt_init_slots (dev,2 ,INPUT_MT_SEMI_MT );input_set_abs_params (dev,ABS_MT_POSITION_X , x_min, x_max,0 ,0 );input_set_abs_params (dev,ABS_MT_POSITION_Y , y_min, y_max,0 ,0 );break ;
drivers/input/mouse/vmmouse.c +7 -6
@@ -458,8 +458,6 @@ int vmmouse_init(struct psmouse *psmouse) priv->abs_dev = abs_dev; psmouse->private = priv; -input_set_capability (rel_dev,EV_REL ,REL_WHEEL ); -/* Set up and register absolute device */ snprintf (priv->phys,sizeof (priv->phys),"%s/input1" , psmouse->ps2dev.serio->phys);
@@ -475,10 +473,6 @@ int vmmouse_init(struct psmouse *psmouse) abs_dev->id.version = psmouse->model; abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; - error =input_register_device (priv->abs_dev); -if (error) - goto init_fail; -/* Set absolute device capabilities */ input_set_capability (abs_dev,EV_KEY ,BTN_LEFT );input_set_capability (abs_dev,EV_KEY ,BTN_RIGHT );
@@ -488,6 +482,13 @@ int vmmouse_init(struct psmouse *psmouse)input_set_abs_params (abs_dev,ABS_X ,0 ,VMMOUSE_MAX_X ,0 ,0 );input_set_abs_params (abs_dev,ABS_Y ,0 ,VMMOUSE_MAX_Y ,0 ,0 ); + error =input_register_device (priv->abs_dev); +if (error) + goto init_fail; + +/* Add wheel capability to the relative device */ +input_set_capability (rel_dev,EV_REL ,REL_WHEEL ); + psmouse->protocol_handler = vmmouse_process_byte; psmouse->disconnect = vmmouse_disconnect; psmouse->reconnect = vmmouse_reconnect;
drivers/input/serio/i8042-x86ia64io.h +7 -0
@@ -258,6 +258,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { }, }, { +/* Fujitsu Lifebook U745 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"FUJITSU" ), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U745"), + }, + }, + {/* Fujitsu T70H */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
drivers/iommu/amd_iommu.c +1 -1
@@ -1905,7 +1905,7 @@ static void do_attach(struct iommu_dev_data *dev_data,/* Update device table */ set_dte_entry (dev_data->devid, domain, ats);if (alias != dev_data->devid) -set_dte_entry (dev_data->devid, domain, ats); +set_dte_entry (alias, domain, ats);device_flush_dte (dev_data); }
drivers/iommu/dmar.c +1 -1
@@ -1347,7 +1347,7 @@ void dmar_disable_qi(struct intel_iommu *iommu)raw_spin_lock_irqsave (&iommu->register_lock, flags); - sts =dmar_readq (iommu->reg +DMAR_GSTS_REG ); + sts =readl (iommu->reg +DMAR_GSTS_REG );if (!(sts &DMA_GSTS_QIES )) goto end;
drivers/iommu/intel-iommu.c +1 -1
@@ -1489,7 +1489,7 @@ static void iommu_disable_dev_iotlb(struct device_domain_info *info) {struct pci_dev *pdev; -if (dev_is_pci (info->dev)) +if (!dev_is_pci (info->dev))return ; pdev =to_pci_dev (info->dev);
drivers/iommu/intel-svm.c +31 -6
@@ -249,12 +249,30 @@ static void intel_flush_pasid_dev(struct intel_svm *svm, struct intel_svm_dev *sstatic void intel_mm_release (struct mmu_notifier *mn,struct mm_struct *mm) { struct intel_svm *svm = container_of(mn, struct intel_svm, notifier); +struct intel_svm_dev *sdev; +/* This might end up being called from exit_mmap(), *before* the page +* tables are cleared. And __mmu_notifier_release() will delete us from +* the list of notifiers so that our invalidate_range() callback doesn't +* get called when the page tables are cleared. So we need to protect +* against hardware accessing those page tables. +* +* We do it by clearing the entry in the PASID table and then flushing +* the IOTLB and the PASID table caches. This might upset hardware; +* perhaps we'll want to point the PASID to a dummy PGD (like the zero +* page) so that we end up taking a fault that the hardware really +* *has* to handle gracefully without affecting other processes. +*/ svm->iommu->pasid_table[svm->pasid].val =0 ; +wmb (); + +rcu_read_lock (); +list_for_each_entry_rcu (sdev, &svm->devs, list) { +intel_flush_pasid_dev (svm, sdev, svm->pasid); +intel_flush_svm_range_dev (svm, sdev,0 ,-1 ,0 , !svm->mm); + } +rcu_read_unlock (); -/* There's no need to do any flush because we can't get here if there -* are any devices left anyway. */ -WARN_ON (!list_empty (&svm->devs)); }static const struct mmu_notifier_ops intel_mmuops = {
@@ -379,7 +397,6 @@ int intel_svm_bind_mm(struct device *dev, int *pasid, int flags, struct svm_dev_ goto out; } iommu->pasid_table[svm->pasid].val = (u64 )__pa (mm->pgd) |1 ; - mm =NULL ; }else iommu->pasid_table[svm->pasid].val = (u64 )__pa (init_mm.pgd) |1 | (1ULL <<11 );wmb ();
@@ -442,11 +459,11 @@ int intel_svm_unbind_mm(struct device *dev, int pasid)kfree_rcu (sdev, rcu);if (list_empty (&svm->devs)) { -mmu_notifier_unregister (&svm->notifier, svm->mm);idr_remove (&svm->iommu->pasid_idr, svm->pasid);if (svm->mm) -mmput (svm->mm); +mmu_notifier_unregister (&svm->notifier, svm->mm); +/* We mandate that no page faults may be outstanding * for the PASID when intel_svm_unbind_mm() is called. * If that is not obeyed, subtle errors will happen.
@@ -507,6 +524,10 @@ static irqreturn_t prq_event_thread(int irq, void *d)struct intel_svm *svm =NULL ;int head, tail, handled =0 ; +/* Clear PPR bit before reading head/tail registers, to +* ensure that we get a new interrupt if needed. */ +writel (DMA_PRS_PPR , iommu->reg +DMAR_PRS_REG ); + tail =dmar_readq (iommu->reg +DMAR_PQT_REG ) &PRQ_RING_MASK ; head =dmar_readq (iommu->reg +DMAR_PQH_REG ) &PRQ_RING_MASK ;while (head != tail) {
@@ -551,6 +572,9 @@ static irqreturn_t prq_event_thread(int irq, void *d)* any faults on kernel addresses. */ if (!svm->mm) goto bad_req; +/* If the mm is already defunct, don't handle faults. */ +if (!atomic_inc_not_zero (&svm->mm->mm_users)) + goto bad_req;down_read (&svm->mm->mmap_sem); vma =find_extend_vma (svm->mm, address);if (!vma || address < vma->vm_start)
@@ -567,6 +591,7 @@ static irqreturn_t prq_event_thread(int irq, void *d) result =QI_RESP_SUCCESS ; invalid:up_read (&svm->mm->mmap_sem); +mmput (svm->mm); bad_req:/* Accounting for major/minor faults? */ rcu_read_lock ();
drivers/iommu/intel_irq_remapping.c +1 -1
@@ -629,7 +629,7 @@ static void iommu_disable_irq_remapping(struct intel_iommu *iommu)raw_spin_lock_irqsave (&iommu->register_lock, flags); - sts =dmar_readq (iommu->reg +DMAR_GSTS_REG ); + sts =readl (iommu->reg +DMAR_GSTS_REG );if (!(sts &DMA_GSTS_IRES )) goto end;
drivers/nvdimm/namespace_devs.c +53 -0
59 lines not on this page · raw message
drivers/nvdimm/region_devs.c +0 -56
62 lines not on this page · raw message
drivers/phy/phy-twl4030-usb.c +9 -5
@@ -715,6 +715,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)pm_runtime_use_autosuspend (&pdev->dev);pm_runtime_set_autosuspend_delay (&pdev->dev,2000 );pm_runtime_enable (&pdev->dev); +pm_runtime_get_sync (&pdev->dev);/* Our job is to use irqs and status from the power module * to keep the transceiver disabled when nothing's connected.
@@ -750,6 +751,7 @@ static int twl4030_usb_remove(struct platform_device *pdev)struct twl4030_usb *twl =platform_get_drvdata (pdev);int val; +usb_remove_phy (&twl->phy);pm_runtime_get_sync (twl->dev);cancel_delayed_work (&twl->id_workaround_work);device_remove_file (twl->dev, &dev_attr_vbus);
@@ -757,6 +759,13 @@ static int twl4030_usb_remove(struct platform_device *pdev)/* set transceiver mode to power on defaults */ twl4030_usb_set_mode (twl,-1 ); +/* idle ulpi before powering off */ +if (cable_present (twl->linkstat)) +pm_runtime_put_noidle (twl->dev); +pm_runtime_mark_last_busy (twl->dev); +pm_runtime_put_sync_suspend (twl->dev); +pm_runtime_disable (twl->dev); +/* autogate 60MHz ULPI clock, * clear dpll clock request for i2c access, * disable 32KHz
@@ -771,11 +780,6 @@ static int twl4030_usb_remove(struct platform_device *pdev)/* disable complete OTG block */ twl4030_usb_clear_bits (twl,POWER_CTRL ,POWER_CTRL_OTG_ENAB ); -if (cable_present (twl->linkstat)) -pm_runtime_put_noidle (twl->dev); -pm_runtime_mark_last_busy (twl->dev); -pm_runtime_put (twl->dev); -return 0 ; }
drivers/platform/x86/intel_scu_ipcutil.c +1 -1
@@ -49,7 +49,7 @@ struct scu_ipc_data {static int scu_reg_access (u32 cmd,struct scu_ipc_data *data) { -int count = data->count; +unsigned int count = data->count;if (count ==0 || count ==3 || count >4 )return -EINVAL ;
drivers/scsi/device_handler/scsi_dh_rdac.c +3 -1
@@ -562,7 +562,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev,/* * Command Lock contention */ - err =SCSI_DH_RETRY ; + err =SCSI_DH_IMM_RETRY ;break ;default :break ;
@@ -612,6 +612,8 @@ retry: err =mode_select_handle_sense (sdev, h->sense);if (err ==SCSI_DH_RETRY && retry_cnt--) goto retry; +if (err ==SCSI_DH_IMM_RETRY ) + goto retry; }if (err ==SCSI_DH_OK ) { h->state =RDAC_STATE_ACTIVE ;
drivers/scsi/scsi_devinfo.c +2 -0
@@ -205,6 +205,7 @@ static struct { {"Intel", "Multi-Flex", NULL, BLIST_NO_RSOC}, {"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36}, {"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN}, + {"Marvell", "Console", NULL, BLIST_SKIP_VPD_PAGES}, {"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"MATSHITA", "DMC-LC5", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36}, {"MATSHITA", "DMC-LC40", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
@@ -227,6 +228,7 @@ static struct { {"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC}, {"Promise", "", NULL, BLIST_SPARSELUN}, {"QNAP", "iSCSI Storage", NULL, BLIST_MAX_1024}, + {"SYNOLOGY", "iSCSI Storage", NULL, BLIST_MAX_1024}, {"QUANTUM", "XP34301", "1071", BLIST_NOTQ}, {"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN}, {"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
drivers/scsi/scsi_sysfs.c +4 -2
@@ -1192,16 +1192,18 @@ static void __scsi_remove_target(struct scsi_target *starget)void scsi_remove_target (struct device *dev) {struct Scsi_Host *shost =dev_to_shost (dev->parent); -struct scsi_target *starget; +struct scsi_target *starget, *last_target =NULL ;unsigned long flags; restart:spin_lock_irqsave (shost->host_lock, flags);list_for_each_entry (starget, &shost->__targets, siblings) { -if (starget->state ==STARGET_DEL ) +if (starget->state ==STARGET_DEL || + starget == last_target)continue ;if (starget->dev.parent == dev || &starget->dev == dev) {kref_get (&starget->reap_ref); + last_target = starget;spin_unlock_irqrestore (shost->host_lock, flags);__scsi_remove_target (starget);scsi_target_reap (starget);
drivers/scsi/sd.c +5 -2
@@ -3268,8 +3268,8 @@ static int sd_suspend_common(struct device *dev, bool ignore_stop_errors)struct scsi_disk *sdkp =dev_get_drvdata (dev);int ret =0 ; -if (!sdkp) -return 0 ;/* this can happen */ +if (!sdkp)/* E.g.: runtime suspend following sd_remove() */ +return 0 ;if (sdkp->WCE && sdkp->media_present) {sd_printk (KERN_NOTICE , sdkp,"Synchronizing SCSI cache\n" );
@@ -3308,6 +3308,9 @@ static int sd_resume(struct device *dev) {struct scsi_disk *sdkp =dev_get_drvdata (dev); +if (!sdkp)/* E.g.: runtime resume at the start of sd_probe() */ +return 0 ; +if (!sdkp->device->manage_start_stop)return 0 ;
drivers/scsi/sg.c +1 -1
@@ -1261,7 +1261,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma) } sfp->mmap_called =1 ; - vma->vm_flags |=VM_DONTEXPAND |VM_DONTDUMP ; + vma->vm_flags |=VM_IO |VM_DONTEXPAND |VM_DONTDUMP ; vma->vm_private_data = sfp; vma->vm_ops = &sg_mmap_vm_ops;return 0 ;
drivers/scsi/sr.c +4 -0
@@ -144,6 +144,9 @@ static int sr_runtime_suspend(struct device *dev) {struct scsi_cd *cd =dev_get_drvdata (dev); +if (!cd)/* E.g.: runtime suspend following sr_remove() */ +return 0 ; +if (cd->media_present)return -EBUSY ;else
@@ -985,6 +988,7 @@ static int sr_remove(struct device *dev)scsi_autopm_get_device (cd->device);del_gendisk (cd->disk); +dev_set_drvdata (dev,NULL );mutex_lock (&sr_ref_mutex);kref_put (&cd->kref, sr_kref_release);
drivers/staging/speakup/selection.c +4 -1
@@ -142,7 +142,9 @@ static void __speakup_paste_selection(struct work_struct *work)struct tty_ldisc *ld;DECLARE_WAITQUEUE (wait, current); - ld =tty_ldisc_ref_wait (tty); + ld =tty_ldisc_ref (tty); +if (!ld) + goto tty_unref;tty_buffer_lock_exclusive (&vc->port);add_wait_queue (&vc->paste_wait, &wait);
@@ -162,6 +164,7 @@ static void __speakup_paste_selection(struct work_struct *work)tty_buffer_unlock_exclusive (&vc->port);tty_ldisc_deref (ld); +tty_unref:tty_kref_put (tty); }
drivers/target/iscsi/iscsi_target_configfs.c +15 -1
@@ -1593,7 +1593,8 @@ static int lio_tpg_check_prot_fabric_only( }/* -* Called with spin_lock_bh(struct se_portal_group->session_lock) held.. +* Called with spin_lock_irq(struct se_portal_group->session_lock) held +* or not held. * * Also, this function calls iscsit_inc_session_usage_count() on the * struct iscsi_session in question.
@@ -1601,19 +1602,32 @@ static int lio_tpg_check_prot_fabric_only(static int lio_tpg_shutdown_session (struct se_session *se_sess) {struct iscsi_session *sess = se_sess->fabric_sess_ptr; +struct se_portal_group *se_tpg = se_sess->se_tpg; +bool local_lock = false; + +if (!spin_is_locked (&se_tpg->session_lock)) { +spin_lock_irq (&se_tpg->session_lock); + local_lock = true; + }spin_lock (&sess->conn_lock);if (atomic_read (&sess->session_fall_back_to_erl0) ||atomic_read (&sess->session_logout) || (sess->time2retain_timer_flags &ISCSI_TF_EXPIRED )) {spin_unlock (&sess->conn_lock); +if (local_lock) +spin_unlock_irq (&sess->conn_lock);return 0 ; }atomic_set (&sess->session_reinstatement,1 );spin_unlock (&sess->conn_lock);iscsit_stop_time2retain_timer (sess); +spin_unlock_irq (&se_tpg->session_lock); +iscsit_stop_session (sess,1 ,1 ); +if (!local_lock) +spin_lock_irq (&se_tpg->session_lock);return 1 ; }
drivers/tty/pty.c +20 -1
@@ -681,7 +681,14 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)/* this is called once with whichever end is closed last */ static void pty_unix98_shutdown (struct tty_struct *tty) { -devpts_kill_index (tty->driver_data, tty->index); +struct inode *ptmx_inode; + +if (tty->driver->subtype ==PTY_TYPE_MASTER ) + ptmx_inode = tty->driver_data; +else + ptmx_inode = tty->link->driver_data; +devpts_kill_index (ptmx_inode, tty->index); +devpts_del_ref (ptmx_inode); }static const struct tty_operations ptm_unix98_ops = {
@@ -773,6 +780,18 @@ static int ptmx_open(struct inode *inode, struct file *filp)set_bit (TTY_PTY_LOCK , &tty->flags);/* LOCK THE SLAVE */ tty->driver_data = inode; +/* +* In the case where all references to ptmx inode are dropped and we +* still have /dev/tty opened pointing to the master/slave pair (ptmx +* is closed/released before /dev/tty), we must make sure that the inode +* is still valid when we call the final pty_unix98_shutdown, thus we +* hold an additional reference to the ptmx inode. For the same /dev/tty +* last close case, we also need to make sure the super_block isn't +* destroyed (devpts instance unmounted), before /dev/tty is closed and +* on its release devpts_kill_index is called. +*/ +devpts_add_ref (inode); +tty_add_file (tty, filp); slave_inode = devpts_pty_new(inode,
drivers/tty/serial/8250/8250_pci.c +50 -0
109 lines not on this page · raw message
drivers/tty/serial/omap-serial.c +6 -2
@@ -1343,7 +1343,7 @@ static inline void serial_omap_add_console_port(struct uart_omap_port *up)/* Enable or disable the rs485 support */ static int -serial_omap_config_rs485 (struct uart_port *port,struct serial_rs485 *rs485conf) +serial_omap_config_rs485 (struct uart_port *port,struct serial_rs485 *rs485) {struct uart_omap_port *up =to_uart_omap_port (port);unsigned int mode;
@@ -1356,8 +1356,12 @@ serial_omap_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) up->ier =0 ;serial_out (up,UART_IER ,0 ); +/* Clamp the delays to [0, 100ms] */ + rs485->delay_rts_before_send =min (rs485->delay_rts_before_send,100U ); + rs485->delay_rts_after_send =min (rs485->delay_rts_after_send,100U ); +/* store new config */ - port->rs485 = *rs485conf; + port->rs485 = *rs485;/* * Just as a precaution, only allow rs485
drivers/usb/host/xhci-ring.c +0 -10
@@ -2192,10 +2192,6 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td, }/* Fast path - was this the last TRB in the TD for this URB? */ }else if (event_trb == td->last_trb) { -if (td->urb_length_set && trb_comp_code ==COMP_SHORT_TX ) -return finish_td (xhci, td, event_trb, event, ep, - status, false); -if (EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)) !=0 ) { td->urb->actual_length = td->urb->transfer_buffer_length -
@@ -2247,12 +2243,6 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td, td->urb->actual_length +=TRB_LEN (le32_to_cpu (cur_trb->generic.field[2 ])) -EVENT_TRB_LEN (le32_to_cpu (event->transfer_len)); - -if (trb_comp_code ==COMP_SHORT_TX ) { -xhci_dbg (xhci,"mid bulk/intr SP, wait for last TRB event\n" ); - td->urb_length_set = true; -return 0 ; - } }return finish_td (xhci, td, event_trb, event, ep, status, false);
drivers/usb/host/xhci.c +3 -1
@@ -1549,7 +1549,9 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb,"HW died, freeing TD." ); urb_priv = urb->hcpriv; -for (i = urb_priv->td_cnt; i < urb_priv->length; i++) { +for (i = urb_priv->td_cnt; + i < urb_priv->length && xhci->devs[urb->dev->slot_id]; + i++) { td = urb_priv->td[i];if (!list_empty (&td->td_list))list_del_init (&td->td_list);
fs/btrfs/backref.c +6 -4
@@ -1417,7 +1417,8 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path,read_extent_buffer (eb, dest + bytes_left, name_off, name_len);if (eb != eb_in) { -btrfs_tree_read_unlock_blocking (eb); +if (!path->skip_locking) +btrfs_tree_read_unlock_blocking (eb);free_extent_buffer (eb); } ret = btrfs_find_item(fs_root, path, parent, 0,
@@ -1437,9 +1438,10 @@ char *btrfs_ref_to_path(struct btrfs_root *fs_root, struct btrfs_path *path, eb = path->nodes[0 ];/* make sure we can use eb after releasing the path */ if (eb != eb_in) { -atomic_inc (&eb->refs); -btrfs_tree_read_lock (eb); -btrfs_set_lock_blocking_rw (eb,BTRFS_READ_LOCK ); +if (!path->skip_locking) +btrfs_set_lock_blocking_rw (eb,BTRFS_READ_LOCK ); + path->nodes[0 ] =NULL ; + path->locks[0 ] =0 ; }btrfs_release_path (path); iref = btrfs_item_ptr(eb, slot, struct btrfs_inode_ref);
fs/btrfs/delayed-inode.c +2 -1
@@ -1694,7 +1694,7 @@ int btrfs_should_delete_dir_index(struct list_head *del_list,* */ int btrfs_readdir_delayed_dir_index (struct dir_context *ctx, -struct list_head *ins_list) +struct list_head *ins_list,bool *emitted) {struct btrfs_dir_item *di;struct btrfs_delayed_item *curr, *next;
@@ -1738,6 +1738,7 @@ int btrfs_readdir_delayed_dir_index(struct dir_context *ctx,if (over)return 1 ; + *emitted = true; }return 0 ; }
fs/btrfs/delayed-inode.h +1 -1
@@ -144,7 +144,7 @@ void btrfs_put_delayed_items(struct list_head *ins_list,int btrfs_should_delete_dir_index (struct list_head *del_list,u64 index);int btrfs_readdir_delayed_dir_index (struct dir_context *ctx, -struct list_head *ins_list); +struct list_head *ins_list,bool *emitted);/* for init */ int __init btrfs_delayed_inode_init (void );
fs/btrfs/disk-io.c +0 -1
@@ -1762,7 +1762,6 @@ static int cleaner_kthread(void *arg)int again;struct btrfs_trans_handle *trans; -set_freezable (); do { again = 0;
fs/btrfs/inode.c +15 -1
@@ -5741,6 +5741,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)char *name_ptr;int name_len;int is_curr =0 ;/* ctx->pos points to the current index? */ +bool emitted;/* FIXME, use a real flag for deciding about the key type */ if (root->fs_info->tree_root == root)
@@ -5769,6 +5770,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)if (ret <0 ) goto err; + emitted = false;while (1 ) { leaf = path->nodes[0 ]; slot = path->slots[0 ];
@@ -5848,6 +5850,7 @@ skip:if (over) goto nopos; + emitted = true; di_len =btrfs_dir_name_len (leaf, di) +btrfs_dir_data_len (leaf, di) +sizeof (*di); di_cur += di_len;
@@ -5860,11 +5863,20 @@ next:if (key_type ==BTRFS_DIR_INDEX_KEY ) {if (is_curr) ctx->pos++; - ret =btrfs_readdir_delayed_dir_index (ctx, &ins_list); + ret =btrfs_readdir_delayed_dir_index (ctx, &ins_list, &emitted);if (ret) goto nopos; } +/* +* If we haven't emitted any dir entry, we must not touch ctx->pos as +* it was was set to the termination value in previous call. We assume +* that "." and ".." were emitted if we reach this point and set the +* termination value as well for an empty directory. +*/ +if (ctx->pos >2 && !emitted) + goto nopos; +/* Reached end of directory/root. Bump pos past the last item. */ ctx->pos++;
@@ -7985,6 +7997,7 @@ static void btrfs_endio_direct_read(struct bio *bio)kfree (dip); + dio_bio->bi_error = bio->bi_error;dio_end_io (dio_bio, bio->bi_error);if (io_bio->end_io)
@@ -8030,6 +8043,7 @@ out_test:kfree (dip); + dio_bio->bi_error = bio->bi_error;dio_end_io (dio_bio, bio->bi_error);bio_put (bio); }
fs/btrfs/ioctl.c +97 -22
201 lines not on this page · raw message
fs/btrfs/volumes.c +18 -10
@@ -1257,6 +1257,15 @@ int find_free_dev_extent_start(struct btrfs_transaction *transaction,int ret;int slot;struct extent_buffer *l; +u64 min_search_start; + +/* +* We don't want to overwrite the superblock on the drive nor any area +* used by the boot loader (grub for example), so we make sure to start +* at an offset of at least 1MB. +*/ + min_search_start =max (root->fs_info->alloc_start,1024ull *1024 ); + search_start =max (search_start, min_search_start); path =btrfs_alloc_path ();if (!path)
@@ -1397,18 +1406,9 @@ int find_free_dev_extent(struct btrfs_trans_handle *trans, struct btrfs_device *device, u64 num_bytes, u64 *start, u64 *len) { - struct btrfs_root *root = device->dev_root; -u64 search_start; - /* FIXME use last free of some kind */ - -/* -* we don't want to overwrite the superblock on the drive, -* so we make sure to start at an offset of at least 1MB -*/ - search_start =max (root->fs_info->alloc_start,1024ull *1024 ); return find_free_dev_extent_start(trans->transaction, device, - num_bytes, search_start, start, len); + num_bytes, 0, start, len); } static int btrfs_free_dev_extent(struct btrfs_trans_handle *trans,
@@ -6512,6 +6512,14 @@ int btrfs_read_sys_array(struct btrfs_root *root) goto out_short_read; num_stripes =btrfs_chunk_num_stripes (sb, chunk); +if (!num_stripes) { +printk (KERN_ERR +"BTRFS: invalid number of stripes %u in sys_array at offset %u\n" , + num_stripes, cur_offset); + ret = -EIO ; +break ; + } + len =btrfs_chunk_item_size (num_stripes);if (cur_offset + len > array_size) goto out_short_read;
fs/cifs/cifs_debug.c +1 -1
@@ -50,7 +50,7 @@ void cifs_vfs_err(const char *fmt, ...) vaf.fmt = fmt; vaf.va = &args; -pr_err ("CIFS VFS: %pV" , &vaf); +pr_err_ratelimited ("CIFS VFS: %pV" , &vaf);va_end (args); }
fs/cifs/cifs_debug.h +4 -5
@@ -51,14 +51,13 @@ __printf(1, 2) void cifs_vfs_err(const char *fmt, ...);/* information message: e.g., configuration, major event */ #define cifs_dbg (type, fmt, ...) \ do { \ - if (type == FYI) { \ - if (cifsFYI & CIFS_INFO) { \ - pr_debug("%s: " fmt, __FILE__, ##__VA_ARGS__); \ - } \ + if (type == FYI && cifsFYI & CIFS_INFO) { \ + pr_debug_ratelimited("%s: " \ + fmt, __FILE__, ##__VA_ARGS__); \ } else if (type == VFS) { \ cifs_vfs_err(fmt, ##__VA_ARGS__); \ } else if (type == NOISY && type != 0) { \ - pr_debug(fmt, ##__VA_ARGS__); \ + pr_debug_ratelimited(fmt, ##__VA_ARGS__); \ } \ } while (0)
fs/cifs/cifsencrypt.c +1 -1
@@ -714,7 +714,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp) ses->auth_key.response =kmalloc (baselen + tilen,GFP_KERNEL );if (!ses->auth_key.response) { - rc =ENOMEM ; + rc = -ENOMEM ; ses->auth_key.len =0 ; goto setup_ntlmv2_rsp_ret; }
fs/cifs/connect.c +1 -1
@@ -368,7 +368,6 @@ cifs_reconnect(struct TCP_Server_Info *server) server->session_key.response =NULL ; server->session_key.len =0 ; server->lstrp = jiffies; -mutex_unlock (&server->srv_mutex);/* mark submitted MIDs for retry and issue callback */ INIT_LIST_HEAD (&retry_list);
@@ -381,6 +380,7 @@ cifs_reconnect(struct TCP_Server_Info *server)list_move (&mid_entry->qhead, &retry_list); }spin_unlock (&GlobalMid_Lock); +mutex_unlock (&server->srv_mutex);cifs_dbg (FYI ,"%s: issuing mid callbacks\n" , __func__);list_for_each_safe (tmp, tmp2, &retry_list) {
fs/cifs/readdir.c +1 -0
@@ -847,6 +847,7 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)* if buggy server returns . and .. late do we want to * check for that here? */ + *tmp_buf =0 ; rc =cifs_filldir (current_entry, file, ctx, tmp_buf, max_len);if (rc) {
fs/cifs/transport.c +4 -2
@@ -576,14 +576,16 @@ cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst,cifs_in_send_dec (server);cifs_save_when_sent (mid); -if (rc <0 ) +if (rc <0 ) { server->sequence_number -=2 ; +cifs_delete_mid (mid); + } +mutex_unlock (&server->srv_mutex);if (rc ==0 )return 0 ; -cifs_delete_mid (mid);add_credits_and_wake_if (server, credits, optype);return rc; }
fs/devpts/inode.c +20 -0
@@ -575,6 +575,26 @@ void devpts_kill_index(struct inode *ptmx_inode, int idx)mutex_unlock (&allocated_ptys_lock); } +/* +* pty code needs to hold extra references in case of last /dev/tty close +*/ + +void devpts_add_ref (struct inode *ptmx_inode) +{ +struct super_block *sb =pts_sb_from_inode (ptmx_inode); + +atomic_inc (&sb->s_active); +ihold (ptmx_inode); +} + +void devpts_del_ref (struct inode *ptmx_inode) +{ +struct super_block *sb =pts_sb_from_inode (ptmx_inode); + +iput (ptmx_inode); +deactivate_super (sb); +} +/** * devpts_pty_new -- create a new inode in /dev/pts/ * @ptmx_inode: inode of the master
fs/ext4/balloc.c +4 -3
@@ -191,7 +191,6 @@ static int ext4_init_block_bitmap(struct super_block *sb,/* If checksum is bad mark all blocks used to prevent allocation * essentially implementing a per-group read-only flag. */ if (!ext4_group_desc_csum_verify (sb, block_group, gdp)) { -ext4_error (sb,"Checksum bad for group %u" , block_group); grp =ext4_get_group_info (sb, block_group);if (!EXT4_MB_GRP_BBITMAP_CORRUPT (grp)) percpu_counter_sub(&sbi->s_freeclusters_counter,
@@ -442,14 +441,16 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group) }ext4_lock_group (sb, block_group);if (desc->bg_flags &cpu_to_le16 (EXT4_BG_BLOCK_UNINIT )) { - err =ext4_init_block_bitmap (sb, bh, block_group, desc);set_bitmap_uptodate (bh);set_buffer_uptodate (bh);ext4_unlock_group (sb, block_group);unlock_buffer (bh); -if (err) +if (err) { +ext4_error (sb,"Failed to init block bitmap for group " +"%u: %d" , block_group, err); goto out; + } goto verify; }ext4_unlock_group (sb, block_group);
fs/ext4/ialloc.c +4 -2
@@ -76,7 +76,6 @@ static int ext4_init_inode_bitmap(struct super_block *sb,/* If checksum is bad mark all blocks and inodes use to prevent * allocation, essentially implementing a per-group read-only flag. */ if (!ext4_group_desc_csum_verify (sb, block_group, gdp)) { -ext4_error (sb,"Checksum bad for group %u" , block_group); grp =ext4_get_group_info (sb, block_group);if (!EXT4_MB_GRP_BBITMAP_CORRUPT (grp)) percpu_counter_sub(&sbi->s_freeclusters_counter,
@@ -191,8 +190,11 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)set_buffer_verified (bh);ext4_unlock_group (sb, block_group);unlock_buffer (bh); -if (err) +if (err) { +ext4_error (sb,"Failed to init inode bitmap for group " +"%u: %d" , block_group, err); goto out; + }return bh; }ext4_unlock_group (sb, block_group);
fs/ext4/move_extent.c +12 -3
@@ -265,11 +265,12 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,ext4_lblk_t orig_blk_offset, donor_blk_offset;unsigned long blocksize = orig_inode->i_sb->s_blocksize;unsigned int tmp_data_size, data_size, replaced_size; -int err2, jblocks, retries =0 ; +int i, err2, jblocks, retries =0 ;int replaced_count =0 ;int from = data_offset_in_page << orig_inode->i_blkbits;int blocks_per_page =PAGE_CACHE_SIZE >> orig_inode->i_blkbits;struct super_block *sb = orig_inode->i_sb; +struct buffer_head *bh =NULL ;/* * It needs twice the amount of ordinary journal buffers because
@@ -380,8 +381,16 @@ data_copy: }/* Perform all necessary steps similar write_begin()/write_end() * but keeping in mind that i_size will not change */ - *err =__block_write_begin (pagep[0 ], from, replaced_size, - ext4_get_block); +if (!page_has_buffers (pagep[0 ])) +create_empty_buffers (pagep[0 ],1 << orig_inode->i_blkbits,0 ); + bh =page_buffers (pagep[0 ]); +for (i =0 ; i < data_offset_in_page; i++) + bh = bh->b_this_page; +for (i =0 ; i < block_len_in_page; i++) { + *err =ext4_get_block (orig_inode, orig_blk_offset + i, bh,0 ); +if (*err <0 ) +break ; + }if (!*err) *err =block_commit_write (pagep[0 ], from, from + replaced_size);
fs/ext4/resize.c +1 -1
@@ -198,7 +198,7 @@ static struct ext4_new_flex_group_data *alloc_flex_gd(unsigned long flexbg_size)if (flex_gd ==NULL ) goto out3; -if (flexbg_size >=UINT_MAX /sizeof (struct ext4_new_flex_group_data )) +if (flexbg_size >=UINT_MAX /sizeof (struct ext4_new_group_data )) goto out2; flex_gd->count = flexbg_size;
fs/hugetlbfs/inode.c +11 -8
@@ -463,6 +463,7 @@ hugetlb_vmdelete_list(struct rb_root *root, pgoff_t start, pgoff_t end)*/ vma_interval_tree_foreach(vma, root, start, end ? end : ULONG_MAX) {unsigned long v_offset; +unsigned long v_end;/* * Can the expression below overflow on 32-bit arches?
@@ -475,15 +476,17 @@ hugetlb_vmdelete_list(struct rb_root *root, pgoff_t start, pgoff_t end)else v_offset =0 ; -if (end) { - end = ((end - start) <<PAGE_SHIFT ) + - vma->vm_start + v_offset; -if (end > vma->vm_end) - end = vma->vm_end; - }else - end = vma->vm_end; +if (!end) + v_end = vma->vm_end; +else { + v_end = ((end - vma->vm_pgoff) <<PAGE_SHIFT ) + + vma->vm_start; +if (v_end > vma->vm_end) + v_end = vma->vm_end; + } -unmap_hugepage_range (vma, vma->vm_start + v_offset, end,NULL ); +unmap_hugepage_range (vma, vma->vm_start + v_offset, v_end, +NULL ); } }
fs/nfs/flexfilelayout/flexfilelayout.c +3 -5
@@ -145,7 +145,7 @@ static bool ff_mirror_match_fh(const struct nfs4_ff_layout_mirror *m1,return false;for (i =0 ; i < m1->fh_versions_cnt; i++) {bool found_fh = false; -for (j =0 ; j < m2->fh_versions_cnt; i++) { +for (j =0 ; j < m2->fh_versions_cnt; j++) {if (nfs_compare_fh (&m1->fh_versions[i], &m2->fh_versions[j]) ==0 ) { found_fh = true;
@@ -1859,11 +1859,9 @@ ff_layout_encode_layoutreturn(struct pnfs_layout_hdr *lo, start =xdr_reserve_space (xdr,4 );BUG_ON (!start); -if (ff_layout_encode_ioerr (flo, xdr, args)) - goto out; - +ff_layout_encode_ioerr (flo, xdr, args);ff_layout_encode_iostats (flo, xdr, args); -out: + *start =cpu_to_be32 ((xdr->p - start -1 ) *4 );dprintk ("%s: Return\n" , __func__); }
fs/nfs/inode.c +39 -15
157 lines not on this page · raw message
fs/nfs/nfs4proc.c +1 -1
@@ -1385,6 +1385,7 @@ static void __update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_s* Protect the call to nfs4_state_set_mode_locked and * serialise the stateid update */ +spin_lock (&state->owner->so_lock);write_seqlock (&state->seqlock);if (deleg_stateid !=NULL ) {nfs4_stateid_copy (&state->stateid, deleg_stateid);
@@ -1393,7 +1394,6 @@ static void __update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_sif (open_stateid !=NULL )nfs_set_open_stateid_locked (state, open_stateid, fmode);write_sequnlock (&state->seqlock); -spin_lock (&state->owner->so_lock);update_open_stateflags (state, fmode);spin_unlock (&state->owner->so_lock); }
fs/overlayfs/copy_up.c +26 -15
64 lines not on this page · raw message
fs/overlayfs/inode.c +13 -0
@@ -42,6 +42,19 @@ int ovl_setattr(struct dentry *dentry, struct iattr *attr)int err;struct dentry *upperdentry; +/* +* Check for permissions before trying to copy-up. This is redundant +* since it will be rechecked later by ->setattr() on upper dentry. But +* without this, copy-up can be triggered by just about anybody. +* +* We don't initialize inode->size, which just means that +* inode_newsize_ok() will always check against MAX_LFS_FILESIZE and not +* check for a swapfile (which this won't be anyway). +*/ + err =inode_change_ok (dentry->d_inode, attr); +if (err) +return err; + err =ovl_want_write (dentry);if (err) goto out;
fs/overlayfs/readdir.c +2 -1
@@ -571,7 +571,8 @@ void ovl_cleanup_whiteouts(struct dentry *upper, struct list_head *list) (int) PTR_ERR(dentry));continue ; } -ovl_cleanup (upper->d_inode, dentry); +if (dentry->d_inode) +ovl_cleanup (upper->d_inode, dentry);dput (dentry); }mutex_unlock (&upper->d_inode->i_mutex);
fs/overlayfs/super.c +5 -0
@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/namei.h> +#include <linux/pagemap.h> #include <linux/xattr.h> #include <linux/security.h> #include <linux/mount.h>
@@ -910,6 +911,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) } sb->s_stack_depth =0 ; + sb->s_maxbytes =MAX_LFS_FILESIZE ;if (ufs->config.upperdir) {if (!ufs->config.workdir) {pr_err ("overlayfs: missing 'workdir'\n" );
@@ -1053,6 +1055,9 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) root_dentry->d_fsdata = oe; +ovl_copyattr (ovl_dentry_real (root_dentry)->d_inode, + root_dentry->d_inode); + sb->s_magic =OVERLAYFS_SUPER_MAGIC ; sb->s_op = &ovl_super_operations; sb->s_root = root_dentry;
fs/proc/array.c +1 -1
@@ -395,7 +395,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, state = *get_task_state (task); vsize = eip = esp =0 ; - permitted =ptrace_may_access (task,PTRACE_MODE_READ |PTRACE_MODE_NOAUDIT ); + permitted =ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS |PTRACE_MODE_NOAUDIT ); mm =get_task_mm (task);if (mm) { vsize =task_vsize (mm);
fs/proc/base.c +11 -10
@@ -403,7 +403,7 @@ static const struct file_operations proc_pid_cmdline_ops = {static int proc_pid_auxv (struct seq_file *m,struct pid_namespace *ns,struct pid *pid,struct task_struct *task) { -struct mm_struct *mm =mm_access (task,PTRACE_MODE_READ ); +struct mm_struct *mm =mm_access (task,PTRACE_MODE_READ_FSCREDS );if (mm && !IS_ERR (mm)) {unsigned int nwords =0 ; do {
@@ -430,7 +430,8 @@ static int proc_pid_wchan(struct seq_file *m, struct pid_namespace *ns, wchan =get_wchan (task); -if (wchan &&ptrace_may_access (task,PTRACE_MODE_READ ) && !lookup_symbol_name (wchan, symname)) +if (wchan &&ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS ) + && !lookup_symbol_name (wchan, symname))seq_printf (m,"%s" , symname);else seq_putc (m,'0' );
@@ -444,7 +445,7 @@ static int lock_trace(struct task_struct *task)int err =mutex_lock_killable (&task->signal->cred_guard_mutex);if (err)return err; -if (!ptrace_may_access (task,PTRACE_MODE_ATTACH )) { +if (!ptrace_may_access (task,PTRACE_MODE_ATTACH_FSCREDS )) {mutex_unlock (&task->signal->cred_guard_mutex);return -EPERM ; }
@@ -697,7 +698,7 @@ static int proc_fd_access_allowed(struct inode *inode)*/ task =get_proc_task (inode);if (task) { - allowed =ptrace_may_access (task,PTRACE_MODE_READ ); + allowed =ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS );put_task_struct (task); }return allowed;
@@ -732,7 +733,7 @@ static bool has_pid_permissions(struct pid_namespace *pid,return true;if (in_group_p (pid->pid_gid))return true; -return ptrace_may_access (task,PTRACE_MODE_READ ); +return ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS ); }
@@ -809,7 +810,7 @@ struct mm_struct *proc_mem_open(struct inode *inode, unsigned int mode)struct mm_struct *mm =ERR_PTR (-ESRCH );if (task) { - mm =mm_access (task, mode); + mm =mm_access (task, mode |PTRACE_MODE_FSCREDS );put_task_struct (task);if (!IS_ERR_OR_NULL (mm)) {
@@ -1856,7 +1857,7 @@ static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)if (!task) goto out_notask; - mm =mm_access (task,PTRACE_MODE_READ ); + mm =mm_access (task,PTRACE_MODE_READ_FSCREDS );if (IS_ERR_OR_NULL (mm)) goto out;
@@ -2007,7 +2008,7 @@ static struct dentry *proc_map_files_lookup(struct inode *dir, goto out; result = -EACCES ; -if (!ptrace_may_access (task,PTRACE_MODE_READ )) +if (!ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS )) goto out_put_task; result = -ENOENT ;
@@ -2060,7 +2061,7 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) goto out; ret = -EACCES ; -if (!ptrace_may_access (task,PTRACE_MODE_READ )) +if (!ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS )) goto out_put_task; ret =0 ;
@@ -2530,7 +2531,7 @@ static int do_io_accounting(struct task_struct *task, struct seq_file *m, int whif (result)return result; -if (!ptrace_may_access (task,PTRACE_MODE_READ )) { +if (!ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS )) { result = -EACCES ; goto out_unlock; }
fs/proc/namespaces.c +2 -2
@@ -42,7 +42,7 @@ static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie)if (!task)return error; -if (ptrace_may_access (task,PTRACE_MODE_READ )) { +if (ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS )) { error =ns_get_path (&ns_path, task, ns_ops);if (!error)nd_jump_link (&ns_path);
@@ -63,7 +63,7 @@ static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int buflif (!task)return res; -if (ptrace_may_access (task,PTRACE_MODE_READ )) { +if (ptrace_may_access (task,PTRACE_MODE_READ_FSCREDS )) { res =ns_get_name (name,sizeof (name), task, ns_ops);if (res >=0 ) res =readlink_copy (buffer, buflen, name);
fs/proc/task_mmu.c +4 -3
@@ -1473,18 +1473,19 @@ static int gather_pte_stats(pmd_t *pmd, unsigned long addr,static int gather_hugetlb_stats (pte_t *pte,unsigned long hmask,unsigned long addr,unsigned long end,struct mm_walk *walk) { +pte_t huge_pte =huge_ptep_get (pte);struct numa_maps *md;struct page *page; -if (!pte_present (*pte)) +if (!pte_present (huge_pte))return 0 ; - page =pte_page (*pte); + page =pte_page (huge_pte);if (!page)return 0 ; md = walk->private; -gather_stats (page, md,pte_dirty (*pte),1 ); +gather_stats (page, md,pte_dirty (huge_pte),1 );return 0 ; }
fs/timerfd.c +1 -1
@@ -153,7 +153,7 @@ static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx)if (isalarm (ctx)) remaining =alarm_expires_remaining (&ctx->t.alarm);else - remaining =hrtimer_expires_remaining (&ctx->t.tmr); + remaining =hrtimer_expires_remaining_adjusted (&ctx->t.tmr);return remaining.tv64 <0 ?ktime_set (0 ,0 ): remaining; }
fs/udf/inode.c +15 -0
@@ -2047,14 +2047,29 @@ void udf_write_aext(struct inode *inode, struct extent_position *epos, epos->offset += adsize; } +/* +* Only 1 indirect extent in a row really makes sense but allow upto 16 in case +* someone does some weird stuff. +*/ +#define UDF_MAX_INDIR_EXTS 16 +int8_t udf_next_aext (struct inode *inode,struct extent_position *epos,struct kernel_lb_addr *eloc,uint32_t *elen,int inc) {int8_t etype; +unsigned int indirections =0 ;while ((etype =udf_current_aext (inode, epos, eloc, elen, inc)) == (EXT_NEXT_EXTENT_ALLOCDECS >>30 )) {int block; + +if (++indirections >UDF_MAX_INDIR_EXTS ) { +udf_err (inode->i_sb, +"too many indirect extents in inode %lu\n" , + inode->i_ino); +return -1 ; + } + epos->block = *eloc; epos->offset =sizeof (struct allocExtDesc );brelse (epos->bh);
fs/udf/unicode.c +18 -3
@@ -128,11 +128,15 @@ int udf_CS0toUTF8(struct ustr *utf_o, const struct ustr *ocu_i)if (c <0x80U ) utf_o->u_name[utf_o->u_len++] = (uint8_t )c;else if (c <0x800U ) { +if (utf_o->u_len > (UDF_NAME_LEN -4 )) +break ; utf_o->u_name[utf_o->u_len++] = (uint8_t )(0xc0 | (c >>6 )); utf_o->u_name[utf_o->u_len++] = (uint8_t )(0x80 | (c &0x3f )); }else { +if (utf_o->u_len > (UDF_NAME_LEN -5 )) +break ; utf_o->u_name[utf_o->u_len++] = (uint8_t )(0xe0 | (c >>12 )); utf_o->u_name[utf_o->u_len++] =
@@ -173,17 +177,22 @@ int udf_CS0toUTF8(struct ustr *utf_o, const struct ustr *ocu_i)static int udf_UTF8toCS0 (dstring *ocu,struct ustr *utf,int length) {unsigned c, i, max_val, utf_char; -int utf_cnt, u_len; +int utf_cnt, u_len, u_ch;memset (ocu,0 ,sizeof (dstring) * length); ocu[0 ] =8 ; max_val =0xffU ; + u_ch =1 ; try_again: u_len =0U ; utf_char =0U ; utf_cnt =0U ;for (i =0U ; i < utf->u_len; i++) { +/* Name didn't fit? */ +if (u_len +1 + u_ch >= length) +return 0 ; + c = (uint8_t )utf->u_name[i];/* Complete a multi-byte UTF-8 character */
@@ -225,6 +234,7 @@ try_again:if (max_val ==0xffU ) { max_val =0xffffU ; ocu[0 ] = (uint8_t )0x10U ; + u_ch =2 ; goto try_again; } goto error_out;
@@ -277,7 +287,7 @@ static int udf_CS0toNLS(struct nls_table *nls, struct ustr *utf_o, c = (c <<8 ) | ocu[i++]; len = nls->uni2char (c, &utf_o->u_name[utf_o->u_len], -UDF_NAME_LEN - utf_o->u_len); +UDF_NAME_LEN -2 - utf_o->u_len);/* Valid character? */ if (len >=0 ) utf_o->u_len += len;
@@ -295,15 +305,19 @@ static int udf_NLStoCS0(struct nls_table *nls, dstring *ocu, struct ustr *uni,int len;unsigned i, max_val;uint16_t uni_char; -int u_len; +int u_len, u_ch;memset (ocu,0 ,sizeof (dstring) * length); ocu[0 ] =8 ; max_val =0xffU ; + u_ch =1 ; try_again: u_len =0U ;for (i =0U ; i < uni->u_len; i++) { +/* Name didn't fit? */ +if (u_len +1 + u_ch >= length) +return 0 ; len = nls->char2uni (&uni->u_name[i], uni->u_len - i, &uni_char);if (!len)continue ;
@@ -316,6 +330,7 @@ try_again:if (uni_char > max_val) { max_val =0xffffU ; ocu[0 ] = (uint8_t )0x10U ; + u_ch =2 ; goto try_again; }
fs/xfs/libxfs/xfs_format.h +1 -1
@@ -786,7 +786,7 @@ typedef struct xfs_agfl {__be64 agfl_lsn;__be32 agfl_crc;__be32 agfl_bno[];/* actually XFS_AGFL_SIZE(mp) */ -} xfs_agfl_t; +} __attribute__((packed)) xfs_agfl_t;#define XFS_AGFL_CRC_OFF offsetof(struct xfs_agfl, agfl_crc)
fs/xfs/libxfs/xfs_inode_buf.c +7 -5
@@ -62,11 +62,12 @@ xfs_inobp_check(* has not had the inode cores stamped into it. Hence for readahead, the buffer * may be potentially invalid. * -* If the readahead buffer is invalid, we don't want to mark it with an error, -* but we do want to clear the DONE status of the buffer so that a followup read -* will re-read it from disk. This will ensure that we don't get an unnecessary -* warnings during log recovery and we don't get unnecssary panics on debug -* kernels. +* If the readahead buffer is invalid, we need to mark it with an error and +* clear the DONE status of the buffer so that a followup read will re-read it +* from disk. We don't report the error otherwise to avoid warnings during log +* recovery and we don't get unnecssary panics on debug kernels. We use EIO here +* because all we want to do is say readahead failed; there is no-one to report +* the error to, so this will distinguish it from a non-ra verifier failure. */ static void xfs_inode_buf_verify(
@@ -93,6 +94,7 @@ xfs_inode_buf_verify( XFS_RANDOM_ITOBP_INOTOBP))) {if (readahead) { bp->b_flags &= ~XBF_DONE ; +xfs_buf_ioerror (bp, -EIO );return ; }
fs/xfs/xfs_buf.c +17 -0
@@ -604,6 +604,13 @@ found: } } +/* +* Clear b_error if this is a lookup from a caller that doesn't expect +* valid data to be found in the buffer. +*/ +if (!(flags &XBF_READ )) +xfs_buf_ioerror (bp,0 ); +XFS_STATS_INC (target->bt_mount, xb_get);trace_xfs_buf_get (bp, flags, _RET_IP_);return bp;
@@ -1520,6 +1527,16 @@ xfs_wait_buftarg(LIST_HEAD (dispose);int loop =0 ; +/* +* We need to flush the buffer workqueue to ensure that all IO +* completion processing is 100% done. Just waiting on buffer locks is +* not sufficient for async IO as the reference count held over IO is +* not released until after the buffer lock is dropped. Hence we need to +* ensure here that all reference counts have been dropped before we +* start walking the LRU list. +*/ +drain_workqueue (btp->bt_mount->m_buf_workqueue); +/* loop until there is nothing left on the lru list. */ while (list_lru_count (&btp->bt_lru)) { list_lru_walk(&btp->bt_lru, xfs_buftarg_wait_rele,
fs/xfs/xfs_trans_ail.c +0 -1
@@ -497,7 +497,6 @@ xfsaild(long tout =0 ;/* milliseconds */ current->flags |=PF_MEMALLOC ; -set_freezable ();while (!kthread_should_stop ()) {if (tout && tout <=20 )
include/linux/compiler.h +1 -1
@@ -144,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);*/ #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )#define __trace_if (cond) \ - if (__builtin_constant_p((cond)) ? !!(cond) : \ + if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ({ \ int ______r; \ static struct ftrace_branch_data \
include/linux/devpts_fs.h +4 -0
@@ -19,6 +19,8 @@int devpts_new_index (struct inode *ptmx_inode);void devpts_kill_index (struct inode *ptmx_inode,int idx); +void devpts_add_ref (struct inode *ptmx_inode); +void devpts_del_ref (struct inode *ptmx_inode);/* mknod in devpts */ struct inode *devpts_pty_new (struct inode *ptmx_inode,dev_t device,int index,void *priv);
@@ -32,6 +34,8 @@ void devpts_pty_kill(struct inode *inode);/* Dummy stubs in the no-pty case */ static inline int devpts_new_index (struct inode *ptmx_inode) {return -EINVAL ; }static inline void devpts_kill_index (struct inode *ptmx_inode,int idx) { } +static inline void devpts_add_ref (struct inode *ptmx_inode) { } +static inline void devpts_del_ref (struct inode *ptmx_inode) { }static inline struct inode *devpts_pty_new (struct inode *ptmx_inode,dev_t device,int index,void *priv) {
include/linux/intel-iommu.h +3 -0
@@ -235,6 +235,9 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)/* low 64 bit */ #define dma_frcd_page_addr (d) (d & (((u64)-1) << PAGE_SHIFT)) +/* PRS_REG */ +#define DMA_PRS_PPR ((u32)1) +#define IOMMU_WAIT_OP (iommu, offset, op, cond, sts) \ do { \ cycles_t start_time = get_cycles(); \
include/linux/ptrace.h +23 -1
@@ -57,7 +57,29 @@ extern void exit_ptrace(struct task_struct *tracer, struct list_head *dead);#define PTRACE_MODE_READ 0x01#define PTRACE_MODE_ATTACH 0x02#define PTRACE_MODE_NOAUDIT 0x04 -/* Returns true on success, false on denial. */ +#define PTRACE_MODE_FSCREDS 0x08 +#define PTRACE_MODE_REALCREDS 0x10 + +/* shorthands for READ/ATTACH and FSCREDS/REALCREDS combinations */ +#define PTRACE_MODE_READ_FSCREDS (PTRACE_MODE_READ | PTRACE_MODE_FSCREDS) +#define PTRACE_MODE_READ_REALCREDS (PTRACE_MODE_READ | PTRACE_MODE_REALCREDS) +#define PTRACE_MODE_ATTACH_FSCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_FSCREDS) +#define PTRACE_MODE_ATTACH_REALCREDS (PTRACE_MODE_ATTACH | PTRACE_MODE_REALCREDS) + +/** +* ptrace_may_access - check whether the caller is permitted to access +* a target task. +* @task: target task +* @mode: selects type of access and caller credentials +* +* Returns true on success, false on denial. +* +* One of the flags PTRACE_MODE_FSCREDS and PTRACE_MODE_REALCREDS must +* be set in @mode to specify whether the access was requested through +* a filesystem syscall (should use effective capabilities and fsuid +* of the caller) or through an explicit syscall such as +* process_vm_writev or ptrace (and should use the real credentials). +*/ extern bool ptrace_may_access (struct task_struct *task,unsigned int mode);static inline int ptrace_reparented (struct task_struct *child)
include/linux/radix-tree.h +19 -3
@@ -370,12 +370,28 @@ void **radix_tree_next_chunk(struct radix_tree_root *root, struct radix_tree_iter *iter, unsigned flags);/** +* radix_tree_iter_retry - retry this chunk of the iteration +* @iter: iterator state +* +* If we iterate over a tree protected only by the RCU lock, a race +* against deletion or creation may result in seeing a slot for which +* radix_tree_deref_retry() returns true. If so, call this function +* and continue the iteration. +*/ +static inline __must_check +void **radix_tree_iter_retry (struct radix_tree_iter *iter) +{ + iter->next_index = iter->index; +return NULL ; +} + +/** * radix_tree_chunk_size - get current chunk size * * @iter: pointer to radix tree iterator * Returns: current chunk size */ -static __always_inline unsigned +static __always_inline long radix_tree_chunk_size (struct radix_tree_iter *iter) {return iter->next_index - iter->index;
@@ -409,9 +425,9 @@ radix_tree_next_slot(void **slot, struct radix_tree_iter *iter, unsigned flags)return slot + offset +1 ; } }else { -unsigned size =radix_tree_chunk_size (iter) -1 ; +long size =radix_tree_chunk_size (iter); -while (size--) { +while (--size >0 ) { slot++; iter->index++;if (likely (*slot))
include/linux/rmap.h +0 -14
@@ -108,20 +108,6 @@ static inline void put_anon_vma(struct anon_vma *anon_vma)__put_anon_vma (anon_vma); } -static inline void vma_lock_anon_vma (struct vm_area_struct *vma) -{ -struct anon_vma *anon_vma = vma->anon_vma; -if (anon_vma) -down_write (&anon_vma->root->rwsem); -} - -static inline void vma_unlock_anon_vma (struct vm_area_struct *vma) -{ -struct anon_vma *anon_vma = vma->anon_vma;
Lines of this file are not shown. View the raw message.
ipc/shm.c +43 -10
53 lines not on this page · raw message
lib/string_helpers.c +43 -20
63 lines not on this page · raw message
mm/mmap.c +54 -35
89 lines not on this page · raw message
net/sunrpc/xprtsock.c +21 -28
49 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.