1. 13 May, 2010 4 commits
  2. 12 May, 2010 21 commits
  3. 11 May, 2010 15 commits
    • Sage Weil's avatar
      ceph: zero unused message header, footer fields · 45c6ceb5
      Sage Weil authored
      We shouldn't leak any prior memory contents to other parties.  And random
      data, particularly in the 'version' field, can cause problems down the
      line.
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      45c6ceb5
    • Linus Torvalds's avatar
      fc2a093e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 9fc282ba
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        net: Fix FDDI and TR config checks in ipv4 arp and LLC.
        IPv4: unresolved multicast route cleanup
        mac80211: remove association work when processing deauth request
        ar9170: wait for asynchronous firmware loading
        ipv4: udp: fix short packet and bad checksum logging
        phy: Fix initialization in micrel driver.
        sctp: Fix a race between ICMP protocol unreachable and connect()
        veth: Dont kfree_skb() after dev_forward_skb()
        IPv6: fix IPV6_RECVERR handling of locally-generated errors
        net/gianfar: drop recycled skbs on MTU change
        iwlwifi: work around passive scan issue
      9fc282ba
    • David Howells's avatar
      CacheFiles: Fix occasional EIO on call to vfs_unlink() · c61ea31d
      David Howells authored
      Fix an occasional EIO returned by a call to vfs_unlink():
      
      	[ 4868.465413] CacheFiles: I/O Error: Unlink failed
      	[ 4868.465444] FS-Cache: Cache cachefiles stopped due to I/O error
      	[ 4947.320011] CacheFiles: File cache on md3 unregistering
      	[ 4947.320041] FS-Cache: Withdrawing cache "mycache"
      	[ 5127.348683] FS-Cache: Cache "mycache" added (type cachefiles)
      	[ 5127.348716] CacheFiles: File cache on md3 registered
      	[ 7076.871081] CacheFiles: I/O Error: Unlink failed
      	[ 7076.871130] FS-Cache: Cache cachefiles stopped due to I/O error
      	[ 7116.780891] CacheFiles: File cache on md3 unregistering
      	[ 7116.780937] FS-Cache: Withdrawing cache "mycache"
      	[ 7296.813394] FS-Cache: Cache "mycache" added (type cachefiles)
      	[ 7296.813432] CacheFiles: File cache on md3 registered
      
      What happens is this:
      
       (1) A cached NFS file is seen to have become out of date, so NFS retires the
           object and immediately acquires a new object with the same key.
      
       (2) Retirement of the old object is done asynchronously - so the lookup/create
           to generate the new object may be done first.
      
           This can be a problem as the old object and the new object must exist at
           the same point in the backing filesystem (i.e. they must have the same
           pathname).
      
       (3) The lookup for the new object sees that a backing file already exists,
           checks to see whether it is valid and sees that it isn't.  It then deletes
           that file and creates a new one on disk.
      
       (4) The retirement phase for the old file is then performed.  It tries to
           delete the dentry it has, but ext4_unlink() returns -EIO because the inode
           attached to that dentry no longer matches the inode number associated with
           the filename in the parent directory.
      
      The trace below shows this quite well.
      
      	[md5sum] ==> __fscache_relinquish_cookie(ffff88002d12fb58{NFS.fh,ffff88002ce62100},1)
      	[md5sum] ==> __fscache_acquire_cookie({NFS.server},{NFS.fh},ffff88002ce62100)
      
      NFS has retired the old cookie and asked for a new one.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_ACTIVE,24})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_DYING]
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_INIT,0})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_LOOKING_UP]
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_DYING,24})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_RECYCLING]
      
      The old object (OBJ52) is going through the terminal states to get rid of it,
      whilst the new object - (OBJ53) - is coming into being.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_LOOKING_UP,0})
      	[kslowd] ==> cachefiles_walk_to_object({ffff88003029d8b8},OBJ53,@68,)
      	[kslowd] lookup '@68'
      	[kslowd] next -> ffff88002ce41bd0 positive
      	[kslowd] advance
      	[kslowd] lookup 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] next -> ffff8800369faac8 positive
      
      The new object has looked up the subdir in which the file would be in (getting
      dentry ffff88002ce41bd0) and then looked up the file itself (getting dentry
      ffff8800369faac8).
      
      	[kslowd] validate 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] ==> cachefiles_bury_object(,'@68','Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA')
      	[kslowd] remove ffff8800369faac8 from ffff88002ce41bd0
      	[kslowd] unlink stale object
      	[kslowd] <== cachefiles_bury_object() = 0
      
      It then checks the file's xattrs to see if it's valid.  NFS says that the
      auxiliary data indicate the file is out of date (obvious to us - that's why NFS
      ditched the old version and got a new one).  CacheFiles then deletes the old
      file (dentry ffff8800369faac8).
      
      	[kslowd] redo lookup
      	[kslowd] lookup 'Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA'
      	[kslowd] next -> ffff88002cd94288 negative
      	[kslowd] create -> ffff88002cd94288{ffff88002cdaf238{ino=148247}}
      
      CacheFiles then redoes the lookup and gets a negative result in a new dentry
      (ffff88002cd94288) which it then creates a file for.
      
      	[kslowd] ==> cachefiles_mark_object_active(,OBJ53)
      	[kslowd] <== cachefiles_mark_object_active() = 0
      	[kslowd] === OBTAINED_OBJECT ===
      	[kslowd] <== cachefiles_walk_to_object() = 0 [148247]
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_AVAILABLE]
      
      The new object is then marked active and the state machine moves to the
      available state - at which point NFS can start filling the object.
      
      	[kslowd] ==> fscache_object_state_machine({OBJ52,OBJECT_RECYCLING,20})
      	[kslowd] ==> fscache_release_object()
      	[kslowd] ==> cachefiles_drop_object({OBJ52,2})
      	[kslowd] ==> cachefiles_delete_object(,OBJ52{ffff8800369faac8})
      
      The old object, meanwhile, goes on with being retired.  If allocation occurs
      first, cachefiles_delete_object() has to wait for dir->d_inode->i_mutex to
      become available before it can continue.
      
      	[kslowd] ==> cachefiles_bury_object(,'@68','Es0g00og0_Nd_XCYe3BOzvXrsBLMlN6aw16M1htaA')
      	[kslowd] remove ffff8800369faac8 from ffff88002ce41bd0
      	[kslowd] unlink stale object
      	EXT4-fs warning (device sda6): ext4_unlink: Inode number mismatch in unlink (148247!=148193)
      	CacheFiles: I/O Error: Unlink failed
      	FS-Cache: Cache cachefiles stopped due to I/O error
      
      CacheFiles then tries to delete the file for the old object, but the dentry it
      has (ffff8800369faac8) no longer points to a valid inode for that directory
      entry, and so ext4_unlink() returns -EIO when de->inode does not match i_ino.
      
      	[kslowd] <== cachefiles_bury_object() = -5
      	[kslowd] <== cachefiles_delete_object() = -5
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_DEAD]
      	[kslowd] ==> fscache_object_state_machine({OBJ53,OBJECT_AVAILABLE,0})
      	[kslowd] <== fscache_object_state_machine() [->OBJECT_ACTIVE]
      
      (Note that the above trace includes extra information beyond that produced by
      the upstream code).
      
      The fix is to note when an object that is being retired has had its object
      deleted preemptively by a replacement object that is being created, and to
      skip the second removal attempt in such a case.
      Reported-by: default avatarGreg M <gregm@servu.net.au>
      Reported-by: default avatarMark Moseley <moseleymark@gmail.com>
      Reported-by: default avatarRomain DEGEZ <romain.degez@smartjog.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c61ea31d
    • Alex Chiang's avatar
      ACPI: sleep: eliminate duplicate entries in acpisleep_dmi_table[] · 7d6fb7bd
      Alex Chiang authored
      Duplicate entries ended up acpisleep_dmi_table[] by accident.
      They don't hurt functionality, but they are ugly, so let's get
      rid of them.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarAlex Chiang <achiang@canonical.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7d6fb7bd
    • Sage Weil's avatar
      ceph: fix locking for waking session requests after reconnect · 9abf82b8
      Sage Weil authored
      The session->s_waiting list is protected by mdsc->mutex, not s_mutex.  This
      was causing (rare) s_waiting list corruption.
      
      Fix errors paths too, while we're here.  A more thorough cleanup of this
      function is coming soon.
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      9abf82b8
    • Sage Weil's avatar
      ceph: resubmit requests on pg mapping change (not just primary change) · d85b7056
      Sage Weil authored
      OSD requests need to be resubmitted on any pg mapping change, not just when
      the pg primary changes.  Resending only when the primary changes results in
      occasional 'hung' requests during osd cluster recovery or rebalancing.
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      d85b7056
    • Sage Weil's avatar
      ceph: fix open file counting on snapped inodes when mds returns no caps · 04d000eb
      Sage Weil authored
      It's possible the MDS will not issue caps on a snapped inode, in which case
      an open request may not __ceph_get_fmode(), botching the open file
      counting.  (This is actually a server bug, but the client shouldn't BUG out
      in this case.)
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      04d000eb
    • Sage Weil's avatar
      ceph: unregister osd request on failure · 0ceed5db
      Sage Weil authored
      The osd request wasn't being unregistered when the osd returned a failure
      code, even though the result was returned to the caller.  This would cause
      it to eventually time out, and then crash the kernel when it tried to
      resend the request using a stale page vector.
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      0ceed5db
    • Henrik Rydberg's avatar
      hwmon: (applesmc) Correct sysfs fan error handling · 0559a538
      Henrik Rydberg authored
      The current code will not remove the sysfs files for fan numbers three
      and up. Also, upon exit, fans one and two are removed regardless of
      their existence.  This patch cleans up the sysfs error handling for
      the fans.
      Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      0559a538
    • Ken Milmore's avatar
      hwmon: (asc7621) Bug fixes · d1bf8cf6
      Ken Milmore authored
      * Allow fan minimum RPM to be set to zero without triggering alarms.
      * Fix voltage scaling arithmetic and correct scale factors.
      * Correct fan1-fan4 alarm bit shifts.
      * Correct register address for temp3_smoothing_enable.
      * Read the alarm registers with high priority.
      Signed-off-by: default avatarKen Milmore <ken.milmore@googlemail.com>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      d1bf8cf6
    • Masami Hiramatsu's avatar
      kprobes/x86: Fix removed int3 checking order · 829e9245
      Masami Hiramatsu authored
      Fix kprobe/x86 to check removed int3 when failing to get kprobe
      from hlist. Since we have a time window between checking int3
      exists on probed address and getting kprobe on that address,
      we can have following scenario:
      
       -------
       CPU1                     CPU2
       hit int3
       check int3 exists
                                remove int3
                                remove kprobe from hlist
       get kprobe from hlist
       no kprobe->OOPS!
       -------
      
      This patch moves int3 checking if there is no kprobe on that
      address for fixing this problem as follows:
      
       ------
       CPU1                     CPU2
       hit int3
                                remove int3
                                remove kprobe from hlist
       get kprobe from hlist
       no kprobe->check int3 exists
                ->rollback&retry
       ------
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Dave Anderson <anderson@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20100427223348.2322.9112.stgit@localhost6.localdomain6>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      829e9245
    • Frederic Weisbecker's avatar
      perf: Fix static strings treated like dynamic ones · de068ec0
      Frederic Weisbecker authored
      The raw_field_ptr() helper, used to retrieve the address of a field
      inside a trace event, treats every strings as if they were dynamic
      ie: having a secondary level of indirection to retrieve their
      contents.
      
      FIELD_IS_STRING doesn't mean FIELD_IS_DYNAMIC, we only need to
      compute the secondary dereference for the latter case.
      
      This fixes perf sched segfaults, bad cmdline report and may be
      some other bugs.
      Reported-by: default avatarJason Baron <jbaron@redhat.com>
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      de068ec0
    • David S. Miller's avatar
    • Jean Delvare's avatar
      drm/radeon: Fix 3 regressions - since buffer rework · c9ff04c9
      Jean Delvare authored
      Commit b4fe9454 introduced 3 bugs,
      fix them:
      
      * Use the right command dword for second packet offset in
        RADEON_CNTL_PAINT/BITBLT_MULTI.
      * Don't leak memory if drm_buffer_copy_from_user() fails.
      * Don't call drm_buffer_unprocessed() unless drm_buffer_alloc() and
        drm_buffer_copy_from_user() have been called successfully first.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Pauli Nieminen <suokkos@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      c9ff04c9