xen/cmdline: Fix parse_boolean() for unadorned values
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 31 Jan 2018 10:35:52 +0000 (10:35 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 31 Jan 2018 10:47:12 +0000 (10:47 +0000)
commitac37ec1ddef234eeba6f438c29ff687c64962ebd
tree77f72342685cef7b70583212da0213a47a62458b
parent16a31ca735165e63d67e86f60996f2b6a31cc0ee
xen/cmdline: Fix parse_boolean() for unadorned values

A command line such as "cpuid=no-ibrsb,no-stibp" tickles a bug in
parse_boolean() because the separating comma fails the NUL case.

Instead, check for slen == nlen which accounts for the boundary (if any)
passed via the 'e' parameter.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/kernel.c