Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-13 Thread Alexey Dobriyan
On Mon, Feb 12, 2007 at 10:35:52PM -0800, Andrew Morton wrote: > On Sun, 11 Feb 2007 23:23:30 +0300 Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > > > [PATCH v4] Fix rmmod/read/write races in /proc entries > > This: > > static ssize_t > proc_file_write(struct file

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-13 Thread Alexey Dobriyan
On Mon, Feb 12, 2007 at 10:35:52PM -0800, Andrew Morton wrote: On Sun, 11 Feb 2007 23:23:30 +0300 Alexey Dobriyan [EMAIL PROTECTED] wrote: [PATCH v4] Fix rmmod/read/write races in /proc entries This: static ssize_t proc_file_write(struct file *file, const char __user *buffer

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-12 Thread Andrew Morton
On Sun, 11 Feb 2007 23:23:30 +0300 Alexey Dobriyan <[EMAIL PROTECTED]> wrote: > [PATCH v4] Fix rmmod/read/write races in /proc entries This: static ssize_t proc_file_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct ino

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-12 Thread Andrew Morton
On Sun, 11 Feb 2007 23:23:30 +0300 Alexey Dobriyan [EMAIL PROTECTED] wrote: [PATCH v4] Fix rmmod/read/write races in /proc entries This: static ssize_t proc_file_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct inode *inode = file

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-11 Thread Al Viro
> Does it pass everyone's bullshit detectors? Nice, but incomplete. What we need to add is * procfs-specific file_operations shared by all regular files on procfs. Stuff in there would call methods from pde->proc_fops, after having done the same kind of exclusion you are currently

[PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-11 Thread Alexey Dobriyan
timeslice. > > Would be nicer to do this with a wait_for_completion(). > > I guess it doesn't happen very often - if another process happens to > be in the middle or a read or write syscall to that /proc file. Yes, that's rare. OK, I read LDD3 text on completions, hope I got it ri

[PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-11 Thread Alexey Dobriyan
. Yes, that's rare. OK, I read LDD3 text on completions, hope I got it right. Does it pass everyone's bullshit detectors? [PATCH v4] Fix rmmod/read/write races in /proc entries Differences from version 3: Use completion instead of unlock/schedule/lock Move refcount waiting

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-11 Thread Al Viro
Does it pass everyone's bullshit detectors? Nice, but incomplete. What we need to add is * procfs-specific file_operations shared by all regular files on procfs. Stuff in there would call methods from pde-proc_fops, after having done the same kind of exclusion you are currently doing