Commit Graph

144715 Commits

Author SHA1 Message Date
Alex Williamson 1824a98974 virtio_net: Fix function name typo
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 21:26:36 -07:00
Alex Williamson 23e258e1a8 virtio_net: Cleanup command queue scatterlist usage
We were avoiding calling sg_init* on scatterlists passed
into virtnet_send_command to prevent extraneous end markers.
This caused build warnings for uninitialized variables.
Cleanup the code to create proper scatterlists.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 21:26:36 -07:00
Jiri Pirko 1363d9b135 bonding: correct the cleanup in bond_create()
This patch makes the cleanup in bond_create nicer :) Also now the forgotten
free_netdev is called.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:35:28 -07:00
Grant Likely c047fcd245 virtio: add missing include to virtio_net.h
virtio_net.h uses the macro ETH_ALEN which is defined in linux/if_ether.h.
Discovered when hacking on virtio-over-pci patches.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:34:02 -07:00
Steve Glendinning 726474b8cd smsc95xx: add support for LAN9512 and LAN9514
LAN9512 and LAN9514 are USB hubs with an integrated 10/100 ethernet
controller.  Logically this looks like an ethernet controller (similar
to LAN9500) permanently attached to one of the hub's downstream ports.

This patch adds the usb device id of the new ethernet controller to the
smsc95xx driver.  This id is the same in both new devices.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:27:03 -07:00
Steve Glendinning f293501c61 smsc95xx: configure LED outputs
SMSC LAN9500 has dual purpose GPIO/LED pins, and by default at power-on
these are configured as GPIOs.  This means that if LEDs are fitted they
won't ever light.

This patch sets them to be LED outputs for speed, duplex and
link/activity.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:27:02 -07:00
Bruno Prémont 2382b15bcc netconsole: take care of NETDEV_UNREGISTER event
When netconsole is loaded and a network interface fades away (e.g. on
rmmod $interface_driver_module) the rmmod remains stuck and some locks
are taken that prevent any additional module loading/unloading as well
as interface up/down changes.
In addition kernel logs (and console) get flooded at 10s interval with

[  122.464065] unregister_netdevice: waiting for eth0 to become free. Usage count = 1
[  132.704059] unregister_netdevice: waiting for eth0 to become free. Usage count = 1

This patch lets netconsole take NETDEV_UNREGISTER event into account
and release the affected interface if it was in use.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:24:18 -07:00
Laszlo Attila Toth acda074390 xt_socket: checks for the state of nf_conntrack
xt_socket can use connection tracking, and checks whether it is a module.

Signed-off-by: Laszlo Attila Toth <panther@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:23:10 -07:00
Eric Dumazet 689c96cca7 bonding: bond_slave_info_query() fix
bond_slave_info_query() should keep a read lock while accessing slave info,
or risk accessing stale data and corruption.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 15:18:19 -07:00
Jiri Kosina e5288eb5ea HID: fix oops in hid_check_keys_pressed()
If the device is not claimed by hid-input (i.e devices driver by userspace
hiddev/hidraw-based drivers, or completely detached from HID
and driver by libusb), we must not check the hid->inptus, as it
is not guaranteed to be initialized, as this is performed only for devices
handled by hid-input.

Reported-by: Guillaume Chazarain <guichaz@gmail.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-05-02 00:02:57 +02:00
Thomas Gleixner f9a196b8dc x86: initialize io_bitmap_base on 32bit
commit db949bba3c (x86-32: use non-lazy
io bitmap context switching) broke ioperm for 32bit because it removed
the lazy initialization of io_bitmap_base and did not set it to the
real bitmap offset.

[ Impact: fix non-working sys_ioperm() on 32-bit kernels ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-05-01 21:09:53 +02:00
Sergey Senozhatsky 00b64f2aa5 cxgb3: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ‘!’
Trivial: fixing gcc 4.4 compiler warning:
drivers/net/cxgb3/t3_hw.c: In function ‘t3_prep_adapter’:
drivers/net/cxgb3/t3_hw.c:3782: warning: suggest parentheses around operand of ‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 09:15:09 -07:00
Eric Dumazet 0f3d042ed2 netfilter: use likely() in xt_info_rdlock_bh()
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 09:10:46 -07:00
Eric Dumazet ec581f6a42 net: Fix skb_tx_hash() for forwarding workloads.
When skb_rx_queue_recorded() is true, we dont want to use jash distribution
as the device driver exactly told us which queue was selected at RX time.
jhash makes a statistical shuffle, but this wont work with 8 static inputs.

Later improvements would be to compute reciprocal value of real_num_tx_queues
to avoid a divide here. But this computation should be done once,
when real_num_tx_queues is set. This needs a separate patch, and a new
field in struct net_device.

Reported-by: Andrew Dickinson <andrew@whydna.net>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-01 09:05:06 -07:00
Thomas Gleixner d7226fb6ec Revert "genirq: assert that irq handlers are indeed running in hardirq context"
This reverts commit 044d408409.

The commit added a warning when handle_IRQ_event() is called outside
of hard interrupt context. This breaks the generic tasklet based
interrupt resend mechanism which is used when the hardware has no way
to retrigger the interrupt. So we get a warning for a use case which
is correct and worked for years. Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-05-01 15:16:04 +02:00
Ben Dooks dc8fc7edef [ARM] S3C2412: Add missing cache flush in suspend code
The alterations to the suspend code missed adding a
call to the cache flushing routines during the suspend
path of the S3C2412.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 12:28:16 +01:00
Ben Dooks 090f848da0 [ARM] S3C: Add UDIVSLOT support for newer UARTS
Add support for the UDIVSLOT register on the newer UART blocks
which gives the capability of 1/16ths adjustment to the baud rate.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-05-01 12:28:16 +01:00
Ben Dooks 5ef316fbe7 [ARM] S3C64XX: Add S3C64XX_PA_IIS{0,1} to <mach/map.h>
Add the physical address of the two I2S channel register blocks.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
2009-05-01 12:28:16 +01:00
Anders Kaseorg b614a697dc kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
When you put
  .section ".foo"
in an assembly file instead of
  .section "foo", "ax"
, one of the possible symptoms is that modpost will see an
ld-generated section name ".foo.1" in section_rel() or section_rela().
But this heuristic has two problems: it will miss a bad section that
has no relocations, and it will incorrectly flag many gcc-generated
sections as bad when compiling with -ffunction-sections
-fdata-sections.

On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.

So instead of checking whether the section name matches a particular
pattern, we directly check for a missing SHF_ALLOC in the section
flags.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:05 +02:00
Sam Ravnborg c993971f4a kbuild: fix comment in modpost.c
There is some confusion on naming of the head section.
Correct naming is .head.text.

Fix comment so we use correct naming.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:04 +02:00
Nico Schottelius a182ad3d0f kbuild: fix scripts/setlocalversion with git
When using trees like wireless-testing, which have untagged tags,
scripts/setlocalversion does not display any git indication for
localversion.

This patch fixes it: If git is available, but no usable tag is found,
it uses -g${head}. It skips the detection of unanottated tags via
git name-rev.

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:04 +02:00
Cedric Hombourger 99e3a1eb3c kbuild: fix Module.markers permission error under cygwin
While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers).  This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.

We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.

The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers.  When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.

Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.

Tested on both cygwin (1.3.22) and Linux.  Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()

Signed-off-by: Cedric Hombourger <chombourger@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:03 +02:00
Randy Dunlap 64e3da1094 docs: also clean index.html
Missed index.html in "make cleandocs", so add it.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:03 +02:00
Matt Kraai 2e6cb8b0dc kbuild: remove a tag file before it is regenerated
If a tag file is not removed before it is regenerated, the newly
generated data is appended to the old, which preserves stale data and
makes the tag file grow over time.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:02 +02:00
Robert P. J. Day c4d5ee67ce kbuild: "make prepare" should be "make modules_prepare"
Correct the Makefile help text to read "make modules_prepare".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:01 +02:00
Frédéric Brière 0c56042adc kbuild: clean Module.markers and modules.order for out-of-tree modules
Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:01 +02:00
Sam Ravnborg c520f72172 avr32: drop unused CLEAN_FILES
Left over from before we used arch/avr32/include

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
2009-05-01 10:54:00 +02:00
Benjamin Herrenschmidt 0203d6ec4e powerpc: Fix setting of oprofile cpu type
commit 2657dd4e30 introduced a
bug where we would now always override the "real" oprofile CPU
type with the "compatible" one provided by a pseudo-PVR in the
device-tree which is incorrect and breaks oprofile on all current
configs since the "compatible" ones aren't yet recognized.

This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-05-01 15:12:05 +10:00
Grant Likely 9d37a90f9c powerpc: Update MPC5xxx and Xilinx Virtex maintainer entries
- Add git tree URLs
- Drop Sylvain from the 5xxx maintainers list.  He hasn't been active
  for a while now.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-05-01 15:12:05 +10:00
Michael Wolf 79af6c49a9 powerpc adjust oprofile_cpu_type version 3
Oprofile is changing the naming it is using for the compatibility modes.
Instead of having compat-power<x>, oprofile will go to family naming
convention and use ibm-compat-v<x>.  Currently only ibm-compat-v1 will
be defined.
The notion of compatibility events just started with POWER6. So there is
no way that any other tool could exist that is using these
oprofile_cpu_type strings we want to change.

Signed-off-by: Mike Wolf <mjw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-05-01 15:12:05 +10:00
Oleg Nesterov 78a3d9d565 do_wait: do take security_task_wait() into account
I was never able to understand what should we actually do when
security_task_wait() fails, but the current code doesn't look right.

If ->task_wait() returns the error, we update *notask_error correctly.
But then we either reap the child (despite the fact this was forbidden)
or clear *notask_error (and hide the securiy policy problems).

This patch assumes that "stolen by ptrace" doesn't matter. If selinux
denies the child we should ignore it but make sure we report -EACCESS
instead of -ECHLD if there are no other eligible children.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
2009-05-01 08:49:29 +10:00
Joel Becker 2191aebaf9 ocfs2: Change repository in MAINTAINERS.
The ocfs2.git repository is moving to my kernel.org account.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
2009-04-30 13:23:12 -07:00
Joel Becker dfa13f39b7 ocfs2: Fix a missing credit when deleting from indexed directories.
The ocfs2 directory index updates two blocks when we remove an entry -
the dx root and the dx leaf.  OCFS2_DELETE_INODE_CREDITS was only
accounting for the dx leaf.  This shows up when ocfs2_delete_inode()
runs out of credits in jbd2_journal_dirty_metadata() at
"J_ASSERT_JH(jh, handle->h_buffer_credits > 0);".

The test that caught this was running dirop_file_racer from the
ocfs2-test suite with a 250-character filename PREFIX.  Run on a 512B
blocksize, it forces the orphan dir index to grow large enough to
trigger.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
2009-04-30 13:21:56 -07:00
Catalin Marinas 0516e4643c [ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale data
This patch is a workaround for the 460075 Cortex-A8 (r2p0) erratum. It
configures the L2 cache auxiliary control register so that the Write
Allocate mode for the L2 cache is disabled.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-04-30 20:13:00 +01:00
Catalin Marinas 855c551f5b [ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created
This patch adds a workaround for the 458693 Cortex-A8 (r2p0)
erratum. It sets the corresponding bits in the auxiliary control
register so that the PLD instruction becomes a NOP.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-04-30 20:12:59 +01:00
Catalin Marinas 7ce236fcd6 [ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch
This patch adds the workaround for the 430973 Cortex-A8 (r1p0..r1p2)
erratum. The BTAC/BTB is now flushed at every context switch.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-04-30 20:12:50 +01:00
Catalin Marinas 9cba3ccc8f [ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail
This patch implements the recommended workaround for erratum 411920
(ARM1136, ARM1156, ARM1176).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-04-30 20:12:47 +01:00
Henrik Rydberg eacaad01b4 Input: document the multi-touch (MT) protocol
This patchs adds documentation for the multi-touch protocol to
Documentation/input/.

[randy.dunlap@oracle.com: grammar fixes]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-04-30 10:41:39 -07:00
Borislav Petkov 96c1674397 ide-cd: fix REQ_QUIET tests in cdrom_decode_status
Original patch (dfa4411cc3) was buggy.
This is a more proper fix which introduces blk_rq_quiet() macro
alleviating the need for dumb, too short caching variables.

Thanks to Helge Deller and Bart for debugging this.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reported-and-tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-04-30 18:24:34 +02:00
Jarek Poplawski 7a67e56fd3 net: Fix oops when splicing skbs from a frag_list.
Lennert Buytenhek wrote:
> Since 4fb6699481 ("net: Optimize memory
> usage when splicing from sockets.") I'm seeing this oops (e.g. in
> 2.6.30-rc3) when splicing from a TCP socket to /dev/null on a driver
> (mv643xx_eth) that uses LRO in the skb mode (lro_receive_skb) rather
> than the frag mode:

My patch incorrectly assumed skb->sk was always valid, but for
"frag_listed" skbs we can only use skb->sk of their parent.

Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Debugged-by: Lennert Buytenhek <buytenh@wantstofly.org>
Tested-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-30 05:41:19 -07:00
John Wright 2f65dd475c x86: gettimeofday() vDSO: fix segfault when tv == NULL
According to the gettimeofday(2) manual:

       If either tv or tz is NULL, the corresponding structure is not
       set or returned.

Since it is legal to give NULL as the tv argument, the code should make
sure tv is not NULL before trying to dereference it.

This issue manifests itself on x86_64 when vdso=0 is not on the kernel
command-line and libc uses the vDSO for gettimeofday() (e.g. glibc >=
2.7).  A simple reproducer:

  #include <stdio.h>
  #include <sys/time.h>

  int main(void)
  {
      struct timezone tz;

      gettimeofday(NULL, &tz);

      return 0;
  }

See http://bugs.debian.org/466491 for more details.

[ Impact: fix gettimeofday(NULL, &tz) segfault ]

Signed-off-by: John Wright <john.wright@hp.com>
Cc: Andi Kleen <ak@suse.de>
Cc: John Wright <john.wright@hp.com>
LKML-Reference: <1241037121-14805-1-git-send-email-john.wright@hp.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-30 12:31:45 +02:00
H Hartley Sweeten 6e85c5ba73 kernel/posix-cpu-timers.c: fix sparse warning
Sparse reports the following in kernel/posix-cpu-timers.c:

  warning: symbol 'firing' shadows an earlier one

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>
LKML-Reference: <BD79186B4FD85F4B8E60E381CAEE1909016C1AFE@mi8nycmail19.Mi8.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-04-30 08:08:31 +02:00
Christoph Hellwig 28e211700a xfs: fix getbmap vs mmap deadlock
xfs_getbmap (or rather the formatters called by it) copy out the getbmap
structures under the ilock, which can deadlock against mmap.  This has
been reported via bugzilla a while ago (#717) and has recently also
shown up via lockdep.

So allocate a temporary buffer to format the kernel getbmap structures
into and then copy them out after dropping the locks.

A little problem with this is that we limit the number of extents we
can copy out by the maximum allocation size, but I see no real way
around that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-04-30 00:29:02 -05:00
Christoph Hellwig 5f79ed685f xfs: a couple getbmap cleanups
- reshuffle various conditionals for data vs attr fork to make the code
   more readable
 - do fine-grainded goto-based error handling
 - exit early from conditionals instead of keeping a long else branch around
 - allow kmem_alloc to fail

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-04-30 00:28:31 -05:00
Olaf Weber b9ec9068d7 xfs: add more checks to superblock validation
There had been reports where xfs filesystem was randomly
corrupted with fsfuzzer, and xfs failed to handle it
gracefully. This patch fixes couple of reported problem
by providing additional checks in the superblock
validation routine.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-04-30 00:26:14 -05:00
Lachlan McIlroy def6b3ba56 xfs_file_last_byte() needs to acquire ilock
We had some systems crash with this stack:

[<a00000010000cb20>] ia64_leave_kernel+0x0/0x280
[<a00000021291ca00>] xfs_bmbt_get_startoff+0x0/0x20 [xfs]
[<a0000002129080b0>] xfs_bmap_last_offset+0x210/0x280 [xfs]
[<a00000021295b010>] xfs_file_last_byte+0x70/0x1a0 [xfs]
[<a00000021295b200>] xfs_itruncate_start+0xc0/0x1a0 [xfs]
[<a0000002129935f0>] xfs_inactive_free_eofblocks+0x290/0x460 [xfs]
[<a000000212998fb0>] xfs_release+0x1b0/0x240 [xfs]
[<a0000002129ad930>] xfs_file_release+0x70/0xa0 [xfs]
[<a000000100162ea0>] __fput+0x1a0/0x420
[<a000000100163160>] fput+0x40/0x60

The problem here is that xfs_file_last_byte() does not acquire the
inode lock and can therefore race with another thread that is modifying
the extext list.  While xfs_bmap_last_offset() is trying to lookup
what was the last extent some extents were merged and the extent list
shrunk so the index we lookup is now beyond the end of the extent list
and potentially in a freed buffer.

Signed-off-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-04-30 00:25:25 -05:00
Linus Torvalds 091438dd56 Linux 2.6.30-rc4 2009-04-29 21:48:16 -07:00
Linus Torvalds 9ea66ab580 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  eCryptfs: Fix min function comparison warning
  ecryptfs: fix printk format warning
2009-04-29 21:25:53 -07:00
Linus Torvalds 93acda847f Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
  V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express
  V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM
  V4L/DVB (11570): patch: s2255drv: fix race condition on set mode
  V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error
  V4L/DVB (11561a): move media after i2c
  V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
  V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak
  V4L/DVB (11494a): cx231xx Kconfig fixes
  V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
2009-04-29 21:25:39 -07:00
Lennert Buytenhek 93af7aca44 mv643xx_eth: 64bit mib counter read fix
On several mv643xx_eth hardware versions, the two 64bit mib counters
for 'good octets received' and 'good octets sent' are actually 32bit
counters, and reading from the upper half of the register has the same
effect as reading from the lower half of the register: an atomic
read-and-clear of the entire 32bit counter value.  This can under heavy
traffic occasionally lead to small numbers being added to the upper
half of the 64bit mib counter even though no 32bit wrap has occured.

Since we poll the mib counters at least every 30 seconds anyway, we
might as well just skip the reads of the upper halves of the hardware
counters without breaking the stats, which this patch does.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-29 17:24:19 -07:00