DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: "Liang, Cunming" <cunming.liang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] eal: fix negative value incorrectly being	used defect
Date: Fri, 11 Dec 2015 14:40:21 +0000	[thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE20240343E@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1449798537-3221-1-git-send-email-cunming.liang@intel.com>

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Cunming Liang
> Sent: Friday, December 11, 2015 1:49 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v1] eal: fix negative value incorrectly being
> used defect
> 
> In eal_intr_proc_rxtx_intr, negative value may be used as argument to a
> function expecting a positive value. If 'read' returns EAGAIN as example,
> the bytes_read updates to a negative value which continue be passed as
> argument for the next 'read'.
> 
> Coverity issue: 107115
> 
> 927        do {
>     3. negative_return_fn: Function read(fd, &buf, bytes_read) returns a
> negative number.
>     4. var_assign: Assigning: signed variable bytes_read = read.
>     CID 107115 (#1 of 1): Argument cannot be negative
>     (NEGATIVE_RETURNS)9. negative_returns: bytes_read is passed to a
> parameter
>     that cannot be negative.
> 928                bytes_read = read(fd, &buf, bytes_read);
> 
> Fixes: c9f3ec1a0f3f ("eal/linux: add Rx interrupt control function")
> 
> Signed-off-by: Cunming Liang <cunming.liang@intel.com>

Acked-by: John McNamara <john.mcnamara@intel.com>

  reply	other threads:[~2015-12-11 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11  1:48 Cunming Liang
2015-12-11 14:40 ` Mcnamara, John [this message]
2015-12-11 14:54 ` David Marchand
2015-12-12 21:03   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B27915DBBA3421428155699D51E4CFE20240343E@IRSMSX103.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).