Patch "SUNRPC: Fix oops in the rpc_xdr_buf event class" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    SUNRPC: Fix oops in the rpc_xdr_buf event class

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sunrpc-fix-oops-in-the-rpc_xdr_buf-event-class.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 33455eb9f989c450178d0bf4000761b29aaaa5f7
Author: Scott Mayhew <smayhew@xxxxxxxxxx>
Date:   Thu Nov 12 15:17:32 2020 -0500

    SUNRPC: Fix oops in the rpc_xdr_buf event class
    
    [ Upstream commit c3213d260a23e263ef85ba21ac68c9e7578020b5 ]
    
    Backchannel rpc tasks don't have task->tk_client set, so it's necessary
    to check it for NULL before dereferencing.
    
    Fixes: c509f15a5801 ("SUNRPC: Split the xdr_buf event class")
    Signed-off-by: Scott Mayhew <smayhew@xxxxxxxxxx>
    Reviewed-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index ca2f27b9f919d..1652cc32aebcd 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -68,7 +68,8 @@ DECLARE_EVENT_CLASS(rpc_xdr_buf_class,
 
 	TP_fast_assign(
 		__entry->task_id = task->tk_pid;
-		__entry->client_id = task->tk_client->cl_clid;
+		__entry->client_id = task->tk_client ?
+				     task->tk_client->cl_clid : -1;
 		__entry->head_base = xdr->head[0].iov_base;
 		__entry->head_len = xdr->head[0].iov_len;
 		__entry->tail_base = xdr->tail[0].iov_base;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux