Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754330AbaGJV5a (ORCPT ); Thu, 10 Jul 2014 17:57:30 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:46148 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321AbaGJV5Z (ORCPT ); Thu, 10 Jul 2014 17:57:25 -0400 From: Oded Gabbay X-Google-Original-From: Oded Gabbay To: David Airlie , Alex Deucher , Jerome Glisse Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, John Bridgman , Andrew Lewycky , Joerg Roedel , Ben Goz , Oded Gabbay Subject: [PATCH 74/83] hsa/radeon: Adding some error messages Date: Fri, 11 Jul 2014 00:54:30 +0300 Message-Id: <1405029279-6894-46-git-send-email-oded.gabbay@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> References: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Goz Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/hsa/radeon/kfd_chardev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/hsa/radeon/kfd_chardev.c b/drivers/gpu/hsa/radeon/kfd_chardev.c index 09c9a61..be89d26 100644 --- a/drivers/gpu/hsa/radeon/kfd_chardev.c +++ b/drivers/gpu/hsa/radeon/kfd_chardev.c @@ -137,11 +137,15 @@ kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, void __user *a if (copy_from_user(&args, arg, sizeof(args))) return -EFAULT; - if (!access_ok(VERIFY_WRITE, args.read_pointer_address, sizeof(qptr_t))) + if (!access_ok(VERIFY_WRITE, args.read_pointer_address, sizeof(qptr_t))) { + pr_err("kfd: can't access read pointer"); return -EFAULT; + } - if (!access_ok(VERIFY_WRITE, args.write_pointer_address, sizeof(qptr_t))) + if (!access_ok(VERIFY_WRITE, args.write_pointer_address, sizeof(qptr_t))) { + pr_err("kfd: can't access write pointer"); return -EFAULT; + } q_properties.is_interop = false; q_properties.queue_percent = args.queue_percentage; -- 1.9.1 -- 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/