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

Re: [Xen-devel] [PATCH 2/2] kexec: ensure kexec_status() always returns 0 or 1



>>> On 18.01.17 at 22:47, <eric.devolder@xxxxxxxxxx> wrote:
> The use of test_bit() can also return EPERM, so the
> return value from test_bit() must be checked to
> ensure that kexec_status() always returns 0, 1 or
> -1, per the public header description.

Well, no, and this is rather disappointing. Did you look at the test_bit()
implementation, as I did suggest you do? As said before, it returns
non-zero if the bit was set, and zero if it was clear. It won't ever
return -EPERM (it was only your original code which converted the
meaning of ~0 to -EPERM). Hence the result here isn't much better
than the original.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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