From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754573Ab3CKTB6 (ORCPT ); Mon, 11 Mar 2013 15:01:58 -0400 Received: from mail-ob0-f180.google.com ([209.85.214.180]:63424 "EHLO mail-ob0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754178Ab3CKTB4 (ORCPT ); Mon, 11 Mar 2013 15:01:56 -0400 From: "Lee, Chun-Yi" To: matt.fleming@intel.com Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, "Lee, Chun-Yi" , Seiji Aguchi , Matthew Garrett , Al Viro , Lingzhu Xiang Subject: [PATCH] efivars: allow efi pstore variable when validate filename Date: Tue, 12 Mar 2013 03:00:28 +0800 Message-Id: <1363028428-27976-1-git-send-email-jlee@suse.com> X-Mailer: git-send-email 1.6.0.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We mount efivarfs fail after pstore generated 'dump-type*' variables and reboot. This issue introduced by commit 47f531e8ba3bc3901a0c493f4252826c41dea1a1 (efivarfs: Validate filenames much more aggressively) The pstore variable is 'dump-type*-*-*-*-GUID'style, it could not pass the "GUID should be right after the first '-'" check. This patch allow the variable name that has 'dump-type' pass the name check. Cc: Matt Fleming Cc: Seiji Aguchi Cc: Matthew Garrett Cc: Al Viro Cc: Lingzhu Xiang Signed-off-by: Lee, Chun-Yi --- drivers/firmware/efivars.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 3edade0..ab07f7f 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -930,7 +930,7 @@ static bool efivarfs_valid_name(const char *str, int len) return false; /* GUID should be right after the first '-' */ - if (s - 1 != strchr(str, '-')) + if (s - 1 != strchr(str, '-') && !strstarts(str, "dump-type")) return false; /* -- 1.6.4.2