diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-10-13 11:37:06 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-13 11:37:06 +0200 |
commit | 3c69ea44406bf27b6f2e9b2f11238c344fd8374d (patch) | |
tree | b459600bfffb55b6693b566f5dff859daa216dbe /ipc/shm.c | |
parent | 53b3ffee788559fe26d32f21b223bf4bad959477 (diff) | |
parent | e8d65a8d985271a102f07c7456da5b86c19ffe16 (diff) |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index 222131e8e38f..41787276e141 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -551,12 +551,6 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) if (IS_ERR(file)) goto no_file; - id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); - if (id < 0) { - error = id; - goto no_id; - } - shp->shm_cprid = task_tgid_vnr(current); shp->shm_lprid = 0; shp->shm_atim = shp->shm_dtim = 0; @@ -565,6 +559,13 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) shp->shm_nattch = 0; shp->shm_file = file; shp->shm_creator = current; + + id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); + if (id < 0) { + error = id; + goto no_id; + } + list_add(&shp->shm_clist, ¤t->sysvshm.shm_clist); /* |