sctp: use the passed in gfp flags instead GFP_KERNEL

This change “sctp: use the passed in gfp flags instead GFP_KERNEL” in Linux kernel is authored by Dan Carpenter <dan.carpenter [at]> on Thu Feb 28 19:27:43 2013 +0000.

sctp: use the passed in gfp flags instead GFP_KERNEL

This patch doesn't change how the code works because in the current
kernel gfp is always GFP_KERNEL.  But gfp was obviously intended
instead of GFP_KERNEL.

Signed-off-by: Dan Carpenter <>
Acked-by: Neil Horman <>
Signed-off-by: David S. Miller <>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 81ce0db.

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 net/sctp/endpointola.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 73aad3d..9a680c0 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -155,7 +155,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
 	/* SCTP-AUTH extensions*/
-	null_key = sctp_auth_shkey_create(0, GFP_KERNEL);
+	null_key = sctp_auth_shkey_create(0, gfp);
 	if (!null_key)
 		goto nomem;

The commit for this change in Linux stable tree is 81ce0db (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *