* [PATCH] kdbus: fix sparse address-space annotation
@ 2015-07-24 10:57 David Herrmann
0 siblings, 0 replies; only message in thread
From: David Herrmann @ 2015-07-24 10:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg KH, Daniel Mack, Djalal Harouni, David Herrmann
Make sure to properly annotate casts in 'struct iovec' if we cross
address-spaces, to make sure sparse does not warn about them.
All those conversions are fine, as we are allowed to pass those kvecs
through the iovec importer.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
---
ipc/kdbus/message.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ipc/kdbus/message.c b/ipc/kdbus/message.c
index 3520f45..27a5021 100644
--- a/ipc/kdbus/message.c
+++ b/ipc/kdbus/message.c
@@ -920,7 +920,7 @@ struct kdbus_pool_slice *kdbus_staging_emit(struct kdbus_staging *staging,
/* msg.size */
v->iov_len = sizeof(msg_size);
- v->iov_base = &msg_size;
+ v->iov_base = (void __user *)&msg_size;
++v;
/* msg (after msg.size) plus items */
@@ -937,7 +937,7 @@ struct kdbus_pool_slice *kdbus_staging_emit(struct kdbus_staging *staging,
if (meta_size > 0) {
/* metadata items */
v->iov_len = meta_size;
- v->iov_base = meta_items;
+ v->iov_base = (void __user *)meta_items;
++v;
/* padding after metadata */
--
2.4.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-24 11:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-24 10:57 [PATCH] kdbus: fix sparse address-space annotation David Herrmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®