lkml.org 
[lkml]   [2003]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject->pid in dnotify
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not entirely sure about this change. But it seems to be necessary.
The dnotify code stores the PID in the file structure. The entire
process shares the file and any signal (is it used for that?) should be
sent to the process (thread group), not the individual thread. Also
keep in mind that threads can go away while the process (and therefore
file descriptor) remain. And the ID of the thread can be reused.

Somebody who knows this code should take a good look.

- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/Tk4T2ijCOnn/RHQRAh5cAJkBTNx7g9pj+naBm5fyftI9LatRTACfaPkg
t/ZzWXPAjlaqRJc+wIRP8AU=
=x8G3
-----END PGP SIGNATURE-----
--- linux/fs/dnotify.c-save 2003-04-03 10:04:03.000000000 -0800
+++ linux/fs/dnotify.c 2003-08-28 11:41:23.000000000 -0700
@@ -94,7 +94,7 @@
prev = &odn->dn_next;
}

- error = f_setown(filp, current->pid, 1);
+ error = f_setown(filp, current->tgid, 1);
if (error)
goto out_free;
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.064 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site