Lines Matching refs:new
186 * Insert new IPC object into idr tree, and set sequence number and id
194 * The caller must own kern_ipc_perm.lock.of the new object.
201 static inline int ipc_idr_alloc(struct ipc_ids *ids, struct kern_ipc_perm *new)
211 * As soon as a new object is inserted into the idr,
219 * (i.e.: set new->deleted, reduce refcount, call_rcu())
244 new->seq = ids->seq;
249 idr_replace(&ids->ipcs_idr, new, idx);
252 new->seq = ipcid_to_seqx(next_id);
253 idx = idr_alloc(&ids->ipcs_idr, new, ipcid_to_idx(next_id), 0, GFP_NOWAIT);
256 new->id = (new->seq << ipcmni_seq_shift()) + idx;
264 * @new: new ipc permission set
267 * Add an entry 'new' to the ipc ids idr. The permissions object is
269 * is returned. The 'new' entry is returned in a locked state on success.
276 int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int limit)
283 refcount_set(&new->refcount, 1);
295 spin_lock_init(&new->lock);
297 spin_lock(&new->lock);
300 new->cuid = new->uid = euid;
301 new->gid = new->cgid = egid;
303 new->deleted = false;
305 idx = ipc_idr_alloc(ids, new);
308 if (idx >= 0 && new->key != IPC_PRIVATE) {
309 err = rhashtable_insert_fast(&ids->key_ht, &new->khtnode, ipc_kht_params);
316 new->deleted = true;
317 spin_unlock(&new->lock);
330 * ipcget_new - create a new ipc object
383 * ipcget_public - get an ipc object or create a new one
391 * It adds a new entry if the key is not found and does some permission
405 * a new entry + read locks are not "upgradable"
546 * old/new ipc_perm structures
552 * @out: new style ipc permissions
569 * ipc64_perm_to_ipc_perm - convert new ipc permissions to old
570 * @in: new style ipc permissions
573 * Turn the new style permissions object @in into a compatibility
727 * Return IPC_64 for new style IPC and IPC_OLD for old style IPC.