Prev: [84/89] tmpfs: handle MPOL_LOCAL mount option properly
Next: [80/89] coredump: suppress uid comparison test if core output files are pipes
From: Greg KH on 30 Mar 2010 19:20 2.6.31-stable review patch. If anyone has any objections, please let us know. ------------------ From: Neil Turton <nturton(a)solarflare.com> commit a7ebd27a13757248863cd61e541af7fa9e7727ee upstream. We need buffer->len to remain valid to work out the correct address to be unmapped. We therefore need to clear buffer->len after the unmap operation. Signed-off-by: Ben Hutchings <bhutchings(a)solarflare.com> Signed-off-by: David S. Miller <davem(a)davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/net/sfc/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c @@ -823,8 +823,6 @@ static void efx_enqueue_unwind(struct ef tx_queue->efx->type->txd_ring_mask]; efx_tsoh_free(tx_queue, buffer); EFX_BUG_ON_PARANOID(buffer->skb); - buffer->len = 0; - buffer->continuation = true; if (buffer->unmap_len) { unmap_addr = (buffer->dma_addr + buffer->len - buffer->unmap_len); @@ -838,6 +836,8 @@ static void efx_enqueue_unwind(struct ef PCI_DMA_TODEVICE); buffer->unmap_len = 0; } + buffer->len = 0; + buffer->continuation = true; } } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |