Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127097
b: refs/heads/master
c: 49946e7
h: refs/heads/master
i:
  127095: 128bdea
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Jan 7, 2009
1 parent 8623ce6 commit 6ccface
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9e0020d49587b1b214d65256a88a2978329aefe
refs/heads/master: 49946e7329fa38d79aed1a9ef4a64c320ada305d
13 changes: 10 additions & 3 deletions trunk/arch/blackfin/kernel/bfin_dma_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,18 @@ void *dma_memcpy(void *dest, const void *src, size_t size)
}
EXPORT_SYMBOL(dma_memcpy);

/**
* safe_dma_memcpy - DMA memcpy w/argument checking
*
* Verify arguments are safe before heading to dma_memcpy().
*/
void *safe_dma_memcpy(void *dest, const void *src, size_t size)
{
void *addr;
addr = dma_memcpy(dest, src, size);
return addr;
if (!access_ok(VERIFY_WRITE, dst, size))
return NULL;
if (!access_ok(VERIFY_READ, src, size))
return NULL;
return dma_memcpy(dst, src, size);
}
EXPORT_SYMBOL(safe_dma_memcpy);

Expand Down

0 comments on commit 6ccface

Please sign in to comment.