]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fm10k: add call to fm10k_clean_all_rx_rings in fm10k_down
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 Jun 2015 23:31:02 +0000 (16:31 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:03:00 +0000 (22:03 -0800)
commit758eb364814f2d9ee21d2e4e82a786fdd456a080
tree7c2e5b8686041978520b29e93ffb22941b000260
parent36e284bb1dbeaaca42a1e61f09562e6fd117f0ab
fm10k: add call to fm10k_clean_all_rx_rings in fm10k_down

This prevents a memory leak in fm10k_set_ringparams. The leak occurs
because we go down, change ring parameters, and then come up. However,
fm10k_down on its own is not clearing the Rx rings. Since fm10k_up
assumes the rings are clean we basically drop the buffers and leak a
bunch of memory. Eventually we hit dirty page faults and reboot the
system. This issue does not occur elsewhere because other flows that
involve fm10k_down go through fm10k_close which immediately called
fm10k_free_all_rx_resources which properly cleans the rings.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit ec6acb801e7b2908c24a60c8aabf47c3e40508a4)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c