Message ID | YM321r7Enw8sGj0X@mwanda |
---|---|
State | New |
Headers | show |
Series | [net-next] nfp: flower-ct: check for error in nfp_fl_ct_offload_nft_flow() | expand |
On 2021/06/19 15:53, Dan Carpenter wrote: > The nfp_fl_ct_add_flow() function can fail so we need to check for > failure. > > Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Ah, of course, thank you. Reviewed-by: Louis Peens <louis.peens@corigine.com> > --- > drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c > index 9ea77bb3b69c..273d529d43c2 100644 > --- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c > +++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c > @@ -1067,6 +1067,8 @@ nfp_fl_ct_offload_nft_flow(struct nfp_fl_ct_zone_entry *zt, struct flow_cls_offl > nfp_ct_map_params); > if (!ct_map_ent) { > ct_entry = nfp_fl_ct_add_flow(zt, NULL, flow, true, extack); > + if (IS_ERR(ct_entry)) > + return PTR_ERR(ct_entry); > ct_entry->type = CT_TYPE_NFT; > list_add(&ct_entry->list_node, &zt->nft_flows_list); > zt->nft_flows_count++; >
On Mon, Jun 21, 2021 at 07:15:08AM +0200, Louis Peens wrote: > > > On 2021/06/19 15:53, Dan Carpenter wrote: > > The nfp_fl_ct_add_flow() function can fail so we need to check for > > failure. > > > > Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list") > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > Ah, of course, thank you. > Reviewed-by: Louis Peens <louis.peens@corigine.com> Likewise, thanks. Reviewed-by: Simon Horman <simon.horman@corigine.com>
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sat, 19 Jun 2021 16:53:26 +0300 you wrote: > The nfp_fl_ct_add_flow() function can fail so we need to check for > failure. > > Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 2 ++ > 1 file changed, 2 insertions(+) Here is the summary with links: - [net-next] nfp: flower-ct: check for error in nfp_fl_ct_offload_nft_flow() https://git.kernel.org/netdev/net-next/c/43c9a8111680 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c index 9ea77bb3b69c..273d529d43c2 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c +++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c @@ -1067,6 +1067,8 @@ nfp_fl_ct_offload_nft_flow(struct nfp_fl_ct_zone_entry *zt, struct flow_cls_offl nfp_ct_map_params); if (!ct_map_ent) { ct_entry = nfp_fl_ct_add_flow(zt, NULL, flow, true, extack); + if (IS_ERR(ct_entry)) + return PTR_ERR(ct_entry); ct_entry->type = CT_TYPE_NFT; list_add(&ct_entry->list_node, &zt->nft_flows_list); zt->nft_flows_count++;
The nfp_fl_ct_add_flow() function can fail so we need to check for failure. Fixes: 95255017e0a8 ("nfp: flower-ct: add nft flows to nft list") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 2 ++ 1 file changed, 2 insertions(+)