Re: [PATCH] dmi: Prevent linked list corruption (resent)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jean Delvare
Date: Monday, February 11, 2008 - 10:53 am

Hi Parag,

On Mon, 11 Feb 2008 12:35:39 -0500, Parag Warudkar wrote:

As I understand the way doubly linked lists are implemented in Linux, I
think that the corruption exists even if you are only adding items to
the list. Each struct dmi_device contains a list_head which points to
the previous and next items in the list. If you add a struct dmi_device
that was already in the list, you are overwriting this list_head with
new pointers and you lose the pointers that were originally there. This
means that you have created a "shortcut" from one list item to another
item that is further in the list, and the items in-between them are no
longer reachable.


Thanks,
-- 
Jean Delvare
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] dmi: Prevent linked list corruption, Jean Delvare, (Mon Feb 11, 10:22 am)
[PATCH] dmi: Prevent linked list corruption (resent), Jean Delvare, (Mon Feb 11, 10:24 am)
Re: [PATCH] dmi: Prevent linked list corruption (resent), Parag Warudkar, (Mon Feb 11, 10:35 am)
Re: [PATCH] dmi: Prevent linked list corruption (resent), Jean Delvare, (Mon Feb 11, 10:53 am)