handle: use dynamic major/minor allocation (ABI break)
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 21 Oct 2014 12:11:36 +0000 (14:11 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 21 Oct 2014 12:11:36 +0000 (14:11 +0200)
commit1fc0e192a9c4b43842be277112e1210405e23f55
treef57924d54e25b602b69df4eddfe2518188262815
parent83f791cbcf08c70713078c80020554c21c031e91
handle: use dynamic major/minor allocation (ABI break)

Instead of requiring 1 major per domain, we now allocate major/minor
combinations dynamically. So far, only a single major is allocated during
module init, but the code can easily be extended to even make those
dynamic. However, device-cgroups require us to have a fixed major. User
space must be aware that major/minor numbers no longer have any specific
meaning. Each major/minor combination might be assigned to any domain
and/or endpoint! Apart from this semantics change, the ABI stays the same.

Furthermore, this patch reworks the kdbus_domain_new() and kdbus_ep_new()
functions to avoid races against UEVENT_ADD. Both objects must be active
before we call device_add() and thus produce UEVENT_ADD.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
domain.c
domain.h
endpoint.c
endpoint.h
handle.c
handle.h
main.c
message.c