netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Greg Rose <gregory.v.rose@intel.com>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: ixgbevf: bug in error handling
Date: Thu, 11 Mar 2010 13:33:29 +0300	[thread overview]
Message-ID: <20100311103329.GO6321@bicker> (raw)

Hi Greg,

drivers/net/ixgbevf/ixgbevf_main.c +3013 ixgbevf_tx_map(96) warn: unsigned 'i' is never less than zero.
  3010          while (count >= 0) {
  3011                  count--;
  3012                  i--;
  3013                  if (i < 0)
  3014                          i += tx_ring->count;

	There is a problem here because i is unsigned and just wraps 
	around instead of being less than 0.

  3015                  tx_buffer_info = &tx_ring->tx_buffer_info[i];
  3016                  ixgbevf_unmap_and_free_tx_resource(adapter, tx_buffer_info);
  3017          }

regards,
dan carpenter

             reply	other threads:[~2010-03-11 10:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-11 10:33 Dan Carpenter [this message]
2010-03-11 16:58 ` ixgbevf: bug in error handling Rose, Gregory V

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=20100311103329.GO6321@bicker \
    --to=error27@gmail.com \
    --cc=gregory.v.rose@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.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).