On Mon, Sep 03, 2007 at 12:57:48PM +0200, Helmut Eller wrote:
- T Taneli Vahakangas [2007-09-03 00:17+0200] writes:
Currently I don't have time to investigate further, so I'm just dumping this on the list, hoping that somebody else will take a look. The kernel patch makes slight changes to how /proc files are accessed, why would that have any effect on slime or sbcl?
Slime calls (unnecessarily) MACHINE-VERSION, which seems to open /proc/cpuinfo in SBCL.
Thanks, Helmut, for the info. In the end, I contacted Alexey Dobriyan who introduced the bug ;) and now fixed it with the kernel patch that follows. It applies cleanly at least against 2.6.23-rc5.
Taneli
--- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -11,6 +11,7 @@ #include <linux/string.h> #include <linux/stat.h> #include <linux/completion.h> +#include <linux/poll.h> #include <linux/file.h> #include <linux/limits.h> #include <linux/init.h> @@ -232,7 +233,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) { struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); - unsigned int rv = 0; + unsigned int rv = POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM; unsigned int (*poll)(struct file *, struct poll_table_struct *);
spin_lock(&pde->pde_unload_lock);