u64 timeout_ns)
{
struct kdbus_queue_entry *entry;
+ struct kdbus_item *sigmask_item;
+ sigset_t sigsaved;
int r, ret;
if (WARN_ON(!reply_wait))
* by the timeout scans that might be conducted for other,
* asynchronous replies of conn_src.
*/
+
+ sigmask_item = kdbus_items_get(cmd_send->items,
+ KDBUS_ITEMS_SIZE(cmd_send, items),
+ KDBUS_ITEM_SIGMASK);
+ if (sigmask_item) {
+ sigset_t sigmask;
+ memcpy(&sigmask, &sigmask_item->sigmask, sizeof(sigmask));
+ sigprocmask(SIG_SETMASK, &sigmask, &sigsaved);
+ }
+
r = wait_event_interruptible_timeout(reply_wait->reply_dst->wait,
!reply_wait->waiting || !kdbus_conn_active(conn_src),
nsecs_to_jiffies(timeout_ns));
return r;
}
+ if (sigmask_item)
+ sigprocmask(SIG_SETMASK, &sigsaved, NULL);
+
if (r == 0)
ret = -ETIMEDOUT;
else if (!kdbus_conn_active(conn_src))
#include <linux/ctype.h>
#include <linux/fs.h>
+#include <linux/signal.h>
#include <linux/string.h>
#include "item.h"
return -EINVAL;
break;
+ case KDBUS_ITEM_SIGMASK:
+ if (payload_size != sizeof(sigset_t))
+ return -EINVAL;
+ break;
+
case KDBUS_ITEM_NAME:
case KDBUS_ITEM_DST_NAME:
case KDBUS_ITEM_PID_COMM:
KDBUS_ITEM_ATTACH_FLAGS_RECV,
KDBUS_ITEM_ID,
KDBUS_ITEM_NAME,
+ KDBUS_ITEM_SIGMASK,
/* keep these item types in sync with KDBUS_ATTACH_* flags */
_KDBUS_ITEM_ATTACH_BASE = 0x1000,
struct kdbus_notify_name_change name_change;
struct kdbus_notify_id_change id_change;
struct kdbus_policy_access policy_access;
+ __u64 sigmask;
};
};