lkml.org 
[lkml]   [2018]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 4/5] ipc: Clamp msgmni and shmmni to the real IPCMNI limit
From
Date
On 02/27/2018 08:01 PM, Luis R. Rodriguez wrote:
> On Tue, Feb 27, 2018 at 03:49:50PM -0500, Waiman Long wrote:
>> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
>> index 8ad93c2..e4ab272 100644
>> --- a/ipc/ipc_sysctl.c
>> +++ b/ipc/ipc_sysctl.c
>> @@ -41,12 +41,17 @@ static int proc_ipc_dointvec(struct ctl_table *table, int write,
>> static int proc_ipc_dointvec_minmax(struct ctl_table *table, int write,
>> void __user *buffer, size_t *lenp, loff_t *ppos)
>> {
>> + int ret;
>> struct ctl_table ipc_table;
>>
>> memcpy(&ipc_table, table, sizeof(ipc_table));
>> ipc_table.data = get_ipc(table);
>>
>> - return proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos);
>> + ret = proc_dointvec_minmax(&ipc_table, write, buffer, lenp, ppos);
>> +
>> + table->flags |= ipc_table.flags; /* Copy back any change in flags */
> This seems fragile, why are we requiring this to be done by the users of
> CTL_FLAGS_CLAMP_RANGE ?
>
> Luis

I should have just copied back the CTL_FLAGS_OOR_WARNED flag. That will
clarify what it is for.

Cheers,
Longman

\
 
 \ /
  Last update: 2018-02-28 18:57    [W:0.083 / U:3.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site