oplock_break_level2 with unlocked share enty?

Nadav Danieli nadavd at exanet.com
Wed Jan 26 14:16:24 GMT 2005


On Wed, 2005-01-26 at 02:10, Jeremy Allison wrote:

> On Wed, Jan 26, 2005 at 12:07:48AM +0200, Nadav Danieli wrote:
> > On Tue, 2005-01-25 at 23:33, Jeremy Allison wrote:
> > 
> > > On Tue, Jan 25, 2005 at 09:12:16PM +0200, Nadav Danieli wrote:
> > > > Hi All,
> > > > 
> > > > I appears that when breaking our own oplock, oplock level II may be
> > > > removed while the share entry is unlocked.
> > > > Trace is as follow:
> > > > 
> > > > oplock_break_level2
> > > > smbd/oplock.c:647
> > > > oplock_break
> > > > smbd/oplock.c:722
> > > > request_oplock_break
> > > > smbd/oplock.c:994
> > > > open_mode_check
> > > > smbd/open.c:668
> > > 
> > > Yes, I've confirmed this is a logic bug. I'll fix it for 3.0.11 proper.
> > > What version of Samba are you running ? I'll send you a point patch.
> > > 
> > > Thanks a *lot* for finding this !
> > > 
> > > Jeremy.
> > 
> > 
> > The trivial place to acquire the lock is request_oplock_break which is
> > called from only 2 functions, and the other,
> > release_level_2_oplocks_on_change, already bypass directly to
> > oplock_break_level2 for local oplock breaks.
> 
> Ok, can you try the attached patch ? I think this fixes it correctly.
> 
> Thanks,
> 
> 	Jeremy.

Thanks,

Applied the patch, initial tests look O.K.
However my sources are modified, and may behave different from the
release.


More information about the samba-technical mailing list