sfrench/cifs-2.6.git
16 years agoAllow ARG_MAX execve string space even with a small stack limit
Linus Torvalds [Mon, 3 Mar 2008 18:12:14 +0000 (10:12 -0800)]
Allow ARG_MAX execve string space even with a small stack limit

The new code that removed the limitation on the execve string size
(which was historically 32 pages) replaced it with a much softer limit
based on RLIMIT_STACK which is usually much larger than the traditional
limit.  See commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba ("mm:
variable length argument support") for details.

However, if you have a small stack limit (perhaps because you need lots
of stacks in a threaded environment), the new heuristic of allowing up
to 1/4th of RLIMIT_STACK to be used for argument and environment strings
could actually be smaller than the old limit.

So just say that it's ok to have up to ARG_MAX strings regardless of the
value of RLIMIT_STACK, and check the rlimit only when going over that
traditional limit.

(Of course, if you actually have a *really* small stack limit, the whole
stack itself will be limited before you hit ARG_MAX, but that has always
been true and is clearly the right behaviour anyway).

Acked-by: Carlos O'Donell <carlos@codesourcery.com>
Cc: Michael Kerrisk <michael.kerrisk@googlemail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ollie Wild <aaw@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert "x86: fix pmd_bad and pud_bad to support huge pages"
Linus Torvalds [Mon, 3 Mar 2008 18:02:44 +0000 (10:02 -0800)]
Revert "x86: fix pmd_bad and pud_bad to support huge pages"

This reverts commit cded932b75ab0a5f9181ee3da34a0a488d1a14fd.

Arjan bisected down a boot-time hang to this, saying:
  ".. it prevents the kernel to finish booting on my (Penryn based)
   laptop.  The boot stops right after freeing the init memory."

and while it's not clear exactly what triggers it, at this stage we're
better off just reverting it while Ingo tries to figure out what went
wrong.

Requested-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
Cc: Nish Aravamudan <nish.aravamudan@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sun, 2 Mar 2008 20:38:17 +0000 (12:38 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fix crash in automatic module unloading
  firewire: potentially invalid pointers used in fw_card_bm_work
  firewire: fw-sbp2: better fix for NULL pointer dereference in scsi_remove_device

16 years agofirewire: fix crash in automatic module unloading
Stefan Richter [Wed, 27 Feb 2008 21:14:27 +0000 (22:14 +0100)]
firewire: fix crash in automatic module unloading

"modprobe firewire-ohci; sleep .1; modprobe -r firewire-ohci" used to
result in crashes like this:

    BUG: unable to handle kernel paging request at ffffffff8807b455
    IP: [<ffffffff8807b455>]
    PGD 203067 PUD 207063 PMD 7c170067 PTE 0
    Oops: 0010 [1] PREEMPT SMP
    CPU 0
    Modules linked in: i915 drm cpufreq_ondemand acpi_cpufreq freq_table applesmc input_polldev led_class coretemp hwmon eeprom snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss button thermal processor sg snd_hda_intel snd_pcm snd_timer snd snd_page_alloc sky2 i2c_i801 rtc [last unloaded: crc_itu_t]
    Pid: 9, comm: events/0 Not tainted 2.6.25-rc2 #3
    RIP: 0010:[<ffffffff8807b455>]  [<ffffffff8807b455>]
    RSP: 0018:ffff81007dcdde88  EFLAGS: 00010246
    RAX: ffff81007dc95040 RBX: ffff81007dee5390 RCX: 0000000000005e13
    RDX: 0000000000008c8b RSI: 0000000000000001 RDI: ffff81007dee5388
    RBP: ffff81007dc5eb40 R08: 0000000000000002 R09: ffffffff8022d05c
    R10: ffffffff8023b34c R11: ffffffff8041a353 R12: ffff81007dee5388
    R13: ffffffff8807b455 R14: ffffffff80593bc0 R15: 0000000000000000
    FS:  0000000000000000(0000) GS:ffffffff8055a000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    CR2: ffffffff8807b455 CR3: 0000000000201000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process events/0 (pid: 9, threadinfo ffff81007dcdc000, task ffff81007dc95040)
    Stack:  ffffffff8023b396 ffffffff88082524 0000000000000000 ffffffff8807d9ae
    ffff81007dc5eb40 ffff81007dc9dce0 ffff81007dc5eb40 ffff81007dc5eb80
    ffff81007dc9dce0 ffffffffffffffff ffffffff8023be87 0000000000000000
    Call Trace:
    [<ffffffff8023b396>] ? run_workqueue+0xdf/0x1df
    [<ffffffff8023be87>] ? worker_thread+0xd8/0xe3
    [<ffffffff8023e917>] ? autoremove_wake_function+0x0/0x2e
    [<ffffffff8023bdaf>] ? worker_thread+0x0/0xe3
    [<ffffffff8023e813>] ? kthread+0x47/0x74
    [<ffffffff804198e0>] ? trace_hardirqs_on_thunk+0x35/0x3a
    [<ffffffff8020c008>] ? child_rip+0xa/0x12
    [<ffffffff8020b6e3>] ? restore_args+0x0/0x3d
    [<ffffffff8023e68a>] ? kthreadd+0x14c/0x171
    [<ffffffff8023e68a>] ? kthreadd+0x14c/0x171
    [<ffffffff8023e7cc>] ? kthread+0x0/0x74
    [<ffffffff8020bffe>] ? child_rip+0x0/0x12

    Code:  Bad RIP value.
    RIP  [<ffffffff8807b455>]
    RSP <ffff81007dcdde88>
    CR2: ffffffff8807b455
    ---[ end trace c7366c6657fe5bed ]---

Note that this crash happened _after_ firewire-core was unloaded.  The
shared workqueue tried to run firewire-core's device initialization jobs
or similar jobs.

The fix makes sure that firewire-ohci and hence firewire-core is not
unloaded before all device shutdown jobs have been completed.  This is
determined by the count of device initializations minus device releases.

Also skip useless retries in the node initialization job if the node is
to be shut down.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
16 years agofirewire: potentially invalid pointers used in fw_card_bm_work
Stefan Richter [Sun, 24 Feb 2008 17:57:23 +0000 (18:57 +0100)]
firewire: potentially invalid pointers used in fw_card_bm_work

The bus management workqueue job was in danger to dereference NULL
pointers.  Also, after having temporarily lifted card->lock, a few node
pointers and a device pointer may have become invalid.

Add NULL pointer checks and get the necessary references.  Also, move
card->local_node out of fw_card_bm_work's sight during shutdown of the
card.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
16 years agofirewire: fw-sbp2: better fix for NULL pointer dereference in scsi_remove_device
Stefan Richter [Tue, 26 Feb 2008 22:30:02 +0000 (23:30 +0100)]
firewire: fw-sbp2: better fix for NULL pointer dereference in scsi_remove_device

Patch "firewire: fw-sbp2: fix NULL pointer deref. in scsi_remove_device"
had the unintended effect that firewire-sbp2 could not be unloaded
anymore until all SBP-2 devices were unplugged.

We now fix the NULL pointer bug by reacquiring a reference to the sdev
instead of holding a reference to the sdev (and to the module) all the
time.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Jarod Wilson <jwilson@redhat.com>
16 years ago[PATCH] drop EOE records from printk
Steve Grubb [Thu, 21 Feb 2008 21:59:22 +0000 (16:59 -0500)]
[PATCH] drop EOE records from printk

Hi,

While we are looking at the printk issue, I see that its printk'ing the EOE
(end of event) records which is really not something that we need in syslog.
Its really intended for the realtime audit event stream handled by the audit
daemon. So, lets avoid printk'ing that record type.

Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[RFC] AUDIT: do not panic when printk loses messages
Eric Paris [Thu, 21 Feb 2008 20:53:05 +0000 (15:53 -0500)]
[RFC] AUDIT: do not panic when printk loses messages

On the latest kernels if one was to load about 15 rules, set the failure
state to panic, and then run service auditd stop the kernel will panic.
This is because auditd stops, then the script deletes all of the rules.
These deletions are sent as audit messages out of the printk kernel
interface which is already known to be lossy.  These will overun the
default kernel rate limiting (10 really fast messages) and will call
audit_panic().  The same effect can happen if a slew of avc's come
through while auditd is stopped.

This can be fixed a number of ways but this patch fixes the problem by
just not panicing if auditd is not running.  We know printk is lossy and
if the user chooses to set the failure mode to panic and tries to use
printk we can't make any promises no matter how hard we try, so why try?
At least in this way we continue to get lost message accounting and will
eventually know that things went bad.

The other change is to add a new call to audit_log_lost() if auditd
disappears.  We already pulled the skb off the queue and couldn't send
it so that message is lost.  At least this way we will account for the
last message and panic if the machine is configured to panic.  This code
path should only be run if auditd dies for unforeseen reasons.  If
auditd closes correctly audit_pid will get set to 0 and we won't walk
this code path.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] Audit: Fix the format type for size_t variables
Paul Moore [Wed, 27 Feb 2008 15:39:22 +0000 (10:39 -0500)]
[PATCH] Audit: Fix the format type for size_t variables

Fix the following compiler warning by using "%zu" as defined in C99.

  CC      kernel/auditsc.o
  kernel/auditsc.c: In function 'audit_log_single_execve_arg':
  kernel/auditsc.c:1074: warning: format '%ld' expects type 'long int', but
  argument 4 has type 'size_t'

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Sat, 1 Mar 2008 00:54:33 +0000 (16:54 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] wrap kmap_atomic(KM_IRQ0) with local_irq_save/restore()
  sata_svw: Add support for HT1100 SATA controller

16 years ago[libata] wrap kmap_atomic(KM_IRQ0) with local_irq_save/restore()
Jeff Garzik [Sat, 1 Mar 2008 00:10:51 +0000 (19:10 -0500)]
[libata] wrap kmap_atomic(KM_IRQ0) with local_irq_save/restore()

Interrupts must be disabled if using kmap_atomic(KM_IRQ0), but that was
not the case in a few code paths coming directly from ATA driver
interrupt handlers (which use spin_lock rather than spin_lock_irqsave).

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 29 Feb 2008 23:18:44 +0000 (15:18 -0800)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4843/1: Add GCR_CLKBPB for PXA3xx
  [ARM] 4842/1: pxa: remove redundant IRQ saving/restoring in clk_pxa3xx_cken_*
  [ARM] 4841/1: pxa: fix typo in LCD platform data definition code for zylonite
  [ARM] 4840/1: pxa: fix the typo in get_irqnr_and_base
  [ARM] 4839/1: fixes kernel Oops in /dev/mem device driver for memory map with PHYS_OFF
  [ARM] eliminate MODULE_PARM() usage
  [ARM] 4838/1: Fix kexec for SA1100 machines
  [ARM] 4837/1: make __get_unaligned_*() return unsigned types
  [ARM] 4836/1: Make ATAGS_PROC depend on KEXEC

16 years ago[ARM] 4843/1: Add GCR_CLKBPB for PXA3xx
Mark Brown [Wed, 27 Feb 2008 14:34:56 +0000 (15:34 +0100)]
[ARM] 4843/1: Add GCR_CLKBPB for PXA3xx

The PXA3xx AC97 controller has an additional control bit GCR_CLKBPB
which must be used during cold reset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4842/1: pxa: remove redundant IRQ saving/restoring in clk_pxa3xx_cken_*
eric miao [Wed, 27 Feb 2008 01:01:11 +0000 (02:01 +0100)]
[ARM] 4842/1: pxa: remove redundant IRQ saving/restoring in clk_pxa3xx_cken_*

This is unnecessary since it is already protected by
spin_lock_irq{save, restore} in clock.c.

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4841/1: pxa: fix typo in LCD platform data definition code for zylonite
eric miao [Wed, 27 Feb 2008 01:00:26 +0000 (02:00 +0100)]
[ARM] 4841/1: pxa: fix typo in LCD platform data definition code for zylonite

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4840/1: pxa: fix the typo in get_irqnr_and_base
eric miao [Wed, 27 Feb 2008 00:59:28 +0000 (01:59 +0100)]
[ARM] 4840/1: pxa: fix the typo in get_irqnr_and_base

This typo causes the incorrect calculation of the IRQ numbers
in the ICIP2 registers.

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4839/1: fixes kernel Oops in /dev/mem device driver for memory map with PHYS_OFF
Alexandre Rusev [Tue, 26 Feb 2008 17:42:10 +0000 (18:42 +0100)]
[ARM] 4839/1: fixes kernel Oops in /dev/mem device driver for memory map with PHYS_OFF

"cat /dev/mem" may cause kernel Oops for boards with PHYS_OFFSET != 0
because character device is mapped to addresses starting from zero
and there is no protection against such situation.
Patch just add this.

Signed-off-by: Alexandre Rusev <arusev@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] eliminate MODULE_PARM() usage
Randy Dunlap [Wed, 27 Feb 2008 20:11:16 +0000 (12:11 -0800)]
[ARM] eliminate MODULE_PARM() usage

