store: fix graphLock reload
use s.graphLock.Modified() instead of s.graphLock.TouchedSince(). TouchedSince() seems to fail in some cases when comparing the inode mtime with the current time. Avoid such kind of problems in a critical code path as store.mount(), as we must be sure there is already a driver home mount present, otherwise it the next process may cover the container mount with the home mount. Closes: https://github.com/containers/podman/issues/10454 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
abb54202ce
commit
09295b3c6b
7
store.go
7
store.go
|
|
@ -2652,8 +2652,13 @@ func (s *store) mount(id string, options drivers.MountOpts) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
modified, err := s.graphLock.Modified()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
/* We need to make sure the home mount is present when the Mount is done. */
|
||||
if s.graphLock.TouchedSince(s.lastLoaded) {
|
||||
if modified {
|
||||
s.graphDriver = nil
|
||||
s.layerStore = nil
|
||||
s.graphDriver, err = s.getGraphDriver()
|
||||
|
|
|
|||
Loading…
Reference in New Issue