[SPDK] Re: Change path of file lock in spdk_pci_device_claim

Harris, James R <james.r.harris at intel.com>
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
Hi Weifeng,

There's no special reason to locate these files in /tmp.  /var/run or /var/tmp would be fine.  We already put the JSON-RPC domain socket in /var/tmp, so moving it there would make it more consistent.

Note that the lock files have same ownership as the SPDK process.  If someone has privileges to delete the lock file or remount tmpfs, there are many other things they could do to affect the running SPDK process.  They could even delete the lock file from the new location.

-Jim


On 11/11/20, 1:43 AM, "swf504(a)163.com" <swf504(a)163.com> wrote:

    Hi SPDK team,
        I notice that the posix lock file locate in '/tmp' directory which no safe in running linux system, 
    user maybe delete files in /tmp directory or remout the tmpfs, and that cause the posix lock inactive.
    This is a serious fatal because the application can't detect the file change, After a new application start and
    the spdk_pci_device_claim function still return true, that means multi application maybe probe same controller, 
    Unexpect behavior or controller init hung maybe happen during controller colliding.

    Is there special reason the need locate in '/tmp', if not, I suggest locate in '/var/run' directory.
    Need your comment!

    Br,
    Weifeng Su
    _______________________________________________
    SPDK mailing list -- spdk(a)lists.01.org
    To unsubscribe send an email to spdk-leave(a)lists.01.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.