Commit 02488b12 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Use tgid rather than pid in dnotify

From: Ulrich Drepper <drepper@redhat.com>

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.

(Looks right to me...)
parent a19a4921
......@@ -94,7 +94,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
prev = &odn->dn_next;
}
error = f_setown(filp, current->pid, 1);
error = f_setown(filp, current->tgid, 1);
if (error)
goto out_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment