pol_sort could go into an infinite loop.
The proof of this patch is left as a exercise for the reader :-)
Reported-by: "Hawrylewicz Czarnowski, Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
if (p[next] == NULL ||
(p[1-next] != NULL &&
!(pol_lesseq(prev, p[1-next])
- ^pol_lesseq(p[1-next], p[next])
- ^pol_lesseq(p[next], prev)))
+ ^pol_lesseq(prev, p[next])
+ ^pol_lesseq(p[next], p[1-next])))
)
next = 1 - next;