+ pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch added to -mm tree
To: shuox.liu@xxxxxxxxx,ccross@xxxxxxxxxxx,keescook@xxxxxxxxxxxx,tony.luck@xxxxxxxxx,yanmin_zhang@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 04 Mar 2014 13:50:26 -0800


The patch titled
     Subject: pstore: skip zero size persistent ram buffer in traverse
has been added to the -mm tree.  Its filename is
     pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Liu ShuoX <shuox.liu@xxxxxxxxx>
Subject: pstore: skip zero size persistent ram buffer in traverse

In ramoops_pstore_read, a valid prz pointer with zero size buffer will
break traverse of all persistent ram buffers.  The latter buffer might be
lost.

Signed-off-by: Liu ShuoX <shuox.liu@xxxxxxxxx>
Cc: "Zhang, Yanmin" <yanmin_zhang@xxxxxxxxxxxxxxx>
Cc: Colin Cross <ccross@xxxxxxxxxxx>
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/pstore/ram.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff -puN fs/pstore/ram.c~pstore-skip-zero-size-persistent-ram-buffer-in-traverse fs/pstore/ram.c
--- a/fs/pstore/ram.c~pstore-skip-zero-size-persistent-ram-buffer-in-traverse
+++ a/fs/pstore/ram.c
@@ -119,12 +119,12 @@ ramoops_get_next_prz(struct persistent_r
 
 	prz = przs[i];
 
-	if (update) {
-		/* Update old/shadowed buffer. */
+	/* Update old/shadowed buffer. */
+	if (update)
 		persistent_ram_save_old(prz);
-		if (!persistent_ram_old_size(prz))
-			return NULL;
-	}
+
+	if (!persistent_ram_old_size(prz))
+		return NULL;
 
 	*typep = type;
 	*id = i;
_

Patches currently in -mm which might be from shuox.liu@xxxxxxxxx are

pstore-reset-ftrace_read_cnt-at-ramoops_pstore_open.patch
pstore-skip-zero-size-persistent-ram-buffer-in-traverse.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux