lkml.org 
[lkml]   [2002]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: Segfault hidden in list.h
On Sun, 12 May 2002, Rose, Billy wrote:

> The code inside of __list_add:
>
> next->prev = new;
> new->next = next;
> new->prev = prev;
> pre-next = new;
>
> needs to be altered to:
>
> new->prev = prev;
> new->next = next;
> next->prev = new;
> prev->next = new;

you need a wmb also :

new->prev = prev;
new->next = next;
wmb
next->prev = new;
prev->next = new;




- Davide




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.055 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site