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]
Date: Wed, 12 Jun 2024 17:19:25 +0000
From: Chaitanya Kulkarni <chaitanyak@...dia.com>
To: Keith Busch <kbusch@...a.com>, "linux-nvme@...ts.infradead.org"
	<linux-nvme@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-kselftest@...r.kernel.org"
	<linux-kselftest@...r.kernel.org>
CC: "hch@....de" <hch@....de>, "sagi@...mberg.me" <sagi@...mberg.me>,
	"paulmck@...nel.org" <paulmck@...nel.org>, "davidgow@...gle.com"
	<davidgow@...gle.com>, "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>, "venkat88@...ux.vnet.ibm.com"
	<venkat88@...ux.vnet.ibm.com>, Keith Busch <kbusch@...nel.org>
Subject: Re: [PATCH 1/2] list: introduce a new cutting helper

On 6/12/24 08:51, Keith Busch wrote:
> From: Keith Busch <kbusch@...nel.org>
>
> Provide a helper to remove elements from a list to the end, and place
> those elements in a new list.
>
> Signed-off-by: Keith Busch <kbusch@...nel.org>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck

I did quick run before the review if anybody cares :-

           head     entry                      list

node [3 | | 2]    [1 | | 3]     [2 | | 1]    [X | | X]
addr 1             2            3            4

+    list->next = entry;
+    list->prev = head->prev;
node                                         [3 | | 2] 
addr                                         4

+ head->prev = entry->prev;
node  [1 | | 2]
addr  1
+ entry->prev->next = head; node [1 | | 1]
addr 1

+ entry->prev = list; node               [4 | | 3]
addr                2

+    list->prev->next = list;
node                          [2 | | 4] addr                          3

reordering with list at front with head  :-
      head
node [1 | | 1]
addr
      list
node [3 | | 2] [4 | | 3] [2 | | 4]
addr  4         2         3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