Re: How to tell whether a struct file is held by a process?

From: Oliver Neukum
Date: Fri May 22 2009 - 08:26:35 EST


Am Thursday 21 May 2009 16:06:00 schrieben Sie:
> The problem is this.  Let D be the device plugged into port P.  When
> some program opens D's device file, it's necessary to check whether
> that same program has an open file reference for A(P), i.e., has opened

No. It is merely nice to do that, not necessary. You can take the position
that if the port is reserved the kernel won't touch the device but it is
user space's responsibility to not touch a device user space wants
to reserve.

Or alternatively, don't create the device file until user space tells
you to do so.

Regards
Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/