From patchwork Wed Mar 18 00:53:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ung X-Patchwork-Id: 451189 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CB3A4140119 for ; Wed, 18 Mar 2015 11:54:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753867AbbCRAyZ (ORCPT ); Tue, 17 Mar 2015 20:54:25 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:9310 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbbCRAyZ convert rfc822-to-8bit (ORCPT ); Tue, 17 Mar 2015 20:54:25 -0400 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Tue, 17 Mar 2015 17:54:41 -0700 Received: from hqemhub02.nvidia.com ([172.20.150.31]) by hqnvupgp07.nvidia.com (PGP Universal service); Tue, 17 Mar 2015 17:52:37 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Tue, 17 Mar 2015 17:52:37 -0700 Received: from DRUKMAIL101.nvidia.com (10.25.59.19) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.342.0; Tue, 17 Mar 2015 17:54:24 -0700 Received: from HQMAIL102.nvidia.com (172.18.146.10) by drukmail101.nvidia.com (10.25.59.19) with Microsoft SMTP Server (TLS) id 15.0.847.32; Wed, 18 Mar 2015 00:54:01 +0000 Received: from HQMAIL102.nvidia.com ([::1]) by HQMAIL102.nvidia.com ([fe80::9524:d59a:f703:bdba%19]) with mapi id 15.00.0847.030; Wed, 18 Mar 2015 00:53:46 +0000 From: David Ung To: "airlied@linux.ie" CC: "linux-tegra@vger.kernel.org" , "thierry.reding@gmail.com" , "swarren@wwwdotorg.org" , Arto Merilainen , Terje Bergstrom , "gnurou@gmail.com" Subject: RE: [PATCH V2 1/3] gpu: host1x: Reduce host1x job allocation size Thread-Topic: [PATCH V2 1/3] gpu: host1x: Reduce host1x job allocation size Thread-Index: AQHQV6/v+s7sD1zESU2Y0ID8/93MLp0hfHsM Date: Wed, 18 Mar 2015 00:53:45 +0000 Message-ID: <0e36c4295adc4f2daae9715cd0dde87d@HQMAIL102.nvidia.com> References: <1425606712-15986-1-git-send-email-davidu@nvidia.com> In-Reply-To: <1425606712-15986-1-git-send-email-davidu@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.20.13.39] MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org ping? Reviewed-by: Alexandre Courbot diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index 63bd63f..9c11265 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c @@ -46,8 +46,9 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch, (u64)num_unpins * sizeof(struct host1x_job_unpin_data) + (u64)num_waitchks * sizeof(struct host1x_waitchk) + (u64)num_cmdbufs * sizeof(struct host1x_job_gather) + - (u64)num_unpins * sizeof(dma_addr_t) + - (u64)num_unpins * sizeof(u32 *); + (u64)num_relocs * sizeof(dma_addr_t) + + (u64)num_cmdbufs * sizeof(dma_addr_t); + if (total > ULONG_MAX) return NULL;