cascardo/linux.git
12 years agofreezer: fix wait_event_freezable/__thaw_task races
Oleg Nesterov [Wed, 23 Nov 2011 17:28:17 +0000 (09:28 -0800)]
freezer: fix wait_event_freezable/__thaw_task races

wait_event_freezable() and friends stop the waiting if try_to_freeze()
fails. This is not right, we can race with __thaw_task() and in this
case

- wait_event_freezable() returns the wrong ERESTARTSYS

- wait_event_freezable_timeout() can return the positive
  value while condition == F

Change the code to always check __retval/condition before return.

Note: with or without this patch the timeout logic looks strange,
probably we should recalc timeout if try_to_freeze() returns T.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
12 years agofreezer: kill unused set_freezable_with_signal()
Tejun Heo [Wed, 23 Nov 2011 17:28:17 +0000 (09:28 -0800)]
freezer: kill unused set_freezable_with_signal()

There's no in-kernel user of set_freezable_with_signal() left.  Mixing
TIF_SIGPENDING with kernel threads can lead to nasty corner cases as
kernel threads never travel signal delivery path on their own.

e.g. the current implementation is buggy in the cancelation path of
__thaw_task().  It calls recalc_sigpending_and_wake() in an attempt to
clear TIF_SIGPENDING but the function never clears it regardless of
sigpending state.  This means that signallable freezable kthreads may
continue executing with !freezing() && stuck TIF_SIGPENDING, which can
be troublesome.

This patch removes set_freezable_with_signal() along with
PF_FREEZER_NOSIG and recalc_sigpending*() calls in freezer.  User
tasks get TIF_SIGPENDING, kernel tasks get woken up and the spurious
sigpending is dealt with in the usual signal delivery path.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
12 years agodmatest: don't use set_freezable_with_signal()
Tejun Heo [Wed, 23 Nov 2011 17:28:16 +0000 (09:28 -0800)]
dmatest: don't use set_freezable_with_signal()

Commit 981ed70d8e (dmatest: make dmatest threads freezable) made
dmatest kthread use set_freezable_with_signal(); however, the
interface is scheduled to be removed in the next merge window.

The problem is that unlike userland tasks there's no default place
which handles signal pending state and it isn't clear who owns and/or
is responsible for clearing TIF_SIGPENDING.  For example, in the
current code, try_to_freeze() clears TIF_SIGPENDING but it isn't sure
whether it actually owns the TIF_SIGPENDING nor is it race-free -
ie. the task may continue to run with TIF_SIGPENDING set after the
freezable section.

Unfortunately, we don't have wait_for_completion_freezable_timeout().
This patch open codes it and uses wait_event_freezable_timeout()
instead and removes timeout reloading - wait_event_freezable_timeout()
won't return across freezing events (currently racy but fix scheduled)
and timer doesn't decrement while the task is in freezer.  Although
this does lose timer-reset-over-freezing, given that timeout is
supposed to be long enough and failure to finish inside is considered
irrecoverable, I don't think this is worth the complexity.

While at it, move completion to outer scope and explain that we're
ignoring dangling pointer problem after timeout.  This should give
slightly better chance at avoiding oops after timeout.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agousb_storage: don't use set_freezable_with_signal()
Tejun Heo [Mon, 21 Nov 2011 20:32:26 +0000 (12:32 -0800)]
usb_storage: don't use set_freezable_with_signal()

The current implementation of set_freezable_with_signal() is buggy and
tricky to get right.  usb-storage is the only user and its use can be
avoided trivially.

All usb-storage wants is to be able to sleep with timeout and get
woken up if freezing() becomes true.  This can be trivially
implemented by doing interruptible wait w/ freezing() included in the
wait condition.  There's no reason to use set_freezable_with_signal().

Perform interruptible wait on freezing() instead of using
set_freezable_with_signal(), which is scheduled for removal.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
12 years agofreezer: remove unused @sig_only from freeze_task()
Tejun Heo [Mon, 21 Nov 2011 20:32:26 +0000 (12:32 -0800)]
freezer: remove unused @sig_only from freeze_task()

After "freezer: make freezing() test freeze conditions in effect
instead of TIF_FREEZE", freezing() returns authoritative answer on
whether the current task should freeze or not and freeze_task()
doesn't need or use @sig_only.  Remove it.

While at it, rewrite function comment for freeze_task() and rename
@sig_only to @user_only in try_to_freeze_tasks().

This patch doesn't cause any functional change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: use lock_task_sighand() in fake_signal_wake_up()
Tejun Heo [Mon, 21 Nov 2011 20:32:26 +0000 (12:32 -0800)]
freezer: use lock_task_sighand() in fake_signal_wake_up()

cgroup_freezer calls freeze_task() without holding tasklist_lock and,
if the task is exiting, its ->sighand may be gone by the time
fake_signal_wake_up() is called.  Use lock_task_sighand() instead of
accessing ->sighand directly.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Paul Menage <paul@paulmenage.org>
12 years agofreezer: restructure __refrigerator()
Tejun Heo [Mon, 21 Nov 2011 20:32:26 +0000 (12:32 -0800)]
freezer: restructure __refrigerator()

If another freeze happens before all tasks leave FROZEN state after
being thawed, the freezer can see the existing FROZEN and consider the
tasks to be frozen but they can clear FROZEN without checking the new
freezing().

Oleg suggested restructuring __refrigerator() such that there's single
condition check section inside freezer_lock and sigpending is cleared
afterwards, which fixes the problem and simplifies the code.
Restructure accordingly.

-v2: Frozen loop exited without releasing freezer_lock.  Fixed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
12 years agofreezer: fix set_freezable[_with_signal]() race
Tejun Heo [Mon, 21 Nov 2011 20:32:25 +0000 (12:32 -0800)]
freezer: fix set_freezable[_with_signal]() race

A kthread doing set_freezable*() may race with on-going PM freeze and
the freezer might think all tasks are frozen while the new freezable
kthread is merrily proceeding to execute code paths which aren't
supposed to be executing during PM freeze.

Reimplement set_freezable[_with_signal]() using __set_freezable() such
that freezable PF flags are modified under freezer_lock and
try_to_freeze() is called afterwards.  This eliminates race condition
against freezing.

Note: Separated out from larger patch to resolve fix order dependency
      Oleg pointed out.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: remove should_send_signal() and update frozen()
Tejun Heo [Mon, 21 Nov 2011 20:32:25 +0000 (12:32 -0800)]
freezer: remove should_send_signal() and update frozen()

should_send_signal() is only used in freezer.c.  Exporting them only
increases chance of abuse.  Open code the two users and remove it.

Update frozen() to return bool.

Signed-off-by: Tejun Heo <tj@kernel.org>
12 years agofreezer: remove now unused TIF_FREEZE
Tejun Heo [Mon, 21 Nov 2011 20:32:25 +0000 (12:32 -0800)]
freezer: remove now unused TIF_FREEZE

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
12 years agofreezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE
Tejun Heo [Mon, 21 Nov 2011 20:32:25 +0000 (12:32 -0800)]
freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE

