]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mlx4: fix DMA mapping leak when allocation fails
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Mon, 6 Feb 2012 08:39:50 +0000 (08:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2012 19:42:28 +0000 (14:42 -0500)
commit7e2eb99cc6207e4464f018f72c67c55f2b1c93a4
treeb5c9c43fb5da09326e96525e3820927b22741845
parent68355f71132bec25e0d89b2d8d3ed01286307d31
mlx4: fix DMA mapping leak when allocation fails

mlx4_en_prepare_rx_desc does not correctly clean up after it finds an
allocation failure. It should unmap a page before calling put_page, but
it only calls the later.

This bug would prevent a device removal using hotplug after setting the
device MTU to 9000 and opening the network interface. After the fix, we
still see the allocation failure with MTU 9000, but we are able to
remove the device.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c