On Tue, 28 Nov 2000, Tigran Aivazian wrote: > /* switch the open fds from old_user to new_user */ > read_lock(&files->file_lock); > nr_open = close_files(files, 0); /* 0 means don't close them */ > atomic_sub(nr_open, &old_user->files); > atomic_add(nr_open, &new_user->files); > read_unlock(&files->file_lock); That makes no sense - how do you count the descriptors in shared ->files? And how on the Earth do you count SCM_RIGHTS packets? Because they make a great way to fool any use of that stuff for resource-limit type of applications (stash the descriptors into SCM_RIGHTS cookie, send them to yourself and close them). Basically, I don't see what are you counting. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
- bug in count_open_files() or a strange granularity? Tigran Aivazian
- Re: bug in count_open_files() or a strange granula... David S. Miller
- Re: bug in count_open_files() or a strange gra... Tigran Aivazian
- Re: bug in count_open_files() or a strange... Alexander Viro
- Re: bug in count_open_files() or a str... Tigran Aivazian
- Re: bug in count_open_files() or ... David S. Miller
- Re: bug in count_open_files() or a strange gra... Alexander Viro
- Re: bug in count_open_files() or a strange... Tigran Aivazian
- Re: bug in count_open_files() or a str... Alexander Viro
- Re: bug in count_open_files() or ... Tigran Aivazian
- Re: bug in count_open_files()... Alexander Viro
- Re: bug in count_open_fil... Tigran Aivazian
- Re: bug in count_open_files() or a strange granula... Richard B. Johnson
- Re: bug in count_open_files() or a strange gra... Tigran Aivazian