Using TIF_FREEZE for freezing worked when there was only single
freezing condition (the PM one); however, now there is also the
cgroup_freezer and single bit flag is getting clumsy.
thaw_processes() is already testing whether cgroup freezing in in
effect to avoid thawing tasks which were frozen by both PM and cgroup
freezers.

This is racy (nothing prevents race against cgroup freezing) and
fragile.  A much simpler way is to test actual freeze conditions from
freezing() - ie. directly test whether PM or cgroup freezing is in
effect.

This patch adds variables to indicate whether and what type of
freezing conditions are in effect and reimplements freezing() such
that it directly tests whether any of the two freezing conditions is
active and the task should freeze.  On fast path, freezing() is still
very cheap - it only tests system_freezing_cnt.

This makes the clumsy dancing aroung TIF_FREEZE unnecessary and
freeze/thaw operations more usual - updating state variables for the
new state and nudging target tasks so that they notice the new state
and comply.  As long as the nudging happens after state update, it's
race-free.

* This allows use of freezing() in freeze_task().  Replace the open
  coded tests with freezing().

* p != current test is added to warning printing conditions in
  try_to_freeze_tasks() failure path.  This is necessary as freezing()
  is now true for the task which initiated freezing too.

-v2: Oleg pointed out that re-freezing FROZEN cgroup could increment
     system_freezing_cnt.  Fixed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Paul Menage <paul@paulmenage.org> (for the cgroup portions)
12 years agocgroup_freezer: prepare for removal of TIF_FREEZE
Tejun Heo [Mon, 21 Nov 2011 20:32:25 +0000 (12:32 -0800)]
cgroup_freezer: prepare for removal of TIF_FREEZE

TIF_FREEZE will be removed soon and freezing() will directly test
whether any freezing condition is in effect.  Make the following
changes in preparation.

* Rename cgroup_freezing_or_frozen() to cgroup_freezing() and make it
  return bool.

* Make cgroup_freezing() access task_freezer() under rcu read lock
  instead of task_lock().  This makes the state dereferencing racy
  against task moving to another cgroup; however, it was already racy
  without this change as ->state dereference wasn't synchronized.
  This will be later dealt with using attach hooks.

* freezer->state is now set before trying to push tasks into the
  target state.

-v2: Oleg pointed out that freeze_change_state() was setting
     freeze->state incorrectly to CGROUP_FROZEN instead of
     CGROUP_FREEZING.  Fixed.

-v3: Matt pointed out that setting CGROUP_FROZEN used to always invoke
     try_to_freeze_cgroup() regardless of the current state.  Patch
     updated such that the actual freeze/thaw operations are always
     performed on invocation.  This shouldn't make any difference
     unless something is broken.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Paul Menage <paul@paulmenage.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: clean up freeze_processes() failure path
Tejun Heo [Mon, 21 Nov 2011 20:32:24 +0000 (12:32 -0800)]
freezer: clean up freeze_processes() failure path

freeze_processes() failure path is rather messy.  Freezing is canceled
for workqueues and tasks which aren't frozen yet but frozen tasks are
left alone and should be thawed by the caller and of course some
callers (xen and kexec) didn't do it.

This patch updates __thaw_task() to handle cancelation correctly and
makes freeze_processes() and freeze_kernel_threads() call
thaw_processes() on failure instead so that the system is fully thawed
on failure.  Unnecessary [suspend_]thaw_processes() calls are removed
from kernel/power/hibernate.c, suspend.c and user.c.

While at it, restructure error checking if clause in suspend_prepare()
to be less weird.

-v2: Srivatsa spotted missing removal of suspend_thaw_processes() in
     suspend_prepare() and error in commit message.  Updated.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
12 years agofreezer: kill PF_FREEZING
Tejun Heo [Mon, 21 Nov 2011 20:32:24 +0000 (12:32 -0800)]
freezer: kill PF_FREEZING

With the previous changes, there's no meaningful difference between
PF_FREEZING and PF_FROZEN.  Remove PF_FREEZING and use PF_FROZEN
instead in task_contributes_to_load().

Signed-off-by: Tejun Heo <tj@kernel.org>
12 years agofreezer: test freezable conditions while holding freezer_lock
Tejun Heo [Mon, 21 Nov 2011 20:32:24 +0000 (12:32 -0800)]
freezer: test freezable conditions while holding freezer_lock

try_to_freeze_tasks() and thaw_processes() use freezable() and
frozen() as preliminary tests before initiating operations on a task.
These are done without any synchronization and hinder with
synchronization cleanup without any real performance benefits.

In try_to_freeze_tasks(), open code self test and move PF_NOFREEZE and
frozen() tests inside freezer_lock in freeze_task().

thaw_processes() can simply drop freezable() test as frozen() test in
__thaw_task() is enough.

Note: This used to be a part of larger patch to fix set_freezable()
      race.  Separated out to satisfy ordering among dependent fixes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: make freezing indicate freeze condition in effect
Tejun Heo [Mon, 21 Nov 2011 20:32:24 +0000 (12:32 -0800)]
freezer: make freezing indicate freeze condition in effect

Currently freezing (TIF_FREEZE) and frozen (PF_FROZEN) states are
interlocked - freezing is set to request freeze and when the task
actually freezes, it clears freezing and sets frozen.

This interlocking makes things more complex than necessary - freezing
doesn't mean there's freezing condition in effect and frozen doesn't
match the task actually entering and leaving frozen state (it's
cleared by the thawing task).

This patch makes freezing indicate that freeze condition is in effect.
A task enters and stays frozen if freezing.  This makes PF_FROZEN
manipulation done only by the task itself and prevents wakeup from
__thaw_task() leaking outside of refrigerator.

The only place which needs to tell freezing && !frozen is
try_to_freeze_task() to whine about tasks which don't enter frozen.
It's updated to test the condition explicitly.

With the change, frozen() state my linger after __thaw_task() until
the task wakes up and exits fridge.  This can trigger BUG_ON() in
update_if_frozen().  Work it around by testing freezing() && frozen()
instead of frozen().

-v2: Oleg pointed out missing re-check of freezing() when trying to
     clear FROZEN and possible spurious BUG_ON() trigger in
     update_if_frozen().  Both fixed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul Menage <paul@paulmenage.org>
12 years agofreezer: use dedicated lock instead of task_lock() + memory barrier
Tejun Heo [Mon, 21 Nov 2011 20:32:24 +0000 (12:32 -0800)]
freezer: use dedicated lock instead of task_lock() + memory barrier

Freezer synchronization is needlessly complicated - it's by no means a
hot path and the priority is staying unintrusive and safe.  This patch
makes it simply use a dedicated lock instead of piggy-backing on
task_lock() and playing with memory barriers.

On the failure path of try_to_freeze_tasks(), locking is moved from it
to cancel_freezing().  This makes the frozen() test racy but the race
here is a non-issue as the warning is printed for tasks which failed
to enter frozen for 20 seconds and race on PF_FROZEN at the last
moment doesn't change anything.

This simplifies freezer implementation and eases further changes
including some race fixes.

Signed-off-by: Tejun Heo <tj@kernel.org>
12 years agofreezer: don't distinguish nosig tasks on thaw
Tejun Heo [Mon, 21 Nov 2011 20:32:23 +0000 (12:32 -0800)]
freezer: don't distinguish nosig tasks on thaw

There's no point in thawing nosig tasks before others.  There's no
ordering requirement between the two groups on thaw, which the staged
thawing can't guarantee anyway.  Simplify thaw_processes() by removing
the distinction and collapsing thaw_tasks() into thaw_processes().
This will help further updates to freezer.

Signed-off-by: Tejun Heo <tj@kernel.org>
12 years agofreezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasks
Tejun Heo [Mon, 21 Nov 2011 20:32:23 +0000 (12:32 -0800)]
freezer: remove racy clear_freeze_flag() and set PF_NOFREEZE on dead tasks

clear_freeze_flag() in exit_mm() is racy.  Freezing can start
afterwards.  Remove it.  Skipping freezer for exiting task will be
properly implemented later.

Also, freezable() was testing exit_state directly to make system
freezer ignore dead tasks.  Let the exiting task set PF_NOFREEZE after
entering TASK_DEAD instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: rename thaw_process() to __thaw_task() and simplify the implementation
Tejun Heo [Mon, 21 Nov 2011 20:32:23 +0000 (12:32 -0800)]
freezer: rename thaw_process() to __thaw_task() and simplify the implementation

thaw_process() now has only internal users - system and cgroup
freezers.  Remove the unnecessary return value, rename, unexport and
collapse __thaw_process() into it.  This will help further updates to
the freezer code.

-v3: oom_kill grew a use of thaw_process() while this patch was
     pending.  Convert it to use __thaw_task() for now.  In the longer
     term, this should be handled by allowing tasks to die if killed
     even if it's frozen.

-v2: minor style update as suggested by Matt.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Paul Menage <menage@google.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
12 years agofreezer: implement and use kthread_freezable_should_stop()
Tejun Heo [Mon, 21 Nov 2011 20:32:23 +0000 (12:32 -0800)]
freezer: implement and use kthread_freezable_should_stop()

Writeback and thinkpad_acpi have been using thaw_process() to prevent
deadlock between the freezer and kthread_stop(); unfortunately, this
is inherently racy - nothing prevents freezing from happening between
thaw_process() and kthread_stop().

This patch implements kthread_freezable_should_stop() which enters
refrigerator if necessary but is guaranteed to return if
kthread_stop() is invoked.  Both thaw_process() users are converted to
use the new function.

Note that this deadlock condition exists for many of freezable
kthreads.  They need to be converted to use the new should_stop or
freezable workqueue.

Tested with synthetic test case.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
12 years agofreezer: unexport refrigerator() and update try_to_freeze() slightly
Tejun Heo [Mon, 21 Nov 2011 20:32:22 +0000 (12:32 -0800)]
freezer: unexport refrigerator() and update try_to_freeze() slightly

There is no reason to export two functions for entering the
refrigerator.  Calling refrigerator() instead of try_to_freeze()
doesn't save anything noticeable or removes any race condition.

* Rename refrigerator() to __refrigerator() and make it return bool
  indicating whether it scheduled out for freezing.

* Update try_to_freeze() to return bool and relay the return value of
  __refrigerator() if freezing().

* Convert all refrigerator() users to try_to_freeze().

* Update documentation accordingly.

* While at it, add might_sleep() to try_to_freeze().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
Cc: Christoph Hellwig <hch@infradead.org>
12 years agofreezer: don't unnecessarily set PF_NOFREEZE explicitly
Tejun Heo [Mon, 21 Nov 2011 20:32:22 +0000 (12:32 -0800)]
freezer: don't unnecessarily set PF_NOFREEZE explicitly

Some drivers set PF_NOFREEZE in their kthread functions which is
completely unnecessary and racy - some part of freezer code doesn't
consider cases where PF_NOFREEZE is set asynchronous to freezer
operations.

In general, there's no reason to allow setting PF_NOFREEZE explicitly.
Remove them and change the documentation to note that setting
PF_NOFREEZE directly isn't allowed.

-v2: Dropped change to twl4030-irq.c as it no longer uses PF_NOFREEZE.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "Gustavo F. Padovan" <padovan@profusion.mobi>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: wwang <wei_wang@realsil.com.cn>
12 years agofreezer: fix current->state restoration race in refrigerator()
Tejun Heo [Mon, 21 Nov 2011 20:32:22 +0000 (12:32 -0800)]
freezer: fix current->state restoration race in refrigerator()

refrigerator() saves current->state before entering frozen state and
restores it before returning using __set_current_state(); however,
this is racy, for example, please consider the following sequence.

set_current_state(TASK_INTERRUPTIBLE);
try_to_freeze();
if (kthread_should_stop())
break;
schedule();

If kthread_stop() races with ->state restoration, the restoration can
restore ->state to TASK_INTERRUPTIBLE after kthread_stop() sets it to
TASK_RUNNING but kthread_should_stop() may still see zero
->should_stop because there's no memory barrier between restoring
TASK_INTERRUPTIBLE and kthread_should_stop() test.

This isn't restricted to kthread_should_stop().  current->state is
often used in memory barrier based synchronization and silently
restoring it w/o mb breaks them.

Use set_current_state() instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sun, 20 Nov 2011 22:59:33 +0000 (14:59 -0800)]
Merge git://git./linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
  ipv4: fix redirect handling
  ping: dont increment ICMP_MIB_INERRORS
  sky2: fix hang in napi_disable
  sky2: enforce minimum ring size
  bonding: Don't allow mode change via sysfs with slaves present
  f_phonet: fix page offset of first received fragment
  stmmac: fix pm functions avoiding sleep on spinlock
  stmmac: remove spin_lock in stmmac_ioctl.
  stmmac: parameters auto-tuning through HW cap reg
  stmmac: fix advertising 1000Base capabilties for non GMII iface
  stmmac: use mdelay on timeout of sw reset
  sky2: version 1.30
  sky2: used fixed RSS key
  sky2: reduce default Tx ring size
  sky2: rename up/down functions
  sky2: pci posting issues
  sky2: fix hang on shutdown (and other irq issues)
  r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
  MAINTAINERS: change email address for shemminger
  pch_gbe: Move #include of module.h
  ...

12 years agoMerge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 20 Nov 2011 22:57:43 +0000 (14:57 -0800)]
Merge branch 'kvm-updates/3.2' of git://git./virt/kvm/kvm

* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM guest: prevent tracing recursion with kvmclock
  Revert "KVM: PPC: Add support for explicit HIOR setting"
  KVM: VMX: Check for automatic switch msr table overflow
  KVM: VMX: Add support for guest/host-only profiling
  KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
  KVM: s390: announce SYNC_MMU
  KVM: s390: Fix tprot locking
  KVM: s390: handle SIGP sense running intercepts
  KVM: s390: Fix RUNNING flag misinterpretation

