From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266245AbUGATuF (ORCPT ); Thu, 1 Jul 2004 15:50:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266247AbUGATuF (ORCPT ); Thu, 1 Jul 2004 15:50:05 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.105]:58361 "EHLO e5.ny.us.ibm.com") by vger.kernel.org with ESMTP id S266245AbUGATt7 (ORCPT ); Thu, 1 Jul 2004 15:49:59 -0400 Subject: Re: [PATCH] 2.6 PPC64: lockfix for rtas error log (third-times-a-charm?)] From: Dave Hansen To: linas@austin.ibm.com Cc: paulus@au1.ibm.com, Paul Mackerras , PPC64 External List , Linux Kernel Mailing List In-Reply-To: <20040701141931.E21634@forte.austin.ibm.com> References: <20040701141931.E21634@forte.austin.ibm.com> Content-Type: text/plain Message-Id: <1088711355.21679.152.camel@nighthawk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 01 Jul 2004 12:49:16 -0700 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2004-07-01 at 12:19, linas@austin.ibm.com wrote: > + /* Log the error in the unlikely case that there was one. */ > + if (unlikely(logit)) { > + buff_copy = kmalloc (RTAS_ERROR_LOG_MAX, GFP_ATOMIC); > + memcpy (buff_copy, rtas_err_buf, RTAS_ERROR_LOG_MAX); > + } You forgot to check the allocation for failure. -- Dave