DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] common/cnxk: fix missing null check in IPv6 flow parsing
@ 2022-01-25  4:12 psatheesh
  2022-02-17  4:34 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: psatheesh @ 2022-01-25  4:12 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, Satheesh Paul, stable, Jerin Jacob Kollanukkaran

From: Satheesh Paul <psatheesh@marvell.com>

Added null check in IPv6 flow pattern parsing.

Fixes: a55dc02af5 ("common/cnxk: support extensions attributes in IPv6 item")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index 1f21693369..302ab66efc 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -562,9 +562,11 @@ npc_parse_lc(struct npc_parse_state *pst)
 		ipv6_spec = pst->pattern->spec;
 		lid = NPC_LID_LC;
 		lt = NPC_LT_LC_IP6;
-		rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
-		if (rc)
-			return rc;
+		if (ipv6_spec) {
+			rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
+			if (rc)
+				return rc;
+		}
 		info.len = sizeof(ipv6_spec->hdr);
 		break;
 	case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4:
-- 
2.25.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] common/cnxk: fix missing null check in IPv6 flow parsing
  2022-01-25  4:12 [dpdk-dev] [PATCH] common/cnxk: fix missing null check in IPv6 flow parsing psatheesh
@ 2022-02-17  4:34 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2022-02-17  4:34 UTC (permalink / raw)
  To: Satheesh Paul
  Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	dpdk-dev, dpdk stable, Jerin Jacob Kollanukkaran

On Tue, Jan 25, 2022 at 9:43 AM <psatheesh@marvell.com> wrote:
>
> From: Satheesh Paul <psatheesh@marvell.com>
>
> Added null check in IPv6 flow pattern parsing.
>
> Fixes: a55dc02af5 ("common/cnxk: support extensions attributes in IPv6 item")

The changeset is not correct.

> Cc: stable@dpdk.org
>
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
> Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>


Updated the git commit as follows and Applied to
dpdk-next-net-mrvl/for-next-net. Thanks

    common/cnxk: fix null access in IPv6 flow parsing

    Added null check in IPv6 flow pattern parsing.

    Fixes: 474e275b1bc6 ("common/cnxk: support extensions attributes
in IPv6 item")
    Cc: stable@dpdk.org

    Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
    Reviewed-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  drivers/common/cnxk/roc_npc_parse.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
> index 1f21693369..302ab66efc 100644
> --- a/drivers/common/cnxk/roc_npc_parse.c
> +++ b/drivers/common/cnxk/roc_npc_parse.c
> @@ -562,9 +562,11 @@ npc_parse_lc(struct npc_parse_state *pst)
>                 ipv6_spec = pst->pattern->spec;
>                 lid = NPC_LID_LC;
>                 lt = NPC_LT_LC_IP6;
> -               rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
> -               if (rc)
> -                       return rc;
> +               if (ipv6_spec) {
> +                       rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags);
> +                       if (rc)
> +                               return rc;
> +               }
>                 info.len = sizeof(ipv6_spec->hdr);
>                 break;
>         case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4:
> --
> 2.25.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-17  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25  4:12 [dpdk-dev] [PATCH] common/cnxk: fix missing null check in IPv6 flow parsing psatheesh
2022-02-17  4:34 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).