Cannot mount Cifs Share

Cifs Shares that are hosted on Windows Plattforms, could possibly fail to be re-integrated after reboot of the sharing Windows machine.
The corresponding Error would be: mount error(12): Cannot allocate memory. Refer to the mount.cifs(8) manual page (e.g. man mount.cifs). chown: cannot acces ...

This might be the result of an -not existant or -insufficient size entry in the registry value IRPStacksize even if the mounting did work before the outage or reboot.

Following Microsoft article proposes to increase or create the IRPStacksize value.
 
Important: This section, method, or task contains steps that tell you how to modify the registry.
However, serious problems might occur if you modify the registry incorrectly.
Therefore, make sure that you follow these steps carefully.
To resolve this behavior, increase the IRPStackSize value in the registry:
 
1. Click Start, and then click Run.
2. Type regedit, and then click OK.
3. Navigate to the following key:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
4. In the right pane, double-click the IRPStackSize value.
* NOTE: If the IRPStackSizevalue does not already exist, use the following procedure to create it:
* In the Parameters folder of the registry, right-click the right pane.
* Point to New, and then click DWord Value.
* Type IRPStackSize.
* IMPORTANT: Type "IRPStackSize" exactly as it is displayed because the value name is case-sensitive.
5. Change the Base to decimal.
6. In the Value Data box, type a value that is larger than the value that is listed.
If you created the IRPStackSize value using the procedure described in step 4, the default value is 15.
It is recommended that you increase the value by 3.
Therefore, if the previous value was 11, type 14, and then click OK.
7. Close the Registry Editor.
8. Restart the computer.
 
If the problem persists after you complete the preceding procedure, try to increase the value of IRPStackSize even more.
The maximum value for Windows 2000 is 50 (0x32 hex).
 
If you are running Windows NT 4.0, and the problem persists after you complete the preceding procedure, you may have to apply Windows NT Service Pack 4 or Service Pack 5.

The usage of CIFS is not recommended anymore.
Protocols like ISCSI, NFS or local Disc are by far more robust and less vulnerable by network fluctuations.
It is recommended to use any of the named storagetypes instead of CIFS.