Messages in this thread | | | From | Rasmus Villemoes <> | Subject | Re: [PATCH 2/2] lib: list_sort_test(): Add extra corruption check | Date | Mon, 23 Jun 2014 21:15:21 +0200 |
| |
Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
> Add a check to make sure that the prev pointer of the list head points > to the last element on the list. > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > --- > lib/list_sort.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/list_sort.c b/lib/list_sort.c > index 291412a..832f525 100644 > --- a/lib/list_sort.c > +++ b/lib/list_sort.c > @@ -272,6 +272,11 @@ static int __init list_sort_test(void) > } > count++; > } > + if (head->prev != cur) {
Scratch that, should be head.prev. Obviously I forgot TEST_LIST_SORT=y when test-compiling. Anyway, I have a few other things I'd like to propose for list_sort.c. Revised patches on their way; sorry for the noise.
Rasmus
| |