]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoMerge tag 'v3.0.35' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:34:29 +0000 (14:34 -0700)]
Merge tag 'v3.0.35' into uek2-2.6.39-300#14252075

This is the 3.0.35 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.34' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:33:43 +0000 (14:33 -0700)]
Merge tag 'v3.0.34' into uek2-2.6.39-300#14252075

This is the 3.0.34 stable release

Conflicts:
arch/x86/include/asm/pgtable-3level.h

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.33' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:28:27 +0000 (14:28 -0700)]
Merge tag 'v3.0.33' into uek2-2.6.39-300#14252075

This is the 3.0.33 stable release

Conflicts:
drivers/scsi/hpsa.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.32' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:22:12 +0000 (14:22 -0700)]
Merge tag 'v3.0.32' into uek2-2.6.39-300#14252075

This is the 3.0.32 stable release

Conflicts:
arch/x86/xen/enlighten.c
drivers/scsi/hpsa.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.31' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:17:54 +0000 (14:17 -0700)]
Merge tag 'v3.0.31' into uek2-2.6.39-300#14252075

This is the 3.0.31 stable release

Conflicts:
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/hwmon/fam15h_power.c
virt/kvm/iommu.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.30' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:14:47 +0000 (14:14 -0700)]
Merge tag 'v3.0.30' into uek2-2.6.39-300#14252075

This is the 3.0.30 stable release

Conflicts:
drivers/xen/xenbus/xenbus_probe_frontend.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.29' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:14:00 +0000 (14:14 -0700)]
Merge tag 'v3.0.29' into uek2-2.6.39-300#14252075

This is the 3.0.29 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.28' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:13:37 +0000 (14:13 -0700)]
Merge tag 'v3.0.28' into uek2-2.6.39-300#14252075

This is the 3.0.28 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.27' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:13:20 +0000 (14:13 -0700)]
Merge tag 'v3.0.27' into uek2-2.6.39-300#14252075

This is the 3.0.27 stable release

Conflicts:
drivers/hwmon/fam15h_power.c
drivers/net/e1000e/netdev.c
drivers/usb/serial/ftdi_sio.c
include/asm-generic/pgtable.h
net/ipv6/route.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge git://ca-git.us.oracle.com/linux-ganbalag-public.git v2.6.39-200.24.1#leapsec
Maxim Uvarov [Tue, 3 Jul 2012 13:46:14 +0000 (06:46 -0700)]
Merge git://ca-git.us.oracle.com/linux-ganbalag-public.git v2.6.39-200.24.1#leapsec

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agontp: Fix leap-second hrtimer livelock
John Stultz [Thu, 15 Mar 2012 20:04:03 +0000 (13:04 -0700)]
ntp: Fix leap-second hrtimer livelock

Orabug: 14264454  leap second fix for UEK

Since commit 7dffa3c673fbcf835cd7be80bb4aec8ad3f51168 the ntp
subsystem has used an hrtimer for triggering the leapsecond
adjustment. However, this can cause a potential livelock.

Thomas diagnosed this as the following pattern:
CPU 0                                                    CPU 1
do_adjtimex()
  spin_lock_irq(&ntp_lock);
    process_adjtimex_modes();  timer_interrupt()
      process_adj_status();                                do_timer()
        ntp_start_leap_timer();                             write_lock(&xtime_lock);
          hrtimer_start();                                  update_wall_time();
             hrtimer_reprogram();                            ntp_tick_length()
               tick_program_event()                            spin_lock(&ntp_lock);
                 clockevents_program_event()
   ktime_get()
                     seq = req_seqbegin(xtime_lock);

This patch tries to avoid the problem by reverting back to not using
an hrtimer to inject leapseconds, and instead we handle the leapsecond
processing in the second_overflow() function.

The downside to this change is that on systems that support highres
timers, the leap second processing will occur on a HZ tick boundary,
(ie: ~1-10ms, depending on HZ)  after the leap second instead of
possibly sooner (~34us in my tests w/ x86_64 lapic).

This patch applies on top of tip/timers/core.

CC: Sasha Levin <levinsasha928@gmail.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Diagnoised-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agontp: Add ntp_lock to replace xtime_locking
John Stultz [Mon, 14 Nov 2011 21:48:36 +0000 (13:48 -0800)]
ntp: Add ntp_lock to replace xtime_locking

Use a ntp_lock spin lock to replace xtime_lock locking in ntp.c

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agontp: Access tick_length variable via ntp_tick_length()
John Stultz [Mon, 14 Nov 2011 21:18:07 +0000 (13:18 -0800)]
ntp: Access tick_length variable via ntp_tick_length()

Currently the NTP managed tick_length value is accessed globally,
in preparations for locking cleanups, make sure it is accessed via
a function and mark it as static.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agontp: Cleanup timex.h
John Stultz [Mon, 14 Nov 2011 21:06:21 +0000 (13:06 -0800)]
ntp: Cleanup timex.h

Move ntp_sycned to ntp.c and mark time_status as static.
Also yank function declaration for non-existant function.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoMerge branch 'kexec-v3' of git://ca-git.us.oracle.com/linux-dkiper-public
Maxim Uvarov [Fri, 29 Jun 2012 08:39:20 +0000 (01:39 -0700)]
Merge branch 'kexec-v3' of git://ca-git.us.oracle.com/linux-dkiper-public

13 years agodm-nfs: force random mode for the backend file
Joe Jin [Mon, 4 Jun 2012 05:45:02 +0000 (13:45 +0800)]
dm-nfs: force random mode for the backend file

Orabug: 14092678
Without this flag page_cache_sync_readahead() might take some seconds to
complete.
Since dm-nfs used for ovm and as vdisk, random access is expect, so force
set this flag when open the backend file.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Adnan Misherfi <adnan.misherfi@oracle.com>
Cc: Kurt C Hackel <kurt.hackel@oracle.com>
Cc: Andrew Thomas <andrew.thomas@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agodm-nfs: force random mode for the backend file
Joe Jin [Mon, 4 Jun 2012 05:45:02 +0000 (13:45 +0800)]
dm-nfs: force random mode for the backend file

Orabug: 14092678
Without this flag page_cache_sync_readahead() might take some seconds to
complete.
Since dm-nfs used for ovm and as vdisk, random access is expect, so force
set this flag when open the backend file.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Adnan Misherfi <adnan.misherfi@oracle.com>
Cc: Kurt C Hackel <kurt.hackel@oracle.com>
Cc: Andrew Thomas <andrew.thomas@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39
Maxim Uvarov [Thu, 28 Jun 2012 14:47:37 +0000 (07:47 -0700)]
Merge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39

