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:	Sat, 5 Dec 2009 02:31:23 +0100
From:	Ingo Oeser <ioe-lkml@...eria.de>
To:	Sage Weil <sage@...dream.net>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 05/24] ceph: ref counted buffer

On Friday 04 December 2009, Sage Weil wrote:
> struct ceph_buffer is a simple ref-counted buffer.  We transparently
> choose between kmalloc for small buffers and vmalloc for large ones.
> 
> This is currently used only for allocating memory for xattr data.

Could you wrap parts of this refcounting logic around kref?
see #include <linux/kref.h> and lib/kref.c

It avoids a bug with memory areas for free and if anybody
optimizes or changes refcounting stuff, you get all changes for free :-)

Best Regards

Ingo Oeser
--
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