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:	Mon, 13 Jul 2009 11:25:24 -0400
From:	Benjamin Blum <bblum@...gle.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, akpm@...ux-foundation.org,
	serue@...ibm.com, menage@...gle.com
Subject: Re: [PATCH 1/3] Adds a read-only "procs" file similar to "tasks" that 
	shows only unique tgids

On Sun, Jul 12, 2009 at 11:46 PM, Li Zefan<lizf@...fujitsu.com> wrote:
> I think a better demonstration is:
>
>  $ cat tasks
>  1000
>  1001
>  1002
>
>  $ cat procs
>  1000

Indeed.

>> +     /*
>> +      * if the length difference is large enough, we want to allocate a
>> +      * smaller buffer to save memory. if this fails due to out of memory,
>> +      * we'll just stay with what we've got.
>> +      */
>> +     if (PIDLIST_REALLOC_DIFFERENCE(length, dest)) {
>> +             newlist = kmalloc(dest * sizeof(pid_t), GFP_KERNEL);
>
> krealloc()
>

Ah yes. I had thought about krealloc and determined that it wasn't
clever enough to do in-place resizing, but forgot that it could be
used anyway here.
--
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