[OpenAFS-devel] [PATCH 1.3.81] use seq_file interface for Linux /proc
Christopher Allen Wing
wingc@engin.umich.edu
Thu, 21 Apr 2005 17:27:22 -0400 (EDT)
openafs 1.3.81 crashes the Linux kernel when you try to view the file
/proc/fs/openafs/CellServDB. Linux provides a helper interface for "list
output generators" in /proc called seq_file; here is a patch which
converts the existing /proc/fs/openafs/CellServDB to use it (and fixes the
crash):
http://www-personal.engin.umich.edu/~wingc/openafs/patches/openafs-1.3.81-seqfile.patch
seq_file is available in Linux 2.6, as well as basically all modern 2.4
kernels. I added an autoconf test to check for its presence.
I commented out the existing /proc interface with '#if 0'; this either
needs to be fixed or else just removed if seq_file is not available.
(Since basically every 2.4 and 2.6 kernel in use today will have seq_file,
it may not be a big deal)
Thanks,
Chris Wing
wingc@engin.umich.edu