Re: [PATCH] thread wakeup fix for 2.4.0-test7

Date: Sun Aug 27 2000 - 14:30:44 EST


> > File is closed, when all the references from user disappear.
> Yes? So how about
> fd2 = dup(fd1);
> read(fd1,...);
> close(fd1);
> Is the file closed in that case? If no - you've got completely weird
> semantics (having dup() changes rules for operations on original fd), if
> yes - what happens with your arguments about leaks?

Dup gets another descriptor and another reference.

Stop for a moment and think. dup() is orthogonal to this siutation.

> Wonderful. Now tell me what to do with SCM_RIGHTS cookies, OK? And while
> you are at it, what to do with mmap()? Besides, what processes hold
> ->f_count on /dev/zero and how many lists poor task_struct should be on?

mmap and SCM_RIGHTS hold f_users of course.

Al, do not pretend, that you do not understand the difference
between user count and reference count. Man working on VFS knows this
by defintion. Seems, you jest.

fget()/fput() are to be used only to prevent destruction.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:19 EST