]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
13 years agomd: Notify sysfs when RAID1/5/10 disk is In_sync.
Adrian Drzewiecki [Wed, 18 Aug 2010 01:49:02 +0000 (11:49 +1000)]
md: Notify sysfs when RAID1/5/10 disk is In_sync.

When RAID1 is done syncing disks, it'll update the state
of synced rdevs to In_sync. But it neglected to notify
sysfs that the attribute changed. So any programs that
are waiting for an rdev's state to change will not be
woken.

(raid5/raid10 added by neilb)

Signed-off-by: Adrian Drzewiecki <adriand@vmware.com>
Signed-off-by: NeilBrown <neilb@suse.de>
13 years agoUpdate recovery_offset even when external metadata is used.
NeilBrown [Mon, 16 Aug 2010 08:09:31 +0000 (18:09 +1000)]
Update recovery_offset even when external metadata is used.

The update of ->recovery_offset in sync_sbs is appropriate even then external
metadata is in use.  However sync_sbs is only called when native
metadata is used.

So move that update in to the top of md_update_sb (which is the only
caller of sync_sbs) before the test on ->external.

This moves the update out of ->write_lock protection, but those fields
only need ->reconfig_mutex protection which they still have.

Also move the test on ->persistent up to where ->external is set as
for metadata update purposes they are the same.

Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing
if ->external is set or ->persistent isn't.

Finally move the update of ->utime down as it is only relevent (like
the ->events update) for native metadata.

Signed-off-by: NeilBrown <neilb@suse.de>
Reported-by: "Kwolek, Adam" <adam.kwolek@intel.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Wed, 18 Aug 2010 01:37:03 +0000 (18:37 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  AppArmor: fix task_setrlimit prototype

13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Wed, 18 Aug 2010 01:36:19 +0000 (18:36 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  vt,console,kdb: preserve console_blanked while in kdb
  vt: fix regression warnings from KMS merge
  arm,kgdb: fix GDB_MAX_REGS no longer used
  kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c
  kdb: fix compile error without CONFIG_KALLSYMS

13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Wed, 18 Aug 2010 01:36:01 +0000 (18:36 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  platform/x86: move rfkill for Dell Mini 1012 to compal-laptop
  thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards
  thinkpad-acpi: add support for model-specific keymaps
  thinkpad-acpi: lock down size of hotkey keymap
  thinkpad-acpi: untangle ACPI/vendor backlight selection
  thinkpad-acpi: find ACPI video device by synthetic HID
  intel_ips: potential null dereference
  drivers/platform/x86: Adjust confusing if indentation
  x86: intel_ips: do not use PCI resources before pci_enable_device()

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Wed, 18 Aug 2010 01:35:39 +0000 (18:35 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix false warning saying one of two super blocks is broken
  nilfs2: fix list corruption after ifile creation failure

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 18 Aug 2010 01:34:37 +0000 (18:34 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  net: Fix a memmove bug in dev_gro_receive()
  net sched: fix some kernel memory leaks
  netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive
  Revert "netlink: netlink_recvmsg() fix"
  ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss
  xfrm: Use GFP_ATOMIC in xfrm_compile_policy
  ath5k: disable ASPM L0s for all cards
  ath9k_htc: load proper firmware for device ID 7015
  wl1251: fix trigger scan timeout usage
  ath9k_htc: Fix disconnect issue in HT40 mode.
  ath9k_htc: fix panic on packet injection using airbase-ng tool.
  ipw2100: register pm_qos request before registering pci driver

13 years agoshmem: put_super must percpu_counter_destroy
Hugh Dickins [Tue, 17 Aug 2010 22:23:56 +0000 (15:23 -0700)]
shmem: put_super must percpu_counter_destroy

list_add() corruption messages reported from shmem_fill_super()'s recently
introduced percpu_counter_init(): shmem_put_super() needs to remember to
percpu_counter_destroy().  And also check error from percpu_counter_init().

Reported-bisected-and-tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 18 Aug 2010 01:14:08 +0000 (18:14 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix atomic64_t routine return values.
  sparc64: Fix rwsem constant bug leading to hangs.
  sparc: Hook up new fanotify and prlimit64 syscalls.
  sparc: Really fix "console=" for serial consoles.

13 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 18 Aug 2010 01:11:49 +0000 (18:11 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  VIDEO: amba clcd: don't disable an already disabled clock
  ARM: Tighten check for allowable CPSR values
  ARM: 6329/1: wire up sys_accept4() on ARM
  ARM: 6328/1: Build with -fno-dwarf2-cfi-asm
  ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used

13 years agoarcmsr_hba: Missing slab.h include
David Miller [Tue, 17 Aug 2010 04:20:07 +0000 (21:20 -0700)]
arcmsr_hba: Missing slab.h include

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoFix unprotected access to task credentials in waitid()
Daniel J Blueman [Tue, 17 Aug 2010 22:56:55 +0000 (23:56 +0100)]
Fix unprotected access to task credentials in waitid()

Using a program like the following:

#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

int main() {
id_t id;
siginfo_t infop;
pid_t res;

id = fork();
if (id == 0) { sleep(1); exit(0); }
kill(id, SIGSTOP);
alarm(1);
waitid(P_PID, id, &infop, WCONTINUED);
return 0;
}

to call waitid() on a stopped process results in access to the child task's
credentials without the RCU read lock being held - which may be replaced in the
meantime - eliciting the following warning:

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
kernel/exit.c:1460 invoked rcu_dereference_check() without protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 1
2 locks held by waitid02/22252:
 #0:  (tasklist_lock){.?.?..}, at: [<ffffffff81061ce5>] do_wait+0xc5/0x310
 #1:  (&(&sighand->siglock)->rlock){-.-...}, at: [<ffffffff810611da>]
wait_consider_task+0x19a/0xbe0

stack backtrace:
Pid: 22252, comm: waitid02 Not tainted 2.6.35-323cd+ #3
Call Trace:
 [<ffffffff81095da4>] lockdep_rcu_dereference+0xa4/0xc0
 [<ffffffff81061b31>] wait_consider_task+0xaf1/0xbe0
 [<ffffffff81061d15>] do_wait+0xf5/0x310
 [<ffffffff810620b6>] sys_waitid+0x86/0x1f0
 [<ffffffff8105fce0>] ? child_wait_callback+0x0/0x70
 [<ffffffff81003282>] system_call_fastpath+0x16/0x1b

This is fixed by holding the RCU read lock in wait_task_continued() to ensure
that the task's current credentials aren't destroyed between us reading the
cred pointer and us reading the UID from those credentials.

Furthermore, protect wait_task_stopped() in the same way.

We don't need to keep holding the RCU read lock once we've read the UID from
the credentials as holding the RCU read lock doesn't stop the target task from
changing its creds under us - so the credentials may be outdated immediately
after we've read the pointer, lock or no lock.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMake do_execve() take a const filename pointer
David Howells [Tue, 17 Aug 2010 22:52:56 +0000 (23:52 +0100)]
Make do_execve() take a const filename pointer

Make do_execve() take a const filename pointer so that kernel_execve() compiles
correctly on ARM:

arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

This also requires the argv and envp arguments to be consted twice, once for
the pointer array and once for the strings the array points to.  This is
because do_execve() passes a pointer to the filename (now const) to
copy_strings_kernel().  A simpler alternative would be to cast the filename
pointer in do_execve() when it's passed to copy_strings_kernel().

do_execve() may not change any of the strings it is passed as part of the argv
or envp lists as they are some of them in .rodata, so marking these strings as
const should be fine.

Further kernel_execve() and sys_execve() need to be changed to match.

This has been test built on x86_64, frv, arm and mips.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agonet: Fix a memmove bug in dev_gro_receive()
Jarek Poplawski [Wed, 11 Aug 2010 02:02:10 +0000 (02:02 +0000)]
net: Fix a memmove bug in dev_gro_receive()

>Xin Xiaohui wrote:
> I looked into the code dev_gro_receive(), found the code here:
> if the frags[0] is pulled to 0, then the page will be released,
> and memmove() frags left.
> Is that right? I'm not sure if memmove do right or not, but
> frags[0].size is never set after memove at least. what I think
> a simple way is not to do anything if we found frags[0].size == 0.
> The patch is as followed.
...

This version of the patch fixes the bug directly in memmove.

Reported-by: "Xin, Xiaohui" <xiaohui.xin@intel.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc64: Fix atomic64_t routine return values.
David S. Miller [Wed, 18 Aug 2010 00:12:04 +0000 (17:12 -0700)]
sparc64: Fix atomic64_t routine return values.

Should return 'long' instead of 'int'.

Thanks to Dimitris Michailidis and Tony Luck.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosparc64: Fix rwsem constant bug leading to hangs.
David S. Miller [Wed, 18 Aug 2010 00:09:53 +0000 (17:09 -0700)]
sparc64: Fix rwsem constant bug leading to hangs.

As noticed by Linus, it is critical that some of the
rwsem constants be signed.  Yet, hex constants are
unsigned unless explicitly casted or negated.

The most critical one is RWSEM_WAITING_BIAS.

This bug was exacerbated by commit
424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers
when writer blocks on active read lock")

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet sched: fix some kernel memory leaks
Eric Dumazet [Mon, 16 Aug 2010 20:04:22 +0000 (20:04 +0000)]
net sched: fix some kernel memory leaks

We leak at least 32bits of kernel memory to user land in tc dump,
because we dont init all fields (capab ?) of the dumped structure.

Use C99 initializers so that holes and non explicit fields are zeroed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: {ip,ip6,arp}_tables: avoid lockdep false positive
Eric Dumazet [Mon, 16 Aug 2010 10:22:10 +0000 (10:22 +0000)]
netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive

After commit 24b36f019 (netfilter: {ip,ip6,arp}_tables: dont block
bottom half more than necessary), lockdep can raise a warning
because we attempt to lock a spinlock with BH enabled, while
the same lock is usually locked by another cpu in a softirq context.

Disable again BH to avoid these lockdep warnings.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Diagnosed-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNFS: Fix the selection of security flavours in Kconfig
Trond Myklebust [Tue, 17 Aug 2010 21:42:45 +0000 (17:42 -0400)]
NFS: Fix the selection of security flavours in Kconfig

Randy Dunlap reports:

ERROR: "svc_gss_principal" [fs/nfs/nfs.ko] undefined!

because in fs/nfs/Kconfig, NFS_V4 selects RPCSEC_GSS_KRB5
and/or in fs/nfsd/Kconfig, NFSD_V4 selects RPCSEC_GSS_KRB5.

RPCSEC_GSS_KRB5 does 5 selects, but none of these is enforced/followed
by the fs/nfs[d]/Kconfig configs:

select SUNRPC_GSS
select CRYPTO
select CRYPTO_MD5
select CRYPTO_DES
select CRYPTO_CBC

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: J. Bruce Fields <bfields@fieldses.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoVIDEO: amba clcd: don't disable an already disabled clock
Russell King [Tue, 17 Aug 2010 21:13:22 +0000 (22:13 +0100)]
VIDEO: amba clcd: don't disable an already disabled clock

Fix the clock enable/disable tracking in the AMBA CLCD driver so
that the driver doesn't try to disable an already disabled clock,
thereby causing the clock (if shared) to become unbalanced.

This resolves a problem with CLCD on LPC32xx ARM platforms.

Reported-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoof: fix missing headers for of_address_to_resource() in MTD and SysACE drivers
Graeme Smecher [Tue, 17 Aug 2010 17:13:44 +0000 (10:13 -0700)]
of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers

The drivers for Xilinx' SystemACE and physically mapped MTDs were missing
prototypes for of_address_to_resource(). This patch adds the necessary
headers.

Signed-off-by: Graeme Smecher <graeme.smecher@mail.mcgill.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoperf tools: Fix build on POSIX shells
Bernd Petrovitsch [Tue, 17 Aug 2010 15:22:08 +0000 (12:22 -0300)]
perf tools: Fix build on POSIX shells

POSIX sh does not specify the brace expansion, so fix it by replacing the
global $(shell ...) lines quite at the top creating the output directories with
real rules.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Kusanagi Kouichi <slash@ac.auone-net.jp>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1282046280.5822.4.camel@thorin>
Signed-off-by: Bernd Petrovitsch <bernd@sysprog.at>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoKVM: PIT: free irq source id in handling error path
Xiao Guangrong [Tue, 17 Aug 2010 07:02:12 +0000 (15:02 +0800)]
KVM: PIT: free irq source id in handling error path

Free irq source id if create pit workqueue fail

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoALSA: hda - Fix ALC680 base model capture
Kailang Yang [Tue, 17 Aug 2010 08:39:22 +0000 (10:39 +0200)]
ALSA: hda - Fix ALC680 base model capture

 - Fix capture mixer elements for ALC680 base model
 - Support auto change ADC for recording from MIC
 - Cancel capture source assigned in auto mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agolatencytop: Fix kconfig dependency warnings
Randy Dunlap [Thu, 12 Aug 2010 19:31:21 +0000 (12:31 -0700)]
latencytop: Fix kconfig dependency warnings

warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
SCHED_DEBUG which has unmet direct dependencies (DEBUG_KERNEL &&
PROC_FS) warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
SCHEDSTATS which has unmet direct dependencies (DEBUG_KERNEL && PROC_FS)

Add depends on STACKTRACE_SUPPORT for 'select STACKTRACE'.
Add depends on PROC_FS since that is where the output goes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20100812123121.a7c99cde.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoof: Fix missing includes
Grant Likely [Tue, 17 Aug 2010 05:44:49 +0000 (23:44 -0600)]
of: Fix missing includes

This patch fixes missing includes from a number of .c files because
the code (wrongfully) depended on prom.h including them.  The include
of linux/of_address.h was removed in microblaze prom.h in commit
"of/address: Clean up function declarations" (sha1 id 22ae782f8), but
not fixed in some callers.  This patch fixes them up.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Michal Simek <monstr@monstr.eu>
13 years agoAppArmor: fix task_setrlimit prototype
Jiri Slaby [Wed, 11 Aug 2010 09:28:02 +0000 (11:28 +0200)]
AppArmor: fix task_setrlimit prototype

After rlimits tree was merged we get the following errors:
security/apparmor/lsm.c:663:2: warning: initialization from incompatible pointer type

It is because AppArmor was merged in the meantime, but uses the old
prototype. So fix it by adding struct task_struct as a first parameter
of apparmor_task_setrlimit.

NOTE that this is ONLY a compilation warning fix (and crashes caused
by that). It needs proper handling in AppArmor depending on who is the
'task'.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>
13 years agosparc: Hook up new fanotify and prlimit64 syscalls.
David S. Miller [Mon, 16 Aug 2010 22:04:29 +0000 (15:04 -0700)]
sparc: Hook up new fanotify and prlimit64 syscalls.

The only tricky bit is the compat version of fanotify_mark, which
which on 32-bit the 64-bit mark argument is passed in as "high32",
"low32".

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoata: update for of_device to platform_device replacement
Stephen Rothwell [Mon, 16 Aug 2010 02:20:59 +0000 (12:20 +1000)]
ata: update for of_device to platform_device replacement

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
David S. Miller [Mon, 16 Aug 2010 21:09:34 +0000 (14:09 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

13 years agovt,console,kdb: preserve console_blanked while in kdb
Jason Wessel [Mon, 16 Aug 2010 20:58:31 +0000 (15:58 -0500)]
vt,console,kdb: preserve console_blanked while in kdb

Commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb:
implement atomic console enter/leave functions) introduced the ability
to atomically change the console mode with kernel mode setting but did
not preserve the state of the console_blanked variable.

The console_blanked variable must be restored when executing the
con_debug_leave() or further kernel mode set changes (such as using
chvt X) will fail to correctly set the state of console.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Andrew Morton <akpm@linux-foundation.org>
13 years agovt: fix regression warnings from KMS merge
Jason Wessel [Mon, 16 Aug 2010 20:58:30 +0000 (15:58 -0500)]
vt: fix regression warnings from KMS merge

Fix the following new sparse warnings in vt.c introduced by the commit
b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement
atomic console enter/leave functions):

drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static?
drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static?
drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static?
drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static?

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Andrew Morton <akpm@linux-foundation.org>
13 years agoarm,kgdb: fix GDB_MAX_REGS no longer used
Eric Miao [Mon, 16 Aug 2010 20:58:30 +0000 (15:58 -0500)]
arm,kgdb: fix GDB_MAX_REGS no longer used

According to commit 22eeef4bb2a7fd225089c0044060ed1fbf091958

    kgdb,arm: Individual register get/set for arm

It's now replaced by DBG_MAX_REG_NUM.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c
Namhyung Kim [Sat, 7 Aug 2010 18:00:59 +0000 (11:00 -0700)]
kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c

breakinfo->pev is a pointer to percpu pointer but was missing __percpu markup.
Add it.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13 years agokdb: fix compile error without CONFIG_KALLSYMS
Jason Wessel [Mon, 16 Aug 2010 20:58:29 +0000 (15:58 -0500)]
kdb: fix compile error without CONFIG_KALLSYMS

If CONFIG_KGDB_KDB is set and CONFIG_KALLSYMS is not set the kernel
will fail to build with the error:

kernel/built-in.o: In function `kallsyms_symbol_next':
kernel/debug/kdb/kdb_support.c:237: undefined reference to `kdb_walk_kallsyms'
kernel/built-in.o: In function `kallsyms_symbol_complete':
kernel/debug/kdb/kdb_support.c:193: undefined reference to `kdb_walk_kallsyms'

The kdb_walk_kallsyms needs a #ifdef proper header to match the C
implementation.  This patch also fixes the compiler warnings in
kdb_support.c when compiling without CONFIG_KALLSYMS set.  The
compiler warnings are a result of the kallsyms_lookup() macro not
initializing the two of the pass by reference variables.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reported-by: Michal Simek <monstr@monstr.eu>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 16 Aug 2010 20:56:01 +0000 (13:56 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

13 years agomicroblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node
Michal Simek [Mon, 16 Aug 2010 08:31:54 +0000 (10:31 +0200)]
microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node

Commit 58f9b0b02414062eaff46716bc04b47d7e79add5 should
contain this fix too.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agomicroblaze: Fix of/address: Merge all of the bus translation code
Michal Simek [Mon, 16 Aug 2010 08:31:53 +0000 (10:31 +0200)]
microblaze: Fix of/address: Merge all of the bus translation code

Commit dbbdee94734bf6f1db7af42008a53655e77cab8f removed
of_irq_pci_swizzle but didn't use pci_swizzle_interrupt_pin
instead.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agobooting-without-of: Remove nonexistent chapters from TOC, fix numbering
Anton Vorontsov [Wed, 11 Aug 2010 16:56:03 +0000 (20:56 +0400)]
booting-without-of: Remove nonexistent chapters from TOC, fix numbering

Marvell and GPIO bindings live in their own files, so the TOC should not
mention them.

Also fix chapters numbering.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agosparc: Really fix "console=" for serial consoles.
David S. Miller [Sun, 15 Aug 2010 07:26:14 +0000 (00:26 -0700)]
sparc: Really fix "console=" for serial consoles.

If a video head and keyboard are hooked up, specifying "console=ttyS0"
or similar to use a serial console will not work properly.

The key issue is that we must register all serial console capable
devices with register_console(), otherwise the command line specified
device won't be found.  The sun serial drivers would only register
themselves as console devices if the OpenFirmware specified console
device node matched.  To fix this part we now unconditionally get
the serial console register by setting serial_drv->cons always.

Secondarily we must not add_preferred_console() using the firmware
provided console setting if the user gaven an override on the kernel
command line using "console="  The "primary framebuffer" matching
logic was always triggering o n openfirmware device node match, make
it not when a command line override was given.

Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme...
Ingo Molnar [Mon, 16 Aug 2010 17:26:10 +0000 (19:26 +0200)]
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent

13 years agoplatform/x86: move rfkill for Dell Mini 1012 to compal-laptop
Victor van den Elzen [Sat, 14 Aug 2010 23:19:33 +0000 (01:19 +0200)]
platform/x86: move rfkill for Dell Mini 1012 to compal-laptop

Like others in the Mini series, the Dell Mini 1012 does not support
the smbios hook required by dell-laptop.

Signed-off-by: Victor van den Elzen <victor.vde@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards
Jens Taprogge [Tue, 10 Aug 2010 02:48:22 +0000 (23:48 -0300)]
thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards

On the T410s and most likely other current models, Fn-F6 is labeled as
Camera/Headphone key.  Report key presses as KEY_CAMERA.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Acked-by: Jerone Young <jerone.young@canonical.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: add support for model-specific keymaps
Henrique de Moraes Holschuh [Tue, 10 Aug 2010 02:48:21 +0000 (23:48 -0300)]
thinkpad-acpi: add support for model-specific keymaps

Use the quirks engine to select model-specific keymaps, which makes
it much easier to extend should we need it.

Keycodes are based on the tables at
http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: lock down size of hotkey keymap
Henrique de Moraes Holschuh [Tue, 10 Aug 2010 02:48:20 +0000 (23:48 -0300)]
thinkpad-acpi: lock down size of hotkey keymap

Use a safer coding style for the hotkey keymap.  This does not fix any
problems, as the current code is correct.  But it might help avoid
mistakes in the future.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: untangle ACPI/vendor backlight selection
Henrique de Moraes Holschuh [Tue, 10 Aug 2010 02:48:19 +0000 (23:48 -0300)]
thinkpad-acpi: untangle ACPI/vendor backlight selection

acpi_video_backlight_support() already tells us if ACPI is handling
backlight control through the generic ACPI handle.  It is better to just
trust it.

While at it, adjust down a printk priority, and test earlier for
brightness_enable=0.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: find ACPI video device by synthetic HID
Henrique de Moraes Holschuh [Tue, 10 Aug 2010 02:48:18 +0000 (23:48 -0300)]
thinkpad-acpi: find ACPI video device by synthetic HID

The Linux ACPI core locates the ACPI video devices for us and marks them
with ACPI_VIDEO_HID.  Use that information to locate the video device
instead of a half-baked hunt for _BCL.

This uncouples the detection of the number of backlight brightness
levels on ThinkPads from the ACPI paths in vid_handle.

With this change, the driver should be able to always detect whether the
ThinkPad uses a 8-level or 16-level brightness scale even on newer
models for which the vid_handle paths have not been updated yet.

It will skip deactivated devices in the ACPI device tree, which is a
change in behaviour.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agointel_ips: potential null dereference
Dan Carpenter [Sat, 7 Aug 2010 22:01:12 +0000 (00:01 +0200)]
intel_ips: potential null dereference

There is a potential NULL dereference of "limits."  We can just return
NULL earlier to avoid it.  The caller already handles NULL returns.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agodrivers/platform/x86: Adjust confusing if indentation
Julia Lawall [Thu, 5 Aug 2010 20:24:12 +0000 (22:24 +0200)]
drivers/platform/x86: Adjust confusing if indentation

The assignment of ret to -EIO appears to only make sense if the branch that
it is aligned with is executed, so move it into that branch.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@

(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

if (p1[0].column == p2[0].column):
  cocci.print_main("branch",p1)
  cocci.print_secs("after",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agox86: intel_ips: do not use PCI resources before pci_enable_device()
Kulikov Vasiliy [Tue, 3 Aug 2010 15:44:16 +0000 (19:44 +0400)]
x86: intel_ips: do not use PCI resources before pci_enable_device()

IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.

The semantic match that finds this problem is as follows:

// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@

(
* x->irq
|
* x->resource
|
* request(x, ...)
)
 ...
*pci_enable_device(x)
// </smpl>

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoMerge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Steven Rostedt [Mon, 16 Aug 2010 15:17:30 +0000 (11:17 -0400)]
Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into trace/tip/perf/urgent-4

Conflicts:
kernel/trace/trace_events.c

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agoUSB HID: Add ID for eGalax Multitouch used in JooJoo tablet
Chris Ball [Mon, 16 Aug 2010 14:01:28 +0000 (16:01 +0200)]
USB HID: Add ID for eGalax Multitouch used in JooJoo tablet

The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB
TouchController", and this patch hooks it up to the egalax-touch driver.
Without the patch we don't get any cursor motion, since it comes through
Z/RX rather than X/Y.

(The egalax-touch driver does not yet generate a correct event sequence
for the "serial" protocol used by this device, though -- see the note
added to the code, which comes from research by Stéphane Chatty.)

Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoperf annotate tui: Fix exit and RIGHT keys handling
Arnaldo Carvalho de Melo [Mon, 16 Aug 2010 13:43:54 +0000 (10:43 -0300)]
perf annotate tui: Fix exit and RIGHT keys handling

As part of ongoing effort to reduce the coupling with libnewt, browsers
are being changed to return the exit key.

The annotate browser is not returning it as expected by builtin-annotate
when annotating multiple symbols (when 'perf annotate' is called without
specifying a symbol name).

Fix it by returning the exit key and also adding the RIGHT key as a exit
key so that going to the next symbol in the TUI can work again.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoASoC: Remove DSP mode support for WM8776
Mark Brown [Mon, 16 Aug 2010 10:46:57 +0000 (11:46 +0100)]
ASoC: Remove DSP mode support for WM8776

This is not supported by current hardware revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
13 years agoALSA: hda - Add quirk for Dell Vostro 1220
Takashi Iwai [Mon, 16 Aug 2010 08:15:57 +0000 (10:15 +0200)]
ALSA: hda - Add quirk for Dell Vostro 1220

model=dell-vostro is needed for Dell Vostro 1220 with Coexnat 5067.

Reference: Novell bnc#631066
https://bugzilla.novell.com/show_bug.cgi?id=631066

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoRevert "netlink: netlink_recvmsg() fix"
David S. Miller [Mon, 16 Aug 2010 06:21:50 +0000 (23:21 -0700)]
Revert "netlink: netlink_recvmsg() fix"

This reverts commit 1235f504aaba2ebeabc863fdb3ceac764a317d47.

It causes regressions worse than the problem it was trying
to fix.  Eric will try to solve the problem another way.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: riptide - Fix detection / load of firmware files
Takashi Iwai [Mon, 16 Aug 2010 06:08:48 +0000 (08:08 +0200)]
ALSA: riptide - Fix detection / load of firmware files

The detection and loading of firmeware on riptide driver has been broken
due to rewrite of some codes, checking the presense wrongly.
This patch fixes the logic again.

Reference: kernel bug 16596
https://bugzilla.kernel.org/show_bug.cgi?id=16596

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agonilfs2: fix false warning saying one of two super blocks is broken
Ryusuke Konishi [Sun, 15 Aug 2010 11:16:11 +0000 (20:16 +0900)]
nilfs2: fix false warning saying one of two super blocks is broken

After applying commit b2ac86e1, the following message got appeared
after unclean shutdown:

> NILFS warning: broken superblock. using spare superblock.

This turns out to be a false message due to the change which updates
two super blocks alternately.  The secondary super block now can be
selected if it's newer than the primary one.

This kills the false warning by suppressing it if another super block
is not actually broken.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
13 years agonilfs2: fix list corruption after ifile creation failure
Ryusuke Konishi [Fri, 13 Aug 2010 03:42:24 +0000 (12:42 +0900)]
nilfs2: fix list corruption after ifile creation failure

If nilfs_attach_checkpoint() gets a memory allocation failure during
creation of ifile, it will return without removing nilfs_sb_info
struct from ns_supers list.  When a concurrently mounted snapshot is
unmounted or another new snapshot is mounted after that, this causes
kernel oops as below:

> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<f83662ff>] nilfs_find_sbinfo+0x74/0xa4 [nilfs2]
> *pde = 00000000
> Oops: 0000 [#1] SMP
<snip>
> Call Trace:
>  [<f835dc29>] ? nilfs_get_sb+0x165/0x532 [nilfs2]
>  [<c1173c87>] ? ida_get_new_above+0x16d/0x187
>  [<c109a7f8>] ? alloc_vfsmnt+0x7e/0x10a
>  [<c1070790>] ? kstrdup+0x2c/0x40
>  [<c1089041>] ? vfs_kern_mount+0x96/0x14e
>  [<c108913d>] ? do_kern_mount+0x32/0xbd
>  [<c109b331>] ? do_mount+0x642/0x6a1
>  [<c101a415>] ? do_page_fault+0x0/0x2d1
>  [<c1099c00>] ? copy_mount_options+0x80/0xe2
>  [<c10705d8>] ? strndup_user+0x48/0x67
>  [<c109b3f1>] ? sys_mount+0x61/0x90
>  [<c10027cc>] ? sysenter_do_call+0x12/0x22

This fixes the problem.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable@kernel.org
13 years agoLinux 2.6.36-rc1 v2.6.36-rc1
Linus Torvalds [Mon, 16 Aug 2010 00:41:37 +0000 (17:41 -0700)]
Linux 2.6.36-rc1

13 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 16 Aug 2010 00:37:07 +0000 (17:37 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  gcc-4.6: ACPI: fix unused but set variables in ACPI
  ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
  ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
  ACPI processor: remove deprecated ACPI procfs I/F
  ACPI power_resource: remove unused procfs I/F
  ACPI: remove deprecated ACPI procfs I/F
  ACPI: introduce drivers/acpi/sysfs.c
  ACPI: introduce module parameter acpi.aml_debug_output
  ACPI: introduce drivers/acpi/debugfs.c
  ACPI, APEI, ERST debug support
  ACPI, APEI, Manage GHES as platform devices
  ACPI, APEI, Rename CPER and GHES severity constants
  ACPI, APEI, Fix a typo of error path of apei_resources_request
  ACPI / ACPICA: Fix reference counting problems with GPE handlers
  ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
  ACPI / Sleep: Drop acpi_suspend_finish()
  ACPI / Sleep: Consolidate suspend and hibernation routines
  ACPI / Wakeup: Simplify enabling of wakeup devices
  ACPI / Sleep: Rework enabling wakeup devices
  ACPI / Sleep: Free NVS copy if suspending of devices fails

Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
patch that doesn't even compile in the merge.

Thanks to Sedat Dilek <sedat.dilek@googlemail.com> for noticing the
breakage before I even pulled.  And a big "Grrr.." at Len for not even
bothering to compile the tree before asking me to pull.

13 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Mon, 16 Aug 2010 00:34:20 +0000 (17:34 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  intel-iommu: Fix 32-bit build warning with __cmpxchg()
  intr-remap: allow disabling source id checking

13 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Mon, 16 Aug 2010 00:32:47 +0000 (17:32 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  mtd/nand_ids: Fix buswidth
  mtd/m25p80: fix test for end of loop
  mtd/m25p80: retlen is never NULL
  MIPS: Fix gen_nand probe structures contents
  gen_nand: Test if nr_chips field is valid
  BFIN: Fix gen_nand probe structures contents
  nand/denali: move all hardware initialization work to denali_hw_init
  nand/denali: Add a page check in denali_read_page & denali_read_page_raw
  nand/denali: use cpu_relax() while waiting for hardware interrupt
  nand/denali: change read_status function method
  nand/denali: Fixed check patch warnings
  ARM: Fix gen_nand probe structures contents
  mtd/nand_base: fix kernel-doc warnings & typos
  nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
  nand/denali: Fixed handle ECC error bugs
  nand/denali: use iowrite32() to replace denali_write32()
  nand/denali: Fixed probe function bugs

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Linus Torvalds [Mon, 16 Aug 2010 00:31:43 +0000 (17:31 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile: don't validate CROSS_COMPILE needlessly
  arch/tile: export only COMMAND_LINE_SIZE to userspace.
  arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
  arch/tile: Rename the hweight() implementations to __arch_hweight()
  arch/tile: extend syscall ABI to set r1 on return as well.
  arch/tile: Various cleanups.
  arch/tile: support backtracing on TILE-Gx
  arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx.
  arch/tile: Use separate, better minsec values for clocksource and sched_clock.
  arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.
  arch: tile: mm: pgtable.c: Removed duplicated #include
  arch: tile: kernel/proc.c Removed duplicated #include
  Add fanotify syscalls to <asm-generic/unistd.h>.
  arch/tile: support new kunmap_atomic() naming convention.
  tile: remove unused ISA_DMA_THRESHOLD define

Conflicts in arch/tile/configs/tile_defconfig (pick the mainline version
with the reduced defconfig).

13 years agoARM: Tighten check for allowable CPSR values
Russell King [Fri, 13 Aug 2010 22:33:46 +0000 (23:33 +0100)]
ARM: Tighten check for allowable CPSR values

Reviewed-by: Arve Hjønnevåg <arve@android.com>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6329/1: wire up sys_accept4() on ARM
Mikael Pettersson [Sun, 15 Aug 2010 09:47:23 +0000 (10:47 +0100)]
ARM: 6329/1: wire up sys_accept4() on ARM

sys_accept4() was added in kernel 2.6.28, but ARM was not updated
to include it.  The number and types of parameters is such that
no ARM-specific processing is needed, so wiring up sys_accept4()
just requires defining __NR_accept4 and adding a direct call in
the syscall entry table.

Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original
accept4() test program, modified to define __NR_accept4 for ARM.

Using the updated unistd.h also eliminates a warning then building
glibc (2.10.2 and newer) about accept4() being unimplemented.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoarch/tile: don't validate CROSS_COMPILE needlessly
Chris Metcalf [Sun, 15 Aug 2010 19:01:45 +0000 (15:01 -0400)]
arch/tile: don't validate CROSS_COMPILE needlessly

With this change, the arch/tile Makefile will only check for a valid
combination of CROSS_COMPILE vs "uname -m" for a few common targets
that are typically the ones we get wrong (vmlinux, all, and modules).
The change handles the case of an empty "make" goal like "make all".

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
13 years agomm: fix up some user-visible effects of the stack guard page
Linus Torvalds [Sun, 15 Aug 2010 18:35:52 +0000 (11:35 -0700)]
mm: fix up some user-visible effects of the stack guard page

This commit makes the stack guard page somewhat less visible to user
space. It does this by:

 - not showing the guard page in /proc/<pid>/maps

   It looks like lvm-tools will actually read /proc/self/maps to figure
   out where all its mappings are, and effectively do a specialized
   "mlockall()" in user space.  By not showing the guard page as part of
   the mapping (by just adding PAGE_SIZE to the start for grows-up
   pages), lvm-tools ends up not being aware of it.

 - by also teaching the _real_ mlock() functionality not to try to lock
   the guard page.

   That would just expand the mapping down to create a new guard page,
   so there really is no point in trying to lock it in place.

It would perhaps be nice to show the guard page specially in
/proc/<pid>/maps (or at least mark grow-down segments some way), but
let's not open ourselves up to more breakage by user space from programs
that depends on the exact deails of the 'maps' file.

Special thanks to Henrique de Moraes Holschuh for diving into lvm-tools
source code to see what was going on with the whole new warning.

Reported-and-tested-by: François Valenduc <francois.valenduc@tvcablenet.be
Reported-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 15 Aug 2010 18:22:00 +0000 (11:22 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: sound/usb/format: silence uninitialized variable warnings
  MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices
  MAINTAINERS: Make Wolfson entry also cover CODEC drivers
  ASoC: Only tweak WM8994 chip configuration on devices up to rev D
  ASoC: Optimise DSP performance for WM8994
  ALSA: hda - Fix dynamic ADC change working again
  ALSA: hda - Restrict PCM parameters per ELD information over HDMI
  sound: oss: sh_dac_audio.c removed duplicated #include

13 years agoMerge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Sun, 15 Aug 2010 18:17:52 +0000 (11:17 -0700)]
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6

* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
  intel_idle: recognize Lincroft Atom Processor
  intel_idle: no longer EXPERIMENTAL
  intel_idle: disable module support
  intel_idle: add support for Westmere-EX
  intel_idle: delete power_policy modparam, and choose substate functions
  intel_idle: delete substates DEBUG modparam

13 years agoarch/tile: export only COMMAND_LINE_SIZE to userspace.
Chris Metcalf [Sun, 15 Aug 2010 16:14:41 +0000 (12:14 -0400)]
arch/tile: export only COMMAND_LINE_SIZE to userspace.

This fixes a failure in "make headers_check" for tile.
I hadn't realized this file was exported to userspace by default.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
13 years agoarch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
Chris Metcalf [Sat, 14 Aug 2010 00:43:39 +0000 (20:43 -0400)]
arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN

See commit a6eb9fe105d5de0053b261148cee56c94b4720ca.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 15 Aug 2010 12:34:02 +0000 (14:34 +0200)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 15 Aug 2010 12:33:56 +0000 (14:33 +0200)]
Merge branch 'fix/hda' into for-linus

13 years agoALSA: sound/usb/format: silence uninitialized variable warnings
Dan Carpenter [Sat, 14 Aug 2010 17:29:53 +0000 (19:29 +0200)]
ALSA: sound/usb/format: silence uninitialized variable warnings

Gcc complains that ret might be used uninitialized:

sound/usb/format.c: In function ‘snd_usb_parse_audio_format’:
sound/usb/format.c:354: warning: ‘ret’ may be used uninitialized in this function
sound/usb/format.c:354: note: ‘ret’ was declared here
sound/usb/format.c:414: warning: ‘ret’ may be used uninitialized in this function
sound/usb/format.c:414: note: ‘ret’ was declared here

I suppose it could be uninitialized if there is ever a UAC_VERSION_3
released. Anyway this patch is worthwhile if only to silence the gcc
warning.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoKVM: destroy workqueue on kvm_create_pit() failures
Xiaotian Feng [Fri, 13 Aug 2010 08:23:06 +0000 (16:23 +0800)]
KVM: destroy workqueue on kvm_create_pit() failures

kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise
after pit is freed, the workqueue is leaked.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoKVM: fix poison overwritten caused by using wrong xstate size
Xiaotian Feng [Fri, 13 Aug 2010 07:19:11 +0000 (15:19 +0800)]
KVM: fix poison overwritten caused by using wrong xstate size

fpu.state is allocated from task_xstate_cachep, the size of task_xstate_cachep
is xstate_size. xstate_size is set from cpuid instruction, which is often
smaller than sizeof(struct xsave_struct). kvm is using sizeof(struct xsave_struct)
to fill in/out fpu.state.xsave, as what we allocated for fpu.state is
xstate_size, kernel will write out of memory and caused poison/redzone/padding
overwritten warnings.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Reviewed-by: Sheng Yang <sheng@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
13 years agoipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss
Min Zhang [Sun, 15 Aug 2010 05:42:51 +0000 (22:42 -0700)]
ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss

sysctl output ipv6 gc_elasticity and min_adv_mss as values divided by
HZ. However, they are not in unit of jiffies, since ip6_rt_min_advmss
refers to packet size and ip6_rt_fc_elasticity is used as scaler as in
expire>>ip6_rt_gc_elasticity, so replace the jiffies conversion
handler will regular handler for them.

This has impact on scripts that are currently working assuming the
divide by HZ, will yield different results with this patch in place.

Signed-off-by: Min Zhang <mzhang@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Use GFP_ATOMIC in xfrm_compile_policy
Herbert Xu [Sun, 15 Aug 2010 05:38:09 +0000 (22:38 -0700)]
xfrm: Use GFP_ATOMIC in xfrm_compile_policy

As xfrm_compile_policy runs within a read_lock, we cannot use
GFP_KERNEL for memory allocations.

Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'linus' into release
Len Brown [Sun, 15 Aug 2010 05:06:31 +0000 (01:06 -0400)]
Merge branch 'linus' into release

Conflicts:
drivers/acpi/debug.c

Signed-off-by: Len Brown <len.brown@intel.com>
13 years agogcc-4.6: ACPI: fix unused but set variables in ACPI
Andi Kleen [Tue, 20 Jul 2010 22:18:36 +0000 (15:18 -0700)]
gcc-4.6: ACPI: fix unused but set variables in ACPI

Some minor improvements in error handling, but overall it was mostly dead
code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
Zhang Rui [Thu, 15 Jul 2010 02:46:44 +0000 (10:46 +0800)]
ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS

Mark the ACPI thermal procfs I/F deprecated, because /sys/class/thermal/
is already available and has been working for years w/o any problem.

The ACPI thermal procfs I/F will be removed in 2.6.37.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
Zhang Rui [Thu, 15 Jul 2010 02:46:43 +0000 (10:46 +0800)]
ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS

Mark ACPI video driver procfs I/F deprecated, including:
/proc/acpi/video/*/info
/proc/acpi/video/*/DOS
/proc/acpi/video/*/ROM
/proc/acpi/video/*/POST
/proc/acpi/video/*/POST_info
/proc/acpi/video/*/*/info
/proc/acpi/video/*/*/state
/proc/acpi/video/*/*/EDID
and
/proc/acpi/video/*/*/brightness, because
1. we already have the sysfs I/F /sysclass/backlight/ as the replacement
of /proc/acpi/video/*/*/brightness.
2. the other procfs I/F is not useful for userspace.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI processor: remove deprecated ACPI procfs I/F
Zhang Rui [Thu, 15 Jul 2010 02:46:41 +0000 (10:46 +0800)]
ACPI processor: remove deprecated ACPI procfs I/F

Remove deprecated ACPI processor procfs I/F, including:
/proc/acpi/processor/CPUX/power
/proc/acpi/processor/CPUX/limit
/proc/acpi/processor/CPUX/info

/proc/acpi/processor/CPUX/throttling still exists,
as we don't have sysfs I/F available for now.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI power_resource: remove unused procfs I/F
Zhang Rui [Thu, 15 Jul 2010 02:46:38 +0000 (10:46 +0800)]
ACPI power_resource: remove unused procfs I/F

Remove unused ACPI power procfs I/F.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI: remove deprecated ACPI procfs I/F
Zhang Rui [Thu, 15 Jul 2010 02:46:33 +0000 (10:46 +0800)]
ACPI: remove deprecated ACPI procfs I/F

Rmove deprecated ACPI procfs I/F, including
/proc/acpi/debug_layer
/proc/acpi/debug_level
/proc/acpi/info
/proc/acpi/dsdt
/proc/acpi/fadt
/proc/acpi/sleep

because the sysfs I/F is already available
and has been working well for years.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI: introduce drivers/acpi/sysfs.c
Zhang Rui [Thu, 15 Jul 2010 02:46:30 +0000 (10:46 +0800)]
ACPI: introduce drivers/acpi/sysfs.c

Introduce drivers/acpi/sysfs.c.

code for ACPI sysfs I/F, including
#ifdef ACPI_DEBUG
/sys/module/acpi/parameters/debug_layer
/sys/module/acpi/parameters/debug_level
/sys/module/acpi/parameters/trace_method_name
/sys/module/acpi/parameters/trace_debug_layer
/sys/module/acpi/parameters/trace_debug_level
/sys/module/acpi/parameters/trace_state
#endif
/sys/module/acpi/parameters/acpica_version
/sys/firmware/acpi/tables/
/sys/firmware/acpi/interrupts/
is moved to this file.

No function change in this patch.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoMerge branch 'acpica-gpe' into release
Len Brown [Sun, 15 Aug 2010 04:25:40 +0000 (00:25 -0400)]
Merge branch 'acpica-gpe' into release

13 years agoMerge branch 'bugzilla-16422' into release
Len Brown [Sun, 15 Aug 2010 03:57:32 +0000 (23:57 -0400)]
Merge branch 'bugzilla-16422' into release

13 years agoMerge branch 'procfs-cleanup' into release
Len Brown [Sun, 15 Aug 2010 03:55:57 +0000 (23:55 -0400)]
Merge branch 'procfs-cleanup' into release

13 years agoMerge branch 'apei' into release
Len Brown [Sun, 15 Aug 2010 03:55:47 +0000 (23:55 -0400)]
Merge branch 'apei' into release

13 years agoMerge branch 'nvs' into release
Len Brown [Sun, 15 Aug 2010 03:55:44 +0000 (23:55 -0400)]
Merge branch 'nvs' into release

13 years agoACPI: introduce module parameter acpi.aml_debug_output
Zhang Rui [Thu, 15 Jul 2010 02:46:17 +0000 (10:46 +0800)]
ACPI: introduce module parameter acpi.aml_debug_output

Introduce module parameter acpi.aml_debug_output.

With acpi.aml_debug_output set, we can get AML debug object output
(Store (AAA, Debug)), even with CONFIG_ACPI_DEBUG cleared.

Together with the runtime custom method mechanism,
we can debug AML code problems without rebuilding the kernel.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI: introduce drivers/acpi/debugfs.c
Zhang Rui [Thu, 15 Jul 2010 02:46:15 +0000 (10:46 +0800)]
ACPI: introduce drivers/acpi/debugfs.c

Introduce drivers/acpi/debugfs.c.

Code for ACPI debugfs I/F,
i.e. /sys/kernel/debug/acpi/custom_method,
is moved to this file.

And make ACPI debugfs always built in,
even if CONFIG_ACPI_DEBUG is cleared.

BTW:this adds about 400bytes code to ACPI, when
CONFIG_ACPI_DEBUG is cleared.

[uaccess.h build fix from Andrew Morton <akpm@linux-foundation.org>]

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agointel_idle: recognize Lincroft Atom Processor
Arjan van de Ven [Thu, 22 Jul 2010 03:42:25 +0000 (23:42 -0400)]
intel_idle: recognize Lincroft Atom Processor

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoACPI, APEI, ERST debug support
Huang Ying [Thu, 12 Aug 2010 03:55:17 +0000 (11:55 +0800)]
ACPI, APEI, ERST debug support

This patch adds debugging/testing support to ERST. A misc device is
implemented to export raw ERST read/write/clear etc operations to user
space. With this patch, we can add ERST testing support to
linuxfirmwarekit ISO (linuxfirmwarekit.org) to verify the kernel
support and the firmware implementation.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/cleanup
Linus Torvalds [Sat, 14 Aug 2010 23:21:50 +0000 (16:21 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/cleanup

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/cleanup:
  defconfig reduction
  kbuild: drop unifdef-y support
  archs: replace unifdef-y with header-y
  include: replace unifdef-y with header-y

13 years agofusion: add function parameter names to kernel-doc
Randy Dunlap [Sat, 14 Aug 2010 20:05:57 +0000 (13:05 -0700)]
fusion: add function parameter names to kernel-doc

Fix fusion missing kernel-doc:

  Warning(drivers/message/fusion/mptbase.c:649): No description found for parameter 'func_name'
  Warning(drivers/message/fusion/mptbase.c:8010): No description found for parameter 'cb_idx'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs/dcache: fix function param name in kernel-doc
Randy Dunlap [Sat, 14 Aug 2010 20:05:31 +0000 (13:05 -0700)]
fs/dcache: fix function param name in kernel-doc

Fix parameter name in kernel-doc notation (causes a warning).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofusion: fix non-kernel-doc comment block
Randy Dunlap [Sat, 14 Aug 2010 20:05:50 +0000 (13:05 -0700)]
fusion: fix non-kernel-doc comment block

Fix comment begin notation not to look like kernel-doc
since it's not.  Removes kernel-doc warnings.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>