Re: [PATCH] afs: Fix afs_cb_interest refcnt leak in afs_select_fileserver()
From: David Howells
Date: Tue May 26 2020 - 12:19:08 EST
Xiyu Yang <xiyuyang19@xxxxxxxxxxxx> wrote:
> error = afs_wait_for_fs_probes(fc->server_list, fc->untried);
> - if (error < 0)
> + if (error < 0) {
> + afs_put_cb_interest(afs_v2net(vnode), fc->cbi);
> goto failed_set_error;
> + }
Ummm... Did you try this? afs_end_vnode_operation() should then cause a
double free because you don't clear fc->cbi.
You can try it by installing the kafs-client package if your distribution has
it available and starting the afs.mount service or doing:
mount -t afs none /afs -o dyn
and then:
ls /afs/grand.central.org/
David