Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756119AbcCBP4l (ORCPT ); Wed, 2 Mar 2016 10:56:41 -0500 Received: from mail-bn1on0070.outbound.protection.outlook.com ([157.56.110.70]:8064 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756051AbcCBP4h (ORCPT ); Wed, 2 Mar 2016 10:56:37 -0500 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=permerror action=none header.from=amd.com; X-WSS-ID: 0O3F5M5-07-YT7-02 X-M-MSG: Subject: Re: [PATCH 3/3] EDAC, mce_amd: Correct error paths To: Borislav Petkov References: <1456785179-14378-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <1456785179-14378-3-git-send-email-Aravind.Gopalakrishnan@amd.com> <20160302105032.GC16954@pd.tnic> <20160302105445.GF16954@pd.tnic> CC: , , , , , , , , , , , , , , From: Aravind Gopalakrishnan Message-ID: <56D70D2B.2000302@amd.com> Date: Wed, 2 Mar 2016 09:56:27 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160302105445.GF16954@pd.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(428002)(199003)(479174004)(377454003)(189002)(5004730100002)(4326007)(5001960100004)(2906002)(106466001)(2950100001)(5008740100001)(4001350100001)(11100500001)(81156010)(33656002)(77096005)(93886004)(19580395003)(92566002)(105586002)(36756003)(23676002)(19580405001)(80316001)(110136002)(83506001)(189998001)(6116002)(59896002)(586003)(1220700001)(1096002)(230700001)(3846002)(87936001)(50986999)(76176999)(86362001)(87266999)(101416001)(54356999)(47776003)(65816999)(50466002)(64126003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0713;H:atltwp01.amd.com;FPR:;SPF:None;MLV:sfv;A:1;MX:1;LANG:en; X-MS-Office365-Filtering-Correlation-Id: 8d3eb713-dacb-4ec4-a8fd-08d342b33a0f X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0713;2:L9+rajfWNgH+a8dN6wrubgGkzmqGaUlLvhDXXv2bYVEfN6vq0MXVvN7jcUqWluDa4KjlQ28rYq0LUD1bY2zWHHs97G98IohvKTD4bd1DXs5cbYdhBDWF+uwioqfRq1Eio0sF784F906iFwFZ3NxFCYn+7ybKc/L2tJlnn6EC1tC8qGI3ynJA67m2DafsIUS0;3:fnEmsoTfD3W+j9FEHH78swmjgb7AX8sO/d37rq6dbhgXSNVyjp6XZOWmvfUctF/kbgSDSIzaE3/+UWvhSKD9wBLFl2ghWfuzYTlhYm4Syn2SEvClZsW9M+lR5/Sr9/deYNFGyUSiZ4DgYdrz13+d2a4J2If1GVtyFUrptXmz2p8PLm/cLxP779Y74C8Ge65PTXecphQmyo00wj9XMlhAwTTDHyPbtodSWVtl4BOKBmw=;25:aCVDJo7fzHP3xiZDuGn3AnXJwOCWT93TfVY3HyDmqZm34aT83pn96nMhXBFth4t5+6iBGxVOHMWwGLvZqo7ofGXtqedOc807LvZzNet1Za8iVCB184ousdrgkc9V7MX7QWPd5fR1YUMg1tTmc5WFJRjXoOvSN6njwCh+Vh+HM4N4oC1yDmtVN9KnOQ6jqXN43iG57mFx/4IdN7xQGgLwZxhXhdC+LR3UGreAKx1RbUpIs8ooSbnrUE18OD1gt13fpKkPzb9FAS1xz6H9iMzQjNahScIJqZRSONcBHtjZEay543eYe4rUC4Bzb0U96Be74lytFIS7OYUIRwwxL9TFzA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0713; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0713;20:ycgBFe0W9g6Y8BtL2lQhbiAWvCvljheYAYutWr4hijRnC+DnKAgylIu+WexrW/q1wXRrFkqUIBwvJvZfR2yGNVFul+qaJ35gyBFeSlGsV7xZAtnXz7oIlNjencyGaQ0eCmWhJp0CVY0iIKAD36602f0tb81+PbfcnwUFy8YWDekqQVFGtFi/wcNTTBjAMDqwTEOvgqEj8V6skREhcdkhxrvkTv0i/YgLJEsWeftsiQ7hF6l14XVhVm+yYXjwy/pZiNAnp3cKJtb3cDm3TPEqJe8lGzBZmSPeQjG5AOF0yh4F8sG8bDduHhuETw020s6fW1LQDGX4ulhtfEUGItRnaPyekCsv9ZE8mA0oA6fsGd4Amp6ZmLN27DxOUEtnVYYHjF2y1OVaBwr8oW19+ey0qhEPlZ2ulR6lgn8rhy9CgnrdaduaOX3KKuW1D1UcLciht1P0KA3B2nfNNMN03qzCXAIr1fU6ZrEkZCqJJ3cb3e0KfRXx57NyYVvdxiF14oFI X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(5005006)(8121501046)(13018025)(3002001)(10201501046);SRVR:CY1PR12MB0713;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0713; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0713;4:NMRUHpHXmUde2qQgczs3tkOu8/8lZkNTYKzGddXDDUbZJT8ZT2raUnVMIUXfwdTAvCwql1QHu/MGbsoAj/RyNTAiNSkd66mGnbv9w7cdtpnpxB4typHmyA1Ow0C7erodBAYBbNc+SlCTmGe2jt474IT8/P+vBBeWMaw3uHtFBrymYgE0U9Wd3VesxmMGjy4/7xgybCK6sjFl3cMLZC0n1dLCM/ZOsidkAvmX2RsnFtJgmDbc9O+WpR5xwXRB9y+NNiY/SAP0nBwtVB7c4XXkOY/sEB/pCMgPntzAXe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jdVphb1NBeWN6N0o0MFc5QU51NDREZnRW?= =?utf-8?B?ditrdGxzNVFXUGdoM1pnaHZhOXBic3BlOWxMWkhrWEpBWkxqSHEwclVYaTJ1?= =?utf-8?Q?UMD7D/LPtJnLoaBfA8=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0713;5:h9WjpOFZp3gY0LD0EnXF1DqHZnUpynYoostNgQIAOP8HMsSH57Yh5IX6taABWzIt+OCafc/S75DlHLEj/63ig0LEUOjXCm6GXmKJoKvfw7Kd1XOPQNBS9YRaEkqak5kdva259vfnjheXg71hP9BsQQ==;24:DST9GzYbt9cUAtxUzbyM/fHevQROwL14j8KxM+Xqgfd3/y2IG0vpLkwS8dCDrPZ+hjdgYjMgePgYPR46Ng2YBtNK29PkfL6TNQJ6gYYEoz0=;20:Qa21o6k0cSmMW1KwtOsekSNOSZcgRJCdsWTc2Jp1acnmfHbMNDd94aJfI0xXGCT7yw5WCpaO9901r6JCyN24wWUo76ssF7c32lxdQYqmTEpznPXXTWpz/2f3+6KMJCtIwaoAPOdj7cE8y4KYGkohC0JVOAZyhiRV6utvRQUnpS8OfGGUomMO83wSvjqv8sPIwA72pGQS1oZ4D08HwKmm1fPFjvLudJMUJxcE2s0FwgUWQN2Rzi5gN3R4Yfk0i6ec SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2016 15:56:31.9118 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0713 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 985 Lines: 38 On 3/2/2016 4:54 AM, Borislav Petkov wrote: > From: Borislav Petkov > Date: Wed, 2 Mar 2016 11:46:58 +0100 > Subject: [PATCH 3/3] EDAC, mce_amd: Correct error paths > > We need to unwind properly when we fail to find the proper decoding > functions. Streamline error messages to resemble the rest of this file, > while at it and do some minor stylistic changes. > > Signed-off-by: Borislav Petkov Looks good. Thanks. Reviewed-by: Aravind Gopalakrishnan > - > > default: > printk(KERN_WARNING "Huh? What family is it: 0x%x?!\n", c->x86); > - kfree(fam_ops); > - fam_ops = NULL; > + goto err_out; > } > > pr_info("MCE: In-kernel MCE decoding enabled.\n"); > @@ -1225,6 +1224,11 @@ static int __init mce_amd_init(void) > mce_register_decode_chain(&amd_mce_dec_nb); > > return 0; > + > +err_out: > + kfree(fam_ops); > + fam_ops = NULL; > + return -EINVAL; Thanks! Sorry I missed this. -Aravind.