Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pull-coda' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull coda dcache updates from Al Viro:
"Coda dcache-related cleanups and fixes"

* tag 'pull-coda' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
coda_flag_children(): fix a UAF
sanitize coda_dentry_delete()
coda: is_bad_inode() is always false there

+5 -12
+2
fs/coda/cache.c
··· 93 93 struct dentry *de; 94 94 95 95 spin_lock(&parent->d_lock); 96 + rcu_read_lock(); 96 97 hlist_for_each_entry(de, &parent->d_children, d_sib) { 97 98 struct inode *inode = d_inode_rcu(de); 98 99 /* don't know what to do with negative dentries */ 99 100 if (inode) 100 101 coda_flag_inode(inode, flag); 101 102 } 103 + rcu_read_unlock(); 102 104 spin_unlock(&parent->d_lock); 103 105 } 104 106
+3 -12
fs/coda/dir.c
··· 449 449 inode = d_inode(de); 450 450 if (!inode || is_root_inode(inode)) 451 451 goto out; 452 - if (is_bad_inode(inode)) 453 - goto bad; 454 452 455 453 cii = ITOC(d_inode(de)); 456 454 if (!(cii->c_flags & (C_PURGE | C_FLUSH))) ··· 468 470 spin_lock(&cii->c_lock); 469 471 cii->c_flags &= ~(C_VATTR | C_PURGE | C_FLUSH); 470 472 spin_unlock(&cii->c_lock); 471 - bad: 472 473 return 0; 473 474 out: 474 475 return 1; ··· 479 482 */ 480 483 static int coda_dentry_delete(const struct dentry * dentry) 481 484 { 482 - struct inode *inode; 483 - struct coda_inode_info *cii; 485 + struct inode *inode = d_inode(dentry); 484 486 485 - if (d_really_is_negative(dentry)) 487 + if (!inode) 486 488 return 0; 487 489 488 - inode = d_inode(dentry); 489 - if (!inode || is_bad_inode(inode)) 490 - return 1; 491 - 492 - cii = ITOC(inode); 493 - if (cii->c_flags & C_PURGE) 490 + if (ITOC(inode)->c_flags & C_PURGE) 494 491 return 1; 495 492 496 493 return 0;