Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbbGXLAx (ORCPT ); Fri, 24 Jul 2015 07:00:53 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:37624 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbbGXLAu (ORCPT ); Fri, 24 Jul 2015 07:00:50 -0400 From: David Herrmann To: linux-kernel@vger.kernel.org Cc: Greg KH , Daniel Mack , Djalal Harouni , David Herrmann Subject: [PATCH] kdbus: fix sparse address-space annotation Date: Fri, 24 Jul 2015 12:57:20 +0200 Message-Id: <1437735440-8160-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.4.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1309 Lines: 41 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/