Linux 3.2.72
I'm announcing the release of the 3.2.72 kernel.
All users of the 3.2 kernel series should upgrade.
The updated 3.2.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.2.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.2.71 is attached to this message.
Ben.
------------
Makefile | 2 +- arch/arm/Makefile | 8 + arch/arm/kernel/signal.c | 19 +- arch/mips/include/asm/pgtable.h | 31 +++ arch/mips/kernel/mips-mt-fpaff.c | 5 +- arch/parisc/kernel/irq.c | 8 +- arch/powerpc/platforms/powernv/pci.c | 4 +- arch/powerpc/sysdev/fsl_msi.c | 5 +- arch/powerpc/sysdev/mpic_pasemi_msi.c | 5 +-
arch/powerpc/sysdev/mpic_u3msi.c | 5 +- arch/powerpc/sysdev/ppc4xx_msi.c | 5 +- arch/s390/kernel/compat_signal.c | 30 ++-
arch/sparc/include/asm/visasm.h | 14 +- arch/sparc/lib/VISsave.S | 67 +------ arch/x86/crypto/ghash-clmulni-intel_glue.c | 1 + arch/x86/include/asm/desc.h | 15 -- arch/x86/include/asm/mmu.h | 3 +- arch/x86/include/asm/mmu_context.h | 49 ++++- arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/common.c | 4 +- arch/x86/kernel/entry_64.S | 11 + arch/x86/kernel/ldt.c | 267 ++++++++++++++----------- arch/x86/kernel/paravirt.c | 16 +- arch/x86/kernel/process_64.c | 4 +- arch/x86/kernel/step.c | 8 +- arch/x86/kernel/tsc.c | 17 +- arch/x86/kvm/mmu.c | 45 ----- arch/x86/kvm/x86.c | 2 + arch/x86/math-emu/fpu_entry.c | 3 +- arch/x86/math-emu/fpu_system.h | 21 +- arch/x86/math-emu/get_address.c | 3 +- arch/x86/power/cpu.c | 3 +- drivers/auxdisplay/ks0108.c | 1 + drivers/base/devres.c | 4 +- drivers/base/platform.c | 8 +- drivers/crypto/ixp4xx_crypto.c | 1 - drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/radeon/radeon_combios.c | 8 + drivers/gpu/drm/radeon/radeon_connectors.c | 5 + drivers/infiniband/core/uverbs.h | 3 +- drivers/infiniband/core/uverbs_cmd.c | 10 +- drivers/infiniband/core/uverbs_main.c | 43 ++-- drivers/infiniband/hw/mlx4/ah.c | 6 +- drivers/infiniband/hw/qib/qib.h | 4 + drivers/infiniband/hw/qib/qib_keys.c | 4 + drivers/infiniband/hw/qib/qib_verbs.c | 14 +- drivers/infiniband/hw/qib/qib_verbs.h | 2 + drivers/input/evdev.c | 13 +- drivers/macintosh/windfarm_core.c | 2 +- drivers/md/md.c | 4 +- drivers/md/persistent-data/dm-btree-internal.h | 6 + drivers/md/persistent-data/dm-btree-remove.c | 12 +- drivers/md/persistent-data/dm-btree-spine.c | 37 ++++ drivers/md/persistent-data/dm-btree.c | 7 +- drivers/md/raid1.c | 10 +- drivers/media/rc/rc-main.c | 3 - drivers/net/bonding/bond_main.c | 20 ++ drivers/net/virtio_net.c | 4 +- drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 2 +
drivers/of/address.c | 6 +- drivers/pci/access.c | 61 +++++- drivers/pci/quirks.c | 14 +-
drivers/scsi/libfc/fc_fcp.c | 19 +- drivers/scsi/libiscsi.c | 25 +-- drivers/spi/spi-pxa2xx.c | 4 + drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/target_core_device.c | 13 +- drivers/tty/serial/8250_pnp.c | 6 + drivers/usb/core/config.c | 5 +- drivers/usb/gadget/m66592-udc.c | 2 +- drivers/usb/host/ehci-fsl.c | 4 + drivers/usb/host/ehci-hub.c | 7 + drivers/usb/host/ehci-sysfs.c | 14 +- drivers/usb/host/ehci.h | 12 ++ drivers/usb/host/fsl-mph-dr-of.c | 4 + drivers/usb/host/xhci-mem.c | 6 +- drivers/usb/host/xhci-ring.c | 15 +- drivers/usb/host/xhci.c | 3 +- drivers/usb/serial/ftdi_sio.c | 4 + drivers/usb/serial/ftdi_sio_ids.h | 8 + drivers/usb/serial/option.c | 24 +++ drivers/usb/serial/sierra.c | 1 + drivers/usb/serial/whiteheat.c | 31 +++ drivers/xen/gntdev.c | 34 ++-- fs/btrfs/extent_io.c | 67 ++++++- fs/btrfs/inode.c | 3 +- fs/ceph/super.c | 8 +- fs/cifs/cifsencrypt.c | 52 ++++- fs/cifs/cifsfs.c | 4 +- fs/dcache.c | 10 + fs/ecryptfs/dentry.c | 32 +-- fs/ext4/super.c | 4 +- fs/gfs2/super.c | 6 +- fs/hfs/bnode.c | 9 +- fs/hfs/brec.c | 20 +- fs/hfs/super.c | 4 +- fs/hfsplus/bnode.c | 3 - fs/hfsplus/options.c | 4 +- fs/hostfs/hostfs_kern.c | 2 +- fs/jbd2/checkpoint.c | 39 +++- fs/jbd2/commit.c | 4 +- fs/jbd2/journal.c | 34 +++- fs/namei.c | 29 ++- fs/nfs/nfs4proc.c | 2 +- fs/ocfs2/dlm/dlmmaster.c | 7 +- fs/ocfs2/dlm/dlmrecovery.c | 6 +- fs/ocfs2/dlmglue.c | 10 +- fs/ocfs2/super.c | 4 +- fs/proc/task_mmu.c | 28 ++- fs/xfs/xfs_aops.c | 3 +- fs/xfs/xfs_attr_leaf.h | 11 +- fs/xfs/xfs_super.c | 4 +- include/linux/fsl_devices.h | 1 + include/linux/jbd2.h | 3 +- include/linux/pci.h | 2 + include/linux/seq_file.h | 35 ++++ include/net/ip.h | 1 + include/net/ip6_fib.h | 2 +-
ipc/msg.c | 18 +- ipc/sem.c | 40 ++-- ipc/shm.c | 13 +-
ipc/util.c | 8 +- kernel/cgroup.c | 7 +- kernel/events/core.c | 12 +- net/Kconfig | 2 +- net/core/datagram.c | 46 ++++- net/core/fib_rules.c | 14 +- net/core/pktgen.c | 4 +- net/ipv4/datagram.c | 16 +- net/ipv6/Makefile | 3 +- net/ipv6/addrconf.c | 17 +- net/ipv6/datagram.c | 20 +- net/ipv6/ip6_fib.c | 25 +--
net/ipv6/ip6mr.c | 2 +- net/ipv6/ndisc.c | 4 +- net/ipv6/route.c | 8 +- net/key/af_key.c | 46 ++---
net/mac80211/tx.c | 3 - net/rds/connection.c | 6 + net/rds/info.c | 2 +- net/sctp/output.c | 4 +- net/sctp/sm_sideeffect.c | 2 +- net/sunrpc/xprtsock.c | 2 + net/tipc/socket.c | 2 + scripts/kconfig/streamline_config.pl | 2 +- security/selinux/hooks.c | 2 +- sound/arm/Kconfig | 15 +- sound/soc/pxa/Kconfig | 2 - tools/perf/Makefile | 4 +- tools/perf/util/header.c | 22 +-
150 files changed, 1385 insertions(+), 681 deletions(-)
Adrien Schildknecht (1):
rtlwifi: rtl8192cu: Add new device ID
Alexei Potashnik (1):
target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT
Andrey Ryabinin (1):
crypto: ghash-clmulni: specify context size for ghash async algorithm
Andy Lutomirski (3):
x86/ldt: Make modify_ldt synchronous
x86/ldt: Further fix FPU emulation
x86/paravirt: Replace the paravirt nop with a bona fide empty function
Ard Biesheuvel (1):
ARM: 8429/1: disable GCC SRA optimization
Arnaldo Carvalho de Melo (1):
perf header: Fixup reading of HEADER_NRCPUS feature
Bart Van Assche (1):
libfc: Fix fc_fcp_cleanup_each_cmd()
Ben Hutchings (3):
ipv6: Fix build failure when CONFIG_INET disabled Revert "sctp: Fix race between OOTB responce and route removal" Linux 3.2.72
Benjamin Randazzo (1):
md: use kzalloc() when bitmap is disabled
Bjorn Helgaas (1):
PCI: Fix TI816X class code quirk
Bob Copeland (1):
mac80211: enable assoc check for mesh interfaces
Chris Wilson (1):
drm/i915: Always mark the object as dirty when used by the GPU
Christoph Hellwig (1):
IB/uverbs: reject invalid or unknown opcodes
Dan Carpenter (2):
rds: fix an integer overflow test in rds_info_getsockopt()
usb: gadget: m66592-udc: forever loop in set_feature()
David Ahern (1):
net: Fix RCU splat in af_key
David Daney (2):
MIPS: Make set_pte() SMP safe.
of/address: Don't loop forever in of_find_matching_node_by_address().
David Härdeman (1):
rc-core: fix remove uevent generation
David Jeffery (1):
xfs: return errors from partial I/O failures to files
David S. Miller (1):
sparc64: Fix userspace FPU register corruptions.
David Vrabel (1):
xen/gntdev: convert priv->lock to a mutex
David Woodhouse (1):
x86/platform: Fix Geode LX timekeeping in the generic x86 build
Dirk Behme (1):
USB: sierra: add 1199:68AB device ID
Eric Dumazet (1):
ipv6: lock socket in ip6_datagram_connect()
Eric W. Biederman (2):
dcache: Handle escaped paths in prepend_path
vfs: Test for and handle paths that are unreachable from their mnt_root
Felix Fietkau (1):
MIPS: Fix sched_getaffinity with MT FPAFF enabled
Filipe Manana (1):
Btrfs: fix read corruption of compressed and shared extents
Grant Likely (1):
drivercore: Fix unregistration path of platform devices
Helge Deller (1):
parisc: Filter out spurious interrupts in PA-RISC irq handler
Herbert Xu (4):
crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer
net: Clone skb before setting peeked flag
net: Fix skb_set_peeked use-after-free bug
net: Fix skb csum races when peeking
Herton R. Krzesinski (1):
ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits
Hin-Tak Leung (2):
hfs,hfsplus: cache pages correctly between bnode_create and bnode_free
hfs: fix B-tree corruption after insertion at position 0
Jan Kara (3):
jbd2: protect all log tail updates with j_checkpoint_mutex
xfs: Fix xfs_attr_leafblock definition
jbd2: avoid infinite loop when destroying aborted journal
Jason Wang (1):
virtio-net: drop NETIF_F_FRAGLIST
Jeff Mahoney (1):
btrfs: skip waiting on ordered range for special files
Jeffery Miller (1):
Add radeon suspend/resume quirk for HP Compaq dc5750.
Joe Thornber (1):
dm btree: add ref counting ops for the leaves of top level btrees
Johan Hovold (1):
USB: whiteheat: fix potential null-deref at probe
John Soni Jose (1):
libiscsi: Fix host busy blocking during connection teardown
Joseph Qi (2):
ocfs2: fix BUG in ocfs2_downconvert_thread_do_work() ocfs2/dlm: fix deadlock when dispatch assert master
Juergen Gross (2):
x86/ldt: Correct LDT access in single stepping logic x86/ldt: Correct FPU emulation access to LDT
Kees Cook (1):
fs: create and use seq_show_option for escaping
Kirill A. Shutemov (1):
perf tools: Fix build with perl 5.18
Konstantin Khlebnikov (1):
pagemap: hide physical addresses from non-privileged users
Linus Torvalds (1):
Initialize msg/shm IPC objects before doing ipc_addid()
Liu.Zhao (1):
USB: option: add ZTE PIDs
Maciej S. Szmigiero (1):
serial: 8250: bind to ALi Fast Infrared Controller (ALI5123)
Manfred Spraul (1):
ipc/sem.c: fully initialize sem_array before making it visible
Marcelo Leitner (1):
ipv6: addrconf: validate new MTU before applying it
Marek Marczykowski-Górecki (1):
xen/gntdevt: Fix race condition in gntdev_release()
Marek Vasut (1):
rtlwifi: rtl8192cu: Add new device ID
Mark Rustad (2):
PCI: Add dev_flags bit to access VPD through function 0
PCI: Add VPD function 0 quirk for Intel Ethernet devices
Martin Schwidefsky (1):
s390/compat: correct uc_sigmask of the compat signal frame
Masahiro Yamada (1):
devres: fix devres_get()
Mathias Nyman (4):
xhci: fix off by one error in TRB DMA address boundary check
usb: Use the USB_SS_MULT() macro to get the burst multiplier.
xhci: give command abortion one more chance before killing xhci
xhci: change xhci 1.0 only restrictions to support xhci 1.1
Matthijs Kooijman (1):
USB: ftdi_sio: Added custom PID for CustomWare products
Michal Kubeček (2):
ipv6: prevent fib6_run_gc() contention
ipv6: update ip6_rt_last_gc every time GC is run
Mike Marciniszyn (1):
IB/qib: Change lkey table allocation to support more MRs
NeilBrown (2):
md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies
NFSv4: don't set SETATTR for O_RDONLY|O_EXCL
Nikhil Badola (1):
drivers: usb: fsl: Workaround for USB erratum-A005275
Noa Osherovich (1):
IB/mlx4: Use correct SL on AH query under RoCE
Oleg Nesterov (1):
net: pktgen: fix race between pktgen_thread_worker() and kthread_stop()
Paolo Bonzini (1):
KVM: x86: trap AMD MSRs for the TSeg base and mask
Paul Bolle (1):
windfarm: decrement client count when unregistering
Paul Mackerras (1):
powerpc/MSI: Fix race condition in tearing down MSI interrupts
Peter Chen (1):
usb: host: ehci-sys: delete useless bus_to_hcd conversion
Peter Seiderer (1):
cifs: use server timestamp for ntlmv2 authentication
Peter Zijlstra (1):
perf: Fix fasync handling on inherited events
Richard Laing (1):
net/ipv6: Correct PIM6 mrt_lock handling
Richard Weinberger (1):
localmodconfig: Use Kbuild files too
Robert Jarzmik (1):
ASoC: fix broken pxa SoC support
Roger Quadros (1):
usb: xhci: Clear XHCI_STATE_DYING on start
Roland Dreier (1):
target: REPORT LUNS should return LUN 0 even for dynamic ACLs
Russell King (1):
ARM: fix Thumb2 signal handling when ARMv6 is enabled
Sasha Levin (1):
RDS: verify the underlying transport exists before creating a connection
Stephen Chandler Paul (1):
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd
Stephen Smalley (1):
net/tipc: initialize security state for new connection socket
Sudip Mukherjee (1):
auxdisplay: ks0108: fix refcount
T.J. Purtell (1):
ARM: 7880/1: Clear the IT state independent of the Thumb-2 mode
Takashi Iwai (1):
Input: evdev - do not report errors form flush()
Tan, Jui Nee (1):
spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
Thomas Graf (1):
pktgen: Require CONFIG_INET due to use of IPv4 checksum function
Trond Myklebust (1):
SUNRPC: xs_reset_transport must mark the connection as disconnected
Tyler Hicks (1):
eCryptfs: Invalidate dcache entries when lower i_nlink is zero
Wilson Kok (1):
fib_rules: fix fib rule dumps across multiple skbs
Xiao Guangrong (1):
KVM: MMU: fix validation of mmio page fault
Yishai Hadas (1):
IB/uverbs: Fix race between ib_uverbs_open and remove_one
dingtianhong (1):
bonding: correct the MAC address for "follow" fail_over_mac policy
lucien (1):
sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state
Signature · 2 lines
Ben Hutchings Anthony's Law of Force: Don't force it, get a larger hammer.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 2 -SUBLEVEL = 71 +SUBLEVEL = 72 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/Makefile +8 -0
@@ -53,6 +53,14 @@ endif comma = , +# +# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and +# later may result in code being generated that handles signed short and signed +# char struct members incorrectly. So disable it. +# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932) +# +KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) + # This selects which instruction set is used. # Note that GCC does not numerically define an architecture version # macro, but instead defines a whole series of macros which makes
arch/arm/kernel/signal.c +15 -4
@@ -486,12 +486,23 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,*/ thumb = handler &1 ; +#if __LINUX_ARM_ARCH__ >=6 +/* +* Clear the If-Then Thumb-2 execution state. ARM spec +* requires this to be all 000s in ARM mode. Snapdragon +* S4/Krait misbehaves on a Thumb=>ARM signal transition +* without this. +* +* We must do this whenever we are running on a Thumb-2 +* capable CPU, which includes ARMv6T2. However, we elect +* to do this whenever we're on an ARMv6 or later CPU for +* simplicity. +*/ + cpsr &= ~PSR_IT_MASK ; +#endif +if (thumb) { cpsr |=PSR_T_BIT ; -#if __LINUX_ARM_ARCH__ >=7 -/* clear the If-Then Thumb-2 execution state */ - cpsr &= ~PSR_IT_MASK ; -#endif }else cpsr &= ~PSR_T_BIT ; }
arch/mips/include/asm/pgtable.h +31 -0
@@ -153,8 +153,39 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)* Make sure the buddy is global too (if it's !none, * it better already be global) */ +#ifdef CONFIG_SMP +/* +* For SMP, multiple CPUs can race, so we need to do +* this atomically. +*/ +#ifdef CONFIG_64BIT +#define LL_INSN "lld" +#define SC_INSN "scd" +#else /* CONFIG_32BIT */ +#define LL_INSN "ll" +#define SC_INSN "sc" +#endif +unsigned long page_global = _PAGE_GLOBAL; +unsigned long tmp; + + __asm__ __volatile__ ( +" .set push\n" +" .set noreorder\n" +"1: " LL_INSN " %[tmp], %[buddy]\n" +" bnez %[tmp], 2f\n" +" or %[tmp], %[tmp], %[global]\n" +" " SC_INSN " %[tmp], %[buddy]\n" +" beqz %[tmp], 1b\n" +" nop\n" +"2:\n" +" .set pop" + : [buddy]"+m" (buddy->pte), + [tmp]"=&r" (tmp) + : [global]"r" (page_global)); +#else /* !CONFIG_SMP */ if (pte_none (*buddy))pte_val (*buddy) =pte_val (*buddy) | _PAGE_GLOBAL; +#endif /* CONFIG_SMP */ }#endif }
arch/mips/kernel/mips-mt-fpaff.c +3 -2
@@ -154,7 +154,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long __user *user_mask_ptr) {unsigned int real_len; -cpumask_t mask; +cpumask_t allowed, mask;int retval;struct task_struct *p;
@@ -173,7 +173,8 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,if (retval) goto out_unlock; -cpus_and (mask, p->thread.user_cpus_allowed, cpu_possible_map); +cpumask_or (&allowed, &p->thread.user_cpus_allowed, &p->cpus_allowed); +cpumask_and (&mask, &allowed, cpu_active_mask); out_unlock:read_unlock (&tasklist_lock);
arch/parisc/kernel/irq.c +6 -2
@@ -336,8 +336,8 @@ void do_cpu_irq_mask(struct pt_regs *regs)struct pt_regs *old_regs;unsigned long eirr_val;int irq, cpu =smp_processor_id (); -#ifdef CONFIG_SMP struct irq_desc *desc; +#ifdef CONFIG_SMP cpumask_t dest;#endif
@@ -350,8 +350,12 @@ void do_cpu_irq_mask(struct pt_regs *regs) goto set_out; irq =eirr_to_irq (eirr_val); -#ifdef CONFIG_SMP +/* Filter out spurious interrupts, mostly from serial port at bootup */ desc =irq_to_desc (irq); +if (unlikely (!desc->action)) + goto set_out; + +#ifdef CONFIG_SMP cpumask_copy (&dest, desc->irq_data.affinity);if (irqd_is_per_cpu (&desc->irq_data) && !cpu_isset (smp_processor_id (), dest)) {
arch/powerpc/platforms/powernv/pci.c +3 -1
@@ -130,6 +130,7 @@ static void pnv_teardown_msi_irqs(struct pci_dev *pdev)struct pci_controller *hose =pci_bus_to_host (pdev->bus);struct pnv_phb *phb = hose->private_data;struct msi_desc *entry; +irq_hw_number_t hwirq;if (WARN_ON (!phb))return ;
@@ -137,9 +138,10 @@ static void pnv_teardown_msi_irqs(struct pci_dev *pdev)list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -pnv_put_msi (phb,virq_to_hw (entry->irq));irq_dispose_mapping (entry->irq); +pnv_put_msi (phb, hwirq); } }#endif /* CONFIG_PCI_MSI */
arch/powerpc/sysdev/fsl_msi.c +3 -2
@@ -106,15 +106,16 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev) {struct msi_desc *entry;struct fsl_msi *msi_data; +irq_hw_number_t hwirq;list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq); msi_data =irq_get_chip_data (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_data->bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_data->bitmap, hwirq,1 ); }return ;
arch/powerpc/sysdev/mpic_pasemi_msi.c +3 -2
@@ -74,6 +74,7 @@ static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)static void pasemi_msi_teardown_msi_irqs (struct pci_dev *pdev) {struct msi_desc *entry; +irq_hw_number_t hwirq;pr_debug ("pasemi_msi_teardown_msi_irqs, pdev %p\n" , pdev);
@@ -81,10 +82,10 @@ static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, -virq_to_hw (entry->irq),ALLOC_CHUNK );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, hwirq,ALLOC_CHUNK ); }return ;
arch/powerpc/sysdev/mpic_u3msi.c +3 -2
@@ -124,15 +124,16 @@ static int u3msi_msi_check_device(struct pci_dev *pdev, int nvec, int type)static void u3msi_teardown_msi_irqs (struct pci_dev *pdev) {struct msi_desc *entry; +irq_hw_number_t hwirq;list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, hwirq,1 ); }return ;
arch/powerpc/sysdev/ppc4xx_msi.c +3 -2
@@ -114,16 +114,17 @@ void ppc4xx_teardown_msi_irqs(struct pci_dev *dev) {struct msi_desc *entry;struct ppc4xx_msi *msi_data = &ppc4xx_msi; +irq_hw_number_t hwirq;dev_dbg (&dev->dev,"PCIE-MSI: tearing down msi irqs\n" );list_for_each_entry (entry, &dev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_data->bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_data->bitmap, hwirq,1 ); } }
arch/s390/kernel/compat_signal.c +26 -4
@@ -52,6 +52,19 @@ typedef struct__u32 gprs_high[NUM_GPRS ]; } rt_sigframe32; +static inline void sigset_to_sigset32 (unsigned long *set64, +compat_sigset_word *set32) +{ + set32[0 ] = (compat_sigset_word ) set64[0 ]; + set32[1 ] = (compat_sigset_word)(set64[0 ] >>32 ); +} + +static inline void sigset32_to_sigset (compat_sigset_word *set32, +unsigned long *set64) +{ + set64[0 ] = (unsigned long ) set32[0 ] | ((unsigned long ) set32[1 ] <<32 ); +} +int copy_siginfo_to_user32 (compat_siginfo_t __user *to,siginfo_t *from) {int err;
@@ -361,12 +374,14 @@ asmlinkage long sys32_sigreturn(void) {struct pt_regs *regs =task_pt_regs (current);sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15 ]; +compat_sigset_t cset;sigset_t set;if (!access_ok (VERIFY_READ , frame,sizeof (*frame))) goto badframe; -if (__copy_from_user (&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) +if (__copy_from_user (&cset.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) goto badframe; +sigset32_to_sigset (cset.sig, set.sig);sigdelsetmask (&set, ~_BLOCKABLE);set_current_blocked (&set);if (restore_sigregs32 (regs, &frame->sregs))
@@ -383,6 +398,7 @@ asmlinkage long sys32_rt_sigreturn(void) {struct pt_regs *regs =task_pt_regs (current);rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15 ]; +compat_sigset_t cset;sigset_t set;stack_t st;__u32 ss_sp;
@@ -391,8 +407,9 @@ asmlinkage long sys32_rt_sigreturn(void)if (!access_ok (VERIFY_READ , frame,sizeof (*frame))) goto badframe; -if (__copy_from_user (&set, &frame->uc.uc_sigmask,sizeof (set))) +if (__copy_from_user (&cset, &frame->uc.uc_sigmask,sizeof (cset))) goto badframe; +sigset32_to_sigset (cset.sig, set.sig);sigdelsetmask (&set, ~_BLOCKABLE);set_current_blocked (&set);if (restore_sigregs32 (regs, &frame->uc.uc_mcontext))
@@ -464,13 +481,16 @@ static int setup_frame32(int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs * regs) { sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(sigframe32)); +compat_sigset_t cset; +if (!access_ok (VERIFY_WRITE , frame,sizeof (sigframe32))) goto give_sigsegv;if (frame == (void __user *)-1UL ) goto give_sigsegv; -if (__copy_to_user (&frame->sc.oldmask, &set->sig, _SIGMASK_COPY_SIZE32)) +sigset_to_sigset32 (set->sig, cset.sig); +if (__copy_to_user (&frame->sc.oldmask, &cset.sig, _SIGMASK_COPY_SIZE32)) goto give_sigsegv;if (save_sigregs32 (regs, &frame->sregs))
@@ -524,6 +544,7 @@ give_sigsegv:static int setup_rt_frame32 (int sig,struct k_sigaction *ka,siginfo_t *info,sigset_t *set,struct pt_regs * regs) { +compat_sigset_t cset;int err =0 ;rt_sigframe32 __user *frame =get_sigframe (ka, regs,sizeof (rt_sigframe32));if (!access_ok (VERIFY_WRITE , frame,sizeof (rt_sigframe32)))
@@ -536,6 +557,7 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, goto give_sigsegv;/* Create the ucontext. */ +sigset_to_sigset32 (set->sig, cset.sig); err |=__put_user (UC_EXTENDED , &frame->uc.uc_flags); err |=__put_user (0 , &frame->uc.uc_link); err |=__put_user (current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
@@ -544,7 +566,7 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, err |=__put_user (current->sas_ss_size, &frame->uc.uc_stack.ss_size); err |=save_sigregs32 (regs, &frame->uc.uc_mcontext); err |=save_sigregs_gprs_high (regs, frame->gprs_high); - err |=__copy_to_user (&frame->uc.uc_sigmask, set,sizeof (*set)); + err |=__copy_to_user (&frame->uc.uc_sigmask, &cset,sizeof (cset));if (err) goto give_sigsegv;
arch/sparc/include/asm/visasm.h +4 -10
@@ -28,18 +28,12 @@* Must preserve %o5 between VISEntryHalf and VISExitHalf */ #define VISEntryHalf \ - rd %fprs, %o5; \ - andcc %o5, FPRS_FEF, %g0; \ - be,pt %icc, 297f; \ - sethi %hi(298f), %g7; \ - sethi %hi(VISenterhalf), %g1; \ - jmpl %g1 + %lo(VISenterhalf), %g0; \ - or %g7, %lo(298f), %g7; \ - clr %o5; \ -297: wr %o5, FPRS_FEF, %fprs; \ -298: + VISEntry#define VISExitHalf \ + VISExit + +#define VISExitHalfFast \ wr %o5, 0, %fprs;#ifndef __ASSEMBLY__
arch/sparc/lib/VISsave.S +2 -65
76 lines not on this page · raw message
arch/x86/crypto/ghash-clmulni-intel_glue.c +1 -0
@@ -291,6 +291,7 @@ static struct ahash_alg ghash_async_alg = { .cra_name = "ghash", .cra_driver_name = "ghash-clmulni", .cra_priority = 400, + .cra_ctxsize = sizeof(struct ghash_async_ctx), .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC, .cra_blocksize = GHASH_BLOCK_SIZE, .cra_type = &crypto_ahash_type,
arch/x86/include/asm/desc.h +0 -15
@@ -277,21 +277,6 @@ static inline void clear_LDT(void)set_ldt (NULL ,0 ); } -/* -* load one particular LDT into the current CPU -*/ -static inline void load_LDT_nolock (mm_context_t *pc) -{ -set_ldt (pc->ldt, pc->size); -} - -static inline void load_LDT (mm_context_t *pc) -{ -preempt_disable (); -load_LDT_nolock (pc); -preempt_enable (); -} -static inline unsigned long get_desc_base (const struct desc_struct *desc) {return (unsigned )(desc->base0 | ((desc->base1) <<16 ) | ((desc->base2) <<24 ));
arch/x86/include/asm/mmu.h +1 -2
@@ -9,8 +9,7 @@* we put the segment information here. */ typedef struct { - void *ldt; - int size; + struct ldt_struct *ldt; #ifdef CONFIG_X86_64 /* True if mm supports a task running in 32 bit compatibility mode. */
arch/x86/include/asm/mmu_context.h +47 -2
67 lines not on this page · raw message
arch/x86/include/asm/msr-index.h +1 -0
@@ -159,6 +159,7 @@/* C1E active bits in int pending message */ #define K8_INTP_C1E_ACTIVE_MASK 0x18000000#define MSR_K8_TSEG_ADDR 0xc0010112 +#define MSR_K8_TSEG_MASK 0xc0010113#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000/* MtrrFixDramEn bit */ #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000/* MtrrFixDramModEn bit */ #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818/* Mask: RdMem|WrMem */
arch/x86/kernel/cpu/common.c +2 -2
@@ -1225,7 +1225,7 @@ void __cpuinit cpu_init(void)load_sp0 (t, ¤t->thread);set_tss_desc (cpu, t);load_TR_desc (); -load_LDT (&init_mm.context); +load_mm_ldt (&init_mm);clear_all_debug_regs ();dbg_restore_debug_regs ();
@@ -1273,7 +1273,7 @@ void __cpuinit cpu_init(void)load_sp0 (t, thread);set_tss_desc (cpu, t);load_TR_desc (); -load_LDT (&init_mm.context); +load_mm_ldt (&init_mm); t->x86_tss.io_bitmap_base = offsetof(struct tss_struct , io_bitmap);
arch/x86/kernel/entry_64.S +11 -0
@@ -1504,7 +1504,18 @@ END(error_exit) /* runs on exception stack */ ENTRY(nmi) INTR_FRAME + /* + * Fix up the exception frame if we're on Xen. + * PARAVIRT_ADJUST_EXCEPTION_FRAME is guaranteed to push at most + * one value to the stack on native, so it may clobber the rdx + * scratch slot, but it won't clobber any of the important + * slots past it. + * + * Xen is a different story, because the Xen frame itself overlaps + * the "NMI executing" variable. + */ PARAVIRT_ADJUST_EXCEPTION_FRAME + pushq_cfi $-1 subq $ORIG_RAX-R15, %rsp CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15
arch/x86/kernel/ldt.c +147 -120
345 lines not on this page · raw message
arch/x86/kernel/paravirt.c +12 -4
@@ -38,10 +38,18 @@#include <asm/tlbflush.h> #include <asm/timer.h> -/* nop stub */ -void _paravirt_nop (void ) -{ -} +/* +* nop stub, which must not clobber anything *including the stack* to +* avoid confusing the entry prologues. +*/ +extern void _paravirt_nop (void ); +asm (".pushsection .entry.text, \"ax\"\n" +".global _paravirt_nop\n" +"_paravirt_nop:\n\t" +"ret\n\t" +".size _paravirt_nop, . - _paravirt_nop\n\t" +".type _paravirt_nop, @function\n\t" +".popsection" );/* identity function, which can be inlined */ u32 _paravirt_ident_32 (u32 x)
arch/x86/kernel/process_64.c +2 -2
@@ -218,11 +218,11 @@ void __show_regs(struct pt_regs *regs, int all)void release_thread (struct task_struct *dead_task) {if (dead_task->mm) { -if (dead_task->mm->context.size) { +if (dead_task->mm->context.ldt) {printk ("WARNING: dead process %8s still has LDT? <%p/%d>\n" , dead_task->comm, dead_task->mm->context.ldt, - dead_task->mm->context.size); + dead_task->mm->context.ldt->size);BUG (); } }
arch/x86/kernel/step.c +5 -3
@@ -5,6 +5,7 @@#include <linux/mm.h> #include <linux/ptrace.h> #include <asm/desc.h> +#include <asm/mmu_context.h> unsigned long convert_ip_to_linear (struct task_struct *child,struct pt_regs *regs) {
@@ -27,13 +28,14 @@ unsigned long convert_ip_to_linear(struct task_struct *child, struct pt_regs *restruct desc_struct *desc;unsigned long base; - seg &= ~7UL ; + seg >>=3 ;mutex_lock (&child->mm->context.lock); -if (unlikely ((seg >>3 ) >= child->mm->context.size)) +if (unlikely (!child->mm->context.ldt || + seg >= child->mm->context.ldt->size)) addr =-1L ;/* bogus selector, access would fault */ else { - desc = child->mm->context.ldt + seg; + desc = &child->mm->context.ldt->entries[seg]; base =get_desc_base (desc);/* 16-bit code segment? */
arch/x86/kernel/tsc.c +10 -7
@@ -18,6 +18,7 @@#include <asm/hypervisor.h> #include <asm/nmi.h> #include <asm/x86_init.h> +#include <asm/geode.h> unsigned int __read_mostly cpu_khz;/* TSC clocks / usec, not used here */ EXPORT_SYMBOL (cpu_khz);
@@ -802,15 +803,17 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable);static void __init check_system_tsc_reliable (void ) { -#ifdef CONFIG_MGEODE_LX -/* RTSC counts during suspend */ +#if defined(CONFIG_MGEODEGX1 ) || defined(CONFIG_MGEODE_LX ) || defined(CONFIG_X86_GENERIC ) +if (is_geode_lx ()) { +/* RTSC counts during suspend */ #define RTSC_SUSP 0x100 -unsigned long res_low, res_high; +unsigned long res_low, res_high; -rdmsr_safe (MSR_GEODE_BUSCONT_CONF0 , &res_low, &res_high); -/* Geode_LX - the OLPC CPU has a very reliable TSC */ -if (res_low &RTSC_SUSP ) - tsc_clocksource_reliable =1 ; +rdmsr_safe (MSR_GEODE_BUSCONT_CONF0 , &res_low, &res_high); +/* Geode_LX - the OLPC CPU has a very reliable TSC */ +if (res_low &RTSC_SUSP ) + tsc_clocksource_reliable =1 ; + }#endif if (boot_cpu_has (X86_FEATURE_TSC_RELIABLE )) tsc_clocksource_reliable =1 ;
arch/x86/kvm/mmu.c +0 -45
69 lines not on this page · raw message
arch/x86/kvm/x86.c +2 -0
@@ -1885,6 +1885,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)case MSR_IA32_LASTINTFROMIP :case MSR_IA32_LASTINTTOIP :case MSR_K8_SYSCFG : +case MSR_K8_TSEG_ADDR : +case MSR_K8_TSEG_MASK :case MSR_K7_HWCR :case MSR_VM_HSAVE_PA :case MSR_P6_PERFCTR0 :
arch/x86/math-emu/fpu_entry.c +1 -2
@@ -28,7 +28,6 @@#include <linux/regset.h> #include <asm/uaccess.h> -#include <asm/desc.h> #include <asm/user.h> #include <asm/i387.h>
@@ -184,7 +183,7 @@ void math_emulate(struct math_emu_info *info)math_abort (FPU_info,SIGILL ); } - code_descriptor =LDT_DESCRIPTOR (FPU_CS ); + code_descriptor =FPU_get_ldt_descriptor (FPU_CS );if (SEG_D_SIZE (code_descriptor)) {/* The above test may be wrong, the book is not clear */ /* Segmented 32 bit protected mode */
arch/x86/math-emu/fpu_system.h +18 -3
@@ -16,9 +16,24 @@#include <linux/kernel.h> #include <linux/mm.h> -/* s is always from a cpu register, and the cpu does bounds checking -* during register load --> no further bounds checks needed */ -#define LDT_DESCRIPTOR (s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3]) +#include <asm/desc.h> +#include <asm/mmu_context.h> + +static inline struct desc_struct FPU_get_ldt_descriptor (unsigned seg) +{ +static struct desc_struct zero_desc; +struct desc_struct ret = zero_desc; + +#ifdef CONFIG_MODIFY_LDT_SYSCALL + seg >>=3 ; +mutex_lock (¤t->mm->context.lock); +if (current->mm->context.ldt && seg < current->mm->context.ldt->size) + ret = current->mm->context.ldt->entries[seg]; +mutex_unlock (¤t->mm->context.lock); +#endif +return ret; +} +#define SEG_D_SIZE (x) ((x).b & (3 << 21))#define SEG_G_BIT (x) ((x).b & (1 << 23))#define SEG_GRANULARITY (x) (((x).b & (1 << 23)) ? 4096 : 1)
arch/x86/math-emu/get_address.c +1 -2
@@ -20,7 +20,6 @@#include <linux/stddef.h> #include <asm/uaccess.h> -#include <asm/desc.h> #include "fpu_system.h" #include "exception.h"
@@ -158,7 +157,7 @@ static long pm_address(u_char FPU_modrm, u_char segment, addr->selector =PM_REG_ (segment); } - descriptor =LDT_DESCRIPTOR (PM_REG_ (segment)); + descriptor =FPU_get_ldt_descriptor (addr->selector); base_address =SEG_BASE_ADDR (descriptor); address = base_address + offset; limit = base_address
arch/x86/power/cpu.c +2 -1
@@ -21,6 +21,7 @@#include <asm/xcr.h> #include <asm/suspend.h> #include <asm/debugreg.h> +#include <asm/mmu_context.h> #ifdef CONFIG_X86_32 static struct saved_context saved_context;
@@ -147,7 +148,7 @@ static void fix_processor_context(void)syscall_init ();/* This sets MSR_*STAR and related */ #endif load_TR_desc ();/* This does ltr */ -load_LDT (¤t->active_mm->context);/* This does lldt */ +load_mm_ldt (current->active_mm);/* This does lldt */ }/**
drivers/auxdisplay/ks0108.c +1 -0
@@ -139,6 +139,7 @@ static int __init ks0108_init(void) ks0108_pardevice =parport_register_device (ks0108_parport,KS0108_NAME ,NULL ,NULL ,NULL ,PARPORT_DEV_EXCL ,NULL ); +parport_put_port (ks0108_parport);if (ks0108_pardevice ==NULL ) { printk(KERN_ERR KS0108_NAME ": ERROR: " "parport didn't register new device\n");
drivers/base/devres.c +2 -2
@@ -254,10 +254,10 @@ void * devres_get(struct device *dev, void *new_res,if (!dr) {add_dr (dev, &new_dr->node); dr = new_dr; - new_dr =NULL ; + new_res =NULL ; }spin_unlock_irqrestore (&dev->devres_lock, flags); -devres_free (new_dr); +devres_free (new_res);return dr->data; }
drivers/base/platform.c +2 -6
@@ -311,9 +311,7 @@ int platform_device_add(struct platform_device *pdev) failed:while (--i >=0 ) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); }
@@ -338,9 +336,7 @@ void platform_device_del(struct platform_device *pdev)for (i =0 ; i < pdev->num_resources; i++) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); } }
drivers/crypto/ixp4xx_crypto.c +0 -1
@@ -914,7 +914,6 @@ static int ablk_perform(struct ablkcipher_request *req, int encrypt) crypt->mode |=NPE_OP_NOT_IN_PLACE ;/* This was never tested by Intel * for more than one dst buffer, I think. */ -BUG_ON (req->dst->length < nbytes); req_ctx->dst =NULL ;if (!chainup_buffers (dev, req->dst, nbytes, &dst_hook, flags,DMA_FROM_DEVICE ))
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
@@ -950,13 +950,13 @@ i915_gem_execbuffer_move_to_active(struct list_head *objects,u32 old_write = obj->base.write_domain; + obj->dirty =1 ;/* be paranoid */ obj->base.read_domains = obj->base.pending_read_domains; obj->base.write_domain = obj->base.pending_write_domain; obj->fenced_gpu_access = obj->pending_fenced_gpu_access;i915_gem_object_move_to_active (obj, ring, seqno);if (obj->base.write_domain) { - obj->dirty =1 ; obj->pending_gpu_write = true;list_move_tail (&obj->gpu_write_list, &ring->gpu_write_list);
drivers/gpu/drm/radeon/radeon_combios.c +8 -0
@@ -3399,6 +3399,14 @@ void radeon_combios_asic_init(struct drm_device *dev) rdev->pdev->subsystem_device == 0x30ae)return ; +/* quirk for rs4xx HP Compaq dc5750 Small Form Factor to make it resume +* - it hangs on resume inside the dynclk 1 table. +*/ +if (rdev->family ==CHIP_RS480 && + rdev->pdev->subsystem_vendor ==0x103c && + rdev->pdev->subsystem_device ==0x280a ) +return ; +/* DYN CLK 1 */ table =combios_get_table_offset (dev,COMBIOS_DYN_CLK_1_TABLE );if (table)
drivers/gpu/drm/radeon/radeon_connectors.c +5 -0
@@ -82,6 +82,11 @@ void radeon_connector_hotplug(struct drm_connector *connector)if (!radeon_hpd_sense (rdev, radeon_connector->hpd.hpd)) {drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); }else if (radeon_dp_needs_link_train (radeon_connector)) { +/* Don't try to start link training before we +* have the dpcd */ +if (!radeon_dp_getdpcd (radeon_connector)) +return ; +/* set it to OFF so that drm_helper_connector_dpms() * won't return immediately since the current state * is ON at this point.
drivers/infiniband/core/uverbs.h +2 -1
@@ -69,7 +69,7 @@*/ struct ib_uverbs_device { -struct kref ref; +atomic_t refcount;int num_comp_vectors;struct completion comp;struct device *dev;
@@ -78,6 +78,7 @@ struct ib_uverbs_device {struct cdev cdev;struct rb_root xrcd_tree;struct mutex xrcd_tree_mutex; +struct kobject kobj; };struct ib_uverbs_event_file {
drivers/infiniband/core/uverbs_cmd.c +9 -1
@@ -1979,6 +1979,12 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, next->send_flags = user_wr->send_flags;if (is_ud) { +if (next->opcode !=IB_WR_SEND && + next->opcode !=IB_WR_SEND_WITH_IMM ) { + ret = -EINVAL ; + goto out_put; + } + next->wr.ud.ah =idr_read_ah (user_wr->wr.ud.ah, file->ucontext);if (!next->wr.ud.ah) {
@@ -2015,9 +2021,11 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, user_wr->wr.atomic.compare_add; next->wr.atomic.swap = user_wr->wr.atomic.swap; next->wr.atomic.rkey = user_wr->wr.atomic.rkey; +case IB_WR_SEND :break ;default : -break ; + ret = -EINVAL ; + goto out_put; } }
drivers/infiniband/core/uverbs_main.c +30 -13
125 lines not on this page · raw message
drivers/infiniband/hw/mlx4/ah.c +5 -1
@@ -169,9 +169,13 @@ int mlx4_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr)enum rdma_link_layer ll;memset (ah_attr,0 ,sizeof *ah_attr); - ah_attr->sl =be32_to_cpu (ah->av.ib.sl_tclass_flowlabel) >>28 ; ah_attr->port_num =be32_to_cpu (ah->av.ib.port_pd) >>24 ; ll =rdma_port_get_link_layer (ibah->device, ah_attr->port_num); +if (ll ==IB_LINK_LAYER_ETHERNET ) + ah_attr->sl =be32_to_cpu (ah->av.eth.sl_tclass_flowlabel) >>29 ; +else + ah_attr->sl =be32_to_cpu (ah->av.ib.sl_tclass_flowlabel) >>28 ; + ah_attr->dlid = ll ==IB_LINK_LAYER_INFINIBAND ?be16_to_cpu (ah->av.ib.dlid) :0 ;if (ah->av.ib.stat_rate) ah_attr->static_rate = ah->av.ib.stat_rate -MLX4_STAT_RATE_OFFSET ;
drivers/infiniband/hw/qib/qib.h +4 -0
@@ -1421,6 +1421,10 @@ extern struct mutex qib_mutex; qib_get_unit_name((dd)->unit), ##__VA_ARGS__); \ } while (0) +#define qib_dev_warn (dd, fmt, ...) \ + dev_warn(&(dd)->pcidev->dev, "%s: " fmt, \ + qib_get_unit_name((dd)->unit), ##__VA_ARGS__) +#define qib_dev_porterr (dd, port, fmt, ...) \ do { \ dev_err(&(dd)->pcidev->dev, "%s: IB%u:%u " fmt, \
drivers/infiniband/hw/qib/qib_keys.c +4 -0
@@ -69,6 +69,10 @@ int qib_alloc_lkey(struct qib_lkey_table *rkt, struct qib_mregion *mr)* unrestricted LKEY. */ rkt->gen++; +/* +* bits are capped in qib_verbs.c to insure enough bits +* for generation number +*/ mr->lkey = (r << (32 - ib_qib_lkey_table_size)) | ((((1 << (24 - ib_qib_lkey_table_size)) -1 ) & rkt->gen) <<8 );
drivers/infiniband/hw/qib/qib_verbs.c +10 -4
@@ -40,6 +40,7 @@#include <linux/rculist.h> #include <linux/mm.h> #include <linux/random.h> +#include <linux/vmalloc.h> #include "qib.h" #include "qib_common.h"
@@ -2035,10 +2036,16 @@ int qib_register_ib_device(struct qib_devdata *dd)* the LKEY). The remaining bits act as a generation number or tag. */ spin_lock_init (&dev->lk_table.lock); +/* insure generation is at least 4 bits see keys.c */ +if (ib_qib_lkey_table_size >MAX_LKEY_TABLE_BITS ) { +qib_dev_warn (dd,"lkey bits %u too large, reduced to %u\n" , + ib_qib_lkey_table_size,MAX_LKEY_TABLE_BITS ); + ib_qib_lkey_table_size =MAX_LKEY_TABLE_BITS ; + } dev->lk_table.max =1 << ib_qib_lkey_table_size; lk_tab_size = dev->lk_table.max *sizeof (*dev->lk_table.table); dev->lk_table.table = (struct qib_mregion **) -__get_free_pages (GFP_KERNEL ,get_order (lk_tab_size)); +vmalloc (lk_tab_size);if (dev->lk_table.table ==NULL ) { ret = -ENOMEM ; goto err_lk;
@@ -2208,7 +2215,7 @@ err_tx:sizeof (struct qib_pio_header ), dev->pio_hdrs, dev->pio_hdrs_phys); err_hdrs: -free_pages ((unsigned long ) dev->lk_table.table,get_order (lk_tab_size)); +vfree (dev->lk_table.table); err_lk:kfree (dev->qp_table); err_qpt:
@@ -2262,7 +2269,6 @@ void qib_unregister_ib_device(struct qib_devdata *dd)sizeof (struct qib_pio_header ), dev->pio_hdrs, dev->pio_hdrs_phys); lk_tab_size = dev->lk_table.max *sizeof (*dev->lk_table.table); -free_pages ((unsigned long ) dev->lk_table.table, -get_order (lk_tab_size)); +vfree (dev->lk_table.table);kfree (dev->qp_table); }
drivers/infiniband/hw/qib/qib_verbs.h +2 -0
@@ -622,6 +622,8 @@ struct qib_qpn_table {struct qpn_map map[QPNMAP_ENTRIES ]; }; +#define MAX_LKEY_TABLE_BITS 23 +struct qib_lkey_table {spinlock_t lock;/* protect changes in this struct */ u32 next;/* next unused index (speeds search) */
drivers/input/evdev.c +4 -9
@@ -126,19 +126,14 @@ static int evdev_flush(struct file *file, fl_owner_t id) {struct evdev_client *client = file->private_data;struct evdev *evdev = client->evdev; -int retval; - retval =mutex_lock_interruptible (&evdev->mutex); -if (retval) -return retval; +mutex_lock (&evdev->mutex); -if (!evdev->exist) - retval = -ENODEV ; -else - retval =input_flush_device (&evdev->handle, file); +if (evdev->exist) +input_flush_device (&evdev->handle, file);mutex_unlock (&evdev->mutex); -return retval; +return 0 ; }static void evdev_free (struct device *dev)
drivers/macintosh/windfarm_core.c +1 -1
@@ -421,7 +421,7 @@ int wf_unregister_client(struct notifier_block *nb) {mutex_lock (&wf_lock);blocking_notifier_chain_unregister (&wf_client_list, nb); - wf_client_count++; + wf_client_count--;if (wf_client_count ==0 )wf_stop_thread ();mutex_unlock (&wf_lock);
drivers/md/md.c +2 -2
@@ -5384,9 +5384,9 @@ static int get_bitmap_file(struct mddev * mddev, void __user * arg)int err = -ENOMEM ;if (md_allow_write (mddev)) - file =kmalloc (sizeof (*file),GFP_NOIO ); + file =kzalloc (sizeof (*file),GFP_NOIO );else - file =kmalloc (sizeof (*file),GFP_KERNEL ); + file =kzalloc (sizeof (*file),GFP_KERNEL );if (!file) goto out;
drivers/md/persistent-data/dm-btree-internal.h +6 -0
@@ -134,4 +134,10 @@ int lower_bound(struct btree_node *n, uint64_t key);extern struct dm_block_validator btree_node_validator; +/* +* Value type for upper levels of multi-level btrees. +*/ +extern void init_le64_type (struct dm_transaction_manager *tm, +struct dm_btree_value_type *vt); +#endif /* DM_BTREE_INTERNAL_H */
drivers/md/persistent-data/dm-btree-remove.c +3 -9
@@ -544,14 +544,6 @@ static int remove_raw(struct shadow_spine *s, struct dm_btree_info *info,return r; } -static struct dm_btree_value_type le64_type = { - .context =NULL , - .size =sizeof (__le64), - .inc =NULL , - .dec =NULL , - .equal =NULL -}; -int dm_btree_remove (struct dm_btree_info *info,dm_block_t root,uint64_t *keys,dm_block_t *new_root) {
@@ -559,12 +551,14 @@ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,int index =0 , r =0 ;struct shadow_spine spine;struct btree_node *n; +struct dm_btree_value_type le64_vt; +init_le64_type (info->tm, &le64_vt);init_shadow_spine (&spine, info);for (level =0 ; level < info->levels; level++) { r =remove_raw (&spine, info, (level == last_level ? - &info->value_type : &le64_type), + &info->value_type : &le64_vt), root, keys[level], (unsigned *)&index);if (r <0 )break ;
drivers/md/persistent-data/dm-btree-spine.c +37 -0
@@ -242,3 +242,40 @@ int shadow_root(struct shadow_spine *s) {return s->root; } + +static void le64_inc (void *context,void *value_le) +{ +struct dm_transaction_manager *tm = context; +__le64 v_le; + +memcpy (&v_le, value_le,sizeof (v_le)); +dm_tm_inc (tm,le64_to_cpu (v_le)); +} + +static void le64_dec (void *context,void *value_le) +{ +struct dm_transaction_manager *tm = context; +__le64 v_le; + +memcpy (&v_le, value_le,sizeof (v_le)); +dm_tm_dec (tm,le64_to_cpu (v_le)); +} + +static int le64_equal (void *context,void *value1_le,void *value2_le) +{ +__le64 v1_le, v2_le; + +memcpy (&v1_le, value1_le,sizeof (v1_le)); +memcpy (&v2_le, value2_le,sizeof (v2_le)); +return v1_le == v2_le; +} + +void init_le64_type (struct dm_transaction_manager *tm, +struct dm_btree_value_type *vt) +{ + vt->context = tm; + vt->size =sizeof (__le64); + vt->inc = le64_inc; + vt->dec = le64_dec; + vt->equal = le64_equal; +}
drivers/md/persistent-data/dm-btree.c +1 -6
@@ -647,12 +647,7 @@ static int insert(struct dm_btree_info *info, dm_block_t root,struct btree_node *n;struct dm_btree_value_type le64_type; - le64_type.context =NULL ; - le64_type.size =sizeof (__le64); - le64_type.inc =NULL ; - le64_type.dec =NULL ; - le64_type.equal =NULL ; - +init_le64_type (info->tm, &le64_type);init_shadow_spine (&spine, info);for (level =0 ; level < (info->levels -1 ); level++) {
drivers/md/raid1.c +6 -4
@@ -1208,6 +1208,7 @@ static void error(struct mddev *mddev, struct md_rdev *rdev) {char b[BDEVNAME_SIZE ];struct r1conf *conf = mddev->private; +unsigned long flags;/* * If it is not operational, then we have already marked it as dead
@@ -1227,14 +1228,13 @@ static void error(struct mddev *mddev, struct md_rdev *rdev)return ; }set_bit (Blocked, &rdev->flags); +spin_lock_irqsave (&conf->device_lock, flags);if (test_and_clear_bit (In_sync, &rdev->flags)) { -unsigned long flags; -spin_lock_irqsave (&conf->device_lock, flags); mddev->degraded++;set_bit (Faulty, &rdev->flags); -spin_unlock_irqrestore (&conf->device_lock, flags); }else set_bit (Faulty, &rdev->flags); +spin_unlock_irqrestore (&conf->device_lock, flags);/* * if recovery is running, make sure it aborts. */
@@ -1292,7 +1292,10 @@ static int raid1_spare_active(struct mddev *mddev)* Find all failed disks within the RAID1 configuration * and mark them readable. * Called under mddev lock, so rcu protection not needed. +* device_lock used to avoid races with raid1_end_read_request +* which expects 'In_sync' flags and ->degraded to be consistent. */ +spin_lock_irqsave (&conf->device_lock, flags);for (i =0 ; i < conf->raid_disks; i++) {struct md_rdev *rdev = conf->mirrors[i].rdev; if (rdev
@@ -1302,7 +1305,6 @@ static int raid1_spare_active(struct mddev *mddev)sysfs_notify_dirent_safe (rdev->sysfs_state); } } -spin_lock_irqsave (&conf->device_lock, flags); mddev->degraded -= count;spin_unlock_irqrestore (&conf->device_lock, flags);
drivers/media/rc/rc-main.c +0 -3
@@ -945,9 +945,6 @@ static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env) {struct rc_dev *dev =to_rc_dev (device); -if (!dev || !dev->input_dev) -return -ENODEV ; -if (dev->rc_map.name)ADD_HOTPLUG_VAR ("NAME=%s" , dev->rc_map.name);if (dev->driver_name)
drivers/net/bonding/bond_main.c +20 -0
@@ -861,6 +861,23 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, } } +static struct slave *bond_get_old_active (struct bonding *bond, +struct slave *new_active) +{ +struct slave *slave; +int i; + +bond_for_each_slave (bond, slave, i) { +if (slave == new_active) +continue ; + +if (!compare_ether_addr (bond->dev->dev_addr, slave->dev->dev_addr)) +return slave; + } + +return NULL ; +} +/* * bond_do_fail_over_mac *
@@ -898,6 +915,9 @@ static void bond_do_fail_over_mac(struct bonding *bond,write_unlock_bh (&bond->curr_slave_lock);read_unlock (&bond->lock); +if (!old_active) + old_active =bond_get_old_active (bond, new_active); +if (old_active) {memcpy (tmp_mac, new_active->dev->dev_addr,ETH_ALEN ); memcpy(saddr.sa_data, old_active->dev->dev_addr,
drivers/net/virtio_net.c +2 -2
@@ -981,9 +981,9 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->hw_features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->hw_features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (csum) - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->hw_features |=NETIF_F_TSO |NETIF_F_UFO
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +2 -0
@@ -313,6 +313,8 @@ static struct usb_device_id rtl8192c_usb_ids[] = { {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/ {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/ {RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/ + {RTL_USB_DEVICE(0x0846, 0x9043, rtl92cu_hal_cfg)}, /*NG WNA1000Mv2*/ + {RTL_USB_DEVICE(0x0b05, 0x17ba, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/ {RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/ {RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/ {RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
drivers/of/address.c +3 -3
@@ -604,10 +604,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from,struct resource res;while (dn) { -if (of_address_to_resource (dn,0 , &res)) -continue ; -if (res.start == base_address) +if (!of_address_to_resource (dn,0 , &res) && + res.start == base_address)return dn; + dn =of_find_matching_node (dn, matches); }
drivers/pci/access.c +60 -1
78 lines not on this page · raw message
drivers/pci/quirks.c +12 -2
@@ -1941,6 +1941,15 @@ static void __devinit quirk_netmos(struct pci_dev *dev) }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_NETMOS ,PCI_ANY_ID , quirk_netmos); +static void quirk_f0_vpd_link (struct pci_dev *dev) +{ +if ((dev->class >>8 ) !=PCI_CLASS_NETWORK_ETHERNET || + !dev->multifunction || !PCI_FUNC (dev->devfn)) +return ; + dev->dev_flags |=PCI_DEV_FLAGS_VPD_REF_F0 ; +} +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID , quirk_f0_vpd_link); +static void __devinit quirk_e100_interrupt (struct pci_dev *dev) {u16 command, pmcsr;
@@ -2875,8 +2884,9 @@ static void __devinit fixup_ti816x_class(struct pci_dev* dev) {/* TI 816x devices do not have class code set when in PCIe boot mode */ if (dev->class ==PCI_CLASS_NOT_DEFINED ) { -dev_info (&dev->dev,"Setting PCI class for 816x PCIe device\n" ); - dev->class =PCI_CLASS_MULTIMEDIA_VIDEO ; + dev->class =PCI_CLASS_MULTIMEDIA_VIDEO <<8 ; +dev_info (&dev->dev,"PCI class overridden (%#08x -> %#08x)\n" , +PCI_CLASS_NOT_DEFINED , dev->class); } }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_TI ,0xb800 , fixup_ti816x_class);
drivers/scsi/libfc/fc_fcp.c +17 -2
@@ -1029,11 +1029,26 @@ restart:fc_fcp_pkt_hold (fsp);spin_unlock_irqrestore (&si->scsi_queue_lock, flags); -if (!fc_fcp_lock_pkt (fsp)) { +spin_lock_bh (&fsp->scsi_pkt_lock); +if (!(fsp->state &FC_SRB_COMPL )) { + fsp->state |=FC_SRB_COMPL ; +/* +* TODO: dropping scsi_pkt_lock and then reacquiring +* again around fc_fcp_cleanup_cmd() is required, +* since fc_fcp_cleanup_cmd() calls into +* fc_seq_set_resp() and that func preempts cpu using +* schedule. May be schedule and related code should be +* removed instead of unlocking here to avoid scheduling +* while atomic bug. +*/ +spin_unlock_bh (&fsp->scsi_pkt_lock); +fc_fcp_cleanup_cmd (fsp, error); + +spin_lock_bh (&fsp->scsi_pkt_lock);fc_io_compl (fsp); -fc_fcp_unlock_pkt (fsp); } +spin_unlock_bh (&fsp->scsi_pkt_lock);fc_fcp_pkt_release (fsp);spin_lock_irqsave (&si->scsi_queue_lock, flags);
drivers/scsi/libiscsi.c +2 -23
@@ -2906,10 +2906,10 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) {struct iscsi_conn *conn = cls_conn->dd_data;struct iscsi_session *session = conn->session; -unsigned long flags;del_timer_sync (&conn->transport_timer); +mutex_lock (&session->eh_mutex);spin_lock_bh (&session->lock); conn->c_stage =ISCSI_CONN_CLEANUP_WAIT ;if (session->leadconn == conn) {
@@ -2921,28 +2921,6 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) }spin_unlock_bh (&session->lock); -/* -* Block until all in-progress commands for this connection -* time out or fail. -*/ -for (;;) { -spin_lock_irqsave (session->host->host_lock, flags); -if (!session->host->host_busy) {/* OK for ERL == 0 */ -spin_unlock_irqrestore (session->host->host_lock, flags); -break ; - } -spin_unlock_irqrestore (session->host->host_lock, flags); -msleep_interruptible (500 ); -iscsi_conn_printk (KERN_INFO , conn,"iscsi conn_destroy(): " -"host_busy %d host_failed %d\n" , - session->host->host_busy, - session->host->host_failed); -/* -* force eh_abort() to unblock -*/ -wake_up (&conn->ehwait); - } -/* flush queued up work because we free the connection below */ iscsi_suspend_tx (conn);
@@ -2955,6 +2933,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)if (session->leadconn == conn) session->leadconn =NULL ;spin_unlock_bh (&session->lock); +mutex_unlock (&session->eh_mutex);iscsi_destroy_conn (cls_conn); }
drivers/spi/spi-pxa2xx.c +4 -0
@@ -799,6 +799,10 @@ static irqreturn_t ssp_int(int irq, void *dev_id)if (!(sccr1_reg &SSCR1_TIE )) mask &= ~SSSR_TFS ; +/* Ignore RX timeout interrupt if it is disabled */ +if (!(sccr1_reg &SSCR1_TINTE )) + mask &= ~SSSR_TINT ; +if (!(status & mask))return IRQ_NONE ;
drivers/target/iscsi/iscsi_target.c +1 -1
@@ -979,7 +979,7 @@ static int iscsit_handle_scsi_cmd(if (cmd->targ_xfer_tag ==0xFFFFFFFF ) cmd->targ_xfer_tag = conn->sess->targ_xfer_tag++;spin_unlock_bh (&conn->sess->ttt_lock); - }else if (hdr->flags &ISCSI_FLAG_CMD_WRITE ) + }else cmd->targ_xfer_tag =0xFFFFFFFF ; cmd->cmd_sn = hdr->cmdsn; cmd->exp_stat_sn = hdr->exp_statsn;
drivers/target/target_core_device.c +9 -4
@@ -668,11 +668,8 @@ int target_report_luns(struct se_task *se_task)* coming via a target_core_mod PASSTHROUGH op, and not through * a $FABRIC_MOD. In that case, report LUN=0 only. */ -if (!se_sess) { -int_to_scsilun (0 , (struct scsi_lun *)&buf[offset]); - lun_count =1 ; +if (!se_sess) goto done; - }spin_lock_irq (&se_sess->se_node_acl->device_list_lock);for (i =0 ; i <TRANSPORT_MAX_LUNS_PER_TPG ; i++) {
@@ -699,6 +696,14 @@ int target_report_luns(struct se_task *se_task)* See SPC3 r07, page 159. */ done: +/* +* If no LUNs are accessible, report virtual LUN 0. +*/ +if (lun_count ==0 ) { +int_to_scsilun (0 , (struct scsi_lun *)&buf[offset]); + lun_count =1 ; + } + lun_count *=8 ; buf[0 ] = ((lun_count >>24 ) &0xff ); buf[1 ] = ((lun_count >>16 ) &0xff );
drivers/tty/serial/8250_pnp.c +6 -0
@@ -42,6 +42,12 @@ static const struct pnp_device_id pnp_dev_table[] = { { "AEI1240", 0 },/* Rockwell 56K ACF II Fax+Data+Voice Modem */ { "AKY1021", 0 /*SPCI_FL_NO_SHIRQ*/ }, +/* +* ALi Fast Infrared Controller +* Native driver (ali-ircc) is broken so at least +* it can be used with irtty-sir. +*/ + { "ALI5123", 0 },/* AZT3005 PnP SOUND DEVICE */ { "AZT4001", 0 },/* Best Data Products Inc. Smart One 336F PnP Modem */
drivers/usb/core/config.c +3 -2
@@ -114,7 +114,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, cfgno, inum, asnum, ep->desc.bEndpointAddress); ep->ss_ep_comp.bmAttributes =16 ; }else if (usb_endpoint_xfer_isoc (&ep->desc) && - desc->bmAttributes >2 ) { +USB_SS_MULT (desc->bmAttributes) >3 ) { dev_warn(ddev, "Isoc endpoint has Mult of %d in " "config %d interface %d altsetting %d ep %d: " "setting to 3\n", desc->bmAttributes + 1,
@@ -123,7 +123,8 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, }if (usb_endpoint_xfer_isoc (&ep->desc)) - max_tx = (desc->bMaxBurst +1 ) * (desc->bmAttributes +1 ) * + max_tx = (desc->bMaxBurst +1 ) * + (USB_SS_MULT (desc->bmAttributes)) *usb_endpoint_maxp (&ep->desc);else if (usb_endpoint_xfer_int (&ep->desc)) max_tx = usb_endpoint_maxp(&ep->desc) *
drivers/usb/gadget/m66592-udc.c +1 -1
@@ -1052,7 +1052,7 @@ static void set_feature(struct m66592 *m66592, struct usb_ctrlrequest *ctrl) tmp =m66592_read (m66592,M66592_INTSTS0 ) &M66592_CTSQ ;udelay (1 ); - }while (tmp !=M66592_CS_IDST || timeout-- >0 ); + }while (tmp !=M66592_CS_IDST && timeout-- >0 );if (tmp ==M66592_CS_IDST ) m66592_bset(m66592,
drivers/usb/host/ehci-fsl.c +4 -0
@@ -272,6 +272,10 @@ static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)out_be32 (non_ehci +FSL_SOC_USB_SNOOP2 ,0x80000000 |SNOOP_SIZE_2GB );#endif +/* Deal with USB erratum A-005275 */ +if (pdata->has_fsl_erratum_a005275 ==1 ) + ehci->has_fsl_hs_errata =1 ; +if ((pdata->operating_mode ==FSL_USB2_DR_HOST ) || (pdata->operating_mode ==FSL_USB2_DR_OTG ))ehci_fsl_setup_phy (ehci, pdata->phy_mode,0 );
drivers/usb/host/ehci-hub.c +7 -0
@@ -1049,6 +1049,13 @@ static int ehci_hub_control (*/ ehci->reset_done [wIndex] = jiffies +msecs_to_jiffies (50 ); + +/* +* Force full-speed connect for FSL high-speed +* erratum; disable HS Chirp by setting PFSC bit +*/ +if (ehci_has_fsl_hs_errata (ehci)) + temp |= (1 <<PORTSC_FSL_PFSC ); }ehci_writel (ehci, temp, status_reg);break ;
drivers/usb/host/ehci-sysfs.c +10 -4
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,int count =PAGE_SIZE ;char *ptr = buf; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); nports =HCS_N_PORTS (ehci->hcs_params);for (index =0 ; index < nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,struct ehci_hcd *ehci;int portnum, new_owner; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); new_owner =PORT_OWNER ;/* Owned by companion */ if (sscanf (buf,"%d" , &portnum) !=1 )return -EINVAL ;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,struct ehci_hcd *ehci;int n; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); n =scnprintf (buf,PAGE_SIZE ,"%d\n" , ehci->uframe_periodic_max);return n; }
@@ -102,7 +102,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,unsigned long flags;ssize_t ret; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev));if (kstrtouint (buf,0 , &uframe_periodic_max) <0 )return -EINVAL ;
@@ -167,6 +167,9 @@ static inline int create_sysfs_files(struct ehci_hcd *ehci)struct device *controller =ehci_to_hcd (ehci)->self.controller;int i =0 ; +if (dev_get_drvdata (controller) !=ehci_to_hcd (ehci)) +return 0 ; +/* with integrated TT there is no companion! */ if (!ehci_is_TDI (ehci)) i =device_create_file (controller, &dev_attr_companion);
@@ -182,6 +185,9 @@ static inline void remove_sysfs_files(struct ehci_hcd *ehci) {struct device *controller =ehci_to_hcd (ehci)->self.controller; +if (dev_get_drvdata (controller) !=ehci_to_hcd (ehci)) +return ; +/* with integrated TT there is no companion! */ if (!ehci_is_TDI (ehci))device_remove_file (controller, &dev_attr_companion);
drivers/usb/host/ehci.h +12 -0
@@ -136,6 +136,7 @@ struct ehci_hcd { /* one per controller *//* SILICON QUIRKS */ unsigned no_selective_suspend:1; unsigned has_fsl_port_bug:1; /* FreeScale */ + unsigned has_fsl_hs_errata:1; /* Freescale HS quirk */ unsigned big_endian_mmio:1; unsigned big_endian_desc:1; unsigned big_endian_capbase:1;
@@ -612,6 +613,17 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)#define ehci_has_fsl_portno_bug (e) (0)#endif +#define PORTSC_FSL_PFSC 24/* Port Force Full-Speed Connect */ + +#if defined(CONFIG_PPC_85xx) +/* Some Freescale processors have an erratum (USB A-005275) in which +* incoming packets get corrupted in HS mode +*/ +#define ehci_has_fsl_hs_errata (e) ((e)->has_fsl_hs_errata) +#else +#define ehci_has_fsl_hs_errata (e) (0) +#endif +/* * While most USB host controllers implement their registers in * little-endian format, a minority (celleb companion chip) implement
drivers/usb/host/fsl-mph-dr-of.c +4 -0
@@ -166,6 +166,10 @@ static int __devinit fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) prop =of_get_property (np,"phy_type" ,NULL ); pdata->phy_mode =determine_usb_phy (prop); +if (of_get_property (np,"fsl,usb-erratum-a005275" ,NULL )) + pdata->has_fsl_erratum_a005275 =1 ; +else + pdata->has_fsl_erratum_a005275 =0 ;for (i =0 ; i <ARRAY_SIZE (dev_data->drivers); i++) {if (!dev_data->drivers[i])
drivers/usb/host/xhci-mem.c +3 -3
@@ -1403,10 +1403,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,* use Event Data TRBs, and we don't chain in a link TRB on short * transfers, we're basically dividing by 1. * -* xHCI 1.0 specification indicates that the Average TRB Length should -* be set to 8 for control endpoints. +* xHCI 1.0 and 1.1 specification indicates that the Average TRB Length +* should be set to 8 for control endpoints. */ -if (usb_endpoint_xfer_control (&ep->desc) && xhci->hci_version ==0x100 ) +if (usb_endpoint_xfer_control (&ep->desc) && xhci->hci_version >=0x100 ) ep_ctx->tx_info |=cpu_to_le32 (AVG_TRB_LENGTH_FOR_EP (8 ));else ep_ctx->tx_info |=
drivers/usb/host/xhci-ring.c +12 -3
@@ -85,7 +85,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg,return 0 ;/* offset in TRBs */ segment_offset = trb - seg->trbs; -if (segment_offset >TRBS_PER_SEGMENT ) +if (segment_offset >=TRBS_PER_SEGMENT )return 0 ;return seg->dma + (segment_offset *sizeof (*trb)); }
@@ -350,6 +350,15 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci) ret =handshake (xhci, &xhci->op_regs->cmd_ring,CMD_RING_RUNNING ,0 ,5 *1000 *1000 );if (ret <0 ) { +/* we are about to kill xhci, give it one more chance */ +xhci_write_64 (xhci, temp_64 |CMD_RING_ABORT , + &xhci->op_regs->cmd_ring); +udelay (1000 ); + ret =handshake (xhci, &xhci->op_regs->cmd_ring, +CMD_RING_RUNNING ,0 ,3 *1000 *1000 ); +if (ret ==0 ) +return 0 ; +xhci_err (xhci,"Stopped the command ring failed, " "maybe the host is dead\n" ); xhci->xhc_state |=XHCI_STATE_DYING ;
@@ -3423,8 +3432,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,if (start_cycle ==0 ) field |=0x1 ; -/* xHCI 1.0 6.4.1.2.1: Transfer Type field */ -if (xhci->hci_version ==0x100 ) { +/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */ +if (xhci->hci_version >=0x100 ) {if (urb->transfer_buffer_length >0 ) {if (setup->bRequestType &USB_DIR_IN ) field |=TRB_TX_TYPE (TRB_DATA_IN );
drivers/usb/host/xhci.c +2 -1
@@ -141,7 +141,8 @@ static int xhci_start(struct xhci_hcd *xhci)"waited %u microseconds.\n" , XHCI_MAX_HALT_USEC);if (!ret) - xhci->xhc_state &= ~XHCI_STATE_HALTED ; + xhci->xhc_state &= ~(XHCI_STATE_HALTED |XHCI_STATE_DYING ); +return ret; }
drivers/usb/serial/ftdi_sio.c +4 -0
@@ -629,6 +629,10 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },/* * ELV devices: */
drivers/usb/serial/ftdi_sio_ids.h +8 -0
@@ -568,6 +568,14 @@*/ #define FTDI_SYNAPSE_SS200_PID 0x9090/* SS200 - SNAP Stick 200 */ +/* +* CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID) +*/ +#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48/* MiniPlex first generation NMEA Multiplexer */ +#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49/* MiniPlex-USB and MiniPlex-2 series */ +#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a/* MiniPlex-2Wi */ +#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b/* MiniPlex-3 series */ +/********************************/ /** third-party VID/PID combos **/
drivers/usb/serial/option.c +24 -0
@@ -276,6 +276,10 @@ static void option_instat_callback(struct urb *urb);#define ZTE_PRODUCT_MF622 0x0001#define ZTE_PRODUCT_MF628 0x0015#define ZTE_PRODUCT_MF626 0x0031 +#define ZTE_PRODUCT_ZM8620_X 0x0396 +#define ZTE_PRODUCT_ME3620_MBIM 0x0426 +#define ZTE_PRODUCT_ME3620_X 0x1432 +#define ZTE_PRODUCT_ME3620_L 0x1433#define ZTE_PRODUCT_CDMA_TECH 0xfffe#define ZTE_PRODUCT_AC8710 0xfff1#define ZTE_PRODUCT_AC2726 0xfff5
@@ -547,6 +551,18 @@ static const struct option_blacklist_info zte_mc2716_z_blacklist = { .sendsetup = BIT(1) | BIT(2) | BIT(3), }; +static const struct option_blacklist_info zte_me3620_mbim_blacklist = { + .reserved =BIT (2 ) |BIT (3 ) |BIT (4 ), +}; + +static const struct option_blacklist_info zte_me3620_xl_blacklist = { + .reserved =BIT (3 ) |BIT (4 ) |BIT (5 ), +}; + +static const struct option_blacklist_info zte_zm8620_x_blacklist = { + .reserved =BIT (3 ) |BIT (4 ) |BIT (5 ), +}; +static const struct option_blacklist_info huawei_cdc12_blacklist = { .reserved =BIT (1 ) |BIT (2 ), };
@@ -1578,6 +1594,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_L), + .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_MBIM), + .driver_info = (kernel_ulong_t)&zte_me3620_mbim_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_X), + .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ZM8620_X), + .driver_info = (kernel_ulong_t)&zte_zm8620_x_blacklist }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
drivers/usb/serial/sierra.c +1 -0
@@ -303,6 +303,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68AA, 0xFF, 0xFF, 0xFF), .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist }, + { USB_DEVICE(0x1199, 0x68AB) }, /* Sierra Wireless AR8550 */ /* AT&T Direct IP LTE modems */ { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
drivers/usb/serial/whiteheat.c +31 -0
@@ -143,6 +143,8 @@ static int whiteheat_firmware_download(struct usb_serial *serial,static int whiteheat_firmware_attach (struct usb_serial *serial);/* function prototypes for the Connect Tech WhiteHEAT serial converter */ +static int whiteheat_probe (struct usb_serial *serial, +const struct usb_device_id *id);static int whiteheat_attach (struct usb_serial *serial);static void whiteheat_release (struct usb_serial *serial); static int whiteheat_open(struct tty_struct *tty,
@@ -188,6 +190,7 @@ static struct usb_serial_driver whiteheat_device = { .usb_driver = &whiteheat_driver, .id_table = id_table_std, .num_ports = 4, + .probe = whiteheat_probe, .attach = whiteheat_attach, .release = whiteheat_release, .open = whiteheat_open,
@@ -387,6 +390,34 @@ static int whiteheat_firmware_attach(struct usb_serial *serial)/***************************************************************************** * Connect Tech's White Heat serial driver functions *****************************************************************************/ + +static int whiteheat_probe (struct usb_serial *serial, +const struct usb_device_id *id) +{ +struct usb_host_interface *iface_desc; +struct usb_endpoint_descriptor *endpoint; +size_t num_bulk_in =0 ; +size_t num_bulk_out =0 ; +size_t min_num_bulk; +unsigned int i; + + iface_desc = serial->interface->cur_altsetting; + +for (i =0 ; i < iface_desc->desc.bNumEndpoints; i++) { + endpoint = &iface_desc->endpoint[i].desc; +if (usb_endpoint_is_bulk_in (endpoint)) + ++num_bulk_in; +if (usb_endpoint_is_bulk_out (endpoint)) + ++num_bulk_out; + } + + min_num_bulk =COMMAND_PORT +1 ; +if (num_bulk_in < min_num_bulk || num_bulk_out < min_num_bulk) +return -ENODEV ; + +return 0 ; +} +static int whiteheat_attach (struct usb_serial *serial) {struct usb_serial_port *command_port;
drivers/xen/gntdev.c +18 -16
@@ -60,7 +60,7 @@ static int use_ptemod;struct gntdev_priv {struct list_head maps;/* lock protects maps from concurrent changes */ -spinlock_t lock; +struct mutex lock;struct mm_struct *mm;struct mmu_notifier mn; };
@@ -395,7 +395,7 @@ static void mn_invl_range_start(struct mmu_notifier *mn,unsigned long mstart, mend;int err; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {if (!map->vma)continue ;
@@ -414,7 +414,7 @@ static void mn_invl_range_start(struct mmu_notifier *mn, (mend - mstart) >> PAGE_SHIFT);WARN_ON (err); } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); } static void mn_invl_page(struct mmu_notifier *mn,
@@ -431,7 +431,7 @@ static void mn_release(struct mmu_notifier *mn,struct grant_map *map;int err; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {if (!map->vma)continue ;
@@ -441,7 +441,7 @@ static void mn_release(struct mmu_notifier *mn, err =unmap_grant_pages (map,/* offset */ 0 , map->count);WARN_ON (err); } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); }struct mmu_notifier_ops gntdev_mmu_ops = {
@@ -462,7 +462,7 @@ static int gntdev_open(struct inode *inode, struct file *flip)return -ENOMEM ;INIT_LIST_HEAD (&priv->maps); -spin_lock_init (&priv->lock); +mutex_init (&priv->lock);if (use_ptemod) { priv->mm =get_task_mm (current);
@@ -493,11 +493,13 @@ static int gntdev_release(struct inode *inode, struct file *flip)pr_debug ("priv %p\n" , priv); +mutex_lock (&priv->lock);while (!list_empty (&priv->maps)) { map = list_entry(priv->maps.next, struct grant_map, next);list_del (&map->next);gntdev_put_map (map); } +mutex_unlock (&priv->lock);if (use_ptemod)mmu_notifier_unregister (&priv->mn, priv->mm);
@@ -535,10 +537,10 @@ static long gntdev_ioctl_map_grant_ref(struct gntdev_priv *priv,return err; } -spin_lock (&priv->lock); +mutex_lock (&priv->lock);gntdev_add_map (priv, map); op.index = map->index <<PAGE_SHIFT ; -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (copy_to_user (u, &op,sizeof (op)) !=0 )return -EFAULT ;
@@ -557,13 +559,13 @@ static long gntdev_ioctl_unmap_grant_ref(struct gntdev_priv *priv,return -EFAULT ;pr_debug ("priv %p, del %d+%d\n" , priv, (int )op.index, (int )op.count); -spin_lock (&priv->lock); +mutex_lock (&priv->lock); map =gntdev_find_map_index (priv, op.index >>PAGE_SHIFT , op.count);if (map) {list_del (&map->next); err =0 ; } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (map)gntdev_put_map (map);return err;
@@ -608,7 +610,7 @@ static long gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u)if (op.action & ~(UNMAP_NOTIFY_CLEAR_BYTE |UNMAP_NOTIFY_SEND_EVENT ))return -EINVAL ; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {uint64_t begin = map->index <<PAGE_SHIFT ;
@@ -631,7 +633,7 @@ static long gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u) map->notify.event = op.event_channel_port; rc =0 ; unlock_out: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);return rc; }
@@ -676,7 +678,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)pr_debug ("map %d+%d at %lx (pgoff %lx)\n" , index, count, vma->vm_start, vma->vm_pgoff); -spin_lock (&priv->lock); +mutex_lock (&priv->lock); map =gntdev_find_map_index (priv, index, count);if (!map) goto unlock_out;
@@ -711,7 +713,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) map->flags |= GNTMAP_readonly; } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (use_ptemod) { err = apply_to_page_range(vma->vm_mm, vma->vm_start,
@@ -739,11 +741,11 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)return 0 ; unlock_out: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);return err; out_unlock_put: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); out_put_map:if (use_ptemod) map->vma =NULL ;
fs/btrfs/extent_io.c +60 -7
139 lines not on this page · raw message
fs/btrfs/inode.c +2 -1
@@ -3518,7 +3518,8 @@ void btrfs_evict_inode(struct inode *inode) goto no_delete; }/* do we really want it for ->i_nlink > 0 and zero btrfs_root_refs? */ -btrfs_wait_ordered_range (inode,0 , (u64)-1 ); +if (!special_file (inode->i_mode)) +btrfs_wait_ordered_range (inode,0 , (u64)-1 );if (root->fs_info->log_root_recovering) {BUG_ON (!list_empty (&BTRFS_I (inode)->i_orphan));
fs/ceph/super.c +5 -3
@@ -361,8 +361,10 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)if (opt->flags &CEPH_OPT_NOCRC )seq_puts (m,",nocrc" ); -if (opt->name) -seq_printf (m,",name=%s" , opt->name); +if (opt->name) { +seq_puts (m,",name=" ); +seq_escape (m, opt->name,", \t\n\\" ); + }if (opt->key)seq_puts (m,",secret=<hidden>" );
@@ -405,7 +407,7 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)if (fsopt->max_readdir_bytes !=CEPH_MAX_READDIR_BYTES_DEFAULT )seq_printf (m,",readdir_max_bytes=%d" , fsopt->max_readdir_bytes);if (strcmp (fsopt->snapdir_name,CEPH_SNAPDIRNAME_DEFAULT )) -seq_printf (m,",snapdirname=%s" , fsopt->snapdir_name); +seq_show_option (m,"snapdirname" , fsopt->snapdir_name);return 0 ; }
fs/cifs/cifsencrypt.c +51 -1
76 lines not on this page · raw message
fs/cifs/cifsfs.c +2 -2
@@ -381,10 +381,10 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)if (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_MULTIUSER )seq_printf (s,",multiuser" );else if (tcon->ses->user_name) -seq_printf (s,",username=%s" , tcon->ses->user_name); +seq_show_option (s,"username" , tcon->ses->user_name);if (tcon->ses->domainName) -seq_printf (s,",domain=%s" , tcon->ses->domainName); +seq_show_option (s,"domain" , tcon->ses->domainName);if (srcaddr->sa_family !=AF_UNSPEC ) {struct sockaddr_in *saddr4;
fs/dcache.c +10 -0
@@ -2452,6 +2452,8 @@ static int prepend_path(const struct path *path, {struct dentry *dentry = path->dentry;struct vfsmount *vfsmnt = path->mnt; +char *orig_buffer = *buffer; +int orig_len = *buflen;bool slash = false;int error =0 ;
@@ -2459,6 +2461,14 @@ static int prepend_path(const struct path *path,struct dentry * parent;if (dentry == vfsmnt->mnt_root ||IS_ROOT (dentry)) { +/* Escaped? */ +if (dentry != vfsmnt->mnt_root) { + *buffer = orig_buffer; + *buflen = orig_len; + slash = false; + error =3 ; + goto global_root; + }/* Global root? */ if (vfsmnt->mnt_parent == vfsmnt) { goto global_root;
fs/ecryptfs/dentry.c +16 -16
@@ -55,26 +55,26 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd) lower_dentry =ecryptfs_dentry_to_lower (dentry); lower_mnt =ecryptfs_dentry_to_lower_mnt (dentry); -if (!lower_dentry->d_op || !lower_dentry->d_op->d_revalidate) - goto out; -if (nd) { - dentry_save = nd->path.dentry; - vfsmount_save = nd->path.mnt; - nd->path.dentry = lower_dentry; - nd->path.mnt = lower_mnt; - } - rc = lower_dentry->d_op->d_revalidate (lower_dentry, nd); -if (nd) { - nd->path.dentry = dentry_save; - nd->path.mnt = vfsmount_save; +if (lower_dentry->d_op && lower_dentry->d_op->d_revalidate) { +if (nd) { + dentry_save = nd->path.dentry; + vfsmount_save = nd->path.mnt; + nd->path.dentry = lower_dentry; + nd->path.mnt = lower_mnt; + } + rc = lower_dentry->d_op->d_revalidate (lower_dentry, nd); +if (nd) { + nd->path.dentry = dentry_save; + nd->path.mnt = vfsmount_save; + } }if (dentry->d_inode) { -struct inode *lower_inode = -ecryptfs_inode_to_lower (dentry->d_inode); +struct inode *inode = dentry->d_inode; -fsstack_copy_attr_all (dentry->d_inode, lower_inode); +fsstack_copy_attr_all (inode,ecryptfs_inode_to_lower (inode)); +if (!inode->i_nlink) +return 0 ; } -out:return rc; }
fs/ext4/super.c +2 -2
@@ -1018,10 +1018,10 @@ static inline void ext4_show_quota_options(struct seq_file *seq, }if (sbi->s_qf_names[USRQUOTA ]) -seq_printf (seq,",usrjquota=%s" , sbi->s_qf_names[USRQUOTA ]); +seq_show_option (seq,"usrjquota" , sbi->s_qf_names[USRQUOTA ]);if (sbi->s_qf_names[GRPQUOTA ]) -seq_printf (seq,",grpjquota=%s" , sbi->s_qf_names[GRPQUOTA ]); +seq_show_option (seq,"grpjquota" , sbi->s_qf_names[GRPQUOTA ]);if (test_opt (sb,USRQUOTA ))seq_puts (seq,",usrquota" );
fs/gfs2/super.c +3 -3
@@ -1298,11 +1298,11 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)if (is_ancestor (mnt->mnt_root, sdp->sd_master_dir))seq_printf (s,",meta" );if (args->ar_lockproto[0 ]) -seq_printf (s,",lockproto=%s" , args->ar_lockproto); +seq_show_option (s,"lockproto" , args->ar_lockproto);if (args->ar_locktable[0 ]) -seq_printf (s,",locktable=%s" , args->ar_locktable); +seq_show_option (s,"locktable" , args->ar_locktable);if (args->ar_hostdata[0 ]) -seq_printf (s,",hostdata=%s" , args->ar_hostdata); +seq_show_option (s,"hostdata" , args->ar_hostdata);if (args->ar_spectator)seq_printf (s,",spectator" );if (args->ar_localflocks)
fs/hfs/bnode.c +4 -5
@@ -287,7 +287,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)page_cache_release (page); goto fail; } -page_cache_release (page); node->page[i] = page; }
@@ -397,11 +396,11 @@ node_error:void hfs_bnode_free (struct hfs_bnode *node) { -//int i; +int i; -//for (i = 0; i < node->tree->pages_per_bnode; i++) -// if (node->page[i]) -// page_cache_release(node->page[i]); +for (i =0 ; i < node->tree->pages_per_bnode; i++) +if (node->page[i]) +page_cache_release (node->page[i]);kfree (node); }
fs/hfs/brec.c +11 -9
@@ -132,13 +132,16 @@ skip:hfs_bnode_write (node, entry, data_off + key_len, entry_len);hfs_bnode_dump (node); -if (new_node) { -/* update parent key if we inserted a key -* at the start of the first node -*/ -if (!rec && new_node != node) -hfs_brec_update_parent (fd); +/* +* update parent key if we inserted a key +* at the start of the node and it is not the new node +*/ +if (!rec && new_node != node) { +hfs_bnode_read_key (node, fd->search_key, data_off + size); +hfs_brec_update_parent (fd); + } +if (new_node) {hfs_bnode_put (fd->bnode);if (!new_node->parent) {hfs_btree_inc_height (tree);
@@ -167,9 +170,6 @@ skip: goto again; } -if (!rec) -hfs_brec_update_parent (fd); -return 0 ; }
@@ -366,6 +366,8 @@ again:if (IS_ERR (parent))return PTR_ERR (parent);__hfs_brec_find (parent, fd); +if (fd->record <0 ) +return -ENOENT ;hfs_bnode_dump (parent); rec = fd->record;
fs/hfs/super.c +2 -2
@@ -138,9 +138,9 @@ static int hfs_show_options(struct seq_file *seq, struct vfsmount *mnt)struct hfs_sb_info *sbi =HFS_SB (mnt->mnt_sb);if (sbi->s_creator !=cpu_to_be32 (0x3f3f3f3f )) -seq_printf (seq,",creator=%.4s" , (char *)&sbi->s_creator); +seq_show_option_n (seq,"creator" , (char *)&sbi->s_creator,4 );if (sbi->s_type !=cpu_to_be32 (0x3f3f3f3f )) -seq_printf (seq,",type=%.4s" , (char *)&sbi->s_type); +seq_show_option_n (seq,"type" , (char *)&sbi->s_type,4 );seq_printf (seq,",uid=%u,gid=%u" , sbi->s_uid, sbi->s_gid);if (sbi->s_file_umask !=0133 )seq_printf (seq,",file_umask=%o" , sbi->s_file_umask);
fs/hfsplus/bnode.c +0 -3
@@ -454,7 +454,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)page_cache_release (page); goto fail; } -page_cache_release (page); node->page[i] = page; }
@@ -566,13 +565,11 @@ node_error:void hfs_bnode_free (struct hfs_bnode *node) { -#if 0 int i;for (i =0 ; i < node->tree->pages_per_bnode; i++)if (node->page[i])page_cache_release (node->page[i]); -#endif kfree (node); }
fs/hfsplus/options.c +2 -2
@@ -211,9 +211,9 @@ int hfsplus_show_options(struct seq_file *seq, struct vfsmount *mnt)struct hfsplus_sb_info *sbi =HFSPLUS_SB (mnt->mnt_sb);if (sbi->creator !=HFSPLUS_DEF_CR_TYPE ) -seq_printf (seq,",creator=%.4s" , (char *)&sbi->creator); +seq_show_option_n (seq,"creator" , (char *)&sbi->creator,4 );if (sbi->type !=HFSPLUS_DEF_CR_TYPE ) -seq_printf (seq,",type=%.4s" , (char *)&sbi->type); +seq_show_option_n (seq,"type" , (char *)&sbi->type,4 );seq_printf (seq,",umask=%o,uid=%u,gid=%u" , sbi->umask, sbi->uid, sbi->gid);if (sbi->part >=0 )
fs/hostfs/hostfs_kern.c +1 -1
@@ -265,7 +265,7 @@ static int hostfs_show_options(struct seq_file *seq, struct vfsmount *vfs)size_t offset =strlen (root_ino) +1 ;if (strlen (root_path) > offset) -seq_printf (seq,",%s" , root_path + offset); +seq_show_option (seq, root_path + offset,NULL );return 0 ; }
fs/jbd2/checkpoint.c +33 -6
@@ -509,14 +509,15 @@ int jbd2_cleanup_journal_tail(journal_t *journal)* journal_clean_one_cp_list * * Find all the written-back checkpoint buffers in the given list and -* release them. +* release them. If 'destroy' is set, clean all buffers unconditionally. * * Called with the journal locked. * Called with j_list_lock held. * Returns number of bufers reaped (for debug) */ -static int journal_clean_one_cp_list (struct journal_head *jh,int *released) +static int journal_clean_one_cp_list (struct journal_head *jh,bool destroy, +int *released) {struct journal_head *last_jh;struct journal_head *next_jh = jh;
@@ -532,7 +533,10 @@ static int journal_clean_one_cp_list(struct journal_head *jh, int *released) next_jh = jh->b_cpnext;/* Use trylock because of the ranking */ if (jbd_trylock_bh_state (jh2bh (jh))) { - ret =__try_to_free_cp_buf (jh); +if (!destroy) + ret =__try_to_free_cp_buf (jh); +else + ret =__jbd2_journal_remove_checkpoint (jh) +1 ;if (ret) { freed++;if (ret ==2 ) {
@@ -558,13 +562,14 @@ static int journal_clean_one_cp_list(struct journal_head *jh, int *released)* journal_clean_checkpoint_list * * Find all the written-back checkpoint buffers in the journal and release them. +* If 'destroy' is set, release all buffers unconditionally. * * Called with the journal locked. * Called with j_list_lock held. * Returns number of buffers reaped (for debug) */ -int __jbd2_journal_clean_checkpoint_list (journal_t *journal) +int __jbd2_journal_clean_checkpoint_list (journal_t *journal,bool destroy) {transaction_t *transaction, *last_transaction, *next_transaction;int ret =0 ;
@@ -580,7 +585,7 @@ int __jbd2_journal_clean_checkpoint_list(journal_t *journal) transaction = next_transaction; next_transaction = transaction->t_cpnext; ret +=journal_clean_one_cp_list (transaction-> - t_checkpoint_list, &released); + t_checkpoint_list, destroy, &released);/* * This function only frees up some memory if possible so we * dont have an obligation to finish processing. Bail out if
@@ -596,7 +601,7 @@ int __jbd2_journal_clean_checkpoint_list(journal_t *journal)* we can possibly see not yet submitted buffers on io_list */ ret +=journal_clean_one_cp_list (transaction-> - t_checkpoint_io_list, &released); + t_checkpoint_io_list, destroy, &released);if (need_resched ()) goto out; }while (transaction != last_transaction);
@@ -605,6 +610,28 @@ out: }/* +* Remove buffers from all checkpoint lists as journal is aborted and we just +* need to free memory +*/ +void jbd2_journal_destroy_checkpoint (journal_t *journal) +{ +/* +* We loop because __jbd2_journal_clean_checkpoint_list() may abort +* early due to a need of rescheduling. +*/ +while (1 ) { +spin_lock (&journal->j_list_lock); +if (!journal->j_checkpoint_transactions) { +spin_unlock (&journal->j_list_lock); +break ; + } +__jbd2_journal_clean_checkpoint_list (journal, true); +spin_unlock (&journal->j_list_lock); +cond_resched (); + } +} + +/* * journal_remove_checkpoint: called after a buffer has been committed * to disk (either by being write-back flushed to disk, or being * committed to the log).
fs/jbd2/commit.c +3 -1
@@ -340,6 +340,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)/* Do we need to erase the effects of a prior jbd2_journal_flush? */ if (journal->j_flags &JBD2_FLUSHED ) {jbd_debug (3 ,"super block updated\n" ); +mutex_lock (&journal->j_checkpoint_mutex);/* * We hold j_checkpoint_mutex so tail cannot change under us. * We don't need any special data guarantees for writing sb
@@ -350,6 +351,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) journal->j_tail_sequence, journal->j_tail, WRITE_SYNC); +mutex_unlock (&journal->j_checkpoint_mutex); }else {jbd_debug (3 ,"superblock not updated\n" ); }
@@ -433,7 +435,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)* frees some memory */ spin_lock (&journal->j_list_lock); -__jbd2_journal_clean_checkpoint_list (journal); +__jbd2_journal_clean_checkpoint_list (journal, false);spin_unlock (&journal->j_list_lock);jbd_debug (3 ,"JBD2: commit phase 1\n" );
fs/jbd2/journal.c +29 -5
@@ -1242,6 +1242,8 @@ static int journal_reset(journal_t *journal) journal->j_errno); journal->j_flags |=JBD2_FLUSHED ; }else { +/* Lock here to make assertions happy... */ +mutex_lock (&journal->j_checkpoint_mutex);/* * Update log tail information. We use WRITE_FUA since new * transaction will start reusing journal space and so we
@@ -1252,6 +1254,7 @@ static int journal_reset(journal_t *journal) journal->j_tail_sequence, journal->j_tail, WRITE_FUA); +mutex_unlock (&journal->j_checkpoint_mutex); }return jbd2_journal_start_thread (journal); }
@@ -1314,6 +1317,7 @@ int jbd2_journal_update_sb_log_tail(journal_t *journal, tid_t tail_tid,journal_superblock_t *sb = journal->j_superblock;int ret; +BUG_ON (!mutex_is_locked (&journal->j_checkpoint_mutex));jbd_debug (1 ,"JBD2: updating superblock (start %lu, seq %u)\n" , tail_block, tail_tid);
@@ -1344,6 +1348,7 @@ static void jbd2_mark_journal_empty(journal_t *journal) {journal_superblock_t *sb = journal->j_superblock; +BUG_ON (!mutex_is_locked (&journal->j_checkpoint_mutex));read_lock (&journal->j_state_lock);jbd_debug (1 ,"JBD2: Marking journal as empty (seq %d)\n" , journal->j_tail_sequence);
@@ -1566,8 +1571,17 @@ int jbd2_journal_destroy(journal_t *journal)while (journal->j_checkpoint_transactions !=NULL ) {spin_unlock (&journal->j_list_lock);mutex_lock (&journal->j_checkpoint_mutex); -jbd2_log_do_checkpoint (journal); + err =jbd2_log_do_checkpoint (journal);mutex_unlock (&journal->j_checkpoint_mutex); +/* +* If checkpointing failed, just free the buffers to avoid +* looping forever +*/ +if (err) { +jbd2_journal_destroy_checkpoint (journal); +spin_lock (&journal->j_list_lock); +break ; + }spin_lock (&journal->j_list_lock);
Lines of this file are not shown. View the raw message.
net/core/datagram.c +41 -5
46 lines not on this page · raw message
net/key/af_key.c +23 -23
46 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.