A task of a cell can neither create a cell nor start a task in one. So far that looks like a side effect of the fact that no cellfd ever gets into a cell. Make it an explicit rule that does not depend on that. The rule fits the model: a cell can do what its slots hold, and the right to spawn is a slot like any other. cell_may_spawn() checks it where a cell is created and where a task is started in one. There is nothing to put into the slot yet, so it is always empty for a cell, and a task that is in no cell may always spawn. This patch only reserves the name. Nested cells can later be enabled by filling the slot. Signed-off-by: Josef Bacik --- kernel/cell/slots.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/cell/slots.c b/kernel/cell/slots.c index cc732c4e09f9..6ce8892f7908 100644 --- a/kernel/cell/slots.c +++ b/kernel/cell/slots.c @@ -165,6 +165,9 @@ SYSCALL_DEFINE5(cell_configure, int, cfd, unsigned int, cmd, if (IS_ERR(key)) return PTR_ERR(no_free_ptr(key)); } + /* Reserved. See cell_may_spawn(). */ + if (key && !strcmp(key, "spawn")) + return -EOPNOTSUPP; if (cmd == CELL_SET_STRING) { str = strndup_user(uvalue, 256); if (IS_ERR(str)) -- 2.55.0