1. 28 Jun, 2007 13 commits
    • Jeff Mahoney's avatar
      saa7134: fix thread shutdown handling · 58e78475
      Jeff Mahoney authored
      This patch changes the test for the thread pid from >= 0 to > 0.
      
      When the saa8134 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: default avatarJeff Mahoney <jeffm@suse.com>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      58e78475
    • Randy Dunlap's avatar
      ALSA: fix ice1712 section mismatch · 53f3bed0
      Randy Dunlap authored
      Cannot mix const and __initdata:
      sound/pci/ice1712/prodigy192.c:708: error: ak4114_controls causes a section type conflict
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      53f3bed0
    • Randy Dunlap's avatar
      IOATDMA: fix section mismatches · 92504f79
      Randy Dunlap authored
      Rename struct pci_driver data so that false section mismatch warnings won't
      be produced.
      
      Sam, ISTM that depending on variable names is the weakest & worst part of
      modpost section checking.  Should __init_refok work here?  I got build
      errors when I tried to use it, probably because the struct pci_driver probe
      and remove methods are not marked "__init_refok".
      
      WARNING: drivers/dma/ioatdma.o(.data+0x10): Section mismatch: reference to .init.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
      WARNING: drivers/dma/ioatdma.o(.data+0x14): Section mismatch: reference to .exit.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarChris Leech <christopher.leech@intel.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      92504f79
    • Trent Piepho's avatar
      Fix Kconfig dependency problems wrt boolean menuconfigs · 59faba1b
      Trent Piepho authored
      If one has a dependency chain (tristate)FOO depends on (bool)BAR depends on
      (tristate)BAZ, build problems will result.  If BAZ=m, then BAR can be set
      y, which allows FOO=y.  It's possible to have FOO=y && BAZ=m, which
      wouldn't be allowed if FOO depended directly on BAZ.  In effect, the bool
      promotes the tristate from m to y.
      
      This ends up causing a problem with several menuconfigs that look like:
      
      menuconfig BAR
      	bool
      	depends on BAZ [tristate]
      if BAR
      config FOO
      	tristate
      endif
      
      The solution used here is to add the dependencies of BAR to the if
      statement, so that items in the if block will gain a direct
      non-bool-promoted dependency on BAZ.  This is how it would work if a menu
      was used instead of an if block.
      Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Acked-by: default avatarJeff Garzik <jeff@garzik.org>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Chas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      59faba1b
    • Hugh Dickins's avatar
      mm: kill validate_anon_vma to avoid mapcount BUG · 30acbaba
      Hugh Dickins authored
      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: default avatarHugh Dickins <hugh@veritas.com>
      Cc: Petr Vandrovec <petr@vmware.com>
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Andrea Arcangeli <andrea@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      30acbaba
    • Bjorn Helgaas's avatar
      PNP SMCf010 quirk: auto-config device if BIOS left it broken · 172d0496
      Bjorn Helgaas authored
      Some HP firmware leaves the SMCf010 IRDA device incompletely configured, or
      reports the wrong resources in _CRS.  As a workaround, when we find such a
      device, try to auto-configure the device.
      
      This ignores the _CRS data, picks a config from _PRS, and runs _SRS to
      configure the device.  This makes smsc-ircc2 work correctly with PNP
      resources (with no preconfiguration!) on all the machines I tested.
      
      I think Windows does something like this by default for all devices,
      so we should consider doing the same thing in Linux.
      
      This patch addresses part of the 2.6.22 regression:
          "no irda0 interface (2.6.21 was OK), smsc does not find chip"
      It fixes smsc-ircc2 PNP device detection on HP nc6000, nc6220, nw8000,
      nw8240, and possibly other machines.
      Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      172d0496
    • Bjorn Helgaas's avatar
      smsc-ircc2: skip preconfiguration for PNP devices · 7c31d2f5
      Bjorn Helgaas authored
      If we rely on the device resources from PNPBIOS, we also have to rely on
      the BIOS to configure any bridges on the way to the device.
      
      Using the PNPBIOS resources but changing the configuration of a bridge
      behind the back of the firmware is likely to make things inconsistent.
      
      This patch addresses part of the 2.6.22 regression:
          "no irda0 interface (2.6.21 was OK), smsc does not find chip"
      It fixes smsc-ircc2 PNP device detection on HP nx5000 laptops.
      Other laptops, including HP nc6000, HP nc8000, HP nw8000, and Toshiba
      Portege 4000, still need PNP quirks to make this work.
      
      With "smsc-ircc2.nopnp", we do the legacy device probe, including manual
      bridge preconfiguration, as before.
      Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Samuel Ortiz <samuel@sortiz.org>
      Acked-by: default avatar"Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
      Cc: Andrey Borzenkov <arvidjaar@mail.ru>
      Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7c31d2f5
    • Randy Dunlap's avatar
      mtrr/cyrix: fix sections · 80581c43
      Randy Dunlap authored
      main.c::mtrr_add() or mtrr_del() [exported]
      calls main.c::mtrr_add_page() or mtrr_del_page() or mtrr_restore() [resume]
      calls main.c::set_mtrr()
      calls main.c::ipi_handler()
      calls main.c::mtrr_if->set_all() == which can be cyrix_set_all
      
      WARNING: arch/i386/kernel/built-in.o(.text+0x8657): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x866b): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x867e): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x8684): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x868a): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      80581c43
    • Randy Dunlap's avatar
      eventfd: clean compile when CONFIG_EVENTFD=n · d2fd8996
      Randy Dunlap authored
      Fix gcc warning and add parameter checking when CONFIG_EVENTFD=n:
      
      fs/aio.c: In function 'aio_complete':
      fs/aio.c:955: warning: statement with no effect
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Davide Libenzi <davidel@xmailserver.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d2fd8996
    • Ville Syrjala's avatar
      atyfb: Fix XCLK frequency on Apple iBook1 · c0887eed
      Ville Syrjala authored
      Fix a regression on Apple iBook1.  Changes in the clock init code caused an
      incorrect XCLK frequency to be used leading to a corrupted display.
      Signed-off-by: default avatarVille Syrjala <syrjala@sci.fi>
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c0887eed
    • Michael Halcrow's avatar
      zero out last page for llseek/write · d4c5cdb3
      Michael Halcrow authored
      When one llseek's past the end of the file and then writes, every page past
      the previous end of the file should be cleared.  Trevor found that the code,
      as is, does not assure that the very last page is always cleared.  This patch
      takes care of that.
      Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4c5cdb3
    • Michael Halcrow's avatar
      eCryptfs: initialize crypt_stat in setattr · e10f281b
      Michael Halcrow authored
      Recent changes in eCryptfs have made it possible to get to ecryptfs_setattr()
      with an uninitialized crypt_stat struct.  This results in a wide and colorful
      variety of unpleasantries.  This patch properly initializes the crypt_stat
      structure in ecryptfs_setattr() when it is necessary to do so.
      Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e10f281b
    • Michael Halcrow's avatar
      eCryptfs: fix write zeros behavior · 240e2df5
      Michael Halcrow authored
      This patch fixes the processes involved in wiping regions of the data during
      truncate and write events, fixing a kernel hang in 2.6.22-rc4 while assuring
      that zero values are written out to the appropriate locations during events in
      which the i_size will change.
      
      The range passed to ecryptfs_truncate() from ecryptfs_prepare_write() includes
      the page that is the object of ecryptfs_prepare_write().  This leads to a
      kernel hang as read_cache_page() is executed on the same page in the
      ecryptfs_truncate() execution path.  This patch remedies this by limiting the
      range passed to ecryptfs_truncate() so as to exclude the page that is the
      object of ecryptfs_prepare_write(); it also adds code to
      ecryptfs_prepare_write() to zero out the region of its own page when writing
      past the i_size position.  This patch also modifies ecryptfs_truncate() so
      that when a file is truncated to a smaller size, eCryptfs will zero out the
      contents of the new last page from the new size through to the end of the last
      page.
      Signed-off-by: default avatarMichael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      240e2df5
  2. 27 Jun, 2007 19 commits
  3. 26 Jun, 2007 8 commits