GitHub PushEvent at 2014-08-10 21:41:13
Repository: kdbus
Actor: torstehu
Payload: {"shas":[["00d2afc400ae8184d88e5cb19f534e166d91ef6b","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","test: correctly set the 'ret' variable\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["8b7cfed90748d7bf5d35f03d83e7a105c4a26809","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","domain: add kdbus_domain_user_assign_id() to assign IDs to domain users\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["9a1bd42e36046e289d4c16350a15e1e2ea34e299","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","domain: add __kdbus_domain_user_account() to account domain users\n\nAdd __kdbus_domain_user_account() to account and link users into a\ndomain.\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["4ff47b39b30671ccca96cef951a2af12a02cb7df","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","domain: add kdbus_domain_user_account()\n\nAdd kdbus_domain_user_account() to account and link users into a\ndomain.\n\nThis function will take the domain lock, and it will be used as a\nreplacement for kdbus_domain_user_find_or_new().\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["e8c7fddfb695c384c6ecfdd15b3066480f473a45","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","kdbus: improve user quota accounting by using kdbus_domain_user_account()\n\nCurrently kdbus_domain_user_find_or_new() is used to find a user\ndomain or create a new one and link it into the domain.\n\nkdbus_domain_user_find_or_new() may fail due to memory allocation\nerrors or if the domain was shutdown, but since callers will\nreceive only a NULL pointer on failure, they assume -ENOMEM and\nignore -ESHUTDOWN. Fix this in kdbus_domain_user_account() by returning\nthe appropriate error code.\n\nThere are also some races with kdbus_domain_user_find_or_new(), if it is\ncalled with the same parameters and if we do not find a previously\nlinked domain user, then both threads will race to assign a different ID\nfor the same uid, thus, invalidating the users array. We fix this in the\nnew kdbus_domain_user_account() and __kdbus_domain_user_account() by\ntaking the domain lock only one time.\n\nReplace some kdbus_domain_user_find_or_new() calls with\nkdbus_domain_user_account(). The last one in bus.c is updated in the\nnext patch.\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["1ee9fcac431e4d6f71a7667258e343459a13e5c7","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","bus: improve user quota accounting and domain locking\n\nCurrently kdbus_bus_new() execution path might take the domain lock\nthree times on success, four times on failure.\n\nkdbus_bus_new():\n  => kdbus_domain_user_find_or_new(): takes it 2 times (and it is racy)\n  +\n  kdbus_bus_new(): take it an extra time to account the user and link\n  the bus into the domain bus_list.\n\nAnd as discussed in the previous patch kdbus_domain_user_find_or_new()\nis racy, so convert to __kdbus_domain_user_account()\n\nThis allows also to improve the execution path to take the domain lock\nonly one time in case of success. On failure the domain lock will be\ntaken two times.\n\nkdbus_bus_new():\n  => take domain lock\n  => check if domain is still active/connected\n     => __kdbus_domain_user_account()\n  ...\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["1becebff0eafbdb4b04105378c3e4328f1c6509f","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","connection: fix user quota accounting corruption\n\nFirst use kzalloc to allocate the users array, so we do not reference\nunintialized values.\n\nAnd free the old conn->msg_users array not the newly allocated 'users'\none.\n\nPatch tested, and users will hit the KDBUS_CONN_MAX_MSGS_PER_USER limit\nand fail with -ENOBUFS\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["cdaff4faa681e8c43d68581876b2158b13e3b604","2d393b18c8d5966ba6d9a51ea3e6da71f71f4933@opendz.org","domain: remove dead kdbus_domain_user_find_or_new()\n\nSigned-off-by: Djalal Harouni <tixxdz@opendz.org>","Djalal Harouni",true],["bcf31b7d68711ee2ebf4fe8c840b193b4155dbf7","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","test: do not use __ prefix for ordinary functions","Kay Sievers",true],["479322eb1c84c1679c06dcefc70a6c7b9579aa0c","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","do not use __ prefix for ordinary functions","Kay Sievers",true],["fc25c95354fed3caeaa8c8087a6c0ba8079dbd38","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","domain: add BUG_ON()","Kay Sievers",true],["6598aaf2fb9960456bb4e6867bdb9b30f50680fc","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","do not use __ prefix for ordinary functions","Kay Sievers",true],["96738fb43331f06b2a95633fd4c59e090d4fc532","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","kdbus.h: clarify policy holder docs","Kay Sievers",true],["7015a1e6746e0c238a723f132623819c2215bce1","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","prevent special-purpose connections from owning names or exchanging messages","Kay Sievers",true],["419166844240515e380fd90e00373783e5aa6b89","e9264147b413746293e539868c8edff71715e1e3@vrfy.org","use conn->type instead of conn->flags where possible","Kay Sievers",true]],"size":15,"ref":"refs/heads/master","head":"419166844240515e380fd90e00373783e5aa6b89"}