OoO En  ce doux début de matinée  du vendredi 09 mars  2012, vers 08:28,
Cyril Bonté <[email protected]> disait :

>> looks good, will check this tomorrow when I have my eyeballs wider
>> opened.

> I didn't have time to test the patch yet, but for me this will keep
> some side effects : depending on the parameters order, this will skip
> some servers.

> Example :
> ?s=server1&b=backend&action=disable&s=server2&s=server3

> With the patch, I think "server3" will be ignored.

Yes, sorry, I didn't consider multiple servers.

> When writing this part of code, the order dependency was not
> considered as a bug but as an "optimization" instead :
> - the stats page form provides the parameters in that order.
> - the query string is parsed from right to left to only remember the
> last value for parameters "action" and "b" (in case someone provides
> several ones).

> If we want to break the order dependency, we should think of a more
> complete patch, for example using a 2 pass parsing (1st pass to find
> "action" and "b" parameters, 2nd pass to apply them to the servers) :
> - to prevent memory allocation
> - to take into account every "s" parameters
> - of course, it can be optimized to prevent the 2nd pass if the
> parameters are already ordered.

Maybe, it's not worth it.
-- 
Vincent Bernat ☯ http://vincent.bernat.im

die_if_kernel("Whee... Hello Mr. Penguin", current->tss.kregs);
        2.2.16 /usr/src/linux/arch/sparc/kernel/traps.c

Reply via email to