12 years agoMerge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur...
Linus Torvalds [Sun, 20 Nov 2011 22:34:58 +0000 (14:34 -0800)]
Merge branch 'fixes' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  ARM: wire up process_vm_writev and process_vm_readv syscalls
  ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list
  ARM: 7158/1: add new MFP implement for NUC900
  ARM: 7157/1: fix a building WARNING for nuc900
  ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
  ARM: 7155/1: arch.h: Declare 'pt_regs' locally
  ARM: 7154/1: mach-bcmring: fix build error in dma.c
  ARM: 7153/1: mach-bcmring: fix build error in core.c
  ARM: 7152/1: distclean: Remove generated .dtb files
  ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
  ARM: 7149/1: spi/pl022: Enable clock in probe
  Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Sun, 20 Nov 2011 22:33:02 +0000 (14:33 -0800)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Suspend: Fix bug in suspend statistics update
  PM / Hibernate: Fix the early termination of test modes
  PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
  PM Sleep: Do not extend wakeup paths to devices with ignore_children set
  PM / driver core: disable device's runtime PM during shutdown
  PM / devfreq: correct Kconfig dependency
  PM / devfreq: fix use after free in devfreq_remove_device
  PM / shmobile: Avoid restoring the INTCS state during initialization
  PM / devfreq: Remove compiler error after irq.h update
  PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
  PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
  ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
  PM / shmobile: Don't skip debugging output in pd_power_up()

12 years agoKVM guest: prevent tracing recursion with kvmclock
Avi Kivity [Tue, 15 Nov 2011 12:59:07 +0000 (14:59 +0200)]
KVM guest: prevent tracing recursion with kvmclock

Prevent tracing of preempt_disable() in get_cpu_var() in
kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
preempt_disable/enable() are traced and this causes the function_graph
tracer to go into an infinite recursion. By open coding the
preempt_disable() around the get_cpu_var(), we can use the notrace
version which prevents preempt_disable/enable() from being traced and
prevents the recursion.

Based on a similar patch for Xen from Jeremy Fitzhardinge.

