opensubscriber
   Find in this group all groups
 
Linux-Kernel more information…

l : linux-kernel@vger.kernel.org 8 March 2005 • 7:14AM -0500

Re: [8/many] acrypto: crypto_dev.c
by Evgeniy Polyakov

REPLY TO AUTHOR
 
REPLY TO GROUP




On Mon, 7 Mar 2005 14:40:52 -0800
Nish Aravamudan <nish.aravamudan@gmai...> wrote:

> On Mon, 7 Mar 2005 23:37:34 +0300, Evgeniy Polyakov <johnpol@2ka....> wrote:
> > --- /tmp/empty/crypto_dev.c     1970-01-01 03:00:00.000000000 +0300
> > +++ ./acrypto/crypto_dev.c      2005-03-07 20:35:36.000000000 +0300
> > @@ -0,0 +1,421 @@
> > +/*
> > + *     crypto_dev.c
>
> <snip>
>
> > +                       while (atomic_read(&__dev->refcnt)) {
> > +
> > +                               dprintk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n",
> > +                                       __dev->name, atomic_read(&dev->refcnt));
> > +
> > +                               /*
> > +                                * Hack zone: you need to write good ->data_ready()
> > +                                * and crypto device driver itself.
> > +                                *
> > +                                * Driver shoud not buzz if it has pending sessions
> > +                                * in it's queue and it was removed from global device list.
> > +                                *
> > +                                * Although I can workaround it here, for example by
> > +                                * flushing the whole queue and drop all pending sessions.
> > +                                */
> > +
> > +                               __dev->data_ready(__dev);
> > +                               set_current_state(TASK_UNINTERRUPTIBLE);
> > +                               schedule_timeout(HZ);
>
> I don't see any wait-queues in the immediate area of this code. Can
> this be an ssleep(1)?

Yes, you are right, this loop just spins until all pending sessions
are removed from given crypto device, so it can just ssleep(1) here.

> Thanks,
> Nish


Evgeniy Polyakov

Only failure makes us experts. -- Theo de Raadt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger...
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.