Re: [PATCH 2/2] 9p: client_create: init fcall_cache earlier

Dominique Martinet
2022-09-29T07:04:45Z

Leon Romanovsky wrote on Thu, Sep 29, 2022 at 08:57:31AM +0300:
> > + * followed by data accessed from userspace by read
> > + * Note we do not check for failure here because the cache is
> > + * optional; warning will be issued on dmesg for failure.
> > + */
> > + clnt->fcall_cache =
> > + kmem_cache_create_usercopy("9p-fcall-cache", clnt->msize,
> > + 0, 0, P9_HDRSZ + 4,
> > + clnt->msize - (P9_HDRSZ + 4),
> > + NULL);
> > +
>
> clnt->msize can be changed after call to ->create() if it is larger than clnt->trans_mod->maxsize).

Ugh, that's what I get for doing this in a hurry because you're all
talking about order this order that...

This is absolutely correct, I'm dropping this patch.

--
Dominique