lkml.org 
[lkml]   [2012]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 04/10] ipc: add new SHM_SET command for sys_shmctl() call
From
Date
On Mon, 2012-10-15 at 19:59 +0400, Stanislav Kinsbursky wrote:
> New SHM_SET command will be interpreted exactly as IPC_SET, but also will
> update key, cuid and cgid values. IOW, it allows to change existent key value.
> The fact, that key is not used is checked before update. Otherwise -EEXIST is
> returned.
[...]
> --- a/ipc/shm.c
> +++ b/ipc/shm.c
[...]
> @@ -759,6 +763,10 @@ static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd,
> case IPC_RMID:
> do_shm_rmid(ns, ipcp);
> goto out_up;
> + case SHM_SET:
> + err = ipc_update_key(&shm_ids(ns), &shmid64.shm_perm, ipcp);
> + if (err)
> + break;
[...]

Please add /* fall through */ here, and in the similar cases in patches
5 and 7, to make clear that it's deliberate.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.



\
 
 \ /
  Last update: 2012-10-15 21:41    [W:0.239 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site