1. 06 Apr, 2007 30 commits
  2. 23 Mar, 2007 10 commits
    • Greg Kroah-Hartman's avatar
      Linux 2.6.20.4 · e947fa65
      Greg Kroah-Hartman authored
      e947fa65
    • David Miller's avatar
      Fix niagara memory corruption · 9c062782
      David Miller authored
      [SPARC64]: store-init needs trailing membar.
      
      The manual says that it is required and we actually have crash reports
      where loads see stale data due to not having membars here.
      
      In one case the networking does:
      
      	memset(skb, 0, offsetof(struct sk_buff, truesize));
      
      and then some code later checks skb->nohdr for zero, but it's still
      the value that was there before the memset().
      
      Note that arch/sparc64/lib/xor.S already got this right.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9c062782
    • Kai Makisara's avatar
      st: fix Tape dies if wrong block size used, bug 7919 · ad23c76c
      Kai Makisara authored
      [SCSI] st: fix Tape dies if wrong block size used, bug 7919
      
      On Thu, 1 Feb 2007, Andrew Morton wrote:
      > On Thu, 1 Feb 2007 15:34:29 -0800
      > bugme-daemon@bugzilla.kernel.org wrote:
      >
      > > http://bugzilla.kernel.org/show_bug.cgi?id=7919
      > >
      > >            Summary: Tape dies if wrong block size used
      > >     Kernel Version: 2.6.20-rc5
      > >             Status: NEW
      > >           Severity: normal
      > >              Owner: scsi_drivers-other@kernel-bugs.osdl.org
      > >          Submitter: dmartin@sccd.ctc.edu
      > >
      > >
      > > Most recent kernel where this bug did *NOT* occur: 2.6.17.14
      > >
      > > Other Kernels Tested and Results:
      > >
      > >     OK 2.6.15.7
      > >     OK 2.6.16.37
      > >     OK 2.6.17.14
      > >     BAD 2.6.18.6
      > >     BAD 2.6.18-1.2869.fc6
      > >     BAD 2.6.19.2 +
      > >     BAD 2.6.20-rc5
      > >
      > > NOTE: 2.6.18-1.2869.fc6 is a Fedora modified kernel, all others are from kernel.org
      > >
      ...
      > > Steps to reproduce:
      > > Get a Adaptec AHA-2940U/UW/D / AIC-7881U card and a tape drive,
      > > install a recent kernel
      > > set the tape block size - mt setblk 4096
      > > read from or write to tape using wrong block size - tar -b 7 -cvf /dev/tape foo
      > >
      Write does not trigger this bug because the driver refuses in fixed block
      mode writes that are not a multiple of the block size. Read does trigger
      it in my system.
      
      The bug is not associated with any specific HBA. st tries to do direct i/o
      in fixed block mode with reads that are not a multiple of tape block size.
      
      The patch in this message fixes the st problem by switching to using the
      driver buffer up to the next close of the device file in fixed block mode
      if the user asks for a read like this.
      
      I don't know why the bug has surfaced only after 2.6.17 although the st
      problem is old. There may be another bug in the block subsystem and this
      patch works around it. However, the patch fixes a problem in st and in
      this way it is a valid fix.
      
      This patch may also fix the bug 7900.
      
      The patch compiles and is lightly tested.
      Signed-off-by: default avatarKai Makisara <kai.makisara@kolumbus.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ad23c76c
    • Dmitry Torokhov's avatar
      Input: i8042 - another attempt to fix AUX delivery checks · 0036a32b
      Dmitry Torokhov authored
      Do not assume that AUX_LOOP command is broken unless it
      completes successfully but returns wrong (unexpected) data.
      
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0036a32b
    • Jeff Dike's avatar
      UML - arch_prctl should set thread fs · a0518e04
      Jeff Dike authored
      x86_64 needs some TLS fixes.  What was missing was remembering the child
      thread id during clone and stuffing it into the child during each context
      switch.
      
      The %fs value is stored separately in the thread structure since the host
      controls what effect it has on the actual register file.  The host also needs
      to store it in its own thread struct, so we need the value kept outside the
      register file.
      
      arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately.  There is
      some saving and restoring of registers in the ARCH_SET_* cases so that the
      correct set of registers are changed on the host and restored to the process
      when it runs again.
      Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a0518e04
    • Al Viro's avatar
      fix deadlock in audit_log_task_context() · 7ac7551d
      Al Viro authored
      GFP_KERNEL allocations in non-blocking context; fixed by killing
      an idiotic use of security_getprocattr().
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Acked-by: default avatarJames Morris <jmorris@namei.org>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7ac7551d
    • Dmitry Torokhov's avatar
      Input: i8042 - fix AUX IRQ delivery check · 6f09b7b3
      Dmitry Torokhov authored
      Input: i8042 - fix AUX IRQ delivery check
      
      On boxes that do not implement AUX LOOP command we can not
      verify AUX IRQ delivery and must assume that it is wired
      properly.
      
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      6f09b7b3
    • Zach Brown's avatar
      dio: invalidate clean pages before dio write · 8479fc42
      Zach Brown authored
      This patch fixes a user-triggerable oops that was reported by Leonid
      Ananiev as archived at http://lkml.org/lkml/2007/2/8/337.
      
      dio writes invalidate clean pages that intersect the written region so that
      subsequent buffered reads go to disk to read the new data.  If this fails
      the interface tries to tell the caller that the cache is inconsistent by
      returning EIO.
      
      Before this patch we had the problem where this invalidation failure would
      clobber -EIOCBQUEUED as it made its way from fs/direct-io.c to fs/aio.c.
      Both fs/aio.c and bio completion call aio_complete() and we reference freed
      memory, usually oopsing.
      
      This patch addresses this problem by invalidating before the write so that
      we can cleanly return -EIO before ->direct_IO() has had a chance to return
      -EIOCBQUEUED.
      
      There is a compromise here.  During the dio write we can fault in mmap()ed
      pages which intersect the written range with get_user_pages() if the user
      provided them for the source buffer.  This is a crazy thing to do, but we
      can make it mostly work in most cases by trying the invalidation again.
      The compromise is that we won't return an error if this second invalidation
      fails if it's an AIO write and we have -EIOCBQUEUED.
      
      This was tested by having two processes race performing large O_DIRECT and
      buffered ordered writes.  Within minutes ext3 would see a race between
      ext3_releasepage() and jbd holding a reference on ordered data buffers and
      would cause invalidation to fail, panicing the box.  The test can be found
      in the 'aio_dio_bugs' test group in test.kernel.org/autotest.  After this
      patch the test passes.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      Signed-off-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Cc: Leonid Ananiev <leonid.i.ananiev@linux.intel.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8479fc42
    • Ankita Garg's avatar
      oom fix: prevent oom from killing a process with children/sibling unkillable · 86fef703
      Ankita Garg authored
      Looking at oom_kill.c, found that the intention to not kill the selected
      process if any of its children/siblings has OOM_DISABLE set, is not being
      met.
      Signed-off-by: default avatarAnkita Garg <ankita@in.ibm.com>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      86fef703
    • Takashi Iwai's avatar
      hda-intel - Fix codec probe with ATI controllers · 0a67204c
      Takashi Iwai authored
      [ALSA] hda-intel - Fix codec probe with ATI contorllers
      
      ATI controllers may have up to 4 codecs while ICH up to 3.
      Thus the earlier fix to change AZX_MAX_CODECS to 3 cause a regression
      on some devices that have the audio codec at bit#3.
      Now max codecs is defined according to the driver type, either 3 or 4.
      Currently 4 is set only to ATI chips.  Other might need the same
      change, too.
      
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
      0a67204c