Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Apr 08, 2022
  2. Apr 07, 2022
  3. Apr 06, 2022
  4. Apr 05, 2022
  5. Apr 04, 2022
  6. Apr 02, 2022
  7. Apr 01, 2022
  8. Mar 31, 2022
  9. Mar 30, 2022
  10. Mar 29, 2022
    • NeilBrown's avatar
      SUNRPC: handle malloc failure in ->request_prepare · eb07d5a4
      NeilBrown authored
      
      If ->request_prepare() detects an error, it sets ->rq_task->tk_status.
      This is easy for callers to ignore.
      The only caller is xprt_request_enqueue_receive() and it does ignore the
      error, as does call_encode() which calls it.  This can result in a
      request being queued to receive a reply without an allocated receive buffer.
      
      So instead of setting rq_task->tk_status, return an error, and store in
      ->tk_status only in call_encode();
      
      The call to xprt_request_enqueue_receive() is now earlier in
      call_encode(), where the error can still be handled.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      eb07d5a4