]> git.baikalelectronics.ru Git - kernel.git/commit
igb: fix memory leak when setting ring size while interface is down
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 26 Oct 2009 11:31:47 +0000 (11:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Oct 2009 23:08:56 +0000 (16:08 -0700)
commitac2b98d1029fcd79007d36410479a6a6d47bf5b7
treeae459220577e6435473a7a94e0a32947b826bf5b
parent93258a48d723145dbb2278cdb625d142379c0468
igb: fix memory leak when setting ring size while interface is down

Changing ring sizes while the interface was down was causing a double
allocation of the receive and transmit rings.  This issue is amplified when
there are multiple rings enabled.  To prevent this we need to add an
additional check which will just update the ring counts when the interface
is not up and skip the allocation steps.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/igb_ethtool.c