Convert debug-only (and removed) MODULE_PARM() to module_param().
Compiles cleanly (with DEBUG=1).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4838/1: Fix kexec for SA1100 machines
Thomas Kunze [Sun, 24 Feb 2008 16:59:34 +0000 (17:59 +0100)]
[ARM] 4838/1: Fix kexec for SA1100 machines

This patch sets KEXEC_CONTROL_MEMORY_LIMIT to (-1)UL. As the value is
compared with physical addresses TASK_SIZE makes no sense. Machines
where the RAM addresses start above TASK_SIZE kexecs eats all memory
and crashes the kernel without this patch.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4837/1: make __get_unaligned_*() return unsigned types
Lennert Buytenhek [Fri, 22 Feb 2008 23:23:48 +0000 (00:23 +0100)]
[ARM] 4837/1: make __get_unaligned_*() return unsigned types

Eric Sandeen tracked an XFS on ARM corruption bug down to a function
under fs/xfs/ involving some get_unaligned() calls on u64 pointers.
As it turns out, calling ARM's get_unaligned() on a u64 pointer
pointing to the following byte sequence:

80 81 82 83 84 85 86 87

would return ffffffff83828180 (LE mode.)  This turns out to be
because of implicit u8 -> int promotion in ARM's implementation of
various helpers for get_unaligned(), causing them to accidentally
return signed instead of unsigned values, which in turn caused the
subsequent casts to unsigned long long in __get_unaligned_8_[bl]e()
to sign-extend the lower words.

