netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ixgbevf: bug in error handling
@ 2010-03-11 10:33 Dan Carpenter
  2010-03-11 16:58 ` Rose, Gregory V
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-03-11 10:33 UTC (permalink / raw)
  To: Greg Rose; +Cc: netdev, kernel-janitors

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

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

* RE: ixgbevf: bug in error handling
  2010-03-11 10:33 ixgbevf: bug in error handling Dan Carpenter
@ 2010-03-11 16:58 ` Rose, Gregory V
  0 siblings, 0 replies; 2+ messages in thread
From: Rose, Gregory V @ 2010-03-11 16:58 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org

>-----Original Message-----
>From: Dan Carpenter [mailto:error27@gmail.com]
>Sent: Thursday, March 11, 2010 2:33 AM
>To: Rose, Gregory V
>Cc: netdev@vger.kernel.org; kernel-janitors@vger.kernel.org
>Subject: ixgbevf: bug in error handling
>
>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

Ouch.  Good catch, we'll fix that right away.

- Greg


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

end of thread, other threads:[~2010-03-11 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 10:33 ixgbevf: bug in error handling Dan Carpenter
2010-03-11 16:58 ` Rose, Gregory V

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