Conflicts:
block/scsi_ioctl.c
drivers/hwmon/fam15h_power.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/md/dm-mpath.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/hxge/hxge_main.c
drivers/net/hxge/hxge_txdma.c
drivers/pci/pcie/aspm.c
drivers/scsi/sd.c
include/linux/if_vlan.h
net/ipv4/route.c
net/ipv6/route.c
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c
uek-rpm/ol5/kernel-uek.spec
uek-rpm/ol6/config-generic
uek-rpm/ol6/kernel-uek.spec

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agox86: Add Xen kexec control code size check to linker script
Daniel Kiper [Thu, 21 Jun 2012 13:39:19 +0000 (15:39 +0200)]
x86: Add Xen kexec control code size check to linker script

Add Xen kexec control code size check to linker script.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agodrivers/xen: Export vmcoreinfo through sysfs
Daniel Kiper [Thu, 21 Jun 2012 13:38:45 +0000 (15:38 +0200)]
drivers/xen: Export vmcoreinfo through sysfs

Export vmcoreinfo through sysfs.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen/enlighten: Add init and crash kexec/kdump hooks
Daniel Kiper [Thu, 21 Jun 2012 13:38:02 +0000 (15:38 +0200)]
x86/xen/enlighten: Add init and crash kexec/kdump hooks

Add init and crash kexec/kdump hooks.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add kexec/kdump makefile rules
Daniel Kiper [Thu, 21 Jun 2012 13:37:29 +0000 (15:37 +0200)]
x86/xen: Add kexec/kdump makefile rules

Add kexec/kdump makefile rules.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add x86_64 kexec/kdump implementation
Daniel Kiper [Thu, 21 Jun 2012 13:30:38 +0000 (15:30 +0200)]
x86/xen: Add x86_64 kexec/kdump implementation

Add x86_64 kexec/kdump implementation.

v2 - Konrad Rzeszutek Wilk suggestions:
  - rewrite assembler code for transition page table initialization,
  - improve comments in assembler code,
  - other code cleanups for assembler code.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add placeholder for i386 kexec/kdump implementation
Daniel Kiper [Thu, 21 Jun 2012 13:29:39 +0000 (15:29 +0200)]
x86/xen: Add placeholder for i386 kexec/kdump implementation

Add placeholder for i386 kexec/kdump implementation
to not break compilation on this architecture.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Register resources required by kexec-tools
Daniel Kiper [Thu, 21 Jun 2012 13:28:54 +0000 (15:28 +0200)]
x86/xen: Register resources required by kexec-tools

Register resources required by kexec-tools.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Introduce architecture dependent data for kexec/kdump
Daniel Kiper [Thu, 21 Jun 2012 13:27:57 +0000 (15:27 +0200)]
x86/xen: Introduce architecture dependent data for kexec/kdump

Introduce architecture dependent constants, structures and
functions required by Xen kexec/kdump implementation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agoxen: Introduce architecture independent data for kexec/kdump
Daniel Kiper [Thu, 21 Jun 2012 13:25:02 +0000 (15:25 +0200)]
xen: Introduce architecture independent data for kexec/kdump

Introduce architecture independent constants and structures
required by Xen kexec/kdump implementation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/kexec: Add extra pointers to transition page table PGD, PUD, PMD and PTE
Daniel Kiper [Thu, 21 Jun 2012 13:24:09 +0000 (15:24 +0200)]
x86/kexec: Add extra pointers to transition page table PGD, PUD, PMD and PTE

Some implementations (e.g. Xen PVOPS) could not use part of identity page table
to construct transition page table. It means that they require separate PUDs,
PMDs and PTEs for virtual and physical (identity) mapping. To satisfy that
requirement add extra pointer to PGD, PUD, PMD and PTE and align existing code.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agokexec: introduce kexec_ops struct
Daniel Kiper [Thu, 21 Jun 2012 13:22:41 +0000 (15:22 +0200)]
kexec: introduce kexec_ops struct

Some kexec/kdump implementations (e.g. Xen PVOPS) on different archs could
not use default functions or require some changes in behavior of kexec/kdump
generic code. To cope with that problem kexec_ops struct was introduced.
It allows a developer to replace all or some functions and control some
functionality of kexec/kdump generic code.

