tech-kern archive

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

Re: memcpy of struct buf, or similar?



Chris Gilbert wrote:

> Simon Burge wrote:
> > Andrew Doran wrote:
> > 
> >> I am trying to fix PR 38761.  [ ... ]
> > 
> > FWIW, just sticking a
> > 
> >     KASSERT(mutex_owned(&bufcache_lock));
> > 
> > before each time b_cflags is modified fails to reach single user when it
> > hits genfs_getpages():
> > 
> > panic: kernel diagnostic assertion "mutex_owned(&bufcache_lock)" failed: 
> > file "../../../../miscfs/genfs/genfs_io.c", line 418
> 
> I think thats a false positive, [ ... ]

Working my way through, the next KASSERT if I remove the above is in
physio():

panic: kernel diagnostic assertion "mutex_owned(&bufcache_lock)" failed: file 
"../../../../kern/kern_physio.c", line 334

I see the change to obp->b_cflags earlier in this function is protected
with bufcache_lock but this one isn't.  I'll keep digging...

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index