From mboxrd@z Thu Jan 1 00:00:00 1970 From: navych@126.com (Navy Cheng) Date: Fri, 4 Mar 2016 13:02:02 +0800 Subject: What is the role of LIST_POISON1 and LIST_POISON2? Message-ID: <20160304050202.GA783@debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, When I read the code of list_del(), I find LIST_POISON1 and LIST_POISON2: static inline void list_del(struct list_head *entry) { __list_del(entry->prev, entry->next); entry->next = LIST_POISON1; entry->prev = LIST_POISON2; } Why not set entry->next and entry->prev to NULL ? Thank you!