Re: [PATCHv2] generic: add fcntl corner cases tests

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



Hi Zorro,

The problem is that cifs.ko is returning -EACCES from fcntl(2) called
in do_test_equal_file_lock() but it is expecting -EAGAIN to be
returned, so it hangs in wait4(2):

...
[pid 14846] fcntl(3, F_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = -1 EACCES (Permission denied)
[pid 14846] wait4(-1,

The man page says:

      F_SETLK (struct flock *)
              Acquire a lock (when l_type is F_RDLCK or F_WRLCK) or release  a
              lock  (when  l_type  is  F_UNLCK)  on the bytes specified by the
              l_whence, l_start, and l_len fields of lock.  If  a  conflicting
              lock  is  held by another process, this call returns -1 and sets
              errno to EACCES or EAGAIN.  (The error  returned  in  this  case
              differs across implementations, so POSIX requires a portable ap‐
              plication to check for both errors.)

so fcntl_lock_corner_tests should also handle -EACCES.





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux