Bug 125827 - losetup, memlock: Cannot allocate memory
Summary: losetup, memlock: Cannot allocate memory
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: rawhide
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-11 21:29 UTC by Ivan Gyurdiev
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-24 08:32:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ivan Gyurdiev 2004-06-11 21:29:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040518 Firefox/0.8

Description of problem:
Hi. I am running Core with 128 MB of RAM which is rather low, but I
think sufficient. 

However, in lomount.c , part of losetup, 

this fails with ENOMEM:

#ifdef MCL_FUTURE
        /*
         * Oh-oh, sensitive data coming up. Better lock into memory to
prevent
         * passwd etc being swapped out and left somewhere on disk.
         */
                                                                     
                                                       
        if(mlockall(MCL_CURRENT | MCL_FUTURE)) {
                perror("memlock");
                fprintf(stderr, _("Couldn't lock into memory,
exiting.\n"));
                exit(1);
        }
#endif

causing this:
[root@cobra mount]# free
             total       used       free     shared    buffers     cached
Mem:        127096     119556       7540          0       6416      53872
-/+ buffers/cache:      59268      67828
Swap:       512024      64616     447408
[root@cobra mount]# ./losetup /dev/loop0 /initrd2
memlock: Cannot allocate memory
Couldn't lock into memory, exiting.
[root@cobra mount]# ls

causing mkinitrd to fail

causing new-kernel-pkg to fail

causing me to not be able to install a new kernel properly, which
sucks, because I can't test SElinux :)

So - what should be done. I hope the answer is not "get more RAM". 



Version-Release number of selected component (if applicable):
util-linux-2.12-18

How reproducible:
Always

Comment 1 Ivan Gyurdiev 2004-06-21 01:27:41 UTC
Please help me out here - I can't install any new kernels properly...
Some clue as to what can be done?

Thanks for any help in advance.

I.G.




Comment 2 Ivan Gyurdiev 2004-06-24 08:32:59 UTC
Fixed in newer kernels.


Note You need to log in before you can comment on or make changes to this bug.