Skip to content

Commit 397a83a

Browse files
committed
Merge tag '9p-for-6.10-rc2' of https://github.com/martinetd/linux
Pull 9p fixes from Dominique Martinet: "Two fixes headed to stable trees: - a trace event was dumping uninitialized values - a missing lock that was thought to have exclusive access, and it turned out not to" * tag '9p-for-6.10-rc2' of https://github.com/martinetd/linux: 9p: add missing locking around taking dentry fid list net/9p: fix uninit-value in p9_client_rpc()
2 parents db16366 + c898afd commit 397a83a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

fs/9p/vfs_dentry.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@ static int v9fs_cached_dentry_delete(const struct dentry *dentry)
4848
static void v9fs_dentry_release(struct dentry *dentry)
4949
{
5050
struct hlist_node *p, *n;
51+
struct hlist_head head;
5152

5253
p9_debug(P9_DEBUG_VFS, " dentry: %pd (%p)\n",
5354
dentry, dentry);
54-
hlist_for_each_safe(p, n, (struct hlist_head *)&dentry->d_fsdata)
55+
56+
spin_lock(&dentry->d_lock);
57+
hlist_move_list((struct hlist_head *)&dentry->d_fsdata, &head);
58+
spin_unlock(&dentry->d_lock);
59+
60+
hlist_for_each_safe(p, n, &head)
5561
p9_fid_put(hlist_entry(p, struct p9_fid, dlist));
56-
dentry->d_fsdata = NULL;
5762
}
5863

5964
static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)

net/9p/client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ static int p9_fcall_init(struct p9_client *c, struct p9_fcall *fc,
236236
if (!fc->sdata)
237237
return -ENOMEM;
238238
fc->capacity = alloc_msize;
239+
fc->id = 0;
240+
fc->tag = P9_NOTAG;
239241
return 0;
240242
}
241243

0 commit comments

Comments
 (0)