Tested-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sat, 19 Nov 2011 18:56:01 +0000 (10:56 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (exynos4_tmu) Fix Kconfig dependency

[ Merging code in-flight, just because I can.  What timezone should I
  use?  - Linus ]

12 years agoPM / Suspend: Fix bug in suspend statistics update
Srivatsa S. Bhat [Sat, 19 Nov 2011 13:37:57 +0000 (14:37 +0100)]
PM / Suspend: Fix bug in suspend statistics update

After commit 2a77c46de1e3dace73745015635ebbc648eca69c
(PM / Suspend: Add statistics debugfs file for suspend to RAM)
a missing pair of braces inside the state_store() function causes even
invalid arguments to suspend to be wrongly treated as failed suspend
attempts. Fix this.

[rjw: Put the hash/subject of the buggy commit into the changelog.]

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoXen: update MAINTAINER info
Jeremy Fitzhardinge [Fri, 18 Nov 2011 23:56:06 +0000 (15:56 -0800)]
Xen: update MAINTAINER info

No longer at Citrix, still interested in Xen.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agohugetlb: remove dummy definitions of HPAGE_MASK and HPAGE_SIZE
David Rientjes [Sat, 19 Nov 2011 10:33:57 +0000 (02:33 -0800)]
hugetlb: remove dummy definitions of HPAGE_MASK and HPAGE_SIZE

Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in
51c6f666fceb ("mm: ZAP_BLOCK causes redundant work") to avoid a divide
by zero in generic kernel code.

That code has since been removed, but probably should never have been
added in the first place: we don't want HPAGE_SIZE to act like PAGE_SIZE
for code that is working with hugepages, for example, when the
dependency on CONFIG_HUGETLB_PAGE has not been fulfilled.

Because hugepage size can differ from architecture to architecture, each
is required to have their own definitions for both HPAGE_MASK and
HPAGE_SIZE.  This is always done in arch/*/include/asm/page.h.

So, just remove the dummy and dangerous definitions since they are no
longer needed and reveals the correct dependencies.  Tested on
architectures using the definitions with allyesconfig: x86 (even with
thp), hppa, mips, powerpc, s390, sh3, sh4, sparc, and sparc64, and with
defconfig on ia64.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 19 Nov 2011 11:06:39 +0000 (06:06 -0500)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  new helper: mount_subtree()
  switch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs
  btrfs: fix double mntput() in mount_subvol()

12 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 19 Nov 2011 11:05:17 +0000 (06:05 -0500)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  MAINTAINERS: update XFS maintainer entry
  xfs: use doalloc flag in xfs_qm_dqattach_one()

12 years agoMerge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Sat, 19 Nov 2011 00:23:23 +0000 (22:23 -0200)]
Merge branch 'for-3.2-fixes' of git://git./linux/kernel/git/tj/cgroup

* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Nov 2011 00:16:18 +0000 (22:16 -0200)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  random: Fix handing of arch_get_random_long in get_random_bytes()
  x86: Call stop_machine_text_poke() on all CPUs
  x86, ioapic: Only print ioapic debug information for IRQs belonging to an ioapic chip
  x86/mrst: Avoid reporting wrong nmi status
  x86/mrst: Add support for Penwell clock calibration
  x86/apic: Allow use of lapic timer early calibration result
  x86/apic: Do not clear nr_irqs_gsi if no legacy irqs
  x86/platform: Add a wallclock_init func to x86_platforms ops
  x86/mce: Make mce_chrdev_ops 'static const'

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Linus Torvalds [Sat, 19 Nov 2011 00:04:12 +0000 (22:04 -0200)]
Merge git://git./linux/kernel/git/davem/ide

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  cy82c693: fix PCI device selection
  icside: DMA support fix
  IDE: Don't powerdown Compaq Triflex IDE device on suspend
  piix: ICH7 MWDMA1 errata

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Sat, 19 Nov 2011 00:03:31 +0000 (22:03 -0200)]
Merge git://git./linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Patch sun4v code sequences properly on module load.
  sparc: Kill custom io_remap_pfn_range().
  sparc: Stash orig_i0 into %g6 instead of %g2
  sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls.
  sparc: sigutil: Include <linux/errno.h>

12 years agocgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer
Paul Menage [Fri, 18 Nov 2011 22:22:09 +0000 (14:22 -0800)]
cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer

As is probably painfully obvious, I don't have time to be a cgroups
maintainer.  Rather than have me continue to hope that I'll magically
find more spare time, instead Tejun has kindly agreed to take over the
role, along with Li Zefan.

-tj: added cgroup tree URL to MAINTAINERS file

Signed-off-by: Paul Menage <paul@paulmenage.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
LKML-Reference: <1321320612-57855-1-git-send-email-paul@paulmenage.org>

12 years agoPM / Hibernate: Fix the early termination of test modes
Srivatsa S. Bhat [Fri, 18 Nov 2011 22:02:42 +0000 (23:02 +0100)]
PM / Hibernate: Fix the early termination of test modes

Commit 2aede851ddf08666f68ffc17be446420e9d2a056
(PM / Hibernate: Freeze kernel threads after preallocating memory)
postponed the freezing of kernel threads to after preallocating memory
for hibernation. But while doing that, the hibernation test TEST_FREEZER
and the test mode HIBERNATION_TESTPROC were not moved accordingly.

As a result, when using these test modes, it only goes upto the freezing of
userspace and exits, when in fact it should go till the complete end of task
freezing stage, namely the freezing of kernel threads as well.

So, move these points of exit to appropriate places so that freezing of
kernel threads is also tested while using these test harnesses.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoipv4: fix redirect handling
Eric Dumazet [Fri, 18 Nov 2011 20:24:32 +0000 (15:24 -0500)]
ipv4: fix redirect handling

commit f39925dbde77 (ipv4: Cache learned redirect information in
inetpeer.) introduced a regression in ICMP redirect handling.

It assumed ipv4_dst_check() would be called because all possible routes
were attached to the inetpeer we modify in ip_rt_redirect(), but thats
not true.

commit 7cc9150ebe (route: fix ICMP redirect validation) tried to fix
this but solution was not complete. (It fixed only one route)

So we must lookup existing routes (including different TOS values) and
call check_peer_redir() on them.

Reported-by: Ivan Zahariev <famzah@icdsoft.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMAINTAINERS: update XFS maintainer entry
Alex Elder [Fri, 18 Nov 2011 17:21:05 +0000 (17:21 +0000)]
MAINTAINERS: update XFS maintainer entry

I will no longer be maintaining XFS for SGI.  Ben Myers
(bpm@sgi.com) has agreed to be the primary maintainer
for XFS in my place.  I will continue to be able to push
commits to the SGI XFS tree if required.  As such I will
continue to be a designated XFS maintainer, but plan to
serve in more of a backup role.

Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoping: dont increment ICMP_MIB_INERRORS
Eric Dumazet [Thu, 17 Nov 2011 04:40:20 +0000 (04:40 +0000)]
ping: dont increment ICMP_MIB_INERRORS

ping module incorrectly increments ICMP_MIB_INERRORS if feeded with a
frame not belonging to its own sockets.

RFC 2011 states that ICMP_MIB_INERRORS should count "the number of ICMP
messages which the entiry received but determined as having
ICMP-specific errors (bad ICMP checksums, bad length, etc.)."

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Acked-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Fri, 18 Nov 2011 15:18:07 +0000 (13:18 -0200)]
Merge branch 'stable/for-linus-fixes-3.2' of git://git./linux/kernel/git/konrad/xen

* 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen-gntalloc: signedness bug in add_grefs()
  xen-gntalloc: integer overflow in gntalloc_ioctl_alloc()
  xen-gntdev: integer overflow in gntdev_alloc_map()
  xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs.
  xen/balloon: Avoid OOM when requesting highmem
  xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI
  xen: map foreign pages for shared rings by updating the PTEs directly

12 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 18 Nov 2011 11:34:35 +0000 (09:34 -0200)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: add missed trace_block_plug
  paride: fix potential information leak in pg_read()
  bio: change some signed vars to unsigned
  block: avoid unnecessary plug list flush
  cciss: auto engage SCSI mid layer at driver load time
  loop: cleanup set_status interface
  include/linux/bio.h: use a static inline function for bio_integrity_clone()
  loop: prevent information leak after failed read
  block: Always check length of all iov entries in blk_rq_map_user_iov()
  The Windows driver .inf disables ASPM on all cciss devices. Do the same.
  backing-dev: ensure wakeup_timer is deleted
  block: Revert "[SCSI] genhd: add a new attribute "alias" in gendisk"

12 years agoMerge branch 'unicore32' of git://github.com/gxt/linux
Linus Torvalds [Fri, 18 Nov 2011 09:51:57 +0000 (07:51 -0200)]
Merge branch 'unicore32' of git://github.com/gxt/linux

* 'unicore32' of git://github.com/gxt/linux:
  unicore32, exec: remove redundant set_fs(USER_DS)
  unicore32: Fix typo 'PUV3_I2C'
  unicore32: drop unused Kconfig symbols
  rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove
  arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS
  unicore32: fix build error for find bitops

12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 18 Nov 2011 09:16:10 +0000 (07:16 -0200)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/signal32: Fix sigset_t conversion when copying to user
  powerpc: Fix atomic_xxx_return barrier semantics
  powerpc: Remove buggy 9-year-old test for binutils < 2.12.1
  powerpc/book3e-64: Fix debug support for userspace
  powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define
  powerpc: Revert show_regs() define for readability
  powerpc/ps3: Fix SMP lockdep boot warning
  powerpc/ps3: Fix lost SMP IPIs
  powerpc: Add hvcall.h include to book3s_hv.c
  powerpc/trace: Add a dummy stack frame for trace_hardirqs_off
  powerpc: Copy down exception vectors after feature fixups
  powerpc: panic if we can't instantiate RTAS
  powerpc/4xx: Fix typos in kexec config dependencies
  powerpc/fsl: MCU_MPC8349EMITX wants I2C built-in, modular won't do...
  powerpc/fsl_udc_core: Fix dumb typo
  carma-fpga: Missed switch from of_register_platform_driver()
  powerpc: Fix build breakage in jump_label.c

12 years agoMerge branch 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security
Linus Torvalds [Fri, 18 Nov 2011 09:14:30 +0000 (07:14 -0200)]
Merge branch 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security

* 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security:
  encrypted-keys: module build fixes
  encrypted-keys: fix error return code
  Smack: smackfs cipso seq read repair

12 years agosparc64: Patch sun4v code sequences properly on module load.
David S. Miller [Fri, 18 Nov 2011 06:44:58 +0000 (22:44 -0800)]
sparc64: Patch sun4v code sequences properly on module load.

Some of the sun4v code patching occurs in inline functions visible
to, and usable by, modules.

Therefore we have to patch them up during module load.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: fix hang in napi_disable
stephen hemminger [Thu, 17 Nov 2011 14:37:35 +0000 (14:37 +0000)]
sky2: fix hang in napi_disable

If IRQ was never initialized, then calling napi_disable() would hang.
Add more bookkeeping to track whether IRQ was ever initialized.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: enforce minimum ring size
stephen hemminger [Thu, 17 Nov 2011 14:37:23 +0000 (14:37 +0000)]
sky2: enforce minimum ring size

The hardware has a restriction that the minimum ring size possible
is 128. The number of elements used is controlled by tx_pending and
the overall number of elements in the ring tx_ring_size, therefore it
is okay to limit the number of elements in use to a small value (63)
but still provide a bigger ring.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: Kill custom io_remap_pfn_range().
David S. Miller [Fri, 18 Nov 2011 02:17:59 +0000 (18:17 -0800)]
sparc: Kill custom io_remap_pfn_range().

To handle the large physical addresses, just make a simple wrapper
around remap_pfn_range() like MIPS does.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobonding: Don't allow mode change via sysfs with slaves present
Veaceslav Falico [Tue, 15 Nov 2011 06:44:42 +0000 (06:44 +0000)]
bonding: Don't allow mode change via sysfs with slaves present

When changing mode via bonding's sysfs, the slaves are not initialized
correctly. Forbid to change modes with slaves present to ensure that every
slave is initialized correctly via bond_enslave().

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'encrypted-key-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
James Morris [Fri, 18 Nov 2011 00:17:23 +0000 (11:17 +1100)]
Merge branch 'encrypted-key-fixes' of git://git./linux/kernel/git/zohar/linux-integrity into for-linus

12 years agoMerge branch 'for-1111' of git://gitorious.org/smack-next/kernel into for-linus
James Morris [Fri, 18 Nov 2011 00:17:06 +0000 (11:17 +1100)]
Merge branch 'for-1111' of git://gitorious.org/smack-next/kernel into for-linus

12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 17 Nov 2011 22:31:49 +0000 (17:31 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

12 years agof_phonet: fix page offset of first received fragment
Rémi Denis-Courmont [Thu, 17 Nov 2011 02:58:55 +0000 (02:58 +0000)]
f_phonet: fix page offset of first received fragment

We pull one byte (the MAC header) from the first fragment before the
fragment is actually appended. So the socket buffer length is 1, not 0.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoPM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
Rafael J. Wysocki [Thu, 17 Nov 2011 20:39:55 +0000 (21:39 +0100)]
PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset

Fix build regression introduced by commit 056879d2f244001b2888cdc8cf
(ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix) by moving
the intialization of the A3SP domain to a separate function and
providing an empty definition of it for CONFIG_PM unset.

Reported-and-tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM Sleep: Do not extend wakeup paths to devices with ignore_children set
Rafael J. Wysocki [Thu, 17 Nov 2011 20:39:33 +0000 (21:39 +0100)]
PM Sleep: Do not extend wakeup paths to devices with ignore_children set

Commit 4ca46ff3e0d8c234cb40ebb6457653b59584426c (PM / Sleep: Mark
devices involved in wakeup signaling during suspend) introduced
the power.wakeup_path field in struct dev_pm_info to mark devices
whose children are enabled to wake up the system from sleep states,
so that power domains containing the parents that provide their
children with wakeup power and/or relay their wakeup signals are not
turned off.  Unfortunately, that introduced a PM regression on SH7372
whose power consumption in the system "memory sleep" state increased
as a result of it, because it prevented the power domain containing
the I2C controller from being turned off when some children of that
controller were enabled to wake up the system, although the
controller was not necessary for them to signal wakeup.

To fix this issue use the observation that devices whose
power.ignore_children flag is set for runtime PM should be treated
analogously during system suspend.  Namely, they shouldn't be
included in wakeup paths going through their children.  Since the
SH7372 I2C controller's power.ignore_children flag is set, doing so
will restore the previous behavior of that SOC.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 17 Nov 2011 19:15:47 +0000 (14:15 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 17 Nov 2011 17:28:54 +0000 (15:28 -0200)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] hpsa: Disable ASPM
  [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy
  [SCSI] mpt2sas: add missing allocation.
  [SCSI] Silencing 'killing requests for dead queue'
  [SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 17 Nov 2011 17:13:37 +0000 (15:13 -0200)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix the connection selection of ADCs on Cirrus codecs
  ALSA: hda - Update URLs in document
  ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()
  ALSA: hda - delayed ELD repoll
  ALSA: hda - fix ELD memory leak
  ALSA: hda/realtek: remove redundant semicolon
  ALSA: hda - pwr_nids cleanup for IDT codecs

12 years agoARM: wire up process_vm_writev and process_vm_readv syscalls
Russell King [Thu, 17 Nov 2011 16:58:00 +0000 (16:58 +0000)]
ARM: wire up process_vm_writev and process_vm_readv syscalls

These two syscalls were introduced during the last merge window.
Add the entries into the ARM call tables for them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoRevert "KVM: PPC: Add support for explicit HIOR setting"
Alexander Graf [Thu, 17 Nov 2011 14:26:35 +0000 (15:26 +0100)]
Revert "KVM: PPC: Add support for explicit HIOR setting"

This reverts commit a15bd354f083f20f257db450488db52ac27df439.

It exceeded the padding on the SREGS struct, rendering the ABI
backwards-incompatible.

Conflicts:

arch/powerpc/kvm/powerpc.c
include/linux/kvm.h

Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: VMX: Check for automatic switch msr table overflow
Gleb Natapov [Wed, 5 Oct 2011 12:01:24 +0000 (14:01 +0200)]
KVM: VMX: Check for automatic switch msr table overflow

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: VMX: Add support for guest/host-only profiling
Gleb Natapov [Wed, 5 Oct 2011 12:01:23 +0000 (14:01 +0200)]
KVM: VMX: Add support for guest/host-only profiling

Support guest/host-only profiling by switch perf msrs on
a guest entry if needed.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: VMX: add support for switching of PERF_GLOBAL_CTRL
Gleb Natapov [Wed, 5 Oct 2011 12:01:22 +0000 (14:01 +0200)]
KVM: VMX: add support for switching of PERF_GLOBAL_CTRL

Some cpus have special support for switching PERF_GLOBAL_CTRL msr.
Add logic to detect if such support exists and works properly and extend
msr switching code to use it if available. Also extend number of generic
msr switching entries to 8.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: s390: announce SYNC_MMU
Christian Borntraeger [Thu, 17 Nov 2011 10:00:44 +0000 (11:00 +0100)]
KVM: s390: announce SYNC_MMU

KVM on s390 always had a sync mmu. Any mapping change in userspace
mapping was always reflected immediately in the guest mapping.
- In older code the guest mapping was just an offset
- In newer code the last level page table is shared

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: s390: Fix tprot locking
Christian Borntraeger [Thu, 17 Nov 2011 10:00:43 +0000 (11:00 +0100)]
KVM: s390: Fix tprot locking

There is a potential host deadlock in the tprot intercept handling.
We must not hold the mmap semaphore while resolving the guest
address. If userspace is remapping, then the memory detection in
the guest is broken anyway so we can safely separate the
address translation from walking the vmas.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: s390: handle SIGP sense running intercepts
Cornelia Huck [Thu, 17 Nov 2011 10:00:42 +0000 (11:00 +0100)]
KVM: s390: handle SIGP sense running intercepts

SIGP sense running may cause an intercept on higher level
virtualization, so handle it by checking the CPUSTAT_RUNNING flag.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoKVM: s390: Fix RUNNING flag misinterpretation
Cornelia Huck [Thu, 17 Nov 2011 10:00:41 +0000 (11:00 +0100)]
KVM: s390: Fix RUNNING flag misinterpretation

CPUSTAT_RUNNING was implemented signifying that a vcpu is not stopped.
This is not, however, what the architecture says: RUNNING should be
set when the host is acting on the behalf of the guest operating
system.

CPUSTAT_RUNNING has been changed to be set in kvm_arch_vcpu_load()
and to be unset in kvm_arch_vcpu_put().

For signifying stopped state of a vcpu, a host-controlled bit has
been used and is set/unset basically on the reverse as the old
CPUSTAT_RUNNING bit (including pushing it down into stop handling
proper in handle_stop()).

Cc: stable@kernel.org
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
12 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 17 Nov 2011 13:46:26 +0000 (11:46 -0200)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Fix irqfixup, irqpoll regression

12 years agofix typo/thinko in get_random_bytes()
Luck, Tony [Wed, 16 Nov 2011 18:50:56 +0000 (10:50 -0800)]
fix typo/thinko in get_random_bytes()

If there is an architecture-specific random number generator we use it
to acquire randomness one "long" at a time.  We should put these random
words into consecutive words in the result buffer - not just overwrite
the first word again and again.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoplatform/x86: fix dell-laptop function prototypes
Randy Dunlap [Thu, 17 Nov 2011 02:20:51 +0000 (18:20 -0800)]
platform/x86: fix dell-laptop function prototypes

Fix build warnings:
  drivers/platform/x86/dell-laptop.c:592:13: warning: function declaration isn't a prototype
  drivers/platform/x86/dell-laptop.c:599:13: warning: function declaration isn't a prototype

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomedia/staging: fix allyesconfig build error
Randy Dunlap [Thu, 17 Nov 2011 02:17:03 +0000 (18:17 -0800)]
media/staging: fix allyesconfig build error

Fix x86 allyesconfig builds.  Builds fail due to a non-static variable
named 'debug' in drivers/staging/media/as102:

  arch/x86/built-in.o:arch/x86/kernel/entry_32.S:1296: first defined here
  ld: Warning: size of symbol `debug' changed from 90 in arch/x86/built-in.o to 4 in drivers/built-in.o

Thou shalt have no non-static identifiers that are named 'debug'.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agohwmon: (exynos4_tmu) Fix Kconfig dependency
Donggeun Kim [Thu, 17 Nov 2011 10:33:05 +0000 (05:33 -0500)]
hwmon: (exynos4_tmu) Fix Kconfig dependency

Rename dependency of EXYNOS4_TMU in Kconfig to the existing one.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agostmmac: fix pm functions avoiding sleep on spinlock
Francesco Virlinzi [Wed, 16 Nov 2011 21:58:02 +0000 (21:58 +0000)]
stmmac: fix pm functions avoiding sleep on spinlock

This patch fixes the pm functions to avoid the system
sleeps while a spinlock is taken.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: remove spin_lock in stmmac_ioctl.
Srinivas Kandagatla [Wed, 16 Nov 2011 21:58:01 +0000 (21:58 +0000)]
stmmac: remove spin_lock in stmmac_ioctl.

This patch removes un-needed spin_lock in stmmac_ioctl while reading and
writing mdio registers. While holding spin_lock the code must be
atomic, which is not true in this case as both mdiobus_read and writes
have mutex locks.

Without this patch reading mdio registers via mii-tool results in below
BUG:
mii-tool -vvv eth0"
Using SIOCGMIIPHY=0x8947
BUG: sleeping function called from invalid context at kernel/mutex.c:287
in_atomic(): 1, irqs_disabled(): 0, pid: 614, name: mii-tool
2 locks held by mii-tool/614:
 #0:  (rtnl_mutex){......}, at: [<c01fd80c>] dev_ioctl+0x550/0x674
 #1:  (&priv->lock){......}, at: [<c01b34ec>] stmmac_ioctl+0x4c/0x78
[<c002ea14>] (unwind_backtrace+0x0/0xcc) from [<c0272c38>]
(mutex_lock_nested+0x24/0x35c)
[<c0272c38>] (mutex_lock_nested+0x24/0x35c) from [<c01b237c>]
(mdiobus_read+0x44/0x70)
[<c01b237c>] (mdiobus_read+0x44/0x70) from [<c01b0c64>]
(phy_mii_ioctl+0x4c/0x138)
[<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) from [<c01b34fc>]
(stmmac_ioctl+0x5c/0x78)
[<c01b34fc>] (stmmac_ioctl+0x5c/0x78) from [<c01fcec8>]
(dev_ifsioc+0x2a4/0x2c8)
[<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) from [<c01fd81c>]
(dev_ioctl+0x560/0x674)
[<c01fd81c>] (dev_ioctl+0x560/0x674) from [<c00c36e0>]
(vfs_ioctl+0x2c/0x8c)
[<c00c36e0>] (vfs_ioctl+0x2c/0x8c) from [<c00c4130>]
(do_vfs_ioctl+0x530/0x578)
[<c00c4130>] (do_vfs_ioctl+0x530/0x578) from [<c00c41ac>]
(sys_ioctl+0x34/0x54)
[<c00c41ac>] (sys_ioctl+0x34/0x54) from [<c0028aa0>]
(ret_fast_syscall+0x0/0x2c)

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: parameters auto-tuning through HW cap reg
Giuseppe CAVALLARO [Wed, 16 Nov 2011 21:58:00 +0000 (21:58 +0000)]
stmmac: parameters auto-tuning through HW cap reg

New GMAC devices (newer than the databook 3.50a) have the
HW capability register that provides which features are actually
supported by the hardware.

On old devices many information have to be passed through the
platform, for example: enhanced descriptor structure,
TX COE etc. These are mandatory to properly configure the driver.
This remains still valid because the driver has to support old
Synopsys devices but now it's also able to override them using the
values from the HW capability register if supported.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: fix advertising 1000Base capabilties for non GMII iface
Srinivas Kandagatla [Wed, 16 Nov 2011 21:57:59 +0000 (21:57 +0000)]
stmmac: fix advertising 1000Base capabilties for non GMII iface

This patch fixes the way to stop the 1000Base advertising
capabilties for non GMII interfaces.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: use mdelay on timeout of sw reset
Francesco Virlinzi [Wed, 16 Nov 2011 21:57:58 +0000 (21:57 +0000)]
stmmac: use mdelay on timeout of sw reset

This patch uses an mdelay to manage the timeout on
sw reset to be independant of cpu_clk.

Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com>
Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopowerpc/signal32: Fix sigset_t conversion when copying to user
Will Deacon [Tue, 8 Nov 2011 04:51:19 +0000 (04:51 +0000)]
powerpc/signal32: Fix sigset_t conversion when copying to user

On PPC64, put_sigset_t converts a sigset_t to a compat_sigset_t
before copying it to userspace. There is a typo in the case that
we have 4 words to copy, meaning that we corrupt the compat_sigset_t.

It appears that _NSIG_WORDS can't be greater than 2 at the moment
so this code is probably always optimised away anyway.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Fix atomic_xxx_return barrier semantics
Benjamin Herrenschmidt [Tue, 15 Nov 2011 17:11:27 +0000 (17:11 +0000)]
powerpc: Fix atomic_xxx_return barrier semantics

The Documentation/memory-barriers.txt document requires that atomic
operations that return a value act as a memory barrier both before
and after the actual atomic operation.

Our current implementation doesn't guarantee this. More specifically,
while a load following the isync can not be issued before stwcx. has
completed, that completion doesn't architecturally means that the
result of stwcx. is visible to other processors (or any previous stores
for that matter) (typically, the other processors L1 caches can still
hold the old value).

This has caused an actual crash in RCU torture testing on Power 7

This fixes it by changing those atomic ops to use new macros instead
of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers,
which are then defined respectively to lwsync and sync.

I haven't had a chance to measure the performance impact (or rather
what I measured with kernel compiles is in the noise, I yet have to
find a more precise benchmark)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
12 years agopowerpc: Remove buggy 9-year-old test for binutils < 2.12.1
Kyle Moffett [Mon, 7 Nov 2011 13:30:43 +0000 (13:30 +0000)]
powerpc: Remove buggy 9-year-old test for binutils < 2.12.1

Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE
mode, as some of those opcodes alias the "SPE" instructions.  This
triggers an ancient binutils version check even when building a kernel
with CONFIG_ALTIVEC disabled.

In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in
practice it has long outlived its utility.  It is virtually impossible
to find binutils older than 2.12.1 (released 2002) in the wild anymore.
Even ancient RedHat Enterprise Linux 4 has binutils-2.14.

To fix the kernel build when done natively on e500 systems with this new
binutils, the test is simply removed.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/book3e-64: Fix debug support for userspace
Kumar Gala [Thu, 6 Oct 2011 02:53:40 +0000 (02:53 +0000)]
powerpc/book3e-64: Fix debug support for userspace

With the introduction of CONFIG_PPC_ADV_DEBUG_REGS user space debug is
broken on Book-E 64-bit parts that support delayed debug events.  When
switch_booke_debug_regs() sets DBCR0 we'll start getting debug events as
MSR_DE is also set and we aren't able to handle debug events from kernel
space.

We can remove the hack that always enables MSR_DE and loads up DBCR0 and
just utilize switch_booke_debug_regs() to get user space debug working
again.

We still need to handle critical/debug exception stacks & proper
save/restore of state for those exception levles to support debug events
from kernel space like we have on 32-bit.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define
Kumar Gala [Thu, 6 Oct 2011 02:53:39 +0000 (02:53 +0000)]
powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define

All of DebugException is already protected by CONFIG_PPC_ADV_DEBUG_REGS
there is no need to have another such ifdef inside the function.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Revert show_regs() define for readability
Kumar Gala [Thu, 6 Oct 2011 02:53:38 +0000 (02:53 +0000)]
powerpc: Revert show_regs() define for readability

We had an existing ifdef for 4xx & BOOKE processors that got changed to
CONFIG_PPC_ADV_DEBUG_REGS.  The define has nothing to do with
CONFIG_PPC_ADV_DEBUG_REGS.  The define really should be:

 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)

and not

 #ifdef CONFIG_PPC_ADV_DEBUG_REGS

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agonew helper: mount_subtree()
Al Viro [Thu, 17 Nov 2011 02:43:59 +0000 (21:43 -0500)]
new helper: mount_subtree()

takes vfsmount and relative path, does lookup within that vfsmount
(possibly triggering automounts) and returns the result as root
of subtree suitable for return by ->mount() (i.e. a reference to
dentry and an active reference to its superblock grabbed, superblock
locked exclusive).

btrfs and nfs switched to it instead of open-coding the sucker.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agosky2: version 1.30
stephen hemminger [Wed, 16 Nov 2011 13:43:00 +0000 (13:43 +0000)]
sky2: version 1.30

Update version number.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: used fixed RSS key
stephen hemminger [Wed, 16 Nov 2011 13:42:59 +0000 (13:42 +0000)]
sky2: used fixed RSS key

Rather than generating a different RSS key on each boot, just use
a predetermined value that will map same flow to same value on
every device.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: reduce default Tx ring size
stephen hemminger [Wed, 16 Nov 2011 13:42:58 +0000 (13:42 +0000)]
sky2: reduce default Tx ring size

The default Tx ring size for the sky2 driver is quite large and could
cause excess buffer bloat for many users. The minimum ring size
possible and still allow handling  the worst case packet on 64bit platforms
is 38 which gets rounded up to a power of 2. But most packets only require
a couple of ring elements.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: rename up/down functions
stephen hemminger [Wed, 16 Nov 2011 13:42:57 +0000 (13:42 +0000)]
sky2: rename up/down functions

The code is clearer if the up/down functions are renamed to
open/close like other drivers.  Purely syntax change.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: pci posting issues
stephen hemminger [Wed, 16 Nov 2011 13:42:56 +0000 (13:42 +0000)]
sky2: pci posting issues

A couple of the reset and setup paths have possible PCI posting issues.
When setting registers, a read is necessary to force the writes to complete.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: fix hang on shutdown (and other irq issues)
stephen hemminger [Wed, 16 Nov 2011 13:42:55 +0000 (13:42 +0000)]
sky2: fix hang on shutdown (and other irq issues)

There are several problems with recent change to how IRQ's are setup.
   * synchronize_irq in sky2_shutdown would hang because there
     was no IRQ setup.
   * when device was set to down, some IRQ bits left enabled so a
     hardware error would produce IRQ with no handler
   * quick link on Optima chip set was enabled without handler
   * suspend/resume would leave IRQ on with no handler if device
     was down

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agor6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
Florian Fainelli [Wed, 16 Nov 2011 06:00:08 +0000 (06:00 +0000)]
r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list

We are checking whether the MCR0_HASHEN bit is set using a logical and
instead of bitwise and, fix that.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorandom: Fix handing of arch_get_random_long in get_random_bytes()
Luck, Tony [Wed, 16 Nov 2011 18:50:56 +0000 (10:50 -0800)]
random: Fix handing of arch_get_random_long in get_random_bytes()

If there is an architecture-specific random number generator we use
it to acquire randomness one "long" at a time. We should put these
random words into consecutive words in the result buffer - not just
overwrite the first word again and again.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/4ec4061010261a4cb0@agluck-desktop.sc.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agoMAINTAINERS: change email address for shemminger
Stephen Hemminger [Wed, 16 Nov 2011 22:58:46 +0000 (17:58 -0500)]
MAINTAINERS: change email address for shemminger

My old email account at linux-foundation is no longer usable after
the LF breakin.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopch_gbe: Move #include of module.h
Joe Perches [Tue, 15 Nov 2011 13:56:14 +0000 (13:56 +0000)]
pch_gbe: Move #include of module.h

The first #include must be pch_gbe.h as it
does a #define of pr_fmt.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: cache-in compressed fw image
Dmitry Kravkov [Tue, 15 Nov 2011 12:07:33 +0000 (12:07 +0000)]
bnx2x: cache-in compressed fw image

Re-request fw from fs may fail for different reasons, once the fw was
loaded we won't release it until driver is removed.

This also resolves the boot problem when initial fw is located on initrd,
but rootfs is still unavailable, in this case device reset will fail due
to absence of fw files.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>