forked from Minki/linux
sctp: use GFP_KERNEL in sctp_init()
modules init functions being called from process context, we better use GFP_KERNEL allocations to increase our chances to get these high-order pages we want for SCTP hash tables. This mostly matters if SCTP module is loaded once memory got fragmented. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5cfe6d8adb
commit
6857a02af5
@ -1419,7 +1419,7 @@ static __init int sctp_init(void)
|
|||||||
if ((sctp_assoc_hashsize > (64 * 1024)) && order > 0)
|
if ((sctp_assoc_hashsize > (64 * 1024)) && order > 0)
|
||||||
continue;
|
continue;
|
||||||
sctp_assoc_hashtable = (struct sctp_hashbucket *)
|
sctp_assoc_hashtable = (struct sctp_hashbucket *)
|
||||||
__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
|
__get_free_pages(GFP_KERNEL | __GFP_NOWARN, order);
|
||||||
} while (!sctp_assoc_hashtable && --order > 0);
|
} while (!sctp_assoc_hashtable && --order > 0);
|
||||||
if (!sctp_assoc_hashtable) {
|
if (!sctp_assoc_hashtable) {
|
||||||
pr_err("Failed association hash alloc\n");
|
pr_err("Failed association hash alloc\n");
|
||||||
@ -1452,7 +1452,7 @@ static __init int sctp_init(void)
|
|||||||
if ((sctp_port_hashsize > (64 * 1024)) && order > 0)
|
if ((sctp_port_hashsize > (64 * 1024)) && order > 0)
|
||||||
continue;
|
continue;
|
||||||
sctp_port_hashtable = (struct sctp_bind_hashbucket *)
|
sctp_port_hashtable = (struct sctp_bind_hashbucket *)
|
||||||
__get_free_pages(GFP_ATOMIC|__GFP_NOWARN, order);
|
__get_free_pages(GFP_KERNEL | __GFP_NOWARN, order);
|
||||||
} while (!sctp_port_hashtable && --order > 0);
|
} while (!sctp_port_hashtable && --order > 0);
|
||||||
if (!sctp_port_hashtable) {
|
if (!sctp_port_hashtable) {
|
||||||
pr_err("Failed bind hash alloc\n");
|
pr_err("Failed bind hash alloc\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user