From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755597AbbCGAlr (ORCPT ); Fri, 6 Mar 2015 19:41:47 -0500 Received: from mail-bn1bon0113.outbound.protection.outlook.com ([157.56.111.113]:7529 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752659AbbCGAlo (ORCPT ); Fri, 6 Mar 2015 19:41:44 -0500 Date: Fri, 6 Mar 2015 18:36:23 -0600 From: Kim Phillips To: CC: , , , , , , , , Subject: Re: [PATCH 1/2] crypto: caamhash: - fix uninitialized edesc->sec4_sg_bytes field Message-ID: <20150306183623.64e5c6ca4453d70678819ce3@freescale.com> In-Reply-To: <1425609282-16568-2-git-send-email-yanjiang.jin@windriver.com> References: <1425609282-16568-1-git-send-email-yanjiang.jin@windriver.com> <1425609282-16568-2-git-send-email-yanjiang.jin@windriver.com> Organization: Freescale Semiconductor, Inc. X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=kim.phillips@freescale.com; gmail.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(51704005)(189002)(24454002)(164054003)(199003)(33646002)(62966003)(77156002)(23726002)(92566002)(50986999)(106466001)(2950100001)(47776003)(46406003)(87936001)(575784001)(85426001)(19580395003)(6806004)(19580405001)(110136001)(100306002)(76176999)(104016003)(50226001)(77096005)(36756003)(46102003)(105606002)(2351001)(86362001)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1284;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1284; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002009);SRVR:BN3PR0301MB1284;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1284; X-Forefront-PRVS: 05087F0C24 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2015 00:41:40.6095 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1284 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Mar 2015 10:34:41 +0800 wrote: > From: Yanjiang Jin > > sec4_sg_bytes not being properly initialized causes ahash_done > to try to free unallocated DMA memory: > > caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0xdeadbeefdeadbeef] [size=3735928559 bytes] > ------------[ cut here ]------------ > WARNING: at lib/dma-debug.c:1093 > Modules linked in: > CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.0.0-rc1+ #6 > task: e9598c00 ti: effca000 task.ti: e95a2000 > NIP: c04ef24c LR: c04ef24c CTR: c0549730 > REGS: effcbd40 TRAP: 0700 Not tainted (4.0.0-rc1+) > MSR: 00029002 CR: 22008084 XER: 20000000 > > GPR00: c04ef24c effcbdf0 e9598c00 00000096 c08f7424 c00ab2b0 00000000 00000001 > GPR08: c0fe7510 effca000 00000000 000001c3 22008082 00000000 c1048e77 c1050000 > GPR16: c0c36700 493c0040 0000002c e690e4a0 c1054fb4 c18bac40 00029002 c18b0788 > GPR24: 00000014 e690e480 effcbe48 00000000 c0fde128 e6ffac10 deadbeef deadbeef > NIP [c04ef24c] check_unmap+0x93c/0xb40 > LR [c04ef24c] check_unmap+0x93c/0xb40 > Call Trace: > [effcbdf0] [c04ef24c] check_unmap+0x93c/0xb40 (unreliable) > [effcbe40] [c04ef4f4] debug_dma_unmap_page+0xa4/0xc0 > [effcbec0] [c070cda8] ahash_done+0x128/0x1a0 > [effcbef0] [c0700070] caam_jr_dequeue+0x1d0/0x290 > [effcbf40] [c0045f40] tasklet_action+0x110/0x1f0 > [effcbf80] [c0044bc8] __do_softirq+0x188/0x700 > [effcbfe0] [c00455d8] irq_exit+0x108/0x120 > [effcbff0] [c000f520] call_do_irq+0x24/0x3c > [e95a3e20] [c00059b8] do_IRQ+0xc8/0x170 > [e95a3e50] [c0011bc8] ret_from_except+0x0/0x18 > > Signed-off-by: Yanjiang Jin > --- Acked-by: Kim Phillips Thanks, Kim