Re: [PATCH] Sort module list - use ppos instead of m->private

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Al Viro <viro@...>, <linux-kernel@...>, Martin Bligh <mbligh@...>, Randy.Dunlap <rdunlap@...>
Date: Friday, August 24, 2007 - 8:05 pm

* Andrew Morton (akpm@linux-foundation.org) wrote:

Ok, will append this in the changelog (I sent this to Rusty earlier
today):

Small test program for this:

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#define BUFSIZE 1024

int main()
{
        int fd = open("/proc/modules", O_RDONLY);
        char buf[BUFSIZE];
        ssize_t size;

        do {
                size = read(fd, buf, 1);
                printf("%c", buf[0]);
                usleep(100000);
        } while(size > 0);

        close(fd);
        return 0;
}

Before fix, it prints the first module indefinitely. The patch fixes
this.

I will also append more detail to "Sort module list by pointer address
to get coherent sleepable seq_file iterators" changelog before the
2.6.23-rc3-mm1 repost.

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Sort module list - use ppos instead of m-&gt;private, Mathieu Desnoyers, (Fri Aug 24, 11:39 am)
Re: [PATCH] Sort module list - use ppos instead of m->private, Mathieu Desnoyers, (Fri Aug 24, 8:05 pm)