Re: [PATCH] proc: /proc/kpageflags: incorrect arg order inkpf_copy_bits()

From: Alexey Dobriyan
Date: Sat Feb 28 2009 - 06:29:34 EST


On Fri, Feb 27, 2009 at 05:56:39PM -0800, Jeffrey Mogul wrote:
> The code in fs/proc/page.c that implements /proc/kpageflags has

Already fixed in mainline:

commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
Author: Helge Bahmann <helge.bahmann@xxxxxxxxxxx>
Date: Fri Feb 20 16:24:12 2009 +0300

proc: fix PG_locked reporting in /proc/kpageflags

Expr always evaluates to zero.

Cc: Matt Mackall <mpm@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>

diff --git a/fs/proc/page.c b/fs/proc/page.c
index 767d95a..2d13451 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -107,7 +107,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf,
else
kflags = ppage->flags;

- uflags = kpf_copy_bit(KPF_LOCKED, PG_locked, kflags) |
+ uflags = kpf_copy_bit(kflags, KPF_LOCKED, PG_locked) |
kpf_copy_bit(kflags, KPF_ERROR, PG_error) |
kpf_copy_bit(kflags, KPF_REFERENCED, PG_referenced) |
kpf_copy_bit(kflags, KPF_UPTODATE, PG_uptodate) |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/