Re: [PATCH v2 3/4] tee: add supp_nowait flag in tee_context struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 11, 2019 at 01:00:49PM +0530, Sumit Garg wrote:
> On Thu, 10 Jan 2019 at 19:53, Daniel Thompson
> <daniel.thompson@xxxxxxxxxx> wrote:
> > > diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c
> > > index 9ddb89e..5d6c317 100644
> > > --- a/drivers/tee/tee_core.c
> > > +++ b/drivers/tee/tee_core.c
> > > @@ -105,6 +105,7 @@ static int tee_open(struct inode *inode, struct file *filp)
> > >       if (IS_ERR(ctx))
> > >               return PTR_ERR(ctx);
> > >
> > > +     ctx->supp_nowait = false;
> > >       filp->private_data = ctx;
> > >       return 0;
> > >  }
> > > @@ -981,6 +982,7 @@ tee_client_open_context(struct tee_context *start,
> > >       } while (IS_ERR(ctx) && PTR_ERR(ctx) != -ENOMEM);
> > >
> > >       put_device(put_dev);
> > > +     ctx->supp_nowait = true;
> >
> > Why automatically set supp_nowait inside open_context() ?
> >
> 
> I think this is the default behaviour (non-blocking request) that any
> in kernel client would expect. Also this flag could be configured
> again before call to open_session() if any in kernel client requires
> different behaviour.

Makes sense. I think this is a deep enough behaviour to warrant proper
commenting though.


Daniel.



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux