The Samba-Bugzilla – Attachment 4873 Details for
Bug 6828
infinite timeout occurs when byte lock held outside of samba
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for 3.3.10.
0001-Fix-bug-6828-infinite-timeout-occurs-when-byte-loc.patch (text/plain), 1.93 KB, created by
Jeremy Allison
on 2009-10-20 20:19:09 UTC
(
hide
)
Description:
git-am format patch for 3.3.10.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-10-20 20:19:09 UTC
Size:
1.93 KB
patch
obsolete
>From b5a5876c60e1edc948b6cb07ab5b155cbc14ad8c Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 20 Oct 2009 18:17:19 -0700 >Subject: [PATCH] Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba > Jeremy. > >--- > source/smbd/blocking.c | 26 ++++++++++++++++++-------- > 1 files changed, 18 insertions(+), 8 deletions(-) > >diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c >index 2c37fea..f4adc0d 100644 >--- a/source/smbd/blocking.c >+++ b/source/smbd/blocking.c >@@ -94,6 +94,22 @@ static void brl_timeout_fn(struct event_context *event_ctx, > } > > /**************************************************************************** >+ We need a version of timeval_min that treats zero timval as infinite. >+****************************************************************************/ >+ >+static struct timeval timeval_brl_min(const struct timeval *tv1, >+ const struct timeval *tv2) >+{ >+ if (timeval_is_zero(tv1)) { >+ return *tv2; >+ } >+ if (timeval_is_zero(tv2)) { >+ return *tv1; >+ } >+ return timeval_min(tv1, tv2); >+} >+ >+/**************************************************************************** > After a change to blocking_lock_queue, recalculate the timed_event for the > next processing. > ****************************************************************************/ >@@ -116,19 +132,13 @@ static bool recalc_brl_timeout(void) > */ > if (brl->blocking_pid == 0xFFFFFFFF) { > struct timeval psx_to = timeval_current_ofs(10, 0); >- next_timeout = timeval_min(&next_timeout, &psx_to); >+ next_timeout = timeval_brl_min(&next_timeout, &psx_to); > } > > continue; > } > >- if (timeval_is_zero(&next_timeout)) { >- next_timeout = brl->expire_time; >- } >- else { >- next_timeout = timeval_min(&next_timeout, >- &brl->expire_time); >- } >+ next_timeout = timeval_brl_min(&next_timeout, &brl->expire_time); > } > > if (timeval_is_zero(&next_timeout)) { >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 6828
:
4866
|
4872
| 4873 |
4889
|
4890
|
4891
|
4899
|
4900