From patchwork Tue May 22 14:17:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8875 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 3BA1423F0A for ; Tue, 22 May 2012 14:20:16 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id A7937A18C33 for ; Tue, 22 May 2012 14:20:15 +0000 (UTC) Received: by yenq6 with SMTP id q6so6633932yen.11 for ; Tue, 22 May 2012 07:20:15 -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=6FzPpt9p++5LI9fxS7eykP0+3I1fZbE4acwbFKk2qEY=; b=GmftDq4/tIft+aMqQyHjd+FB4ZD+y+C8TRtZddAzAi4JkSIWN4Wq2UmkDTQqWaXA4l Ovz09gBn/E/MNLZgyHqGeb9SPvmdqcJUvHtcUsgmDDZvLZUjUhIh3n0xFYFEufbytTAS 7rF3VTzfc2bUwoEGyUSZ/YB0zYcXIRJQ3pHFyFh3efj14Yi4XpIrSbk+gS4vbUeYv2k1 iUCLDlZEmU7C2SGS3Aw0fvmP65mHhWK0zjQWlB/NWg6FXiiMpqq2rpqPv3EIrNtYlO1M mdcNWcSHO6bIskgXFQUbLcT6wcjqU53vijMgghH9KUwndzMTBC5dqYyU9Axf+10HViHf JfbQ== Received: by 10.42.56.80 with SMTP id y16mr5560044icg.48.1337696414890; Tue, 22 May 2012 07:20:14 -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.35.72 with SMTP id o8csp369502ibd; Tue, 22 May 2012 07:20:14 -0700 (PDT) Received: by 10.68.220.98 with SMTP id pv2mr81235688pbc.117.1337696413466; Tue, 22 May 2012 07:20:13 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id s4si31657300pbc.45.2012.05.22.07.20.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.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-pb0-f50.google.com with SMTP id rr4so10070402pbb.37 for ; Tue, 22 May 2012 07:20:13 -0700 (PDT) Received: by 10.68.220.100 with SMTP id pv4mr82156341pbc.116.1337696413021; Tue, 22 May 2012 07:20:13 -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 pw10sm26846362pbb.61.2012.05.22.07.20.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:12 -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 05/16] pstore/ram: Should zap persistent zone on unlink Date: Tue, 22 May 2012 07:17:48 -0700 Message-Id: <1337696279-8994-5-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120522141717.GA31574@lizard> References: <20120522141717.GA31574@lizard> X-Gm-Message-State: ALoCoQmGaaKV9hFEAHeVyZciVl0zB4iVcGiCGehr8ujjYXeG7Kx+KP2M6gl/jPaVvk5VjUF3/Bwg 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; }