mount error 12 = Cannot allocate memory - SOLVED! (Was "wrong newsgroup" subject)

Ohmster <notareal@emailaddress.> wrote in


The good
thing is that it is fixed, from a Linux point of view and this is a
Linux newsgroup. I will be a good netizen and report back here what
the fix was when I find it to get it into the newsgroup archives to
help others. There ain't hardly crap out there on the net for this
problem, although others have mentioned it.


I am posting this for the benefits of any others that are confounded by
the mount error:
mount error 12 = Cannot allocate memory

Okay, this is what was wrong with the mount.cifs command and what I did
to correct it. This is the error you receive in Linux when you try to
mount a Windows XP, 2000, or NT share and it fails:

mount error 12 = Cannot allocate memory

This is not a Linux problem, but the Windows machine is the one that is
causing it and refusing to allow the mount. I found this by running tail
on the messages file in one term and then running the command in another
terminal window, then watching the tail command to see what errors were
generated by the mount commmand.

The command that generates the error:

[root@ohmster ~]# mount -t cifs //missy/ohmster_music /mnt/test -o
mount error 12 = Cannot allocate memory
Refer to the mount.cifs(8) manual page ( mount.cifs)
[root@ohmster ~]#

The tail results that showed me the error:

[root@ohmster samba]# tail -f /var/log/messages
Oct 23 21:15:40 ohmster kernel: CIFS VFS: cifs_mount failed w/return
code = -12
Oct 23 21:19:43 ohmster kernel: Status code returned 0xc0000205
Oct 23 21:19:43 ohmster kernel: CIFS VFS: cifs_mount failed w/return
code = -12
[root@ohmster samba]#

The NT_STATUS message gave it away, this shows that a Windows based NT
machine caused the error, not a Linux machine.

Read on for the fix.

The Windows Fix, A.K.A.
The Solution!

Check the Event Log on the Windows machine that fails to allow it's share
to be mounted under System. Look for a red X, and the word Error. The
Source is Srv. The error will be:

The server's configuration parameter "irpstacksize" is too small for the
server to use a local device. Please increase the value of this

If you have this error on the Windows machine that fails to have it's
share mounted, then do the following...

This key in the system registry must be modifed or created:


If the key is there, increase it a bit to say 15 or 18. If the key does
not exist, as in my case, create a new DWORD Valute. Name it
IRPStackSize. Double click on it to edit the value, put a check on the
Decimal radio button for the Base so that you can see the parameter value
as a decimal value and not a hexidecimal value. Give the new key a value
of 15 and reboot. If that is not enough, raise it a litte to let's say 18
and then reboot again. The problem is solved. Go mount your samba shares.

theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.