Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fcntl.c Create Date:2022-07-28 20:05:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:SYSCALL_DEFINE3

Proto:SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, unsigned long, arg)

Type:

Parameter:Nothing

475  __user * argp = arg
476  f = fdget_raw(fd)
478  err = -EBADF
480  If Not file Then Go to out
483  If Value for the false possibility is greater at compile time(f_mode & File is opened with O_PATH; almost nothing can be done with it ) Then
484  If Not check_fcntl_cmd(cmd) Then Go to out1
488  err = security_file_fcntl(file, cmd, arg)
489  If err Then Go to out1
493  Case cmd == using 'struct flock64'
494  Case cmd == F_OFD_GETLK
495  err = -EFAULT
496  If copy_from_user( & flock, argp, size of flock ) Then Break
498  err = fcntl_getlk64(file, cmd, & flock)
499  If Not err && copy_to_user(argp, & flock, size of flock ) Then err = -EFAULT
501  Break
502  Case cmd == F_SETLK64
503  Case cmd == F_SETLKW64
504  Case cmd == F_OFD_SETLK
505  Case cmd == F_OFD_SETLKW
506  err = -EFAULT
507  If copy_from_user( & flock, argp, size of flock ) Then Break
509  err = fcntl_setlk64(fd, file, cmd, & flock)
510  Break
511  Default
512  err = do_fcntl(fd, cmd, arg, file)
513  Break
515  out1 :
516  fdput(f)
517  out :
518  Return err