From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752422AbbJOKDl (ORCPT ); Thu, 15 Oct 2015 06:03:41 -0400 Received: from mail.skyhub.de ([78.46.96.112]:52060 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbbJOKDj (ORCPT ); Thu, 15 Oct 2015 06:03:39 -0400 Date: Thu, 15 Oct 2015 12:03:34 +0200 From: Borislav Petkov To: Dave Young Cc: LKML , Andrew Morton , Andy Lutomirski , "H. Peter Anvin" , Ingo Molnar , jerry_hoemann@hp.com, Jiri Kosina , Joerg Roedel , Juergen Gross , Mark Salter , Thomas Gleixner , WANG Chao , x86-ml Subject: Re: [PATCH 4/5] x86/setup/crash: Check memblock_reserve() retval Message-ID: <20151015100333.GD4267@pd.tnic> References: <1444897231-7906-1-git-send-email-bp@alien8.de> <1444897231-7906-5-git-send-email-bp@alien8.de> <20151015091826.GD4795@dhcp-129-3.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151015091826.GD4795@dhcp-129-3.nay.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 15, 2015 at 05:18:26PM +0800, Dave Young wrote: > Seems there's no checking for other callback to memblock_reserve in setup.c > Need another cleanup? True story. It sure does. > BTW, a further cleanup is reasonable to me, there's a lot of below patter: > memblock_find_in_range > error checking > memblock_reserve > error checking > > So a new function memblock_reserve_in_range is reasonable. Well, in some of the callsites, the first "error checking" issues a specific message, depending on the subsystem. The following memblock_reserve() is mostly unchecked though. At least that should be fixed... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.