[klibc] [PATCH] Fix wrong NFS umount path

maximilian attems max at stro.at
Thu Jun 28 08:27:02 PDT 2012

On Fri, 22 Jun 2012, Benjamin Cama wrote:

> When mounting a NFS share and an error occurs for some reason, the NFS
> share is not unmounted correctly: the local path is used instead of the
> remote path in the umount_v[23]() call. This patch fixes this.
> I found this while debugging some problems mounting the root file system
> on NFS in a test system; I saw this in the logs (/mnt/duplicated is the
> legitimate remote path):
>         Jun 21 21:52:35 pangolin-test rpc.mountd[11155]: authenticated mount request from for /mnt/duplicated 
>         (/mnt/duplicated)
>         Jun 21 21:52:35 pangolin-test rpc.mountd[11155]: refused unmount request from for /root (/): no export ent
>         ry
> I didn't understand why the hell it was trying to umount /root. You can
> look at google for this and you'll find a lot of people wondering what
> this is. I think that the big issue with this is that _a lot_ of
> problems appearing _after_ not unmounting correctly the share the first
> time are caused by this: I used to get mounting errors with “Stale NFS
> file handle” that would never go away (NFS is so much a PITA for this
> statefull behavior). You'll find a lot of people on the net trying to
> reboot their NFS server and the like, in hope this errors goes away.

indeed lots of google hits.
> It was also quite misleading that the mount point for the root FS in the
> initramfs is called /root. Anyway, a lot of these problems go away with
> this patch.
> BTW, this bug is more than 9 years old, since the inception of nfsmount!

thank you for the detailed analysis and correction of this code flow.

applied and pushed.


More information about the klibc mailing list