Fix by casting the return values of __get_unaligned_[24]_[bl]e()
to unsigned int.

Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: Rabeeh Khoury <rabeeh@marvell.com>
Cc: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4836/1: Make ATAGS_PROC depend on KEXEC
Uli Luckas [Fri, 22 Feb 2008 15:45:18 +0000 (16:45 +0100)]
[ARM] 4836/1: Make ATAGS_PROC depend on KEXEC

On Wed, Feb 20, 2008 at 11:50:33AM +0100, Guennadi Liakhovetski wrote:
> arch/arm/kernel/atags.c uses for some reason the
> KEXEC_BOOT_PARAMS_SIZE macro, which is only defined if CONFIG_KEXEC
> is set. So, either this macro should be defined always, or another
> macro should be used, or ATAGS_PROC should depend on KEXEC.

As the procfs export of ATAGS is not meant as a stable, general purpose
ABI it shouldn't be an independent, general configuration option.

This patch make ATAGS_PROC depend on KEXEC

Signed-off-by: Uli Luckas <u.luckas@road.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agorcupreempt: remove never-migrates assumption from rcu_process_callbacks()
Paul E. McKenney [Thu, 28 Feb 2008 19:51:07 +0000 (11:51 -0800)]
rcupreempt: remove never-migrates assumption from rcu_process_callbacks()

This patch fixes a potentially invalid access to a per-CPU variable in
rcu_process_callbacks().

This per-CPU access needs to be done in such a way as to guarantee that
the code using it cannot move to some other CPU before all uses of the
value accessed have completed.  Even though this code is currently only
invoked from softirq context, which currrently cannot migrate to some
other CPU, life would be better if this code did not silently make such
an assumption.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agorcupreempt: fix hibernate/resume in presence of PREEMPT_RCU and hotplug
Paul E. McKenney [Thu, 28 Feb 2008 00:21:10 +0000 (16:21 -0800)]
rcupreempt: fix hibernate/resume in presence of PREEMPT_RCU and hotplug

This fixes a oops encountered when doing hibernate/resume in presence of
PREEMPT_RCU.

The problem was that the code failed to disable preemption when
accessing a per-CPU variable.  This is OK when called from code that
already has preemption disabled, but such is not the case from the
suspend/resume code path.

Reported-by: Dave Young <hidave.darkstar@gmail.com>
Tested-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Fri, 29 Feb 2008 18:19:27 +0000 (10:19 -0800)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  softlockup: fix task state setting
  rcu: add support for dynamic ticks and preempt rcu

16 years agoxen: mask out SEP from CPUID
Jeremy Fitzhardinge [Fri, 29 Feb 2008 17:55:43 +0000 (18:55 +0100)]
xen: mask out SEP from CPUID

Fix 32-on-64 pvops kernel:

we don't want userspace using syscall/sysenter, even if the hypervisor
supports it, so mask it out from CPUID.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86 ptrace: fix ptrace_bts_config structure declaration
Dave Anderson [Thu, 21 Feb 2008 16:45:38 +0000 (11:45 -0500)]
x86 ptrace: fix ptrace_bts_config structure declaration

The 2.6.25 ptrace_bts_config structure in asm-x86/ptrace-abi.h
is defined with u32 types:

   #include <asm/types.h>

   /* configuration/status structure used in PTRACE_BTS_CONFIG and
      PTRACE_BTS_STATUS commands.
   */
   struct ptrace_bts_config {
           /* requested or actual size of BTS buffer in bytes */
           u32 size;
           /* bitmask of below flags */
           u32 flags;
           /* buffer overflow signal */
           u32 signal;
           /* actual size of bts_struct in bytes */
           u32 bts_size;
   };
   #endif

