[LU-16851] ll_atomic_open(): use d_in_lookup() instead of d_unhashed() Created: 26/May/23 Updated: 19/Aug/23 Resolved: 19/Aug/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vladimir Saveliev | Assignee: | Vladimir Saveliev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Using d_unhashed() brings a race window with d_add() and d_drop() leading to dentry hash table corruption. If dentry which is in hash table already is added to hash table, it gets looped to itself via next pointer like in the below real instance: dentry 0xffff8fd34cc08840
...
d_hash = {
next = 0xffff8fd34cc08848,
pprev = 0x0
},
This is recommended for implementations of atomic_open operation. commit 00699ad8571afd7fb8bc2c61f67c86c2428680ab Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue Jul 5 09:44:53 2016 -0400 Use the right predicate in ->atomic_open() instances ... |
| Comments |
| Comment by Gerrit Updater [ 26/May/23 ] |
|
"Vladimir Saveliev <vladimir.saveliev@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51147 |
| Comment by Gerrit Updater [ 19/Aug/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51147/ |
| Comment by Peter Jones [ 19/Aug/23 ] |
|
Landed for 2.16 |