DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/bond: add mbuf alloc check
@ 2018-01-22 16:36 Radu Nicolau
  2018-01-23 17:42 ` Mcnamara, John
  2018-01-24 13:16 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
  0 siblings, 2 replies; 4+ messages in thread
From: Radu Nicolau @ 2018-01-22 16:36 UTC (permalink / raw)
  To: dev; +Cc: marko.kovacevic, john.mcnamara, declan.doherty, Radu Nicolau

Fixes Coverity issue 257008

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/bond/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index 01e5eda..6c8a44a 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -441,6 +441,11 @@ static void cmd_obj_send_parsed(void *parsed_result,
 				(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
 
 	created_pkt = rte_pktmbuf_alloc(mbuf_pool);
+	if (created_pkt == NULL) {
+		cmdline_printf(cl, "Failed to allocate mbuf\n");
+		return;
+	}
+
 	pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
 	created_pkt->data_len = pkt_size;
 	created_pkt->pkt_len = pkt_size;
-- 
2.7.5

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

* Re: [dpdk-dev] [PATCH] examples/bond: add mbuf alloc check
  2018-01-22 16:36 [dpdk-dev] [PATCH] examples/bond: add mbuf alloc check Radu Nicolau
@ 2018-01-23 17:42 ` Mcnamara, John
  2018-01-24 13:16 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
  1 sibling, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2018-01-23 17:42 UTC (permalink / raw)
  To: Nicolau, Radu, dev; +Cc: Kovacevic, Marko, Doherty, Declan



> -----Original Message-----
> From: Nicolau, Radu
> Sent: Monday, January 22, 2018 4:37 PM
> To: dev@dpdk.org
> Cc: Kovacevic, Marko <marko.kovacevic@intel.com>; Mcnamara, John
> <john.mcnamara@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> Nicolau, Radu <radu.nicolau@intel.com>
> Subject: [PATCH] examples/bond: add mbuf alloc check
> 
> Fixes Coverity issue 257008
> 

Hi Radu,

You should also include the fixes line in the commit message and CC stable@dpdk.org as well:

    Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
    Coverity issue: 257008
    Cc: stable@dpdk.org

John

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

* [dpdk-dev] [PATCH v2] examples/bond: add mbuf alloc check
  2018-01-22 16:36 [dpdk-dev] [PATCH] examples/bond: add mbuf alloc check Radu Nicolau
  2018-01-23 17:42 ` Mcnamara, John
@ 2018-01-24 13:16 ` Radu Nicolau
  2018-02-01  0:21   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Radu Nicolau @ 2018-01-24 13:16 UTC (permalink / raw)
  To: dev; +Cc: marko.kovacevic, john.mcnamara, declan.doherty, Radu Nicolau, stable

Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
Coverity issue: 257008
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: updated commit message

 examples/bond/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index 01e5eda..6c8a44a 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -441,6 +441,11 @@ static void cmd_obj_send_parsed(void *parsed_result,
 				(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
 
 	created_pkt = rte_pktmbuf_alloc(mbuf_pool);
+	if (created_pkt == NULL) {
+		cmdline_printf(cl, "Failed to allocate mbuf\n");
+		return;
+	}
+
 	pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
 	created_pkt->data_len = pkt_size;
 	created_pkt->pkt_len = pkt_size;
-- 
2.7.5

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] examples/bond: add mbuf alloc check
  2018-01-24 13:16 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
@ 2018-02-01  0:21   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-02-01  0:21 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: stable, dev, marko.kovacevic, john.mcnamara, declan.doherty

24/01/2018 14:16, Radu Nicolau:
> Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")
> Coverity issue: 257008
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Applied, thanks

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

end of thread, other threads:[~2018-02-01  0:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 16:36 [dpdk-dev] [PATCH] examples/bond: add mbuf alloc check Radu Nicolau
2018-01-23 17:42 ` Mcnamara, John
2018-01-24 13:16 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-02-01  0:21   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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).