]> git.baikalelectronics.ru Git - kernel.git/commit
mm: use pidfd_get_task()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 11 Oct 2021 13:32:45 +0000 (15:32 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 14 Oct 2021 11:29:22 +0000 (13:29 +0200)
commit9e88257514190e7cc0e775139771ef77ade92162
tree6f2648304b5616382752a5f4e6020037d0a137c5
parent565f1457857bb70342caa9f86eb0a42e84c3b4f7
mm: use pidfd_get_task()

Instead of duplicating the same code in two places use the newly added
pidfd_get_task() helper. This fixes an (unimportant for now) bug where
PIDTYPE_PID is used whereas PIDTYPE_TGID should have been used.

Link: https://lore.kernel.org/r/20211004125050.1153693-3-christian.brauner@ubuntu.com
Link: https://lore.kernel.org/r/20211011133245.1703103-3-brauner@kernel.org
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Matthew Bobrowski <repnop@google.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Reviewed-by: Matthew Bobrowski <repnop@google.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
mm/madvise.c
mm/oom_kill.c