Commit 3f736868 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE

Don't definite its own MAX_KMALLOC_SIZE, use the one
defined in mm.

Cc: Vlad Yasevich <>
Cc: Sridhar Samudrala <>
Cc: Neil Horman <>
Cc: David S. Miller <>
Signed-off-by: default avatarCong Wang <>
Acked-by: default avatarNeil Horman <>
Signed-off-by: default avatarDavid S. Miller <>
parent ece6b0a2
......@@ -41,8 +41,6 @@
#include <net/sctp/sctp.h>
#include <net/sctp/sm.h>
#define MAX_KMALLOC_SIZE 131072
static struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *map, __u16 in,
__u16 out);
......@@ -65,7 +63,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
int size;
size = sctp_ssnmap_size(in, out);
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
retval = kmalloc(size, gfp);
retval = (struct sctp_ssnmap *)
......@@ -82,7 +80,7 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
return retval;
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
free_pages((unsigned long)retval, get_order(size));
......@@ -124,7 +122,7 @@ void sctp_ssnmap_free(struct sctp_ssnmap *map)
int size;
size = sctp_ssnmap_size(map->in.len, map->out.len);
if (size <= MAX_KMALLOC_SIZE)
if (size <= KMALLOC_MAX_SIZE)
free_pages((unsigned long)map, get_order(size));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment