netfilter: snmp: avoid stack size warning
authorFlorian Westphal <fw@strlen.de>
Thu, 27 Apr 2017 14:39:43 +0000 (16:39 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 May 2017 09:43:58 +0000 (11:43 +0200)
net/ipv4/netfilter/nf_nat_snmp_basic.c:1158:1: warning: the frame size
of 1160 bytes is larger than 1024 bytes

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_nat_snmp_basic.c

index da04b9c33ef39761466a10867164c8a8b49f54b3..d5b1e0b3f6876995b6987aa47515ece9c7beaca3 100644 (file)
@@ -827,8 +827,8 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
        return 1;
 }
 
-static unsigned char snmp_request_decode(struct asn1_ctx *ctx,
-                                        struct snmp_request *request)
+static unsigned char noinline_for_stack
+snmp_request_decode(struct asn1_ctx *ctx, struct snmp_request *request)
 {
        unsigned int cls, con, tag;
        unsigned char *end;
@@ -920,10 +920,10 @@ static inline void mangle_address(unsigned char *begin,
        }
 }
 
-static unsigned char snmp_trap_decode(struct asn1_ctx *ctx,
-                                     struct snmp_v1_trap *trap,
-                                     const struct oct1_map *map,
-                                     __sum16 *check)
+static unsigned char noinline_for_stack
+snmp_trap_decode(struct asn1_ctx *ctx, struct snmp_v1_trap *trap,
+                const struct oct1_map *map,
+                __sum16 *check)
 {
        unsigned int cls, con, tag, len;
        unsigned char *end;