diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-05 17:36:38 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-05 17:36:38 -0700 |
commit | 7b415285ae96f5bfa0fa95d3227c6900c4ff151d (patch) | |
tree | feb5198f57bfb5b58aca24ddc76a313236f94512 /ipc/shm.c | |
parent | c65cf815653ec64e73d40819806c2d1aed91681e (diff) | |
parent | 049e6dde7e57f0054fdc49102e7ef4830c698b46 (diff) | |
download | linux-7b415285ae96f5bfa0fa95d3227c6900c4ff151d.tar.gz |
Merge tag 'v4.3-rc4' into next
Merge with mainline to sync up with changes to parkbd driver.
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); /* |