From patchwork Mon May 10 08:04:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jin Dongming X-Patchwork-Id: 98085 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4A85peL032723 for ; Mon, 10 May 2010 08:05:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752551Ab0EJIFu (ORCPT ); Mon, 10 May 2010 04:05:50 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:57923 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318Ab0EJIFt (ORCPT ); Mon, 10 May 2010 04:05:49 -0400 Received: from m1.gw.fujitsu.co.jp ([10.0.50.71]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o4A85lUF005888 (envelope-from jin.dongming@np.css.fujitsu.com); Mon, 10 May 2010 17:05:47 +0900 Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 49C6345DE4F; Mon, 10 May 2010 17:05:47 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 1AD5645DE52; Mon, 10 May 2010 17:05:47 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id EA15E1DB8043; Mon, 10 May 2010 17:05:46 +0900 (JST) Received: from m000.s.css.fujitsu.com (m000.s.css.fujitsu.com [10.23.4.38]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 9E4161DB804E; Mon, 10 May 2010 17:05:46 +0900 (JST) Received: from m000.css.fujitsu.com (m000 [127.0.0.1]) by m000.s.css.fujitsu.com (Postfix) with ESMTP id 7B3772DFEE4; Mon, 10 May 2010 17:05:46 +0900 (JST) Received: from [127.0.0.1] (extra.soft.fujitsu.com [10.124.100.180]) by m000.s.css.fujitsu.com (Postfix) with ESMTP id 476CD2DFE96; Mon, 10 May 2010 17:05:46 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.4.0 Received: from fujitsu-9048d84[10.124.100.180] by fujitsu-9048d84 (FujitsuOutboundMailChecker v1.4.0/9992[10.124.100.180]); Mon, 10 May 2010 17:04:45 +0900 (JST) Message-ID: <4BE7BE10.8080000@np.css.fujitsu.com> Date: Mon, 10 May 2010 17:04:32 +0900 From: Jin Dongming User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: LKLM CC: lenb , Andi Kleen , Huang Ying , Hidetoshi Seto , ACPI Subject: [Patch-next] Oops caused by ERST Table not supported. Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 10 May 2010 08:05:51 +0000 (UTC) diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 5fe5c0f..2ebc391 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -698,6 +698,9 @@ ssize_t erst_read_next(struct cper_record_header *record, size_t buflen) unsigned long flags; u64 record_id; + if (erst_disable) + return -ENODEV; + spin_lock_irqsave(&erst_lock, flags); rc = __erst_get_next_record_id(&record_id); if (rc) {