Index: linux-2.6/include/linux/scatterlist.h =================================================================== --- linux-2.6.orig/include/linux/scatterlist.h 2007-06-27 17:00:19.000000000 -0700 +++ linux-2.6/include/linux/scatterlist.h 2007-06-27 17:02:13.000000000 -0700 @@ -16,6 +16,15 @@ static inline void sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) { + /* + * Putting slab objects onto a scatter gather + * list could be problematic. + * + * If a temporary buffer is needed then a page + * should be allocated and not a kmalloc + * entity. + */ + WARN_ON_ONCE(PageSlab(virt_to_page(buf))); memset(sg, 0, sizeof(*sg)); sg_set_buf(sg, buf, buflen); }