~thopiekar/linux/+git/linux-stable:linux-2.6.21.y

Last commit made on 2007-08-04
Get this branch:
git clone -b linux-2.6.21.y https://git.launchpad.net/~thopiekar/linux/+git/linux-stable

Branch merges

Branch information

Name:
linux-2.6.21.y
Repository:
lp:~thopiekar/linux/+git/linux-stable

Recent commits

a31a903... by Greg Kroah-Hartman <email address hidden>

Linux 2.6.21.7

cb8b4a0... by Jelle Foks <email address hidden>

V4L: cx88-blackbird: fix vidioc_g_tuner never ending list of tuners

v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.

The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...

This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.

Signed-off-by: Jelle Foks <email address hidden>
Signed-off-by: Michael Krufky <email address hidden>
Signed-off-by: Mauro Carvalho Chehab <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

b13e627... by Trent Piepho <email address hidden>

V4L: bttv: fix v4l1 api usage breaking the driver

If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
the first user after the driver is loaded, the driver wedges itself and will
never capture properly. Even if one uses a V4L2 application later, it still
won't work.

If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
driver, then the driver will be ok. One can then run a V4L1 application, and
it will work.

It turns out the problem is with norm changing and the crop support that was
added in 2.6.21. The driver defaults to PAL, and keeps the last norm it was
set too across opens. If one changes the norm via V4L1, the cropping
parameters are not reset like they should be, and they'll remain broken across
device opens.

This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
VIDIOCSCHAN handler. The norm is set via the existing call to set_input(),
which calls set_tvnorm(), which will reset the cropping values now that it is
able to detect the norm change.

Signed-off-by: Trent Piepho <email address hidden>
Signed-off-by: Michael Krufky <email address hidden>
Signed-off-by: Mauro Carvalho Chehab <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

fe1fe7c... by Stephen Hemminger

sky2: workaround for lost IRQ

This patch restores a couple of workarounds from 2.6.16:
 * restart transmit moderation timer in case it expires during IRQ routine
 * default to having 10 HZ watchdog timer.
At this point it more important not to hang than to worry about the
power cost.

Signed-off-by: Stephen Hemminger <email address hidden>
Cc: Jeff Garzik <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

46164b5... by tglx

NTP: remove clock_was_set() call to prevent deadlock

The clock_was_set() call in seconds_overflow() which happens only when
leap seconds are inserted / deleted is wrong in two aspects:

1. it results in a call to on_each_cpu() with interrupts disabled
2. it is potential deadlock source vs. call_lock in smp_call_function()

The only possible side effect of the removal might be, that an absolute
CLOCK_REALTIME timer fires 1 second too late, in the rare case of leap
second deletion and an absolute CLOCK_REALTIME timer which expires in
the affected time frame. It will never fire too early.

This was probably observed by the reporter of a June 30th -> July 1st
hang: http://lkml.org/lkml/2007/7/3/

A similar problem was observed by Dave Jones, who provided a screen shot
with a lockdep back trace, which allowed to analyse the problem.

Signed-off-by: Thomas Gleixner <email address hidden>
Cc: john stultz <email address hidden>
Cc: Dave Jones <email address hidden>
Cc: Ingo Molnar <email address hidden>
Cc: Vincent Fortier <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

bf35c37... by Jason Wessel

i386: fix infinite loop with singlestep int80 syscalls

The commit 635cf99a80f4ebee59d70eb64bb85ce829e4591f introduced a
regression. Executing a ptrace single step after certain int80
accesses will infinitely loop and never advance the PC.

The TIF_SINGLESTEP check should be done on the return from the syscall
and not before it.

The new test case is below:

/* Test whether singlestep through an int80 syscall works.
 */
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <asm/user.h>
#include <string.h>

static int child, status;
static struct user_regs_struct regs;

static void do_child()
{
 char str[80] = "child: int80 test\n";

 ptrace(PTRACE_TRACEME, 0, 0, 0);
 kill(getpid(), SIGUSR1);
 write(fileno(stdout),str,strlen(str));
 asm ("int $0x80" : : "a" (20)); /* getpid */
}

static void do_parent()
{
 unsigned long eip, expected = 0;
again:
 waitpid(child, &status, 0);
 if (WIFEXITED(status) || WIFSIGNALED(status))
  return;

 if (WIFSTOPPED(status)) {
  ptrace(PTRACE_GETREGS, child, 0, &regs);
  eip = regs.eip;
  if (expected)
   fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
     eip, expected,
     eip == expected ? "" : " <== ERROR");

  if (*(unsigned short *)eip == 0x80cd) {
   fprintf(stderr, "int 0x80 at %08x\n", (unsigned int)eip);
   expected = eip + 2;
  } else
   expected = 0;

  ptrace(PTRACE_SINGLESTEP, child, NULL, NULL);
 }
 goto again;
}

int main(int argc, char * const argv[])
{
 child = fork();
 if (child)
  do_parent();
 else
  do_child();
 return 0;
}

Signed-off-by: Jason Wessel <email address hidden>
Cc: Jeremy Fitzhardinge <email address hidden>
Cc: Chuck Ebbert <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

ed9ee08... by Jay Lubomirski <email address hidden>

serial: clear proper MPSC interrupt cause bits

The interrupt clearing code in mpsc_sdma_intr_ack() mistakenly clears the
interrupt for both controllers instead of just the one its supposed to.
This can result in the other controller appearing to hang because its
interrupt was effectively lost.

So, don't clear the interrupt cause bits for both MPSC controllers when
clearing the interrupt for one of them. Just clear the one that is
supposed to be cleared.

Signed-off-by: Jay Lubomirski <email address hidden>
Acked-by: Mark A. Greer <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

e278ed8... by Jeffm-9

saa7134: fix thread shutdown handling

This patch changes the test for the thread pid from >= 0 to > 0.

When the saa7134 driver initialization fails after a certain point, it goes
through the complete shutdown process for the driver. Part of shutting it
down includes tearing down the thread for tv audio.

The test for tearing down the thread tests for >= 0. Since the dev
structure is kzalloc'd, the test will always be true if we haven't tried to
start the thread yet. We end up waiting on pid 0 to complete, which will
never happen, so we lock up.

This bug was observed in Novell Bugzilla 284718, when request_irq() failed.

Signed-off-by: Jeff Mahoney <email address hidden>
Acked-by: Mauro Carvalho Chehab <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

19210a2... by Hugh Dickins <email address hidden>

mm: kill validate_anon_vma to avoid mapcount BUG

validate_anon_vma gave a useful check on the integrity of the anon_vma list
when Andrea was developing obj rmap; but it was not enabled in SLES9
itself, nor in mainline, until Nick changed commented-out RMAP_DEBUG to
configurable CONFIG_DEBUG_VM in 2.6.17. Now Petr Vandrovec reports that
its BUG_ON(mapcount > 100000) can easily crash a CONFIG_DEBUG_VM=y system.

That limit was just an arbitrary number to protect against an infinite
loop. We could raise it to something enormous (depending on sizeof struct
vma and size of memory?); but I rather think validate_anon_vma has outlived
its usefulness, and is better just removed - which gives a magnificent
performance boost to anything like Petr's test program ;)

Of course, a very long anon_vma list is bad news for preemption latency,
and I believe there has been one recent report of such: let's not forget
that, but validate_anon_vma only makes it worse not better.

Signed-off-by: Hugh Dickins <email address hidden>
Cc: Petr Vandrovec <email address hidden>
Acked-by: Nick Piggin <email address hidden>
Cc: Andrea Arcangeli <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>

e1a4335... by Paul Mackerras

POWERPC: Fix subtle FP state corruption bug in signal return on SMP

This fixes a bug which can cause corruption of the floating-point state
on return from a signal handler. If we have a signal handler that has
used the floating-point registers, and it happens to context-switch to
another task while copying the interrupted floating-point state from the
user stack into the thread struct (e.g. because of a page fault, or
because it gets preempted), the context switch code will think that the
FP registers contain valid FP state that needs to be copied into the
thread_struct, and will thus overwrite the values that the signal return
code has put into the thread_struct.

This can occur because we clear the MSR bits that indicate the presence
of valid FP state after copying the state into the thread_struct. To fix
this we just move the clearing of the MSR bits to before the copy. A
similar potential problem also occurs with the Altivec state, and this
fixes that in the same way.

Signed-off-by: Paul Mackerras <email address hidden>
Signed-off-by: Chris Wright <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>