1. 05 11月, 2012 12 次提交
  2. 01 11月, 2012 1 次提交
  3. 24 10月, 2012 4 次提交
  4. 18 10月, 2012 1 次提交
    • S
      SUNRPC: Prevent kernel stack corruption on long values of flush · 212ba906
      Sasha Levin 提交于
      The buffer size in read_flush() is too small for the longest possible values
      for it. This can lead to a kernel stack corruption:
      
      [   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
      [   43.047329]
      [   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
      [   43.050038] Call Trace:
      [   43.050435]  [<ffffffff836c60c2>] panic+0xcd/0x1f4
      [   43.050931]  [<ffffffff833e64b4>] ? read_flush.isra.7+0xe4/0x100
      [   43.051602]  [<ffffffff810e94e6>] __stack_chk_fail+0x16/0x20
      [   43.052206]  [<ffffffff833e64b4>] read_flush.isra.7+0xe4/0x100
      [   43.052951]  [<ffffffff833e6500>] ? read_flush_pipefs+0x30/0x30
      [   43.053594]  [<ffffffff833e652c>] read_flush_procfs+0x2c/0x30
      [   43.053596]  [<ffffffff812b9a8c>] proc_reg_read+0x9c/0xd0
      [   43.053596]  [<ffffffff812b99f0>] ? proc_reg_write+0xd0/0xd0
      [   43.053596]  [<ffffffff81250d5b>] do_loop_readv_writev+0x4b/0x90
      [   43.053596]  [<ffffffff81250fd6>] do_readv_writev+0xf6/0x1d0
      [   43.053596]  [<ffffffff812510ee>] vfs_readv+0x3e/0x60
      [   43.053596]  [<ffffffff812511b8>] sys_readv+0x48/0xb0
      [   43.053596]  [<ffffffff8378167d>] system_call_fastpath+0x1a/0x1f
      Signed-off-by: NSasha Levin <levinsasha928@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      212ba906
  5. 02 10月, 2012 4 次提交
    • C
      SUNRPC: Introduce rpc_clone_client_set_auth() · ba9b584c
      Chuck Lever 提交于
      An ULP is supposed to be able to replace a GSS rpc_auth object with
      another GSS rpc_auth object using rpcauth_create().  However,
      rpcauth_create() in 3.5 reliably fails with -EEXIST in this case.
      This is because when gss_create() attempts to create the upcall pipes,
      sometimes they are already there.  For example if a pipe FS mount
      event occurs, or a previous GSS flavor was in use for this rpc_clnt.
      
      It turns out that's not the only problem here.  While working on a
      fix for the above problem, we noticed that replacing an rpc_clnt's
      rpc_auth is not safe, since dereferencing the cl_auth field is not
      protected in any way.
      
      So we're deprecating the ability of rpcauth_create() to switch an
      rpc_clnt's security flavor during normal operation.  Instead, let's
      add a fresh API that clones an rpc_clnt and gives the clone a new
      flavor before it's used.
      
      This makes immediate use of the new __rpc_clone_client() helper.
      
      This can be used in a similar fashion to rpcauth_create() when a
      client is hunting for the correct security flavor.  Instead of
      replacing an rpc_clnt's security flavor in a loop, the ULP replaces
      the whole rpc_clnt.
      
      To fix the -EEXIST problem, any ULP logic that relies on replacing
      an rpc_clnt's rpc_auth with rpcauth_create() must be changed to use
      this API instead.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ba9b584c
    • C
      SUNRPC: Refactor rpc_clone_client() · 1b63a751
      Chuck Lever 提交于
      rpc_clone_client() does most of the same tasks as rpc_new_client(),
      so there is an opportunity for code re-use.  Create a generic helper
      that makes it easy to clone an RPC client while replacing any of the
      clnt's parameters.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1b63a751
    • C
      SUNRPC: Use __func__ in dprintk() in auth_gss.c · 632f0d05
      Chuck Lever 提交于
      Clean up: Some function names have changed, but debugging messages
      were never updated.  Automate the construction of the function name
      in debugging messages.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      632f0d05
    • C
      SUNRPC: Clean up dprintk messages in rpc_pipe.c · d8af9bc1
      Chuck Lever 提交于
      Clean up: The blank space in front of the message must be spaces.
      Tabs show up on the console as a graphical character.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d8af9bc1
  6. 29 9月, 2012 3 次提交
  7. 27 9月, 2012 1 次提交
  8. 25 9月, 2012 1 次提交
    • B
      SUNRPC: Set alloc_slot for backchannel tcp ops · 84e28a30
      Bryan Schumaker 提交于
      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: NBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      84e28a30
  9. 20 9月, 2012 1 次提交
  10. 10 9月, 2012 1 次提交
    • J
      nfsd: remove unused listener-removal interfaces · eccf50c1
      J. Bruce Fields 提交于
      You can use nfsd/portlist to give nfsd additional sockets to listen on.
      In theory you can also remove listening sockets this way.  But nobody's
      ever done that as far as I can tell.
      
      Also this was partially broken in 2.6.25, by
      a217813f "knfsd: Support adding
      transports by writing portlist file".
      
      (Note that we decide whether to take the "delfd" case by checking for a
      digit--but what's actually expected in that case is something made by
      svc_one_sock_name(), which won't begin with a digit.)
      
      So, let's just rip out this stuff.
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      eccf50c1
  11. 07 9月, 2012 1 次提交
    • T
      SUNRPC: Fix a UDP transport regression · f39c1bfb
      Trond Myklebust 提交于
      Commit 43cedbf0 (SUNRPC: Ensure that
      we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
      hangs in the case of NFS over UDP mounts.
      
      Since neither the UDP or the RDMA transport mechanism use dynamic slot
      allocation, we can skip grabbing the socket lock for those transports.
      Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
      case.
      
      Note that the NFSv4.1 back channel assigns the slot directly
      through rpc_run_bc_task, so we can ignore that case.
      Reported-by: NDick Streefland <dick.streefland@altium.nl>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org [>= 3.1]
      f39c1bfb
  12. 22 8月, 2012 10 次提交