From: Konrad Lipinski Date: Mon, 28 Nov 2016 13:40:26 +0000 (+0100) Subject: kdbus: CONN_INFO: drop ATTACH_FLAGS_RECV support X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ffbdbfaec2946d84749ca19d1010ec8f7a1aa37;p=platform%2Fkernel%2Flinux-exynos.git kdbus: CONN_INFO: drop ATTACH_FLAGS_RECV support --- diff --git a/ipc/kdbus/bus.c b/ipc/kdbus/bus.c index f526eb25f4c5..17a8f9898c09 100644 --- a/ipc/kdbus/bus.c +++ b/ipc/kdbus/bus.c @@ -78,13 +78,11 @@ static struct kdbus_bus *kdbus_bus_new(struct kdbus_domain *domain, const char *name, struct kdbus_bloom_parameter *bloom, u64 attach_owner, - u64 attach_req, u64 flags, kuid_t uid, kgid_t gid) { struct kdbus_bus *b; int ret; attach_flags_t attach_flags; - attach_flags_t attach_flags_req; if (bloom->size < 8 || bloom->size > KDBUS_BUS_BLOOM_MAX_SIZE || !KDBUS_IS_ALIGNED8(bloom->size) || bloom->n_hash < 1) return ERR_PTR(-EINVAL); @@ -92,9 +90,6 @@ static struct kdbus_bus *kdbus_bus_new(struct kdbus_domain *domain, if ((ret = kdbus_sanitize_attach_flags(attach_owner, &attach_flags))) return ERR_PTR(ret); - if ((ret = kdbus_sanitize_attach_flags(attach_req, &attach_flags_req))) - return ERR_PTR(ret); - if ((ret = kdbus_verify_uid_prefix(name, domain->user_namespace, uid))) return ERR_PTR(ret); @@ -116,7 +111,6 @@ static struct kdbus_bus *kdbus_bus_new(struct kdbus_domain *domain, return ERR_PTR(ret); memset(b, 0, sizeof(*b)); b->meta_valid = ret | kdbus_dst_sensitive_meta_collect(&b->meta, attach_flags); - b->attach_flags_req = attach_flags_req; } kdbus_node_init(&b->node, KDBUS_NODE_BUS); @@ -341,7 +335,6 @@ struct kdbus_bus *kdbus_cmd_bus_make(struct kdbus_domain *domain, { .type = KDBUS_ITEM_MAKE_NAME, .mandatory = true }, { .type = KDBUS_ITEM_BLOOM_PARAMETER, .mandatory = true }, { .type = KDBUS_ITEM_ATTACH_FLAGS_SEND }, - { .type = KDBUS_ITEM_ATTACH_FLAGS_RECV }, }; struct kdbus_args args = { .allowed_flags = @@ -360,7 +353,6 @@ struct kdbus_bus *kdbus_cmd_bus_make(struct kdbus_domain *domain, bus = kdbus_bus_new(domain, argv[0].item->str, &argv[1].item->bloom_parameter, argv[2].item ? *(argv[2].item->data64) : 0, - argv[3].item ? *(argv[3].item->data64) : 0, cmd->flags, current_euid(), current_egid()); if (IS_ERR(bus)) { ret = PTR_ERR(bus); diff --git a/ipc/kdbus/bus.h b/ipc/kdbus/bus.h index 38ca7b00bc17..78cb5a5a1156 100644 --- a/ipc/kdbus/bus.h +++ b/ipc/kdbus/bus.h @@ -98,7 +98,6 @@ struct kdbus_bus { struct kdbus_dst_sensitive_meta meta; attach_flags_t meta_valid; - attach_flags_t attach_flags_req; struct kdbus_item meta_items[0]; }; diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c index 03c26a31f5bb..cfaf1032f5f4 100644 --- a/ipc/kdbus/connection.c +++ b/ipc/kdbus/connection.c @@ -116,10 +116,6 @@ static struct kdbus_conn *kdbus_conn_new(struct kdbus_ep *ep, if ((ret = kdbus_sanitize_attach_flags(hello->attach_flags_send, &attach_flags_send))) return ERR_PTR(ret); - /* The attach flags must always satisfy the bus requirements. */ - if (bus->attach_flags_req & ~attach_flags_send) - return ERR_PTR(-ECONNREFUSED); - if ((ret = kdbus_sanitize_attach_flags(hello->attach_flags_recv, &attach_flags_recv))) return ERR_PTR(ret); @@ -1905,13 +1901,6 @@ int kdbus_cmd_update(struct kdbus_conn *conn, void __user *argp) if ((ret = kdbus_sanitize_attach_flags(*item_attach_send, &attach_send))) goto exit; - - kdbus_assert(conn->ep); - kdbus_assert(conn->ep->bus); - if (conn->ep->bus->attach_flags_req & ~attach_send) { - ret = -EINVAL; - goto exit; - } } if (item_attach_recv) {