Bug 10577 - SMB1 wildcard unlink fail can leave a retry record on the open retry queue.
Summary: SMB1 wildcard unlink fail can leave a retry record on the open retry queue.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-30 00:08 UTC by Jeremy Allison
Modified: 2014-05-28 16:05 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master, 4.1.next and 4.0.next. (961 bytes, patch)
2014-04-30 00:09 UTC, Jeremy Allison
vl: review+
obnox: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2014-04-30 00:08:50 UTC
From the mailing list:

Wonderful code Volker, you've found
an amazingly long standing bug in
the SMB1 code :-).

The teardown code for:

make test TESTS=samba3.raw.mux

does:

SMBunlink("test_dir\\*"),
and if one of the files
within test_dir is open,
we should return with a
sharing violation.

However, we have a *really*
old bug inside the wildcard
unlink code, where if do_unlink()
fails whilst deleting a file
when traversing the wildcard
match, we just do "continue"
instead of erroring out
to the caller. This is fatal
in the case of deferring a
sharing violation as it
causes a dbwatch record to
be left around with no
associated SMB1 request.

When the dbwatch timeout
fires, it causes the assert
which for developer mode is
an smb_panic, as we can't
requeue the request as
we already replied to
it...

Here's the fix (attached)
for the record. With this
patch applied on top of the
messaging changes we fail the
samba3.raw.mux test, but without
causing a panic.
Comment 1 Jeremy Allison 2014-04-30 00:09:21 UTC
Created attachment 9883 [details]
git-am fix for master, 4.1.next and 4.0.next.
Comment 2 Jeremy Allison 2014-04-30 17:47:00 UTC
Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next.
Jeremy.
Comment 3 Karolin Seeger 2014-05-19 10:23:29 UTC
(In reply to comment #2)
> Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next.
> Jeremy.

Pushed to autobuild-v4-[0|1]-test.
Comment 4 Karolin Seeger 2014-05-20 09:53:49 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next.
> > Jeremy.
> 
> Pushed to autobuild-v4-[0|1]-test.

Pushed to both branches.
Closing out bug report.

Thanks!