But u32 is only accessible in asm-x86/types.h if __KERNEL__,
leading to compile errors when ptrace.h is included from
user-space. The double-underscore versions that are exported
to user-space in asm-x86/types.h should be used instead.

Signed-off-by: Dave Anderson <anderson@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: disable BTS ptrace extensions for now
Ingo Molnar [Tue, 26 Feb 2008 08:40:27 +0000 (09:40 +0100)]
x86: disable BTS ptrace extensions for now

revert the BTS ptrace extension for now.

based on general objections from Roland McGrath:

    http://lkml.org/lkml/2008/2/21/323

we'll let the BTS functionality cook some more and re-enable
it in v2.6.26. We'll leave the dead code around to help the
development of this code.

(X86_BTS is not defined at the moment)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: CPA: avoid split of alias mappings
Thomas Gleixner [Sat, 23 Feb 2008 19:43:21 +0000 (20:43 +0100)]
x86: CPA: avoid split of alias mappings

avoid over-eager large page splitup.

When the target area needs to be split or is split already (ioremap)
then the current code enforces the split of large mappings in the alias
regions even if we could avoid it.

Use a separate variable processed in the cpa_data structure to carry
the number of pages which have been processed instead of reusing the
numpages variable. This keeps numpages intact and gives the alias code
a chance to keep large mappings intact.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: delay the export removal of init_mm
Ingo Molnar [Thu, 28 Feb 2008 19:19:06 +0000 (20:19 +0100)]
x86: delay the export removal of init_mm

delay the removal of this symbol export by one more kernel release,
giving external modules such as VirtualBox a chance to stop using it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix leak un ioremap_page_range() failure
Ingo Molnar [Thu, 28 Feb 2008 13:02:08 +0000 (14:02 +0100)]
x86: fix leak un ioremap_page_range() failure

Jan Beulich noticed it during code review that if a driver's ioremap()
fails (say due to -ENOMEM) then we might leak the struct vm_area.

Free it properly.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86 vdso: fix build locale dependency
Roland McGrath [Wed, 27 Feb 2008 19:42:15 +0000 (11:42 -0800)]
x86 vdso: fix build locale dependency

Priit Laes discovered that the sed command processing nm output was
sensitive to locale settings.  This was addressed in commit
03994f01e8b72b3d01fd3d09d1cc7c9f421a727c by using [:alnum:] in place of
[a-zA-Z0-9].

But that solution too is locale-dependent and may not always match
the identifiers it needs to.  The better fix is just to run sed et al
with a fixed locale setting in all builds.

Signed-off-by: Roland McGrath <roland@redhat.com>
CC: Priit Laes <plaes@plaes.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: restore vsyscall64 prochandler
Thomas Gleixner [Wed, 27 Feb 2008 08:39:52 +0000 (09:39 +0100)]
x86: restore vsyscall64 prochandler

a recent fix:

  commit ce28b9864b853803320c3f1d8de1b81aa4120b14
  Author: Thomas Gleixner <tglx@linutronix.de>
  Date:   Wed Feb 20 23:57:30 2008 +0100

    x86: fix vsyscall wreckage

removed the broken /kernel/vsyscall64 handler completely.
This triggers the following debug check:

  sysctl table check failed: /kernel/vsyscall64  No proc_handler

Restore the sane part of the proc handler.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix pmd_bad and pud_bad to support huge pages
Hans Rosenfeld [Mon, 18 Feb 2008 17:10:47 +0000 (18:10 +0100)]
x86: fix pmd_bad and pud_bad to support huge pages

I recently stumbled upon a problem in the support for huge pages. If a
program using huge pages does not explicitly unmap them, they remain
mapped (and therefore, are lost) after the program exits.

I observed that the free huge page count in /proc/meminfo decreased when
running my program, and it did not increase after the program exited.
After running the program a few times, no more huge pages could be
allocated.

The reason for this seems to be that the x86 pmd_bad and pud_bad
consider pmd/pud entries having the PSE bit set invalid. I think there
is nothing wrong with this bit being set, it just indicates that the
lowest level of translation has been reached. This bit has to be (and
is) checked after the basic validity of the entry has been checked, like
in this fragment from follow_page() in mm/memory.c:

  if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
          goto no_page_table;

  if (pmd_huge(*pmd)) {
          BUG_ON(flags & FOLL_GET);
          page = follow_huge_pmd(mm, address, pmd, flags & FOLL_WRITE);
          goto out;
  }

Note that this code currently doesn't work as intended if the pmd refers
to a huge page, the pmd_huge() check can not be reached if the page is
huge.

Extending pmd_bad() (and, for future 1GB page support, pud_bad()) to
allow for the PSE bit being set fixes this. For similar reasons,
allowing the NX bit being set is necessary, too. I have seen huge pages
having the NX bit set in their pmd entry, which would cause the same
problem.

Signed-Off-By: Hans Rosenfeld <hans.rosenfeld@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: tls prevent_tail_call
Roland McGrath [Tue, 26 Feb 2008 21:00:18 +0000 (13:00 -0800)]
x86: tls prevent_tail_call

Fix a kernel bug (vmware boot problem) reported by Tomasz Grobelny,
which occurs with certain .config variants and gccs.

The x86 TLS cleanup in commit efd1ca52d04d2f6df337a3332cee56cd60e6d4c4
made the sys_set_thread_area and sys_get_thread_area functions ripe for
tail call optimization.  If the compiler chooses to use it for them, it
can clobber the user trap frame because these are asmlinkage functions.

Reported-by: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosoftlockup: fix task state setting
Dmitry Adamushko [Fri, 8 Feb 2008 14:41:13 +0000 (15:41 +0100)]
softlockup: fix task state setting

kthread_stop() can be called when a 'watchdog' thread is executing after
kthread_should_stop() but before set_task_state(TASK_INTERRUPTIBLE).

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agorcu: add support for dynamic ticks and preempt rcu
Steven Rostedt [Fri, 29 Feb 2008 17:46:50 +0000 (18:46 +0100)]
rcu: add support for dynamic ticks and preempt rcu

The PREEMPT-RCU can get stuck if a CPU goes idle and NO_HZ is set. The
idle CPU will not progress the RCU through its grace period and a
synchronize_rcu my get stuck. Without this patch I have a box that will
not boot when PREEMPT_RCU and NO_HZ are set. That same box boots fine
with this patch.

This patch comes from the -rt kernel where it has been tested for
several months.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-fix-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:44:00 +0000 (08:44 -0800)]
Merge git://git./linux/kernel/git/tiwai/alsa-fix-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/alsa-fix-2.6:
  [ALSA] intel8x0 - Add quirk for Compaq Deskpro EN
  [ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control
  [ALSA] sound: ice1712: unused structs
  [ALSA] ASoC: Fix WM9712 mixer_event DAPM widget function type
  [ALSA] ASoC: Fix DAPM widget function types in pxa machine drivers
  [ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls
  [ALSA] intel8x0 - Add quirk for Acer Travelmate 2310
  [ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard
  [ALSA] oxygen: add owner field
  [ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table
  [ALSA] hda-codec - Fix AD1988 capture elements
  [ALSA] sb8: fix SB 1.0 capture DMA programming
  [ALSA] usb-audio: add workaround for broken E-Mu frequency feedback
  [ALSA] ASoC: Fix TLV320AIC3X PLL divider table for 64 kHz rate
  [ALSA] hda-codec - Fix Master volume on HP dv8000

16 years agoMerge branch 'avr32-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemo...
Linus Torvalds [Fri, 29 Feb 2008 16:43:27 +0000 (08:43 -0800)]
Merge branch 'avr32-fixes' of git://git./linux/kernel/git/hskinnemoen/avr32-2.6

* 'avr32-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: Fix OCD refcounting bug
  avr32: Call tick_nohz_{stop,restart}_sched_tick() in idle loop
  avr32: Use correct config symbol in atstk1004 board code
  avr32: Fix broken pte dump code in do_page_fault()
  AVR32: Define PAGE_SHARED

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Fri, 29 Feb 2008 16:41:13 +0000 (08:41 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (35 commits)
  Blackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.
  Blackfin Serial Driver: Fix bug - update tx dma buffer tail before wake up processes.
  Blackfin Serial Driver: Fix bug - Increase buffer tail immediately before starting tx dma.
  [Blackfin] serial driver: Add flow control support to bf54x
  [Blackfin] serial driver: Fix bug Poll RTS/CTS status in DMA mode as well
  [Blackfin] serial driver: ADSP-BF52x arch/mach support
  [Blackfin] serial driver: use simpler comment headers and strip out information that is maintained in the scm's log
  [Blackfin] serial driver: rework break flood anomaly handling to be more robust/realistic about what we can actually work around
  [Blackfin] serial driver: fix bug - cache the bits of the LSR on systems where the LSR is read-to-clear
  [Blackfin] serial driver: fix bug - should not wait for the TFI bit, just clear it when tx stop.
  [Blackfin] serial driver: Fix bug serial driver in DMA mode spams history to console on shell restart
  [Blackfin] serial driver: Fix bug Free rx dma buffer in shutdown.
  [Blackfin] serial driver: Clean up UART DMA code.
  Blackfin Serial driver: Fix bug - serial driver in PIO mode cant handle input very quickly
  [Blackfin] arch: kill section mismatch warnings
  [Blackfin] arch: handle the most common L1 shrinkage case (L1 does not exist for a part) so that any parts labeled for L1 instead get placed into external memory sections
  [Blackfin] arch: add bfin_clear_PPIx_STATUS() helper funcs like we have for other parts
  [Blackfin] arch: make sure we have proper description/copyright/license lines
  [Blackfin] arch: Fix CONFIG_PM support for BF561
  [Blackfin] arch: Remove DPMC char driver option
  ...

16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:40:21 +0000 (08:40 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] If you mount an XFS filesystem with no mount options at all, then

16 years agolet __dec_zone_page_state use __dec_zone_state
Uwe Kleine-König [Mon, 25 Feb 2008 15:45:03 +0000 (16:45 +0100)]
let __dec_zone_page_state use __dec_zone_state

This removes code duplication and makes __dec_zone_page_state look like
__inc_zone_page_state.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:32:15 +0000 (08:32 -0800)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  arch/sh/drivers/dma/dma-sh.c: Correct use of ! and &
  serial: Move asm-sh/sci.h to linux/serial_sci.h.
  sh: Fix up HAS_SR_RB typo in entry-macros.

  maple: fix device detection
  sh: fix rtc_resources setup for sh770x
  sh: heartbeat: ioremap is expected to succeed
  sh: Storage class should be before const qualifier
  maple: remove unused variable
  sh: SH5-103 needs to select CPU_SH5.
  sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:29:55 +0000 (08:29 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (79 commits)
  [X25]: Use proc_create() to setup ->proc_fops first
  [WANROUTER]: Use proc_create() to setup ->proc_fops first
  [8021Q]: Use proc_create() to setup ->proc_fops first
  [IPV4]: Use proc_create() to setup ->proc_fops first
  [IPV6]: Use proc_create() to setup ->proc_fops first
  [SCTP]: Use proc_create() to setup ->proc_fops first
  [PKTGEN]: Use proc_create() to setup ->proc_fops first
  [NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
  [LLC]: Use proc_create() to setup ->proc_fops first
  [IPX]: Use proc_create() to setup ->proc_fops first
  [SUNRPC]: Use proc_create() to setup ->proc_fops first
  [ATM]: Use proc_create() to setup ->proc_fops first
  [SCTP]: Update AUTH structures to match declarations in draft-16.
  [SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
  [SCTP]: Clean up naming conventions of sctp protocol/address family registration
  [APPLETALK]: Use proc_create() to setup ->proc_fops first
  [BNX2X]: add bnx2x to MAINTAINERS
  [BNX2X]: update version, remove CVS strings
  [BNX2X]: Fix Xmit bugs
  [BNX2X]: Prevent PCI queue overflow
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:29:30 +0000 (08:29 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Adjust kernel PC validation test in fault handler.
  [SPARC64]: Loosen checks in exception table handling.
  [SPARC64]: Fix section mismatch from kernel_map_range
  [SPARC64]: Fix section mismatchs from dr_cpu_data
  [SPARC]: Fix build in arch/sparc/kernel/led.c

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 29 Feb 2008 16:28:46 +0000 (08:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  MAINTAINERS: neteffect update
  RDMA/nes: Fix interrupt moderation low threshold
  RDMA/nes: Fix CRC endianness for RDMA connection establishment on big-endian
  RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()
  RDMA/nes: Fix use-after-free in nes_create_cq()
  RDMA/nes: Fix a check-after-use in nes_probe()
  RDMA/nes: Fix a memory leak in schedule_nes_timer()
  RDMA/nes: Fix off-by-one
  RDMA/nes: Resurrect error path dead code
  RDMA/cxgb3: Fix shift calc in build_phys_page_list() for 1-entry page lists

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Fri, 29 Feb 2008 16:27:32 +0000 (08:27 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove stale comments from ide-dma.c (take 2)
  ide: remove ide-tape documentation from Documentation/ide.txt
  qd65xx: remove commented out code
  ide-tape: schedule driver for removal after 6 months
  ide-disk: add missing printk() KERN_* levels
  ide: fix sparse warning about shadowing 'flags' symbol
  ide-cd: fix CD/DVD burning
  ide-cd: fix 'ireason' handling for REQ_TYPE_ATA_PC requests
  qd65xx: fix setup of QD6580 Control register
  ide: skip probing port if "hdx=noprobe" was used for both devices on it
  ide: remove redundant comment from ide_unregister()
  hpt366: fix section mismatch warnings
  ide-cd: Enable audio play quirk for Optiarc DVD RW AD-5200A drive

16 years agoFix hpet_(un)register_irq_handler() for emulation
David Howells [Thu, 28 Feb 2008 13:29:43 +0000 (13:29 +0000)]
Fix hpet_(un)register_irq_handler() for emulation

Fix hpet_(un)register_irq_handler() for when CONFIG_HPET_EMULATE_RTC=n.  They
are provided macros that substitute value 0, but if they are called as
functions and the return value isn't checked, the following warnings appear:

drivers/char/rtc.c: In function `rtc_init':
drivers/char/rtc.c:1063: warning: statement with no effect
drivers/char/rtc.c: In function `rtc_exit':
drivers/char/rtc.c:1157: warning: statement with no effect

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoelfcore-compat fix uid/gid types
Roland McGrath [Tue, 26 Feb 2008 21:20:58 +0000 (13:20 -0800)]
elfcore-compat fix uid/gid types

I overlooked the difference between __kernel_uid_t and uid_t when defining
struct compat_elf_prpsinfo.  The result is a regression in 32-bit core
dumps on x86_64, where the NT_PRPSINFO note has the wrong size and layout.
This patch fixes it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[ALSA] intel8x0 - Add quirk for Compaq Deskpro EN
Takashi Iwai [Wed, 27 Feb 2008 15:40:18 +0000 (16:40 +0100)]
[ALSA] intel8x0 - Add quirk for Compaq Deskpro EN

Added the ac97_quirk hp_only for Compaq Deskpro EN.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control
Herton Ronaldo Krzesinski [Sat, 23 Feb 2008 10:34:12 +0000 (11:34 +0100)]
[ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control

Fix the line-out volume control of eeepc p701 to be a proper slave of
the virtual master control.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] sound: ice1712: unused structs
Harvey Harrison [Fri, 29 Feb 2008 10:46:32 +0000 (11:46 +0100)]
[ALSA] sound: ice1712: unused structs

Don't need to declare a struct when defining a structure layout.  Both
of these structs are unused.
sound/pci/ice1712/revo.c:39:3: warning: symbol 'revo51' was not declared. Should it be static?
sound/pci/ice1712/phase.c:54:3: warning: symbol 'phase28' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix WM9712 mixer_event DAPM widget function type
Jarkko Nikula [Thu, 28 Feb 2008 11:35:25 +0000 (12:35 +0100)]
[ALSA] ASoC: Fix WM9712 mixer_event DAPM widget function type

Add kcontrol argument to function since the API was changed by the commit
9af6d9562414568ecadf96aaef5b88e7e8b19821.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix DAPM widget function types in pxa machine drivers
Jarkko Nikula [Thu, 28 Feb 2008 11:34:48 +0000 (12:34 +0100)]
[ALSA] ASoC: Fix DAPM widget function types in pxa machine drivers

Add kcontrol argument to functions since the API was changed by the commit
9af6d9562414568ecadf96aaef5b88e7e8b19821.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls
Takashi Iwai [Wed, 27 Feb 2008 15:10:44 +0000 (16:10 +0100)]
[ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls

Some models like eeepc ep20 have invalid mixer names that aren't
handled properly by virtual master controls.  Rename them to the
proper names.

Also fixed some typos in the mixer names but they are not compiled
in right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] intel8x0 - Add quirk for Acer Travelmate 2310
Takashi Iwai [Mon, 4 Feb 2008 13:00:53 +0000 (14:00 +0100)]
[ALSA] intel8x0 - Add quirk for Acer Travelmate 2310

Added ac97_quirk=hp-only for Acer Travelmate 2310.
ALSA bug#3656
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3656

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard
Andrew Paprocki [Sun, 3 Feb 2008 09:15:44 +0000 (10:15 +0100)]
[ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard

This adds a quirk to the Realtek ALC883 table for the Albatron KI690-AM2
motherboard to use the 6stack-dig model.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] oxygen: add owner field
Clemens Ladisch [Tue, 26 Feb 2008 07:40:57 +0000 (08:40 +0100)]
[ALSA] oxygen: add owner field

I forgot to set the module owner for the HiFier/Xonar models.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table
Tony Vroon [Mon, 25 Feb 2008 15:44:13 +0000 (16:44 +0100)]
[ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table

Add the proper model entry for Fujitsu Lifebook E8410 with ALC262 codec.

From: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix AD1988 capture elements
Takashi Iwai [Mon, 25 Feb 2008 14:32:01 +0000 (15:32 +0100)]
[ALSA] hda-codec - Fix AD1988 capture elements

The some indices of capture elements of AD1988 are wrongly assigned.
This patch fixes it.  See ALSA bug#3795
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3795

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] sb8: fix SB 1.0 capture DMA programming
Clemens Ladisch [Mon, 25 Feb 2008 10:04:41 +0000 (11:04 +0100)]
[ALSA] sb8: fix SB 1.0 capture DMA programming

Fix a wrong version check that would cause an invalid command to be sent
to SB 1.0 chips.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] usb-audio: add workaround for broken E-Mu frequency feedback
Clemens Ladisch [Mon, 25 Feb 2008 10:01:00 +0000 (11:01 +0100)]
[ALSA] usb-audio: add workaround for broken E-Mu frequency feedback

Add a workaround for the feedback pipe of E-Mu 0202/0404 USB devices
that reports the number of samples per packet instead of the number of
samples per microframe.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] ASoC: Fix TLV320AIC3X PLL divider table for 64 kHz rate
Jarkko Nikula [Wed, 20 Feb 2008 16:13:15 +0000 (17:13 +0100)]
[ALSA] ASoC: Fix TLV320AIC3X PLL divider table for 64 kHz rate

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[ALSA] hda-codec - Fix Master volume on HP dv8000
Takashi Iwai [Mon, 18 Feb 2008 11:36:11 +0000 (12:36 +0100)]
[ALSA] hda-codec - Fix Master volume on HP dv8000

HP dv8000 laptop has a problem with Master volume.  It's due to the
connection of the widget 0x13.  When it's connected from the analog
amp mixer (0x19), it works as expected mysteriously (ALSA bug#3775):
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3775

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years ago[SPARC64]: Adjust kernel PC validation test in fault handler.
David S. Miller [Fri, 29 Feb 2008 04:38:15 +0000 (20:38 -0800)]
[SPARC64]: Adjust kernel PC validation test in fault handler.

Because of the new futex validation init handler, we have
to accept faults in init section text as well as the normal
kernel text.

Thanks to Tom Callaway for the bug report.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFS] If you mount an XFS filesystem with no mount options at all, then
Josef Jeff Sipek [Fri, 29 Feb 2008 02:58:40 +0000 (13:58 +1100)]
[XFS] If you mount an XFS filesystem with no mount options at all, then
the "ikeep" option is set rather than "noikeep".

This regression was introduced in 970451.

With no mount options specified, xfs_parseargs() does the following:

int ikeep = 0;

args->flags |= XFSMNT_BARRIER;

args->flags2 |= XFSMNT2_COMPAT_IOSIZE;

if (!options)

goto done;

It only sets the above two options by default and before, it also used to
set XFSMNT_IDELETE by default.

If options are specified, then

if (!(args->flags & XFSMNT_DMAPI) && !ikeep)

args->flags |= XFSMNT_IDELETE;

is executed later on which is skipped by the "goto done;" above.

The solution is to invert the logic.

SGI-PV: 977771
SGI-Modid: xfs-linux-melb:xfs-kern:30590a

Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years agoBlackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.
Sonic Zhang [Fri, 29 Feb 2008 04:08:42 +0000 (12:08 +0800)]
Blackfin Serial Driver: Fix bug - Only insert UART rx char in timer task.

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3910

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agosata_svw: Add support for HT1100 SATA controller
Anantha Subramanyam [Thu, 28 Feb 2008 23:58:35 +0000 (15:58 -0800)]
sata_svw: Add support for HT1100 SATA controller

This patch adds support (including ATAPI DMA) for HT1100 (aka BCM11000) SATA controller.

Signed-off-by: Anantha Subramanyam <ananth@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[X25]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:16:33 +0000 (14:16 -0800)]
[X25]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[WANROUTER]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:15:56 +0000 (14:15 -0800)]
[WANROUTER]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[8021Q]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:58 +0000 (14:14 -0800)]
[8021Q]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:14:25 +0000 (14:14 -0800)]
[IPV4]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:46 +0000 (14:13 -0800)]
[IPV6]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:13:16 +0000 (14:13 -0800)]
[SCTP]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKTGEN]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:11:49 +0000 (14:11 -0800)]
[PKTGEN]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:10:51 +0000 (14:10 -0800)]
[NEIGHBOUR]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[LLC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:08:54 +0000 (14:08 -0800)]
[LLC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPX]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:06:14 +0000 (14:06 -0800)]
[IPX]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SUNRPC]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 22:00:59 +0000 (14:00 -0800)]
[SUNRPC]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'pending' of master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
David S. Miller [Thu, 28 Feb 2008 21:56:37 +0000 (13:56 -0800)]
Merge branch 'pending' of /linux/kernel/git/vxy/lksctp-dev

16 years ago[ATM]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 21:55:45 +0000 (13:55 -0800)]
[ATM]: Use proc_create() to setup ->proc_fops first

Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Update AUTH structures to match declarations in draft-16.
Vlad Yasevich [Wed, 27 Feb 2008 21:04:52 +0000 (16:04 -0500)]
[SCTP]: Update AUTH structures to match declarations in draft-16.

The new SCTP socket api (draft 16) updates the AUTH API structures.
We never exported these since we knew they would change.
Update the rest to match the draft.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option
Vlad Yasevich [Wed, 27 Feb 2008 19:40:37 +0000 (14:40 -0500)]
[SCTP]: Incorrect length was used in SCTP_*_AUTH_CHUNKS socket option

The chunks are stored inside a parameter structure in the kernel
and when we copy them to the user, we need to account for
the parameter header.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
16 years ago[SCTP]: Clean up naming conventions of sctp protocol/address family registration
Neil Horman [Fri, 15 Feb 2008 14:53:59 +0000 (09:53 -0500)]
[SCTP]: Clean up naming conventions of sctp protocol/address family registration

I noticed while looking into some odd behavior in sctp, that the variable
name sctp_pf_inet6_specific was used twice to represent two different
pieces of data (its both a structure name and a pointer to that type of
structure), which is confusing to say the least, and potentially dangerous
depending on the variable scope.  This patch cleans that up, and makes the
protocol and address family registration names in SCTP more regular,
increasing readability.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
 ipv6.c     |   12 ++++++------
 protocol.c |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

16 years ago[APPLETALK]: Use proc_create() to setup ->proc_fops first
Wang Chen [Thu, 28 Feb 2008 20:53:32 +0000 (12:53 -0800)]
[APPLETALK]: Use proc_create() to setup ->proc_fops first

As Davem mentioned in his recently patch
(d9595a7b9c777d45a74774f1428c263a0a47f4c0)
that the procfs visibility should occur after
the ->proc_fops are setup.

And also, Alexey provide proc_create() to make
sure that ->proc_fops is setup before gluing PDE
to main tree.

We use proc_create().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: add bnx2x to MAINTAINERS
Eliezer Tamir [Thu, 28 Feb 2008 19:59:10 +0000 (11:59 -0800)]
[BNX2X]: add bnx2x to MAINTAINERS

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: update version, remove CVS strings
Eliezer Tamir [Thu, 28 Feb 2008 19:58:49 +0000 (11:58 -0800)]
[BNX2X]: update version, remove CVS strings

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Fix Xmit bugs
Eliezer Tamir [Thu, 28 Feb 2008 19:57:55 +0000 (11:57 -0800)]
[BNX2X]: Fix Xmit bugs

Several endianity corrections in start_xmit()

Fixed TSO bug where packets were missing the TCP flags.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Prevent PCI queue overflow
Eliezer Tamir [Thu, 28 Feb 2008 19:57:29 +0000 (11:57 -0800)]
[BNX2X]: Prevent PCI queue overflow

