Re: [PATCH] add path-oriented proc_mkdir_path() function to /proc

From: Valdis . Kletnieks
Date: Mon May 10 2004 - 17:45:30 EST


On Mon, 10 May 2004 15:09:08 PDT, Edward Falk <efalk@xxxxxxxxxx> said:
> Hi all; apologies if there's a maintainer I should be sending this to
> as well; couldn't find one in the maintainers list or in the source code.
>
> This patch adds the function proc_mkdir_path() to fs/proc/generic.c.
> This allows kernel code to create e.g. "/proc/foo/bar/baz" without needing
> to check the hard way if /proc/foo/ and /proc/foo/bar/ already exist.

Hmm.. Looks like a useful utility function (there's certainly enough deep
trees in my /proc/sys tree), but I wonder...

1) Do we have cases where code should be implementing "it had *better* exist"
checks? This may be important if an intermediate directory "should have" been
created by sysctl or something, and has special permission needs..

2) Alternatively, does using this open up accidental collisions where we should
have checked something *doesnt* exist already, and complain if it does?

(Feel free to address either one by adding a "Dont do that then" comment ;)

Attachment: pgp00000.pgp
Description: PGP signature