Default behavior of kexec/kdump generic code is not changed.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public
Maxim Uvarov [Wed, 27 Jun 2012 09:54:20 +0000 (13:54 +0400)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public

13 years agoSPEC: v2.6.39-200.24.1
Guru Anbalagane [Sat, 23 Jun 2012 06:20:52 +0000 (23:20 -0700)]
SPEC: v2.6.39-200.24.1
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoRevert "Add Oracle VM guest messaging driver"
Guru Anbalagane [Sat, 23 Jun 2012 06:13:46 +0000 (23:13 -0700)]
Revert "Add Oracle VM guest messaging driver"
Orabug: 14233627
This reverts commit 0193318fe7899d2717cabff800c3a51cbfbc6ada.

13 years agoSPEC: v2.6.39-200.23.1
Guru Anbalagane [Fri, 22 Jun 2012 00:35:06 +0000 (17:35 -0700)]
SPEC: v2.6.39-200.23.1
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoSPEC: add block/net modules to list used by installer
Guru Anbalagane [Fri, 22 Jun 2012 00:15:08 +0000 (17:15 -0700)]
SPEC: add block/net modules to list used by installer

Orabug: 14224837

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoSPEC: v2.6.39-200.22.1
Maxim Uvarov [Thu, 21 Jun 2012 15:27:43 +0000 (08:27 -0700)]
SPEC: v2.6.39-200.22.1

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoNFSv4: include bitmap in nfsv4 get acl data
Andy Adamson [Wed, 7 Dec 2011 16:55:27 +0000 (11:55 -0500)]
NFSv4: include bitmap in nfsv4 get acl data

The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request.  Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
xdr length to the (cached) acl page data.

This is a general solution to commit e5012d1f "NFSv4.1: update
nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
when getting ACLs.

Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr
was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved.
This fixes: CVE-2011-4131

Cc: stable@kernel.org
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoAdd Oracle VM guest messaging driver
Zhigang Wang [Mon, 4 Jun 2012 19:40:20 +0000 (15:40 -0400)]
Add Oracle VM guest messaging driver

Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
Signed-off-by: Steve Prochniak <steve.prochniak@oracle.com>
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agothp: avoid atomic64_read in pmd_read_atomic for 32bit PAE
Andrea Arcangeli [Thu, 7 Jun 2012 19:45:30 +0000 (21:45 +0200)]
thp: avoid atomic64_read in pmd_read_atomic for 32bit PAE

In the x86 32bit PAE CONFIG_TRANSPARENT_HUGEPAGE=y case while holding
the mmap_sem for reading, cmpxchg8b cannot be used to read pmd
contents under Xen.

So instead of dealing only with "consistent" pmdvals in
pmd_none_or_trans_huge_or_clear_bad() (which would be conceptually
simpler) we let pmd_none_or_trans_huge_or_clear_bad() deal with pmdvals
where the low 32bit and high 32bit could be inconsistent (to avoid
having to use cmpxchg8b).

The only guarantee we get from pmd_read_atomic is that if the low part
of the pmd was found null, the high part will be null too (so the pmd
will be considered unstable). And if the low part of the pmd is found
"stable" later, then it means the whole pmd was read atomically
(because after a pmd is stable, neither MADV_DONTNEED nor page faults
can alter it anymore, and we read the high part after the low part).

In the 32bit PAE x86 case, it is enough to read the low part of the
pmdval atomically to declare the pmd as "stable" and that's true for
THP and no THP, furthermore in the THP case we also have a barrier()
that will prevent any inconsistent pmdvals to be cached by a later
re-read of the *pmd.
(cherry picked from commit cdc7a76d4903387391fba3284be3b0b5c364f3d2)

Orabug: 14217003
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek...
Maxim Uvarov [Thu, 21 Jun 2012 15:39:05 +0000 (08:39 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek-2.6.39-200

13 years agoocfs2:btrfs: aio-dio-loop changes broke setrlimit behavior [orabug 14207636]
Dave Kleikamp [Wed, 20 Jun 2012 21:05:59 +0000 (16:05 -0500)]
ocfs2:btrfs: aio-dio-loop changes broke setrlimit behavior [orabug 14207636]

The aio-dio changes for the loop device driver broke ocfs2 and btrfs's
handling of rlimit. generic_write_checks() adjusts the IO byte count to
account for the rlimit, but the updated count was not being reflected in
the iov_iter data structure.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoMerge branch 'stable/for-linus-3.6.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Tue, 19 Jun 2012 13:47:27 +0000 (09:47 -0400)]
Merge branch 'stable/for-linus-3.6.rebased' into uek2-merge

* stable/for-linus-3.6.rebased:
  xen/mce: add .poll method for mcelog device driver

13 years agoxen/mce: add .poll method for mcelog device driver
Liu, Jinsong [Fri, 15 Jun 2012 01:03:39 +0000 (09:03 +0800)]
xen/mce: add .poll method for mcelog device driver

If a driver leaves its poll method NULL, the device is assumed to
be both readable and writable without blocking.

This patch add .poll method to xen mcelog device driver, so that
when mcelog use system calls like ppoll or select, it would be
blocked when no data available, and avoid spinning at CPU.

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.21.0
Maxim Uvarov [Tue, 19 Jun 2012 09:56:37 +0000 (13:56 +0400)]
SPEC: v2.6.39-200.21.0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoKVM: Fix buffer overflow in kvm_set_irq()
Avi Kivity [Sun, 22 Apr 2012 14:02:11 +0000 (17:02 +0300)]
KVM: Fix buffer overflow in kvm_set_irq()

Bugdb: 13966
kvm_set_irq() has an internal buffer of three irq routing entries, allowing
connecting a GSI to three IRQ chips or on MSI.  However setup_routing_entry()
does not properly enforce this, allowing three irqchip routes followed by
an MSI route to overflow the buffer.

Fix by ensuring that an MSI entry is added to an empty list.
This fixes: CVE-2012-2137
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agonet: sock: validate data_len before allocating skb in sock_alloc_send_pskb()
Jason Wang [Wed, 30 May 2012 21:18:10 +0000 (21:18 +0000)]
net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()

Bugdb: 13966
We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.
This fixes: CVE-2012-2136
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomm: pmd_read_atomic: fix 32bit PAE pmd walk vs pmd_populate SMP race condition
Andrea Arcangeli [Tue, 29 May 2012 22:06:49 +0000 (15:06 -0700)]
mm: pmd_read_atomic: fix 32bit PAE pmd walk vs pmd_populate SMP race condition

Bugdb: 13966
When holding the mmap_sem for reading, pmd_offset_map_lock should only
run on a pmd_t that has been read atomically from the pmdp pointer,
otherwise we may read only half of it leading to this crash.

PID: 11679  TASK: f06e8000  CPU: 3   COMMAND: "do_race_2_panic"
 #0 [f06a9dd8] crash_kexec at c049b5ec
 #1 [f06a9e2c] oops_end at c083d1c2
 #2 [f06a9e40] no_context at c0433ded
 #3 [f06a9e64] bad_area_nosemaphore at c043401a
 #4 [f06a9e6c] __do_page_fault at c0434493
 #5 [f06a9eec] do_page_fault at c083eb45
 #6 [f06a9f04] error_code (via page_fault) at c083c5d5
    EAX: 01fb470c EBX: fff35000 ECX: 00000003 EDX: 00000100 EBP:
    00000000
    DS:  007b     ESI: 9e201000 ES:  007b     EDI: 01fb4700 GS:  00e0
    CS:  0060     EIP: c083bc14 ERR: ffffffff EFLAGS: 00010246
 #7 [f06a9f38] _spin_lock at c083bc14
 #8 [f06a9f44] sys_mincore at c0507b7d
 #9 [f06a9fb0] system_call at c083becd
                         start           len
    EAX: ffffffda  EBX: 9e200000  ECX: 00001000  EDX: 6228537f
    DS:  007b      ESI: 00000000  ES:  007b      EDI: 003d0f00
    SS:  007b      ESP: 62285354  EBP: 62285388  GS:  0033
    CS:  0073      EIP: 00291416  ERR: 000000da  EFLAGS: 00000286

This should be a longstanding bug affecting x86 32bit PAE without THP.
Only archs with 64bit large pmd_t and 32bit unsigned long should be
affected.

With THP enabled the barrier() in pmd_none_or_trans_huge_or_clear_bad()
would partly hide the bug when the pmd transition from none to stable,
by forcing a re-read of the *pmd in pmd_offset_map_lock, but when THP is
enabled a new set of problem arises by the fact could then transition
freely in any of the none, pmd_trans_huge or pmd_trans_stable states.
So making the barrier in pmd_none_or_trans_huge_or_clear_bad()
unconditional isn't good idea and it would be a flakey solution.

This should be fully fixed by introducing a pmd_read_atomic that reads
the pmd in order with THP disabled, or by reading the pmd atomically
with cmpxchg8b with THP enabled.

Luckily this new race condition only triggers in the places that must
already be covered by pmd_none_or_trans_huge_or_clear_bad() so the fix
is localized there but this bug is not related to THP.

NOTE: this can trigger on x86 32bit systems with PAE enabled with more
than 4G of ram, otherwise the high part of the pmd will never risk to be
truncated because it would be zero at all times, in turn so hiding the
SMP race.

This bug was discovered and fully debugged by Ulrich, quote:

----
[..]
pmd_none_or_trans_huge_or_clear_bad() loads the content of edx and
eax.

    496 static inline int pmd_none_or_trans_huge_or_clear_bad(pmd_t
    *pmd)
    497 {
    498         /* depend on compiler for an atomic pmd read */
    499         pmd_t pmdval = *pmd;

                                // edi = pmd pointer
0xc0507a74 <sys_mincore+548>:   mov    0x8(%esp),%edi
...
                                // edx = PTE page table high address
0xc0507a84 <sys_mincore+564>:   mov    0x4(%edi),%edx
...
                                // eax = PTE page table low address
0xc0507a8e <sys_mincore+574>:   mov    (%edi),%eax

[..]

Please note that the PMD is not read atomically. These are two "mov"
instructions where the high order bits of the PMD entry are fetched
first. Hence, the above machine code is prone to the following race.

-  The PMD entry {high|low} is 0x0000000000000000.
   The "mov" at 0xc0507a84 loads 0x00000000 into edx.

-  A page fault (on another CPU) sneaks in between the two "mov"
   instructions and instantiates the PMD.

-  The PMD entry {high|low} is now 0x00000003fda38067.
   The "mov" at 0xc0507a8e loads 0xfda38067 into eax.
----
This fixes: CVE-2012-2373

Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoKVM: lock slots_lock around device assignment
Alex Williamson [Wed, 18 Apr 2012 03:46:44 +0000 (21:46 -0600)]
KVM: lock slots_lock around device assignment

Bugdb: 13966
As pointed out by Jason Baron, when assigning a device to a guest
we first set the iommu domain pointer, which enables mapping
and unmapping of memory slots to the iommu.  This leaves a window
where this path is enabled, but we haven't synchronized the iommu
mappings to the existing memory slots.  Thus a slot being removed
at that point could send us down unexpected code paths removing
non-existent pinnings and iommu mappings.  Take the slots_lock
around creating the iommu domain and initial mappings as well as
around iommu teardown to avoid this race.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This fixes: CVE-2012-2121
Conflicts:

virt/kvm/iommu.c

13 years agoKVM: unmap pages from the iommu when slots are removed
Alex Williamson [Wed, 11 Apr 2012 15:51:49 +0000 (09:51 -0600)]
KVM: unmap pages from the iommu when slots are removed

Bugdb: 13966
We've been adding new mappings, but not destroying old mappings.
This can lead to a page leak as pages are pinned using
get_user_pages, but only unpinned with put_page if they still
exist in the memslots list on vm shutdown.  A memslot that is
destroyed while an iommu domain is enabled for the guest will
therefore result in an elevated page reference count that is
never cleared.

Additionally, without this fix, the iommu is only programmed
with the first translation for a gpa.  This can result in
peer-to-peer errors if a mapping is destroyed and replaced by a
new mapping at the same gpa as the iommu will still be pointing
to the original, pinned memory address.
This fixes: CVE-2012-2121

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
13 years agoKVM: introduce kvm_for_each_memslot macro
Xiao Guangrong [Thu, 24 Nov 2011 09:39:18 +0000 (17:39 +0800)]
KVM: introduce kvm_for_each_memslot macro

Bugdb: 13966
Introduce kvm_for_each_memslot to walk all valid memslot

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agofcaps: clear the same personality flags as suid when fcaps are used
Eric Paris [Tue, 17 Apr 2012 20:26:54 +0000 (16:26 -0400)]
fcaps: clear the same personality flags as suid when fcaps are used

Bugdb: 13966
If a process increases permissions using fcaps all of the dangerous
personality flags which are cleared for suid apps should also be cleared.
Thus programs given priviledge with fcaps will continue to have address space
randomization enabled even if the parent tried to disable it to make it
easier to attack.
This fixes: CVE-2012-2123

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
13 years agohwmon: (fam15h_power) Correct sign extension of running_avg_capture
Andreas Herrmann [Fri, 23 Mar 2012 09:02:17 +0000 (10:02 +0100)]
hwmon: (fam15h_power) Correct sign extension of running_avg_capture

Wrong bit was used for sign extension which caused wrong end results.
Thanks to Andre for spotting this bug.

Reported-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@vger.kernel.org
Conflicts:

drivers/hwmon/fam15h_power.c

13 years agoEDAC: Make pci_device_id tables __devinitconst.
Lionel Debroux [Mon, 27 Feb 2012 06:41:47 +0000 (07:41 +0100)]
EDAC: Make pci_device_id tables __devinitconst.

These const tables are currently marked __devinitdata, but
Documentation/PCI/pci.txt says:

"o The ID table array should be marked __devinitconst; this is done
automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE()."

So use DEFINE_PCI_DEVICE_TABLE(x).

Based on PaX and earlier work by Andi Kleen.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Conflicts:

drivers/edac/sb_edac.c

13 years agox86, MCE, AMD: Make APIC LVT thresholding interrupt optional
Borislav Petkov [Mon, 16 Apr 2012 16:01:53 +0000 (18:01 +0200)]
x86, MCE, AMD: Make APIC LVT thresholding interrupt optional

Currently, the APIC LVT interrupt for error thresholding is implicitly
enabled. However, there are models in the F15h range which do not enable
it. Make the code machinery which sets up the APIC interrupt support
an optional setting and add an ->interrupt_capable member to the bank
representation mirroring that capability and enable the interrupt offset
programming only if it is true.

Simplify code and fixup comment style while at it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Conflicts:

arch/x86/kernel/cpu/mcheck/mce_amd.c

13 years agohwmon: (fam15h_power) Increase output resolution
Andre Przywara [Fri, 23 Mar 2012 09:02:17 +0000 (10:02 +0100)]
hwmon: (fam15h_power) Increase output resolution

On high CPU load the accumulating values in the running_avg_cap
register are very low (below 10), so averaging them too early leads
to unnecessary poor output resolution. Since we pretend to output
micro-Watt we better keep all the bits we have as long as possible.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Conflicts:

drivers/hwmon/fam15h_power.c

13 years agoLinux 3.0.35 v3.0.35
Greg Kroah-Hartman [Sun, 17 Jun 2012 18:23:33 +0000 (11:23 -0700)]
Linux 3.0.35

13 years agohugetlb: fix resv_map leak in error path
Dave Hansen [Tue, 29 May 2012 22:06:46 +0000 (15:06 -0700)]
hugetlb: fix resv_map leak in error path

commit c50ac050811d6485616a193eb0f37bfbd191cc89 and
4523e1458566a0e8ecfaff90f380dd23acc44d27 upstream.

When called for anonymous (non-shared) mappings, hugetlb_reserve_pages()
does a resv_map_alloc().  It depends on code in hugetlbfs's
vm_ops->close() to release that allocation.

However, in the mmap() failure path, we do a plain unmap_region() without
the remove_vma() which actually calls vm_ops->close().

This is a decent fix.  This leak could get reintroduced if new code (say,
after hugetlb_reserve_pages() in hugetlbfs_file_mmap()) decides to return
an error.  But, I think it would have to unroll the reservation anyway.

Christoph's test case:

http://marc.info/?l=linux-mm&m=133728900729735

This patch applies to 3.4 and later.  A version for earlier kernels is at
https://lkml.org/lkml/2012/5/22/418.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reported-by: Christoph Lameter <cl@linux.com>
Tested-by: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agomm: fix faulty initialization in vmalloc_init()
KyongHo [Tue, 29 May 2012 22:06:49 +0000 (15:06 -0700)]
mm: fix faulty initialization in vmalloc_init()

commit dbda591d920b4c7692725b13e3f68ecb251e9080 upstream.

The transfer of ->flags causes some of the static mapping virtual
addresses to be prematurely freed (before the mapping is removed) because
VM_LAZY_FREE gets "set" if tmp->flags has VM_IOREMAP set.  This might
cause subsequent vmalloc/ioremap calls to fail because it might allocate
one of the freed virtual address ranges that aren't unmapped.

va->flags has different types of flags from tmp->flags.  If a region with
VM_IOREMAP set is registered with vm_area_add_early(), it will be removed
by __purge_vmap_area_lazy().

Fix vmalloc_init() to correctly initialize vmap_area for the given
vm_struct.

Also initialise va->vm.  If it is not set, find_vm_area() for the early
vm regions will always fail.

Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Cc: "Olav Haugan" <ohaugan@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agomm/vmalloc.c: change void* into explict vm_struct*
Minchan Kim [Tue, 10 Jan 2012 23:08:39 +0000 (15:08 -0800)]
mm/vmalloc.c: change void* into explict vm_struct*

commit db1aecafef58b5dda39c4228debe2c845e4a27ab upstream.

vmap_area->private is void* but we don't use the field for various purpose
but use only for vm_struct.  So change it to a vm_struct* with naming to
improve for readability and type checking.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoe1000: save skb counts in TX to avoid cache misses
Dean Nelson [Thu, 25 Aug 2011 14:39:24 +0000 (14:39 +0000)]
e1000: save skb counts in TX to avoid cache misses

commit 31c15a2f24ebdab14333d9bf5df49757842ae2ec upstream.

Virtual Machines with emulated e1000 network adapter running on Parallels'
server were seeing kernel panics due to the e1000 driver dereferencing an
unexpected NULL pointer retrieved from buffer_info->skb.

The problem has been addressed for the e1000e driver, but not for the e1000.
Since the two drivers share similar code in the affected area, a port of the
following e1000e driver commit solves the issue for the e1000 driver:

commit 9ed318d546a29d7a591dbe648fd1a2efe3be1180
Author: Tom Herbert <therbert@google.com>
Date:   Wed May 5 14:02:27 2010 +0000

    e1000e: save skb counts in TX to avoid cache misses

    In e1000_tx_map, precompute number of segements and bytecounts which
    are derived from fields in skb; these are stored in buffer_info.  When
    cleaning tx in e1000_clean_tx_irq use the values in the associated
    buffer_info for statistics counting, this eliminates cache misses
    on skb fields.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Roman Kagan <rkagan@parallels.com>
13 years agofuse: fix stat call on 32 bit platforms
Pavel Shilovsky [Thu, 10 May 2012 15:49:38 +0000 (19:49 +0400)]
fuse: fix stat call on 32 bit platforms

commit 45c72cd73c788dd18c8113d4a404d6b4a01decf1 upstream.

Now we store attr->ino at inode->i_ino, return attr->ino at the
first time and then return inode->i_ino if the attribute timeout
isn't expired. That's wrong on 32 bit platforms because attr->ino
is 64 bit and inode->i_ino is 32 bit in this case.

Fix this by saving 64 bit ino in fuse_inode structure and returning
it every time we call getattr. Also squash attr->ino into inode->i_ino
explicitly.

Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agox86, MCE, AMD: Make APIC LVT thresholding interrupt optional
Borislav Petkov [Mon, 16 Apr 2012 16:01:53 +0000 (18:01 +0200)]
x86, MCE, AMD: Make APIC LVT thresholding interrupt optional

commit f227d4306cf30e1d5b6f231e8ef9006c34f3d186 upstream.

Currently, the APIC LVT interrupt for error thresholding is implicitly
enabled. However, there are models in the F15h range which do not enable
it. Make the code machinery which sets up the APIC interrupt support
an optional setting and add an ->interrupt_capable member to the bank
representation mirroring that capability and enable the interrupt offset
programming only if it is true.

Simplify code and fixup comment style while at it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
13 years agoiwlwifi: don't mess up the SCD when removing a key
Emmanuel Grumbach [Wed, 6 Jun 2012 07:13:36 +0000 (09:13 +0200)]
iwlwifi: don't mess up the SCD when removing a key

commit d6ee27eb13beab94056e0de52d81220058ca2297 upstream.

When we remove a key, we put a key index which was supposed
to tell the fw that we are actually removing the key. But
instead the fw took that index as a valid index and messed
up the SRAM of the device.

This memory corruption on the device mangled the data of
the SCD. The impact on the user is that SCD queue 2 got
stuck after having removed keys.
The message is the log that was printed is:

Queue 2 stuck for 10000ms

This doesn't seem to fix the higher queues that get stuck
from time to time.

Reviewed-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agosched: Fix the relax_domain_level boot parameter
Dimitri Sivanich [Tue, 5 Jun 2012 18:44:36 +0000 (13:44 -0500)]
sched: Fix the relax_domain_level boot parameter

commit a841f8cef4bb124f0f5563314d0beaf2e1249d72 upstream.

It does not get processed because sched_domain_level_max is 0 at the
time that setup_relax_domain_level() is run.

Simply accept the value as it is, as we don't know the value of
sched_domain_level_max until sched domain construction is completed.

Fix sched_relax_domain_level in cpuset.  The build_sched_domain() routine calls
the set_domain_attribute() routine prior to setting the sd->level, however,
the set_domain_attribute() routine relies on the sd->level to decide whether
idle load balancing will be off/on.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120605184436.GA15668@sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoacpi_video: fix leaking PCI references
Alan Cox [Wed, 25 Apr 2012 13:33:33 +0000 (14:33 +0100)]
acpi_video: fix leaking PCI references

commit cfb46f433a4da97c31780e08a259fac2cb6bd61f upstream.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agohwmon: (fam15h_power) Increase output resolution
Andre Przywara [Fri, 23 Mar 2012 09:02:17 +0000 (10:02 +0100)]
hwmon: (fam15h_power) Increase output resolution

commit 941a956b0e387b21f385f486c34ef67576775cfc upstream.

On high CPU load the accumulating values in the running_avg_cap
register are very low (below 10), so averaging them too early leads
to unnecessary poor output resolution. Since we pretend to output
micro-Watt we better keep all the bits we have as long as possible.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agocan: c_can: fix race condition in c_can_open()
AnilKumar Ch [Wed, 23 May 2012 12:15:11 +0000 (17:45 +0530)]
can: c_can: fix race condition in c_can_open()

commit f461f27a4436dbe691908fe08b867ef888848cc3 upstream.

Fix the issue of C_CAN interrupts getting disabled forever when canconfig
utility is used multiple times. According to NAPI usage we disable all
the hardware interrupts in ISR and re-enable them in poll(). Current
implementation calls napi_enable() after hardware interrupts are enabled.
If we get any interrupts between these two steps then we do not process
those interrupts because napi is not enabled. Mostly these interrupts
come because of STATUS is not 0x7 or ERROR interrupts. If napi_enable()
happens before HW interrupts enabled then c_can_poll() function will be
called eventual re-enabling.

This patch moves the napi_enable() call before interrupts enabled.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agocan: c_can: fix an interrupt thrash issue with c_can driver
AnilKumar Ch [Wed, 23 May 2012 12:15:10 +0000 (17:45 +0530)]
can: c_can: fix an interrupt thrash issue with c_can driver

commit 148c87c89e1a8863d3d965179f3ab1a06490569e upstream.

This patch fixes an interrupt thrash issue with c_can driver.

In c_can_isr() function interrupts are disabled and enabled only in
c_can_poll() function. c_can_isr() & c_can_poll() both read the
irqstatus flag. However, irqstatus is always read as 0 in c_can_poll()
because all C_CAN interrupts are disabled in c_can_isr(). This causes
all interrupts to be re-enabled in c_can_poll() which in turn causes
another interrupt since the event is not really handled. This keeps
happening causing a flood of interrupts.

To fix this, read the irqstatus register in isr and use the same cached
value in the poll function.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agocan: c_can: fix "BUG! echo_skb is occupied!" during transmit
AnilKumar Ch [Wed, 23 May 2012 12:15:09 +0000 (17:45 +0530)]
can: c_can: fix "BUG! echo_skb is occupied!" during transmit

commit 617caccebe451716df21c069b079d5936ed7b0f3 upstream.

This patch fixes an issue with transmit routine, which causes
"can_put_echo_skb: BUG! echo_skb is occupied!" message when
using "cansequence -p" on D_CAN controller.

In c_can driver, while transmitting packets tx_echo flag holds
the no of can frames put for transmission into the hardware.

As the comment above c_can_do_tx() indicates, if we find any packet
which is not transmitted then we should stop looking for more.
In the current implementation this is not taken care of causing the
said message.

Also, fix the condition used to find if the packet is transmitted
or not. Current code skips the first tx message object and ends up
checking one extra invalid object.

While at it, fix the comment on top of c_can_do_tx() to use the
terminology "packet" instead of "package" since it is more
standard.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agonet: sierra_net: device IDs for Aircard 320U++
Bjørn Mork [Tue, 5 Jun 2012 21:18:10 +0000 (21:18 +0000)]
net: sierra_net: device IDs for Aircard 320U++

commit dd03cff23d694cfb0fdae80cb618e7ced05ea696 upstream.

Adding device IDs for Aircard 320U and two other devices
found in the out-of-tree version of this driver.

Cc: linux@sierrawireless.com
Cc: Autif Khan <autif.mlist@gmail.com>
Cc: Tom Cassidy <tomas.cassidy@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agocfg80211: fix interface combinations check
Johannes Berg [Tue, 5 Jun 2012 10:16:50 +0000 (12:16 +0200)]
cfg80211: fix interface combinations check

commit 463454b5dbd8dbab6e2fc6c557329e5b811b9c32 upstream.

If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agomac80211: clean up remain-on-channel on interface stop
Johannes Berg [Thu, 31 May 2012 13:09:27 +0000 (15:09 +0200)]
mac80211: clean up remain-on-channel on interface stop

commit 71ecfa1893034eeb1c93e02e22ee2ad26d080858 upstream.

When any interface goes down, it could be the one that we
were doing a remain-on-channel with. We therefore need to
cancel the remain-on-channel and flush the related work
structs so they don't run after the interface has been
removed or even destroyed.

It's also possible in this case that an off-channel SKB
was never transmitted, so free it if this is the case.
Note that this can also happen if the driver finishes
the off-channel period without ever starting it.

Reported-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agocrypto: aesni-intel - fix unaligned cbc decrypt for x86-32
Mathias Krause [Tue, 29 May 2012 23:43:08 +0000 (01:43 +0200)]
crypto: aesni-intel - fix unaligned cbc decrypt for x86-32

commit 7c8d51848a88aafdb68f42b6b650c83485ea2f84 upstream.

The 32 bit variant of cbc(aes) decrypt is using instructions requiring
128 bit aligned memory locations but fails to ensure this constraint in
the code. Fix this by loading the data into intermediate registers with
load unaligned instructions.

This fixes reported general protection faults related to aesni.

References: https://bugzilla.kernel.org/show_bug.cgi?id=43223
Reported-by: Daniel <garkein@mailueberfall.de>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agopowerpc: Fix kernel panic during kernel module load
Steffen Rumler [Wed, 6 Jun 2012 14:37:17 +0000 (16:37 +0200)]
powerpc: Fix kernel panic during kernel module load

commit 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf upstream.

This fixes a problem which can causes kernel oopses while loading
a kernel module.

According to the PowerPC EABI specification, GPR r11 is assigned
the dedicated function to point to the previous stack frame.
In the powerpc-specific kernel module loader, do_plt_call()
(in arch/powerpc/kernel/module_32.c), GPR r11 is also used
to generate trampoline code.

This combination crashes the kernel, in the case where the compiler
chooses to use a helper function for saving GPRs on entry, and the
module loader has placed the .init.text section far away from the
.text section, meaning that it has to generate a trampoline for
functions in the .init.text section to call the GPR save helper.
Because the trampoline trashes r11, references to the stack frame
using r11 can cause an oops.

The fix just uses GPR r12 instead of GPR r11 for generating the
trampoline code.  According to the statements from Freescale, this is
safe from an EABI perspective.

I've tested the fix for kernel 2.6.33 on MPC8541.

Signed-off-by: Steffen Rumler <steffen.rumler.ext@nsn.com>
[paulus@samba.org: reworded the description]
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agobtree: fix tree corruption in btree_get_prev()
Roland Dreier [Thu, 7 Jun 2012 21:21:13 +0000 (14:21 -0700)]
btree: fix tree corruption in btree_get_prev()

commit cbf8ae32f66a9ceb8907ad9e16663c2a29e48990 upstream.

The memory the parameter __key points to is used as an iterator in
btree_get_prev(), so if we save off a bkey() pointer in retry_key and
then assign that to __key, we'll end up corrupting the btree internals
when we do eg

longcpy(__key, bkey(geo, node, i), geo->keylen);

to return the key value.  What we should do instead is use longcpy() to
copy the key value that retry_key points to __key.

This can cause a btree to get corrupted by seemingly read-only
operations such as btree_for_each_safe.

[akpm@linux-foundation.org: avoid the double longcpy()]
Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agochar/agp: add another Ironlake host bridge
Eugeni Dodonov [Wed, 6 Jun 2012 14:59:06 +0000 (11:59 -0300)]
char/agp: add another Ironlake host bridge

commit 67384fe3fd450536342330f684ea1f7dcaef8130 upstream.

This seems to come on Gigabyte H55M-S2V and was discovered through the
https://bugs.freedesktop.org/show_bug.cgi?id=50381 debugging.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50381
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoMCE, AMD: Drop too granulary family model checks
Borislav Petkov [Wed, 4 Apr 2012 12:21:02 +0000 (14:21 +0200)]
MCE, AMD: Drop too granulary family model checks

MCA details seldom change inbetween the models of a family so don't
be too conservative and enable decoding on everything starting from
K8 onwards. Minor adjustments can come in later but most importantly,
we have some decoding infrastructure in place for upcoming models by
default.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoMCE, AMD: Constify error tables
Borislav Petkov [Tue, 29 Nov 2011 18:03:25 +0000 (19:03 +0100)]
MCE, AMD: Constify error tables

... so that checkpatch can chill out.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoMCE, AMD: Correct bank 5 error signatures
Borislav Petkov [Fri, 25 Nov 2011 14:42:59 +0000 (15:42 +0100)]
MCE, AMD: Correct bank 5 error signatures

... and remove superfluous ErrorCodeExt check.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoMCE, AMD: Rework NB MCE signatures
Borislav Petkov [Thu, 24 Nov 2011 20:29:57 +0000 (21:29 +0100)]
MCE, AMD: Rework NB MCE signatures

Correct their formulation, replace per-family functions with a single,
unified lookup table.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoMCE, AMD: Correct VB data error description
Borislav Petkov [Wed, 23 Nov 2011 13:50:44 +0000 (14:50 +0100)]
MCE, AMD: Correct VB data error description

Sync with latest BKDG error types.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoMCE, AMD: Correct ucode patch buffer description
Borislav Petkov [Mon, 21 Nov 2011 18:45:34 +0000 (19:45 +0100)]
MCE, AMD: Correct ucode patch buffer description

This MC1 error signature is called differently now, fix it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoMCE, AMD: Correct some MC0 error types
Borislav Petkov [Tue, 15 Nov 2011 16:10:58 +0000 (17:10 +0100)]
MCE, AMD: Correct some MC0 error types

Use "System Read Data Error" as a more general name for MC0 bus errors
on F15h and update some error definitions.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
13 years agoamd64_edac: Fix K8 revD and later chip select sizes
Borislav Petkov [Wed, 9 Nov 2011 20:28:43 +0000 (21:28 +0100)]
amd64_edac: Fix K8 revD and later chip select sizes

Fix DRAM chip select sizes calculation for K8, revisions D and E.

Reported-by: Niklas Söderlund <niklas.soderlund@ericsson.com
Link: http://lkml.kernel.org/r/1320849178-23340-1-git-send-email-niklas.soderlund@ericsson.com
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoamd64_edac: Fix missing csrows sysfs nodes
Ashish Shenoy [Thu, 23 Feb 2012 01:20:38 +0000 (17:20 -0800)]
amd64_edac: Fix missing csrows sysfs nodes

While initializing the array of csrow attribute instances, a few csrows
were uninitialized. This happened because the module only performed a
check for DRAM base ctl register0's and not DRAM base ctl register1's
chip select enable bit. There could be systems with DIMMs populated
on only single memory channel whereas the module also assumed that a
dual channel dimm had double the memory size of a single memory channel
instead of checking the memory on each channel.

This patch fixes these above issues.

Signed-off-by: Ashish Shenoy <ashenoy@riverbed.com>
Signed-off-by: Prasanna S. Panchamukhi <ppanchamukhi@riverbed.com>
Link: http://lkml.kernel.org/r/4F459CFA.5090604@riverbed.com
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoamd64_edac: Cleanup return type of amd64_determine_edac_cap()
Dan Carpenter [Thu, 6 Oct 2011 06:30:25 +0000 (02:30 -0400)]
amd64_edac: Cleanup return type of amd64_determine_edac_cap()

Sparse complains that edac_cap was declared as dev_type and we are
returning edac_type.  Historically, edac_type was correct but since
then we have changed it to return a bit field.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://lkml.kernel.org/r/20111006063025.GA2615@mwanda
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoamd64_edac: Add a fix for Erratum 505
Borislav Petkov [Mon, 19 Sep 2011 15:34:45 +0000 (17:34 +0200)]
amd64_edac: Add a fix for Erratum 505

When accessing the scrub rate control register (F3x58) on F15h, the DRAM
controller selector (F1x10C[DctCfgSel]) has to point to DCT0 so that the
scrub rate configuration can take effect. See Erratum 505 in the AMD
F15h revision guide for more details.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoEDAC, MCE, AMD: Simplify NB MCE decoder interface
Borislav Petkov [Wed, 24 Aug 2011 16:44:22 +0000 (18:44 +0200)]
EDAC, MCE, AMD: Simplify NB MCE decoder interface

Drop third nbcfg argument which is old remains and not required anymore.

No functionality change.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoEDAC, MCE, AMD: Drop local coreid reporting
Borislav Petkov [Wed, 24 Aug 2011 15:47:11 +0000 (17:47 +0200)]
EDAC, MCE, AMD: Drop local coreid reporting

MCE decoding code is reporting the core which encountered the error
unconditionally now so drop this piece. Besides, it reported the
coreid in the local processor package which is not that valuable as a
datapoint.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoEDAC, MCE, AMD: Print valid addr when reporting an error
Borislav Petkov [Fri, 30 Sep 2011 14:34:44 +0000 (16:34 +0200)]
EDAC, MCE, AMD: Print valid addr when reporting an error

The MCi_STATUS bank has a AddrV bit which, when set, denotes that the
corresponding MCi_ADDR MSR contains a valid address belonging to the
MCE currently being reported. Dump it since it is definitely relevant
information.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoEDAC, MCE, AMD: Print CPU number when reporting the error
Borislav Petkov [Thu, 4 Aug 2011 17:25:24 +0000 (19:25 +0200)]
EDAC, MCE, AMD: Print CPU number when reporting the error

Currently, correctable ECCs go through mcelog and do not print the scary
MCE banner. In that case, however, reporting the core where the CECC
happened is important information so dump it along with the decoded
string albeit at risk of having a minor redundancy.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agox86, MCE, AMD: Disable error thresholding bank 4 on some models
Borislav Petkov [Fri, 20 Apr 2012 16:01:34 +0000 (18:01 +0200)]
x86, MCE, AMD: Disable error thresholding bank 4 on some models

Turn off MC4_MISC thresholding banks on models which have them but that
particular processor implementation does not supply applicable error
sources to be counted.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agox86, MCE, AMD: Hide interrupt_enable sysfs node
Borislav Petkov [Mon, 16 Apr 2012 16:20:36 +0000 (18:20 +0200)]
x86, MCE, AMD: Hide interrupt_enable sysfs node

Depending on whether the box supports the APIC LVT interrupt for
thresholding, we want to show the 'interrupt_enable' sysfs node or not.
Make that the case by adding it to the default sysfs attributes only if
it is supported.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agohwmon: (k10temp) Add support for AMD Trinity CPUs
Andre Przywara [Fri, 30 Mar 2012 20:48:20 +0000 (16:48 -0400)]
hwmon: (k10temp) Add support for AMD Trinity CPUs

The on-chip northbridge's temperature sensor of the upcoming
AMD Trinity CPUs works the same as for the previous CPUs.
Since it has a different PCI-ID, we just add the new one to the list
supported by k10temp.
This allows to use the k10temp driver on those CPUs.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: fam15h_power: fix bogus values with current BIOSes
Andre Przywara [Mon, 9 Apr 2012 22:16:34 +0000 (18:16 -0400)]
hwmon: fam15h_power: fix bogus values with current BIOSes

Newer BKDG[1] versions recommend a different initialization value for
the running average range register in the northbridge. This improves
the power reading by avoiding counter saturations resulting in bogus
values for anything below about 80% of TDP power consumption.
Updated BIOSes will have this new value set up from the beginning,
but meanwhile we correct this value ourselves.
This needs to be done on all northbridges, even on those where the
driver itself does not register at.

This fixes the driver on all current machines to provide proper
values for idle load.

[1]
http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf
Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452)

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
[guenter.roeck@ericsson.com: Removed unnecessary return statement]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@vger.kernel.org # 3.0+
13 years agox86/amd: Re-enable CPU topology extensions in case BIOS has disabled it
Andreas Herrmann [Tue, 3 Apr 2012 10:13:07 +0000 (12:13 +0200)]
x86/amd: Re-enable CPU topology extensions in case BIOS has disabled it

BIOS will switch off the corresponding feature flag on family
15h models 10h-1fh non-desktop CPUs.

The topology extension CPUID leafs are required to detect which
cores belong to the same compute unit. (thread siblings mask is
set accordingly and also correct information about L1i and L2
cache sharing depends on this).

W/o this patch we wouldn't see which cores belong to the same
compute unit and also cache sharing information for L1i and L2
would be incorrect on such systems.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
13 years agoSPEC: v2.6.39-200.20.0
Maxim Uvarov [Fri, 15 Jun 2012 18:49:12 +0000 (22:49 +0400)]
SPEC: v2.6.39-200.20.0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'uek2-200-di' of git://ca-git.us.oracle.com/linux-mkp-public into uek...
Maxim Uvarov [Fri, 15 Jun 2012 18:43:40 +0000 (22:43 +0400)]
Merge branch 'uek2-200-di' of git://ca-git.us.oracle.com/linux-mkp-public into uek-2.6.39-200

13 years agoUpdate lpfc version for 8.3.5.68.6p driver release
Martin K. Petersen [Fri, 15 Jun 2012 15:31:01 +0000 (11:31 -0400)]
Update lpfc version for 8.3.5.68.6p driver release

Signed-off-by: Vaios Papadimitriou <vaios.papadimitriou@emulex.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoFix system hang due to bad protection module parameters (CR 130769)
Martin K. Petersen [Fri, 15 Jun 2012 15:30:06 +0000 (11:30 -0400)]
Fix system hang due to bad protection module parameters (CR 130769)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoSPEC: v2.6.39-300.0.3
Maxim Uvarov [Thu, 14 Jun 2012 09:01:47 +0000 (13:01 +0400)]
SPEC: v2.6.39-300.0.3

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>