1. 28 Sep, 2012 29 commits
  2. 26 Sep, 2012 2 commits
  3. 25 Sep, 2012 3 commits
    • NeilBrown's avatar
      NFS4: avoid underflow when converting error to pointer. · 62d98c93
      NeilBrown authored
      In nfs4_create_sec_client, 'flavor' can hold a negative error
      code (returned from nfs4_negotiate_security), even though it
      is an 'enum' and hence unsigned.
      
      The code is careful to cast it to an (int) before testing if it
      is negative, however it doesn't cast to an (int) before calling
      ERR_PTR.
      
      On a machine where "void*" is larger than "int", this results in
      the unsigned equivalent of -1 (e.g. 0xffffffff) being converted
      to a pointer.  Subsequent code determines that this is not
      negative, and so  dereferences it with predictable results.
      
      So: cast 'flavor' to a (signed) int before passing to ERR_PTR.
      
      cc: Benny Halevy <bhalevy@tonian.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      62d98c93
    • Wei Yongjun's avatar
      NFS: fix the return value check by using IS_ERR · e8d920c5
      Wei Yongjun authored
      In case of error, the function rpcauth_create() returns ERR_PTR()
      and never returns NULL pointer. The NULL test in the return value
      check should be replaced with IS_ERR().
      
      dpatch engine is used to auto generated this patch.
      (https://github.com/weiyj/dpatch)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      e8d920c5
    • Bryan Schumaker's avatar
      SUNRPC: Set alloc_slot for backchannel tcp ops · 84e28a30
      Bryan Schumaker authored
      f39c1bfb (SUNRPC: Fix a UDP transport
      regression) introduced the "alloc_slot" function for xprt operations,
      but never created one for the backchannel operations.  This patch fixes
      a null pointer dereference when mounting NFS over v4.1.
      
      Call Trace:
       [<ffffffffa0207957>] ? xprt_reserve+0x47/0x50 [sunrpc]
       [<ffffffffa02023a4>] call_reserve+0x34/0x60 [sunrpc]
       [<ffffffffa020e280>] __rpc_execute+0x90/0x400 [sunrpc]
       [<ffffffffa020e61a>] rpc_async_schedule+0x2a/0x40 [sunrpc]
       [<ffffffff81073589>] process_one_work+0x139/0x500
       [<ffffffff81070e70>] ? alloc_worker+0x70/0x70
       [<ffffffffa020e5f0>] ? __rpc_execute+0x400/0x400 [sunrpc]
       [<ffffffff81073d1e>] worker_thread+0x15e/0x460
       [<ffffffff8145c839>] ? preempt_schedule+0x49/0x70
       [<ffffffff81073bc0>] ? rescuer_thread+0x230/0x230
       [<ffffffff81079603>] kthread+0x93/0xa0
       [<ffffffff81465d04>] kernel_thread_helper+0x4/0x10
       [<ffffffff81079570>] ? kthread_freezable_should_stop+0x70/0x70
       [<ffffffff81465d00>] ? gs_change+0x13/0x13
      Signed-off-by: default avatarBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      84e28a30
  4. 19 Sep, 2012 6 commits