projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4997b72
)
scatterlist: sg_set_buf() argument must be in linear mapping
author
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 30 May 2013 07:19:35 +0000
(09:19 +0200)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 30 May 2013 07:20:20 +0000
(09:20 +0200)
Add a check behind CONFIG_DEBUG_SG to verify this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/scatterlist.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/scatterlist.h
b/include/linux/scatterlist.h
index 5951e3f38878398d36eef96e0482ebae15bf8409..26806775b11b3932711bc796d1284171d92f58fb 100644
(file)
--- a/
include/linux/scatterlist.h
+++ b/
include/linux/scatterlist.h
@@
-111,6
+111,9
@@
static inline struct page *sg_page(struct scatterlist *sg)
static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
unsigned int buflen)
{
+#ifdef CONFIG_DEBUG_SG
+ BUG_ON(!virt_addr_valid(buf));
+#endif
sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
}