Limit traffic through an internal queue to prevent overflow.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix slowpath races and locking
Eliezer Tamir [Thu, 28 Feb 2008 19:56:57 +0000 (11:56 -0800)]
[BNX2X]: fix slowpath races and locking

Fixed locking between fastpath and slowpath operations.

Corrected order of traffic disabling to prevent race when going down
under traffic.

- first have the microcode drop all incoming packets
- then do the slowpath stuff
- only then reset the MAC

Got rid of in_reset_task.

Remove_one() and friends would deference a null pointer if init_one
failed.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix HW attentions and error handling
Eliezer Tamir [Thu, 28 Feb 2008 19:55:53 +0000 (11:55 -0800)]
[BNX2X]: fix HW attentions and error handling

Some of the HW attentions, used to indicate an error were not properly
acked.

This will cause the driver to endlessly receive interrupts when such
an error happens.

Had to break the code into smaller chunks because it got too nested.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: fix MSI-X/INT#A errata
Eliezer Tamir [Thu, 28 Feb 2008 19:54:54 +0000 (11:54 -0800)]
[BNX2X]: fix MSI-X/INT#A errata

Errata A0.158 workaround.

Running in INT#A mode after running with MSI-X fails due to a PCI core
bug.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: correct statistics
Eliezer Tamir [Thu, 28 Feb 2008 19:54:03 +0000 (11:54 -0800)]
[BNX2X]: correct statistics

Errors were summed improperly, some stats were missing.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct RX filtering and MC configuration
Eliezer Tamir [Thu, 28 Feb 2008 19:53:13 +0000 (11:53 -0800)]
[BNX2X]: Correct RX filtering and MC configuration

The configuration of RX filtering needed the following corrections:

Drop flags need to be set per Rx queue.

Have to tell the microcode to collect drop stats, and properly wait
for them to complete when going down.

Sometimes we failed to detect proper completion due to a logical error
in the wait loop.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct Link management
Eliezer Tamir [Thu, 28 Feb 2008 19:51:50 +0000 (11:51 -0800)]
[BNX2X]: Correct Link management

Properly protect PHY access between two devices on the same board with
a HW lock.

Use GPIO to clear all previous configurations before changing link
parameters.

Shut down the external PHY in case of fan failure.

Reducing the MDC/MDIO clock to 2.5MHz due to problems with some
devices.

Resolve the flow control response according to autoneg with external
PHY.

Unmasking all PHY interrupts in single write to prevent a race in the
interrupts order.

LASI indication fixes to work with peculiarities of PHYs.

Disable MAC RX to avoid a HW bug when closing the MAC under traffic.

Disable parallel detection on HiGig due to HW limitation.

Updating the shared memory structure to work with the current
bootcode.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Correct init_one()
Eliezer Tamir [Thu, 28 Feb 2008 19:50:16 +0000 (11:50 -0800)]
[BNX2X]: Correct init_one()

Correct PCI-E info printed by init_one()
In one case it failed to free the netdev.

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2X]: Spelling fixes
Eliezer Tamir [Thu, 28 Feb 2008 19:49:42 +0000 (11:49 -0800)]
[BNX2X]: Spelling fixes

Signed-off-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPCOMP]: Disable BH on output when using shared tfm
Herbert Xu [Thu, 28 Feb 2008 19:23:17 +0000 (11:23 -0800)]
[IPCOMP]: Disable BH on output when using shared tfm

Because we use shared tfm objects in order to conserve memory,
(each tfm requires 128K of vmalloc memory), BH needs to be turned
off on output as that can occur in process context.

Previously this was done implicitly by the xfrm output code.
That was lost when it became lockless.  So we need to add the
BH disabling to IPComp directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Thu, 28 Feb 2008 19:03:29 +0000 (11:03 -0800)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

16 years agoSSB PCI core driver: use new SPROM data structure
Aurelien Jarno [Thu, 28 Feb 2008 14:11:26 +0000 (15:11 +0100)]
SSB PCI core driver: use new SPROM data structure

Switch the SSB PCI core driver to the new SPROM data structure now that
the old one has been removed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoDon't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.
Alexey Zaytsev [Sat, 23 Feb 2008 10:33:07 +0000 (13:33 +0300)]
Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

This may happen e.g. when the ssb is statically enables by the b44 driver,
and the b43 pci-ssb bridge is enbled by the b43/b43legacy drivers, or the
b43/b43legacy drivers are built statically.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>