]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/scatterlist.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[karo-tx-linux.git] / include / linux / scatterlist.h
index 5951e3f38878398d36eef96e0482ebae15bf8409..26806775b11b3932711bc796d1284171d92f58fb 100644 (file)
@@ -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));
 }