Should I specify the mount type every time? What are the recommendations...?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I want your opinion about a syscall: mount().

Today, a problem brought back this doubt.
I see a lots of code that calls/uses mount() syscall.
But, recently, running Valgrind, it showed an error saying that you
cannot specify NULL as the 'type' argument of mount function.

An example from kernel code:
ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL);

Valgrind was complaining about the first NULL parameter which refers
to the mount type:
==18012== Syscall param mount(type) points to unaddressable byte(s)

After replacing NULL to type "none" the error disappeared.
I read a documentation about it, saying that is better to use "none"
for BIND and MOVE options. But, I'm not right about that.

Do you have any documentation or a best practice to use this syscall?

Thanks!

--
Julio Cesar Faracco

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux