From patchwork Sat May 26 13:07:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8989 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9B13823E37 for ; Sat, 26 May 2012 13:10:33 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 60FDDA18A37 for ; Sat, 26 May 2012 13:10:33 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id un3so3461685obb.11 for ; Sat, 26 May 2012 06:10:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=QUdnQOTcdOrnlLGspsRbXWoCJ4ulgHGb3ZwpAt2Dl5Y=; b=SAEH8JEEDE7Lczl4vx+prd443QZWxlar1xKOOPYNxiywZXCu3xkrop9098OP3megJK LAWXAB7N5Vq6FYzuF+eBBL825DFJQDehPKOY4oh1/da1KYCWfuLw11s5eP/IIFxDwO4y Nistu9GfL9i/W69FfoKHq+enJAHeKXVKCAyI0nQVCvGmdmS55c4ndIVd1RH7n5BmuPpB xOgh0EFQ50pNGDVucgkMw9J2gJQV2qz7DSPSAbGjNEn78nh+n2P4TceXjZK4e3V9Kul1 dJ9/eHjSPBbRKgqFDuy11krvTWUbsjipjSYyZ3rU8um4TfGvogQrSIZ1eU0xSPe/RJL/ T+zw== Received: by 10.50.163.99 with SMTP id yh3mr905120igb.53.1338037833074; Sat, 26 May 2012 06:10:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp85865ibb; Sat, 26 May 2012 06:10:31 -0700 (PDT) Received: by 10.68.227.197 with SMTP id sc5mr2998025pbc.58.1338037831000; Sat, 26 May 2012 06:10:31 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id rj10si7802936pbc.304.2012.05.26.06.10.30 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 May 2012 06:10:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-pz0-f50.google.com with SMTP id h15so2714114dan.37 for ; Sat, 26 May 2012 06:10:30 -0700 (PDT) Received: by 10.68.225.69 with SMTP id ri5mr7437477pbc.147.1338037829941; Sat, 26 May 2012 06:10:29 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id qt8sm12507635pbb.32.2012.05.26.06.10.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 May 2012 06:10:29 -0700 (PDT) From: Anton Vorontsov To: Greg Kroah-Hartman , Kees Cook , Colin Cross , Tony Luck Cc: Arnd Bergmann , John Stultz , Shuah Khan , arve@android.com, Rebecca Schultz Zavin , Jesper Juhl , Randy Dunlap , Stephen Boyd , Thomas Meyer , Andrew Morton , Marco Stornelli , WANG Cong , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com Subject: [PATCH 4/5] pstore/ram: Should zap persistent zone on unlink Date: Sat, 26 May 2012 06:07:52 -0700 Message-Id: <1338037673-19909-4-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120526130650.GA6242@lizard> References: <20120526130650.GA6242@lizard> X-Gm-Message-State: ALoCoQkj/XIXZoBmcRFaqGuL8P9dLSQt+f/dCSMqck+/Mr0f8K9TTkQdISgbEmvxWewH8Ofr9ltB Otherwise, unlinked file will reappear on the next boot. Reported-by: Kees Cook Signed-off-by: Anton Vorontsov Acked-by: Kees Cook --- fs/pstore/ram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 16ff733..453030f 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -186,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id, return -EINVAL; persistent_ram_free_old(cxt->przs[id]); + persistent_ram_zap(cxt->przs[id]); return 0; }