Message ID | 1464877517-28337-2-git-send-email-alexander.deucher@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA4D160221 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 2 Jun 2016 14:25:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB534282E8 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 2 Jun 2016 14:25:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C043D28304; Thu, 2 Jun 2016 14:25:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88C78282E8 for <patchwork-dri-devel@patchwork.kernel.org>; Thu, 2 Jun 2016 14:25:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D11E56EBB1; Thu, 2 Jun 2016 14:25:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-x242.google.com (mail-qg0-x242.google.com [IPv6:2607:f8b0:400d:c04::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2EEF06EBB1 for <dri-devel@lists.freedesktop.org>; Thu, 2 Jun 2016 14:25:24 +0000 (UTC) Received: by mail-qg0-x242.google.com with SMTP id t106so16045152qgt.2 for <dri-devel@lists.freedesktop.org>; Thu, 02 Jun 2016 07:25:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=250MoJsWQZTxB4HKo6noQBpXt++O9X1JN2EA5Ldnobs=; b=MfdwZ4nXO5s36AX+LSmlbdm3JG2qcBfXhUR64XsXBpMFayMRTblF7xLVSSqswFhb6Q h7HrpYU1R60o+vif3P7c5CuLm1J8P0/oLZuEIfiDvUJpEKXoGoF8wIYii/I5f/dYpSOy ANyxhjbYacKenh5N7ij/HMwqhllWgZLa+qHiL+qBM1F8ltYh+d6r2ZmhMGE4tCOaZxXK T7/oyTIzcQ15Nj1CZ/2E0WlO8CzW6LT/8TXT4Hloa/+TGK6+wCtovzM6n3MJ2ObiYwi5 XXeSFyUtbEvQOMB76aSILPdlm2AgW0eJadcbbXKUoW8HermsSMXJPstlo0DxrMkrJL5Y d64g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=250MoJsWQZTxB4HKo6noQBpXt++O9X1JN2EA5Ldnobs=; b=HelEhtFFhzBjgGnIGfs1LtPAEfE3qCRE9+ia24bPXP43EEfVMqgk4k4rMR64thNbdk 8gcZgwIUVz82Xe9H4TczmW2ROiumceC6lG2a+2m22X5qDtioJUaN/PMCZIvn/WvJrETK CGV35MiYj1V+khWg55wDowH2Q/u2TxI2vJ+joNQJOAO3GVacYQlGDzWIqTD7Dz0qIMfw 6PuXm0OZZ2c133dj3SfKVZ00GutkTRBv/jiEeQr4tAWbWM7U+veznc5KrNZXjwByYGYV WL6XKWA+mJRxCUpCpsutajsu6kd71LGpFvl3Hre4FuIQu+IpNS3eUIXttIoDp7qCfNbn Xftw== X-Gm-Message-State: ALyK8tI4IJ26GkS13c5esYNBt5YG4Ewfp579SKyVyMxTKo4tPz6Jin3AdtOH3eYZImtTbg== X-Received: by 10.140.133.5 with SMTP id 5mr44206548qhf.19.1464877522934; Thu, 02 Jun 2016 07:25:22 -0700 (PDT) Received: from cm.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id k6sm10306270qkc.42.2016.06.02.07.25.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2016 07:25:22 -0700 (PDT) From: Alex Deucher <alexdeucher@gmail.com> X-Google-Original-From: Alex Deucher <alexander.deucher@amd.com> To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/amd/amdgpu: ring debugfs is read in increments of 4 bytes Date: Thu, 2 Jun 2016 10:25:16 -0400 Message-Id: <1464877517-28337-2-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464877517-28337-1-git-send-email-alexander.deucher@amd.com> References: <1464877517-28337-1-git-send-email-alexander.deucher@amd.com> MIME-Version: 1.0 Cc: Tom St Denis <tom.stdenis@amd.com>, Alex Deucher <alexander.deucher@amd.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 7e1bc73..1b0b7ae 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -379,7 +379,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf, int r, i; uint32_t value, result, early[3]; - if (*pos & 3) + if (*pos & 3 || size & 3) return -EINVAL; result = 0;