Re: Importing system call as a module function

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

 



On Sun, 14 Jul 2013 01:05:31 +0530, Saket Sinha said:

> This function long mkdir(......) has most probably imported sytem call
> sys_mkdir since no other instance of mkdir is there in the kernel source
> tree.
> http://lxr.linux.no/linux+v2.6.18/include/linux/syscalls.h#L389
>
> Please somebody explain this.

A bigger question is why a kernel module is trying to do a mkdir in the
first place.  Note that procfs and sysfs provide other APIs for modules
to create subdirectories in those pseudo filesystems.

I see it looks like yet another attempt to make a "union" filesystem - you
almost certainly want to examine the other attempts at doing such a thing,
as there's a lot of issues with doing it well.  In particular, doing whiteouts
and other operations will require more support from the VFS layer.  Just
doing a mkdir() call behind the VFS's back is almost certainly setting
yourself up for trouble (most likely on either locking or object lifetime
issues).

Attachment: pgp4JfYGqZIZP.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://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