DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
@ 2017-10-03 11:48 Kuba Kozak
  2017-10-10  6:55 ` Yang, Zhiyong
  2017-10-13 22:41 ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Kuba Kozak @ 2017-10-03 11:48 UTC (permalink / raw)
  To: konstantin.ananyev; +Cc: dev, Kuba Kozak, stable

Add return value check and error handling for fseek call.

Coverity issue: 143435
Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
Cc: konstantin.ananyev@intel.com
Cc: stable@dpdk.org

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 examples/l3fwd-acl/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 8eff4de..708e9eb 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -1026,6 +1026,7 @@ add_rules(const char *rule_path,
 	char buff[LINE_MAX];
 	FILE *fh = fopen(rule_path, "rb");
 	unsigned int i = 0;
+	int val;
 
 	if (fh == NULL)
 		rte_exit(EXIT_FAILURE, "%s: Open %s failed\n", __func__,
@@ -1042,7 +1043,11 @@ add_rules(const char *rule_path,
 		rte_exit(EXIT_FAILURE, "Not find any route entries in %s!\n",
 				rule_path);
 
-	fseek(fh, 0, SEEK_SET);
+	val = fseek(fh, 0, SEEK_SET);
+	if (val < 0) {
+		rte_exit(EXIT_FAILURE, "%s: File seek operation failed\n",
+			__func__);
+	}
 
 	acl_rules = calloc(acl_num, rule_size);
 
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
  2017-10-03 11:48 [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value Kuba Kozak
@ 2017-10-10  6:55 ` Yang, Zhiyong
  2017-10-11  6:58   ` Kozak, KubaX
  2017-10-13 22:41 ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Yang, Zhiyong @ 2017-10-10  6:55 UTC (permalink / raw)
  To: Kozak, KubaX, Ananyev, Konstantin; +Cc: dev, Kozak, KubaX, stable

Hi,kubax,

When you form the patch , you should add v2 and changes in v2.
Besides that,  please be free to add 
Acked-by: zhiyong yang<zhiyong.yang@intel.com>

Thanks
Zhiyong

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kuba Kozak
> Sent: Tuesday, October 3, 2017 7:48 PM
> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> 
> Add return value check and error handling for fseek call.
> 
> Coverity issue: 143435
> Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
> Cc: konstantin.ananyev@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---

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

* Re: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
  2017-10-10  6:55 ` Yang, Zhiyong
@ 2017-10-11  6:58   ` Kozak, KubaX
  2017-10-11  7:07     ` Yang, Zhiyong
  0 siblings, 1 reply; 6+ messages in thread
From: Kozak, KubaX @ 2017-10-11  6:58 UTC (permalink / raw)
  To: Yang, Zhiyong, Ananyev, Konstantin; +Cc: dev, stable, Jastrzebski, MichalX K

Thanks Zhiyong,

Should I correct this patch and resend to dpdk or is it just a suggestion for future?

Regards,
Kuba

>-----Original Message-----
>From: Yang, Zhiyong
>Sent: Tuesday, October 10, 2017 08:56
>To: Kozak, KubaX <kubax.kozak@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>
>Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>; stable@dpdk.org
>Subject: RE: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
>
>Hi,kubax,
>
>When you form the patch , you should add v2 and changes in v2.
>Besides that,  please be free to add
>Acked-by: zhiyong yang<zhiyong.yang@intel.com>
>
>Thanks
>Zhiyong
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kuba Kozak
>> Sent: Tuesday, October 3, 2017 7:48 PM
>> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
>> Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>; stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
>>
>> Add return value check and error handling for fseek call.
>>
>> Coverity issue: 143435
>> Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
>> Cc: konstantin.ananyev@intel.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
>> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>> ---

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

* Re: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
  2017-10-11  6:58   ` Kozak, KubaX
@ 2017-10-11  7:07     ` Yang, Zhiyong
  2017-10-13 22:43       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Yang, Zhiyong @ 2017-10-11  7:07 UTC (permalink / raw)
  To: Kozak, KubaX, Ananyev, Konstantin
  Cc: dev, stable, Jastrzebski, MichalX K, Yigit, Ferruh, thomas

Hi Kuba,

Just a soft reminder.  :) 
Maintainers will make the decision.

Ferruh,  Thomas,

Your opinion?

Thanks
Zhiyong

> -----Original Message-----
> From: Kozak, KubaX
> Sent: Wednesday, October 11, 2017 2:58 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Jastrzebski, MichalX K
> <michalx.k.jastrzebski@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> 
> Thanks Zhiyong,
> 
> Should I correct this patch and resend to dpdk or is it just a suggestion for future?
> 
> Regards,
> Kuba
> 
> >-----Original Message-----
> >From: Yang, Zhiyong
> >Sent: Tuesday, October 10, 2017 08:56
> >To: Kozak, KubaX <kubax.kozak@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> >Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>; stable@dpdk.org
> >Subject: RE: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> >
> >Hi,kubax,
> >
> >When you form the patch , you should add v2 and changes in v2.
> >Besides that,  please be free to add
> >Acked-by: zhiyong yang<zhiyong.yang@intel.com>
> >
> >Thanks
> >Zhiyong
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kuba Kozak
> >> Sent: Tuesday, October 3, 2017 7:48 PM
> >> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> >> Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>;
> stable@dpdk.org
> >> Subject: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> >>
> >> Add return value check and error handling for fseek call.
> >>
> >> Coverity issue: 143435
> >> Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
> >> Cc: konstantin.ananyev@intel.com
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
> >> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> >> ---

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] l3fwd-acl: fix unchecked return value
  2017-10-03 11:48 [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value Kuba Kozak
  2017-10-10  6:55 ` Yang, Zhiyong
@ 2017-10-13 22:41 ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2017-10-13 22:41 UTC (permalink / raw)
  To: Kuba Kozak; +Cc: stable, konstantin.ananyev, dev

03/10/2017 13:48, Kuba Kozak:
> Add return value check and error handling for fseek call.
> 
> Coverity issue: 143435
> Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
> Cc: konstantin.ananyev@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks.

Cc: stable@dpdk.org is removed because it is not a real error.

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] l3fwd-acl: fix unchecked return value
  2017-10-11  7:07     ` Yang, Zhiyong
@ 2017-10-13 22:43       ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2017-10-13 22:43 UTC (permalink / raw)
  To: Kozak, KubaX
  Cc: Yang, Zhiyong, Ananyev, Konstantin, dev, Jastrzebski, MichalX K,
	Yigit, Ferruh

11/10/2017 09:07, Yang, Zhiyong:
> Hi Kuba,
> 
> Just a soft reminder.  :) 
> Maintainers will make the decision.
> 
> Ferruh,  Thomas,
> 
> Your opinion?

No need to re-send.

More comments:
- do not top reply
- title should start with examples/
- use --in-reply-to when sending a new version

Thanks


> > -----Original Message-----
> > From: Kozak, KubaX
> > Sent: Wednesday, October 11, 2017 2:58 PM
> > To: Yang, Zhiyong <zhiyong.yang@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org; Jastrzebski, MichalX K
> > <michalx.k.jastrzebski@intel.com>
> > Subject: RE: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> > 
> > Thanks Zhiyong,
> > 
> > Should I correct this patch and resend to dpdk or is it just a suggestion for future?
> > 
> > Regards,
> > Kuba
> > 
> > >-----Original Message-----
> > >From: Yang, Zhiyong
> > >Sent: Tuesday, October 10, 2017 08:56
> > >To: Kozak, KubaX <kubax.kozak@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>
> > >Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>; stable@dpdk.org
> > >Subject: RE: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> > >
> > >Hi,kubax,
> > >
> > >When you form the patch , you should add v2 and changes in v2.
> > >Besides that,  please be free to add
> > >Acked-by: zhiyong yang<zhiyong.yang@intel.com>
> > >
> > >Thanks
> > >Zhiyong
> > >
> > >> -----Original Message-----
> > >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kuba Kozak
> > >> Sent: Tuesday, October 3, 2017 7:48 PM
> > >> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> > >> Cc: dev@dpdk.org; Kozak, KubaX <kubax.kozak@intel.com>;
> > stable@dpdk.org
> > >> Subject: [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value
> > >>
> > >> Add return value check and error handling for fseek call.
> > >>
> > >> Coverity issue: 143435
> > >> Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl")
> > >> Cc: konstantin.ananyev@intel.com
> > >> Cc: stable@dpdk.org
> > >>
> > >> Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
> > >> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > >> ---
> 

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

end of thread, other threads:[~2017-10-13 22:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 11:48 [dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value Kuba Kozak
2017-10-10  6:55 ` Yang, Zhiyong
2017-10-11  6:58   ` Kozak, KubaX
2017-10-11  7:07     ` Yang, Zhiyong
2017-10-13 22:43       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2017-10-13 22:41 ` 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).