public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: ->pid in dnotify
Date: Thu, 28 Aug 2003 11:46:43 -0700	[thread overview]
Message-ID: <3F4E4E13.1000301@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

-----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-----

[-- Attachment #2: d-dnotify-pid --]
[-- Type: text/plain, Size: 292 bytes --]

--- 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;
 

             reply	other threads:[~2003-08-28 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-28 18:46 Ulrich Drepper [this message]
2003-08-28 22:44 ` ->pid in dnotify Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F4E4E13.1000301@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox