mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
AddSeals has to take the write lock to modify seals
Reported-by: syzbot+355993d42d99b011ea73@syzkaller.appspotmail.com Reported-by: syzbot+f758f7983773e0a60c7b@syzkaller.appspotmail.com PiperOrigin-RevId: 488764524
This commit is contained in:
@@ -778,8 +778,8 @@ func AddSeals(fd *vfs.FileDescription, val uint32) error {
|
||||
rf := f.inode().impl.(*regularFile)
|
||||
rf.mapsMu.Lock()
|
||||
defer rf.mapsMu.Unlock()
|
||||
rf.dataMu.RLock()
|
||||
defer rf.dataMu.RUnlock()
|
||||
rf.dataMu.Lock()
|
||||
defer rf.dataMu.Unlock()
|
||||
|
||||
if rf.seals&linux.F_SEAL_SEAL != 0 {
|
||||
// Seal applied which prevents addition of any new seals.
|
||||
|
||||
Reference in New Issue
Block a user