[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH-for-4.13 v4] Rationalize max_grant_frames and max_maptrack_frames handling



On 28.11.2019 17:42,  Durrant, Paul  wrote:
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 28 November 2019 16:37
>>
>> On 28.11.2019 14:58, Paul Durrant wrote:
>>> +    val = simple_strtoul(arg, &e, 0);
>>> +    if ( *e )
>>> +        return -EINVAL;
>>> +
>>> +    if ( val <= INT_MAX )
>>> +        *valp = val;
>>> +    else
>>> +        printk("parameter \"%s\" value \"%s\" is out of range; using
>> value \"%u\"\n",
>>> +               param, arg, *valp);
>>
>> Better store INT_MAX in this case rather than leaving the value
>> unchanged? Or otherwise ...
>>
>>> +    return 0;
>>
>> ... at least don't return success?
> 
> TBH I wasn't sure what the best thing to do was. In the end I opted
> for the warning and a successful completion as I thought a failure
> would be largely unhelpful. I can change this into an error though.

Well, if you return success, then the option should be handled in at
least a best effort manner, i.e. by storing INT_MAX as indicated.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.