Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource: ucmd-module: only allow the same module that reserved befor…
…e to pass sid_ucmd_mod_{reserve,unreserve}_kv Global reservation change (that is, calling sid_ucmd_mod_reserve,unreserve}_kv) can pass only if exactly the same module that reserved the key before is requesting it. Use new _kv_cb_reserve to check for this condition. The original _kv_cb_write callback is not applicable to sid_ucmd_mod_{reserve_unreserve}_kv calls anymore after recent changes where we can pass 'sid_ucmd_kv_flags flags' with sid_ucmd_mod_reserve_kv calls. This way, we can reserve a key template for a module and let only that module to change the reservation, but still allow other modules to write concrete instances of the key (passing the _check_global_kv_rs_for_wr, depending on KV_{FRG,SUB,SUP}* flags set with sid_ucmd_mod_reserve_kv).
- Loading branch information