netfilter: nf_flow_table: fix missing error check for rhashtable_insert_fast
authorTaehee Yoo <ap420073@gmail.com>
Thu, 2 May 2019 16:56:38 +0000 (01:56 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:54:05 +0000 (11:54 +0200)
commitd0941980fd81bf795400abd533831d348f08a8e2
tree681b2595b829444cfaddd487d12f556d11d68bb4
parent217ec4a6e4ef075a784957b1adcb5c1e3283e911
netfilter: nf_flow_table: fix missing error check for rhashtable_insert_fast

[ Upstream commit 43c8f131184faf20c07221f3e09724611c6525d8 ]

rhashtable_insert_fast() may return an error value when memory
allocation fails, but flow_offload_add() does not check for errors.
This patch just adds missing error checking.

Fixes: ac2a66665e23 ("netfilter: add generic flow table infrastructure")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_flow_table_core.c