summaryrefslogtreecommitdiff
path: root/sig.c
blob: 2b5ab5ecadd20d76e0913ebbe7539f85eedbee03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <signal.h>

#include "sig.h"

void register_signal(int signal, void (*handler)(int))
{
	sigset_t block_mask;
	struct sigaction saction;

	sigfillset(&block_mask);

	saction.sa_handler = handler;
	saction.sa_mask = block_mask;
	saction.sa_flags = SA_RESTART;

	sigaction(signal, &saction, NULL);
}

void register_signal_f(int signal, void (*handler)(int), int flags)
{
	sigset_t block_mask;
	struct sigaction saction;

	sigfillset(&block_mask);

	saction.sa_handler = handler;
	saction.sa_mask = block_mask;
	saction.sa_flags = flags;

	sigaction(signal, &saction, NULL);
}
d3d46dc06b9afd3d17'>93f55972bc0fef0e394bbed3d46dc06b9afd3d17 (diff)
drm/dp/mst: Always clear proposed vcpi table for port.
Not clearing mst manager's proposed vcpis table for destroyed connectors when the manager is stopped leaves it pointing to unrefernced memory, this causes pagefault when the manager is restarted when plugging back a branch. Fixes: 91a25e463130 ("drm/dp/mst: deallocate payload on port destruction") Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Reviewed-by: Lyude <cpaul@redhat.com> Cc: stable@vger.kernel.org Cc: Mykola Lysenko <Mykola.Lysenko@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com>
Diffstat