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>] [day] [month] [year] [list]
Message-ID: <337eb86f0901130757k7d31ec5p82d6405e69549fef@mail.gmail.com>
Date:	Tue, 13 Jan 2009 23:57:52 +0800
From:	zhp <zhpsub@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Is there a 'radix_tree_destroy()' interface in radix-tree?

Hi, all,

I am now writing a kernel module for Linux, and need to use the
radix-tree implementation in kernel. (include/linux/radix-tree.h &
lib/radix-tree.c). However, I do not find any interface for me to
destroy the tree, i.e. remove all non-root nodes in the tree, and free
all of my elements inserted in the tree before (of course, the free_fn
should be passed in by the user).

Is there such an interface for lib users? If not, who can tell me what
should I do to perform such a destroy task without dirty work? It is
almost impossible for me to "lookup an element  to check whether it's
in the tree, delete it if yes", because all possible keys are very
very large.

Also, I think it will be very useful for the kernel radix-tree module
if it provide such an interface:

    radix_tree_destroy(struct radix_tree_root *rtree,
				rtree_free_node_fn free_fn)

How about adding such an interface as a patch if I finally have to do
the dirty work?

Thanks.
zhp
--
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