2002-10-24 06:56:51

by T.L.Madhu

[permalink] [raw]
Subject: Unexpected behaviour with create_module

Hi All,

create_module() system calls gives segmentation fault with
size (second) argument set to huge value. This behaviour is
seen only in 2.4.* series kernel but the same call in 2.5.*
series (tested with 2.5.43 kernel) fails as EXPECTED with
errno set to ENOMEM.

Check this programme,
----------------------------------------------------------
#include <linux/module.h>
#include <errno.h>

main()
{
printf("Return values for too big module size %d ",
create_module("dummy", 99999999));
printf("errno %d\n", errno);
}
----------------------------------------------------------

Is this a known bug? wondering why this bug is not fixed in
2.4.* series?

Please let me know.

Thanks,
Madhu