mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Q] get_ma_area() function
@ 2002-05-07 11:58 Andrey Panin
  2002-05-07 13:58 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Panin @ 2002-05-07 11:58 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

Hi,

looking at mm/vmalloc.c i found one strange (for me) line of code.

From mm/vmalloc.c:

struct vm_struct * get_vm_area(unsigned long size, unsigned long flags)
{
	unsigned long addr;
	struct vm_struct **p, *tmp, *area;

	area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
	if (!area)
		return NULL;
	size += PAGE_SIZE;
	^^^^^^^^^^^^^^^^^^
Why ? Maybe size = PAGE_ALIGN(size); is more correct here ?

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: wwwkeys.eu.pgp.net

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-07 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07 11:58 [Q] get_ma_area() function Andrey Panin
2002-05-07 13:58 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®