[haiku-commits] Re: haiku: hrev53233 - src/system/kernel/debug src/kits/storage src/system/kernel src/kits/app headers/private/kernel
- From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Fri, 5 Jul 2019 15:16:07 +0200
Am 04/07/2019 um 23:00 schrieb waddlesplash:
a90e9ba7b9cd: kernel/team: Create a team_get_team_struct() function and utilize
it.
Cleans up some lock/get/unlock sequences, and makes it possible
for external consumers to get team structs (which will be necessary
for permissions checks.)
That change doesn't look particularly sane. The moment the read lock is
put away, you mustn't access the structure anymore.
There is already Team::Get() which correctly acquires a reference before
losing the lock.
Bye,
Axel.
Other related posts: