lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <961aa3350803220810y25f13d1bk3769e738c9f80625@mail.gmail.com>
Date:	Sun, 23 Mar 2008 00:10:45 +0900
From:	"Akinobu Mita" <akinobu.mita@...il.com>
To:	"Jens Axboe" <jens.axboe@...cle.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] cdrom: use list_head for cdrom_device_info list

2008/3/22, Jens Axboe <jens.axboe@...cle.com>:
> On Sat, Mar 22 2008, Akinobu Mita wrote:
>  > Use list_head for cdrom_device_info list instead of opencoded
>  > singly list handling.
>
>
> Looks good, but you don't seem to be initializing ->list anywhere. Did
>  you test this?
>
>  I'd suggest just adding an INIT_LIST_HEAD() before the list_add() in
>  register_cdrom()

It seems that current list_add() implementation doesn't need
initalized new entry with/without CONFIG_DEBUG_LIST.
And the following change will show too many warnings with CONFIG_DEBUG_LIST.

Is it recommended to add an INIT_LIST_HEAD() before the list_add()?

Index: 2.6-git/lib/list_debug.c
===================================================================
--- 2.6-git.orig/lib/list_debug.c
+++ 2.6-git/lib/list_debug.c
@@ -8,6 +8,7 @@

 #include <linux/module.h>
 #include <linux/list.h>
+#include <linux/bug.h>

 /*
  * Insert a new entry between two known consecutive entries.
@@ -49,6 +50,7 @@ EXPORT_SYMBOL(__list_add);
  */
 void list_add(struct list_head *new, struct list_head *head)
 {
+	WARN_ON(!list_empty(new));
 	__list_add(new, head, head->next);
 }
 EXPORT_SYMBOL(list_add);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