diff options
author | Florian Westphal <fw@strlen.de> | 2014-10-20 07:49:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-20 12:38:13 -0400 |
commit | 330966e501ffe282d7184fde4518d5e0c24bc7f8 (patch) | |
tree | 59951ec61922bcdbb674b63f114cfdf52d1203ef /net/netfilter | |
parent | 1e16aa3ddf863c6b9f37eddf52503230a62dedb3 (diff) |
net: make skb_gso_segment error handling more robust
skb_gso_segment has three possible return values:
1. a pointer to the first segmented skb
2. an errno value (IS_ERR())
3. NULL. This can happen when GSO is used for header verification.
However, several callers currently test IS_ERR instead of IS_ERR_OR_NULL
and would oops when NULL is returned.
Note that these call sites should never actually see such a NULL return
value; all callers mask out the GSO bits in the feature argument.
However, there have been issues with some protocol handlers erronously not
respecting the specified feature mask in some cases.
It is preferable to get 'have to turn off hw offloading, else slow' reports
rather than 'kernel crashes'.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nfnetlink_queue_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c index a82077d9f59b..7c60ccd61a3e 100644 --- a/net/netfilter/nfnetlink_queue_core.c +++ b/net/netfilter/nfnetlink_queue_core.c | |||
@@ -665,7 +665,7 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum) | |||
665 | * returned by nf_queue. For instance, callers rely on -ECANCELED to | 665 | * returned by nf_queue. For instance, callers rely on -ECANCELED to |
666 | * mean 'ignore this hook'. | 666 | * mean 'ignore this hook'. |
667 | */ | 667 | */ |
668 | if (IS_ERR(segs)) | 668 | if (IS_ERR_OR_NULL(segs)) |
669 | goto out_err; | 669 | goto out_err; |
670 | queued = 0; | 670 | queued = 0; |
671 | err = 0; | 671 | err = 0; |