Commit 670e23ce authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-ohci: plug dma memory leak in AR handler
parents 10027471 6b84236d
...@@ -401,7 +401,8 @@ static void ar_context_tasklet(unsigned long data) ...@@ -401,7 +401,8 @@ static void ar_context_tasklet(unsigned long data)
if (d->res_count == 0) { if (d->res_count == 0) {
size_t size, rest, offset; size_t size, rest, offset;
dma_addr_t buffer_bus; dma_addr_t start_bus;
void *start;
/* /*
* This descriptor is finished and we may have a * This descriptor is finished and we may have a
...@@ -410,9 +411,9 @@ static void ar_context_tasklet(unsigned long data) ...@@ -410,9 +411,9 @@ static void ar_context_tasklet(unsigned long data)
*/ */
offset = offsetof(struct ar_buffer, data); offset = offsetof(struct ar_buffer, data);
buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset; start = buffer = ab;
start_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
buffer = ab;
ab = ab->next; ab = ab->next;
d = &ab->descriptor; d = &ab->descriptor;
size = buffer + PAGE_SIZE - ctx->pointer; size = buffer + PAGE_SIZE - ctx->pointer;
...@@ -427,7 +428,7 @@ static void ar_context_tasklet(unsigned long data) ...@@ -427,7 +428,7 @@ static void ar_context_tasklet(unsigned long data)
buffer = handle_ar_packet(ctx, buffer); buffer = handle_ar_packet(ctx, buffer);
dma_free_coherent(ohci->card.device, PAGE_SIZE, dma_free_coherent(ohci->card.device, PAGE_SIZE,
buffer, buffer_bus); start, start_bus);
ar_context_add_page(ctx); ar_context_add_page(ctx);
} else { } else {
buffer = ctx->pointer; buffer = ctx->pointer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment