[folded-merged] vfs-simplify-seq_file-iteration-code-and-interface-fix.patch removed from -mm tree

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

 



The patch titled
     Subject: VFS: seq_file: ensure ->from is valid
has been removed from the -mm tree.  Its filename was
     vfs-simplify-seq_file-iteration-code-and-interface-fix.patch

This patch was dropped because it was folded into vfs-simplify-seq_file-iteration-code-and-interface.patch

------------------------------------------------------
From: NeilBrown <neilb@xxxxxxxx>
Subject: VFS: seq_file: ensure ->from is valid

Previous patch ("VFS: simplify seq_file iteration code and interface")
removed code to set ->from to zero when ->count is zero, as ->from is
dead at that time.  However it didn't ensure ->from was set properly
whenever ->count becomes non-zero.
This can only happen when ->show() is called.  Of the three places it
is called one already has ->from set to zero.  The other two are
fixed by setting from to zero after fully flushing the buffer (at which
point ->count will also be zero).

Link: http://lkml.kernel.org/r/87601ryb8a.fsf@xxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: NeilBrown <neilb@xxxxxxxx>
Reported-by: Jann Horn <jannh@xxxxxxxxxx>
Tested-by: Jann Horn <jannh@xxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/seq_file.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/seq_file.c~vfs-simplify-seq_file-iteration-code-and-interface-fix
+++ a/fs/seq_file.c
@@ -220,6 +220,7 @@ ssize_t seq_read(struct file *file, char
 			goto Done;
 	}
 	/* we need at least one record in buffer */
+	m->from = 0;
 	p = m->op->start(m, &m->index);
 	while (1) {
 		err = PTR_ERR(p);
_

Patches currently in -mm which might be from neilb@xxxxxxxx are

vfs-discard-attr_attr_flag.patch
vfs-simplify-seq_file-iteration-code-and-interface.patch




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

  Powered by Linux