All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] [virtiofsd-rs] MR merged: Fix file type check for submount points
@ 2021-06-11  8:52 virtiofs-bot
  0 siblings, 0 replies; only message in thread
From: virtiofs-bot @ 2021-06-11  8:52 UTC (permalink / raw)
  To: virtio-fs

The current check (`mode & IFDIR != 0`) only kind of works accidentally.
It should be `mode & IFMT == IFDIR`.

Judging from my bits/stat.h, block devices and sockets would also pass
the `mode & IFDIR != 0` condition.  That is not exactly catastrophic, we
just never tested what happens what happens if we were to mark something
that is not a directory a submount, and so we only allow directories to
be submount points until someone needs guest submounts for mount points
that are not directories.

Note that the kernel also has a guard to only allow submounts on
directory nodes, so in practice this patch should not change any
user-visible behavior.
---
https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/30


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-11  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11  8:52 [Virtio-fs] [virtiofsd-rs] MR merged: Fix file type check for submount points virtiofs-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.