NetBSD-Bugs archive

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

kern/42348: lookup protocol use in do_sys_rename() is wrong

>Number:         42348
>Category:       kern
>Synopsis:       lookup protocol use in do_sys_rename() is wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 19 18:05:00 +0000 2009
>Originator:     Antti Kantee
oh no!  more fail systems.
do_sys_rename() induces the final VOP_LOOKUP() for a file server
twice.  This causes confusion in file system drivers, since they
cannot e.g. allocate a memory slot without it being overridden
by the next lookup (alternative is some weird heuristics where the
driver attempts to detect the pattern).

What rename should arguably do is VOP_ABORTOP() right after the first
one.  However, this is difficult since then the "real" lookup gets
done without SAVESTART.  Also, performing the first lookup
without SAVESTART is difficult, since then HASBUF may not get
set correctly, i.e. the pathname buffer is lost.


Home | Main Index | Thread Index | Old Index