[PATCH 2/2] talitos: Freescale integrated security engine (SEC) driver

Kim Phillips kim.phillips at freescale.com
Tue Jun 3 02:50:21 EST 2008


On Mon, 2 Jun 2008 20:00:12 +0400
Evgeniy Polyakov <johnpol at 2ka.mipt.ru> wrote:

> On Mon, Jun 02, 2008 at 09:27:01AM -0500, Kim Phillips (kim.phillips at freescale.com) wrote:
> > > I meant descriptor hdr value accessed via it - can it be checked in
> > > tasklet under the lock and in submit path without? Can they correlate
> > > somehow?
> > 
> > I believe the check for a non-null request->desc (under lock) before
> > the hdr value is accessed ensures this doesn't happen.
> 
> But can it be changed? You write to it without lock, but read under the
> one (different for each channel though), so it attracted attention.

can you point where in the code your concern is?

desc is assigned under head lock and cleared under tail lock, both after
an smp_wmb.  hdr data is assigned before desc is written, and read
after desc is found to be !NULL (i.e, hdr access is governed by if
(desc)). head and tail indices get advanced each within their
corresponding locks.  So afaict there shouldn't be a case where data
pointed to by desc can be accessed by both the consumer and the
producer at any one point in time.  Does that help?

Kim



More information about the Linuxppc-dev mailing list