[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1363028248-27788-1-git-send-email-jlee@suse.com>
Date: Tue, 12 Mar 2013 02:57:28 +0800
From: "Lee, Chun-Yi" <joeyli.kernel@...il.com>
To: matt@...sole-pimps.org
Cc: linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
"Lee, Chun-Yi" <jlee@...e.com>,
Seiji Aguchi <seiji.aguchi@....com>,
Matthew Garrett <mjg59@...f.ucam.org>,
Al Viro <viro@...iv.linux.org.uk>,
Lingzhu Xiang <lxiang@...hat.com>
Subject: [PATCH] efivars: allow efi pstore variable when validate filename
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: Seiji Aguchi <seiji.aguchi@....com>
Cc: Matthew Garrett <mjg59@...f.ucam.org>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Lingzhu Xiang <lxiang@...hat.com>
Signed-off-by: Lee, Chun-Yi <jlee@...e.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists