diff options
author | Joel Stanley <joel@jms.id.au> | 2014-02-13 05:33:46 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-03-13 01:53:25 +0100 |
commit | 6abb2dd92868927c1d680546b9d13f208373d517 (patch) | |
tree | 1b0be2f8e4d5d863b60b2b3258fcf78d93580797 | |
parent | tools/virtio: update internal copies of headers (diff) | |
download | linux-6abb2dd92868927c1d680546b9d13f208373d517.tar.xz linux-6abb2dd92868927c1d680546b9d13f208373d517.zip |
tools/virtio: fix missing kmemleak_ignore symbol
In commit bb478d8b167 virtio_ring: plug kmemleak false positive,
kmemleak_ignore was introduced. This broke compilation of virtio_test:
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
-U_FORTIFY_SOURCE -c -o virtio_ring.o ../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c: In function ‘vring_add_indirect’:
../../drivers/virtio/virtio_ring.c:177:2: warning: implicit declaration
of function ‘kmemleak_ignore’ [-Wimplicit-function-declaration]
kmemleak_ignore(desc);
^
cc virtio_test.o virtio_ring.o -o virtio_test
virtio_ring.o: In function `vring_add_indirect':
tools/virtio/../../drivers/virtio/virtio_ring.c:177:
undefined reference to `kmemleak_ignore'
Add a dummy header for tools/virtio, and add #incldue <linux/kmemleak.h>
to drivers/virtio/virtio_ring.c so it is picked up by the userspace
tools.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | drivers/virtio/virtio_ring.c | 1 | ||||
-rw-r--r-- | tools/virtio/linux/kmemleak.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 28b5338fff71..7ae3cba2f624 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -23,6 +23,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/hrtimer.h> +#include <linux/kmemleak.h> #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ diff --git a/tools/virtio/linux/kmemleak.h b/tools/virtio/linux/kmemleak.h new file mode 100644 index 000000000000..c07072270e2f --- /dev/null +++ b/tools/virtio/linux/kmemleak.h @@ -0,0 +1,3 @@ +static inline void kmemleak_ignore(const void *ptr) +{ +} |