DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/nfp: check value returned
@ 2019-04-08 10:10 Alejandro Lucero
  2019-04-08 10:10 ` Alejandro Lucero
  2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 2 replies; 6+ messages in thread
From: Alejandro Lucero @ 2019-04-08 10:10 UTC (permalink / raw)
  To: dev; +Cc: stable

If the call to _nfp6000_cppat_mu_locality fails, the function needs
to return with an error.

Coverity issue: 277215
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
index 6e380cca0..538f882bf 100644
--- a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
+++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
@@ -368,6 +368,9 @@ _nfp6000_encode_mu(uint64_t *addr, int dest_island, int mode, int addr40,
 	isld[1] = isld1;
 	locality_lsb = _nfp6000_cppat_mu_locality_lsb(mode, addr40);
 
+	if (locality_lsb < 0)
+		return NFP_ERRNO(EINVAL);
+
 	if (((*addr >> locality_lsb) & 3) == _NIC_NFP6000_MU_LOCALITY_DIRECT)
 		da = 1;
 	else
-- 
2.17.1

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

* [dpdk-dev] [PATCH] net/nfp: check value returned
  2019-04-08 10:10 [dpdk-dev] [PATCH] net/nfp: check value returned Alejandro Lucero
@ 2019-04-08 10:10 ` Alejandro Lucero
  2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  1 sibling, 0 replies; 6+ messages in thread
From: Alejandro Lucero @ 2019-04-08 10:10 UTC (permalink / raw)
  To: dev; +Cc: stable

If the call to _nfp6000_cppat_mu_locality fails, the function needs
to return with an error.

Coverity issue: 277215
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
index 6e380cca0..538f882bf 100644
--- a/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
+++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_cppat.h
@@ -368,6 +368,9 @@ _nfp6000_encode_mu(uint64_t *addr, int dest_island, int mode, int addr40,
 	isld[1] = isld1;
 	locality_lsb = _nfp6000_cppat_mu_locality_lsb(mode, addr40);
 
+	if (locality_lsb < 0)
+		return NFP_ERRNO(EINVAL);
+
 	if (((*addr >> locality_lsb) & 3) == _NIC_NFP6000_MU_LOCALITY_DIRECT)
 		da = 1;
 	else
-- 
2.17.1


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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check value returned
  2019-04-08 10:10 [dpdk-dev] [PATCH] net/nfp: check value returned Alejandro Lucero
  2019-04-08 10:10 ` Alejandro Lucero
@ 2019-04-08 16:31 ` Ferruh Yigit
  2019-04-08 16:31   ` Ferruh Yigit
  1 sibling, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:31 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 11:10 AM, Alejandro Lucero wrote:
> If the call to _nfp6000_cppat_mu_locality fails, the function needs
> to return with an error.
> 
> Coverity issue: 277215
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check value returned
  2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-04-08 16:31   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:31 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 11:10 AM, Alejandro Lucero wrote:
> If the call to _nfp6000_cppat_mu_locality fails, the function needs
> to return with an error.
> 
> Coverity issue: 277215
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check value returned
  2019-04-08  9:59 [dpdk-dev] " Alejandro Lucero
@ 2019-04-08 16:31 ` Ferruh Yigit
  2019-04-08 16:31   ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:31 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 10:59 AM, Alejandro Lucero wrote:
> Call to CPP read can fail.
> 
> Coverity issue: 277209
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/nfp: check value returned
  2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-04-08 16:31   ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2019-04-08 16:31 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 4/8/2019 10:59 AM, Alejandro Lucero wrote:
> Call to CPP read can fail.
> 
> Coverity issue: 277209
> Fixes: c7e9729da6b5 ("net/nfp: support CPP")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

Applied to dpdk-next-net/master, thanks.

(squashed with other return value check patches, since all are fixing same
commit there wouldn't be any backport concern)

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

end of thread, other threads:[~2019-04-08 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 10:10 [dpdk-dev] [PATCH] net/nfp: check value returned Alejandro Lucero
2019-04-08 10:10 ` Alejandro Lucero
2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-08 16:31   ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2019-04-08  9:59 [dpdk-dev] " Alejandro Lucero
2019-04-08 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-08 16:31   ` Ferruh Yigit

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