connector: add parent pid and tgid to coredump and exit events
authorStefan Strogin <sstrogin@cisco.com>
Mon, 30 Apr 2018 22:04:29 +0000 (01:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 May 2018 18:25:37 +0000 (14:25 -0400)
commitb086ff87251b4a4c147bc3af20369514e9d0d9ad
tree6dfa9a0d2d559464264580958053f414ad1d0cf9
parente283de3a4fa885aed11525129fd4570f92c1d1a9
connector: add parent pid and tgid to coredump and exit events

The intention is to get notified of process failures as soon
as possible, before a possible core dumping (which could be very long)
(e.g. in some process-manager). Coredump and exit process events
are perfect for such use cases (see 2b5faa4c553f "connector: Added
coredumping event to the process connector").

The problem is that for now the process-manager cannot know the parent
of a dying process using connectors. This could be useful if the
process-manager should monitor for failures only children of certain
parents, so we could filter the coredump and exit events by parent
process and/or thread ID.

Add parent pid and tgid to coredump and exit process connectors event
data.

Signed-off-by: Stefan Strogin <sstrogin@cisco.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/connector/cn_proc.c
include/uapi/linux/cn_proc.h