#302 closed defect (fixed)
fix violation of FS node object copy semantics
Reported by: | strauman | Owned by: | Jennifer Averett |
---|---|---|---|
Priority: | normal | Milestone: | 2 |
Component: | fs | Version: | unknown |
Severity: | major | Keywords: | |
Cc: | bugs@… | Blocked By: | |
Blocking: |
Description
According to the FS semantics, the node_access field is private to the FS implementation. Hence, nodes must not simply be copied but 'cloned', i.e. when copying a node, the FS must be given a chance to create a copy of the private information.
Unfortunately, the generics provide no such hook (the 'opposite' of rtems_filesystem_freenode). However, as a workaround, the evalpath() routine can be used for that purpose, as it returns a freshly allocated node. evalpath(".") hence comes close to a copy constructor.
The attached patch fixes the fchdir() and chroot() syscalls so they properly allocate new nodes from the FS.
Note that the 'privateenv' code heavily violates the FS node_access ownership paradigm. I have fixes for 'privateenv' also but IMO, that entire code needs to be revised.
The current/root locations should be thread-based
by default because the manipulation of 'current' introduces race conditions. I'll file a separate PR for the privateenv related stuff.
Release:
ss-20020301
Attachments (1)
Change History (2)
comment:1 Changed on 12/26/02 at 14:56:30 by Jennifer Averett
Status: | assigned → closed |
---|
State-Changed-From-To: open->closed
State-Changed-Why: Applied patch.