1. 13 Feb, 2012 2 commits
    • Carsten Otte's avatar
      mm/filemap_xip.c: fix race condition in xip_file_fault() · 09948a33
      Carsten Otte authored
      commit 99f02ef1 upstream.
      
      Fix a race condition that shows in conjunction with xip_file_fault() when
      two threads of the same user process fault on the same memory page.
      
      In this case, the race winner will install the page table entry and the
      unlucky loser will cause an oops: xip_file_fault calls vm_insert_pfn (via
      vm_insert_mixed) which drops out at this check:
      
      	retval = -EBUSY;
      	if (!pte_none(*pte))
      		goto out_unlock;
      
      The resulting -EBUSY return value will trigger a BUG_ON() in
      xip_file_fault.
      
      This fix simply considers the fault as fixed in this case, because the
      race winner has successfully installed the pte.
      
      [akpm@linux-foundation.org: use conventional (and consistent) comment layout]
      Reported-by: default avatarDavid Sadler <dsadler@us.ibm.com>
      Signed-off-by: default avatarCarsten Otte <cotte@de.ibm.com>
      Reported-by: default avatarLouis Alex Eisner <leisner@cs.ucsd.edu>
      Cc: Hugh Dickins <hughd@google.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@linuxfoundation.org>
      09948a33
    • Jack Morgenstein's avatar
      IB/mlx4: pass SMP vendor-specific attribute MADs to firmware · 6e6be14c
      Jack Morgenstein authored
      commit a6f7feae upstream.
      
      In the current code, vendor-specific MADs (e.g with the FDR-10
      attribute) are silently dropped by the driver, resulting in timeouts
      at the sending side and inability to query/configure the relevant
      feature.  However, the ConnectX firmware is able to handle such MADs.
      For unsupported attributes, the firmware returns a GET_RESPONSE MAD
      containing an error status.
      
      For example, for a FDR-10 node with LID 11:
      
          # ibstat mlx4_0 1
      
          CA: 'mlx4_0'
          Port 1:
          State: Active
          Physical state: LinkUp
          Rate: 40 (FDR10)
          Base lid: 11
          LMC: 0
          SM lid: 24
          Capability mask: 0x02514868
          Port GUID: 0x0002c903002e65d1
          Link layer: InfiniBand
      
      Extended Port Query (EPI) vendor mad timeouts before the patch:
      
          # smpquery MEPI 11 -d
      
          ibwarn: [4196] smp_query_via: attr 0xff90 mod 0x0 route Lid 11
          ibwarn: [4196] _do_madrpc: retry 1 (timeout 1000 ms)
          ibwarn: [4196] _do_madrpc: retry 2 (timeout 1000 ms)
          ibwarn: [4196] _do_madrpc: timeout after 3 retries, 3000 ms
          ibwarn: [4196] mad_rpc: _do_madrpc failed; dport (Lid 11)
          smpquery: iberror: [pid 4196] main: failed: operation EPI: ext port info query failed
      
      EPI query works OK with the patch:
      
          # smpquery MEPI 11 -d
      
          ibwarn: [6548] smp_query_via: attr 0xff90 mod 0x0 route Lid 11
          ibwarn: [6548] mad_rpc: data offs 64 sz 64
          mad data
          0000 0000 0000 0001 0000 0001 0000 0001
          0000 0000 0000 0000 0000 0000 0000 0000
          0000 0000 0000 0000 0000 0000 0000 0000
          0000 0000 0000 0000 0000 0000 0000 0000
          # Ext Port info: Lid 11 port 0
          StateChangeEnable:...............0x00
          LinkSpeedSupported:..............0x01
          LinkSpeedEnabled:................0x01
          LinkSpeedActive:.................0x01
      Signed-off-by: default avatarJack Morgenstein <jackm@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Acked-by: default avatarIra Weiny <weiny2@llnl.gov>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6e6be14c
  2. 03 Feb, 2012 22 commits
  3. 25 Jan, 2012 16 commits