Re: [PATCH] [-mm] FS: file name must be unique in the same dir in procfs

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

 



On Mon, 20 Aug 2007 23:50:05 +0800 Zhang Rui <rui.zhang@xxxxxxxxx> wrote:

> Hi, Oliver,
> Thanks for your comments,
> 
> On Mon, 2007-08-20 at 18:45 +0800, Oliver Neukum wrote:
> > Am Montag 20 August 2007 schrieb Zhang Rui:
> > > Files name must be unique in the same directory.
> > >
> > > Bug is reported here:
> > > http://bugzilla.kernel.org/show_bug.cgi?id=8798
> > 
> > Then I'd say fix the callers.
> But at least the callers need to be told that something is wrong first.
> 
> >  This will paper over bugs.
> Hmm, what kind of bugs?
> callers always need to check the return value when calling
> proc_mkdir/create_proc_entry, don't they?
> 

Yes, but there's some risk that such a change will cause a
presently-working system to stop working.  It's quite likely, if that
system is checking the procfs-creation return value.

So I think it'd be best if we were to detect the duplication and print a
warning (which should include, if possible, the full pathname and a
dump_stack()) and then the code should proceed as normal: permit the
duplicated entry and return success.

Then, when such duplicates are reported, we can work out what to do about
them on a case-by-case basis.

(btw, please feed your patches through scripts/checkpatch.pl - that one had
a remarkably high coding-style-error-density).
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux