diff options
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -433,10 +433,11 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
433 | if (IS_ERR(file)) | 433 | if (IS_ERR(file)) |
434 | goto no_file; | 434 | goto no_file; |
435 | 435 | ||
436 | error = -ENOSPC; | ||
437 | id = shm_addid(ns, shp); | 436 | id = shm_addid(ns, shp); |
438 | if(id == -1) | 437 | if (id < 0) { |
438 | error = id; | ||
439 | goto no_id; | 439 | goto no_id; |
440 | } | ||
440 | 441 | ||
441 | shp->shm_cprid = task_tgid_vnr(current); | 442 | shp->shm_cprid = task_tgid_vnr(current); |
442 | shp->shm_lprid = 0; | 443 | shp->shm_lprid = 0; |