The Samba-Bugzilla – Attachment 6236 Details for
Bug 7942
inotify can somehow cause endless loops in with select()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backport Patches for v3-5-test
tmp.diff (text/plain), 2.76 KB, created by
Stefan Metzmacher
on 2011-01-31 11:14:57 UTC
(
hide
)
Description:
Backport Patches for v3-5-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2011-01-31 11:14:57 UTC
Size:
2.76 KB
patch
obsolete
>From 014d58b8d93a43ec3281854ba746eada200b7193 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Mon, 24 Jan 2011 08:57:47 +0100 >Subject: [PATCH 1/3] s3:lib/events: don't loop over fd events is select gave -1 > >metze >(cherry picked from commit 1f2be10ebf4cc06e3b7aac41ea35bfc4a41ce828) >(cherry picked from commit d506b574bb94fdc23c5a62c5326cd478b5b63a11) >--- > source3/lib/events.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/source3/lib/events.c b/source3/lib/events.c >index 75aa250..6281f33 100644 >--- a/source3/lib/events.c >+++ b/source3/lib/events.c >@@ -131,7 +131,7 @@ bool run_events(struct tevent_context *ev, > return true; > } > >- if (selrtn == 0) { >+ if (selrtn <= 0) { > /* > * No fd ready > */ >-- >1.7.0.4 > > >From 5a61379a423e5aa6758e6ddd406795a2f1defaf4 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Mon, 24 Jan 2011 09:00:53 +0100 >Subject: [PATCH 2/3] s3:smbd: let smbd_server_connection_loop_once() check for select errors > >metze >(cherry picked from commit 0bbe7334d69bcaa476f0741e0bd9685b023a4208) >(cherry picked from commit d677921237c66e6cdf83de04e16c576a101d6493) >--- > source3/smbd/process.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/source3/smbd/process.c b/source3/smbd/process.c >index f7b0f4c..5292060 100644 >--- a/source3/smbd/process.c >+++ b/source3/smbd/process.c >@@ -837,6 +837,10 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection * > errno = sav; > } > >+ if (selrtn == -1 && errno != EINTR) { >+ return map_nt_error_from_unix(errno); >+ } >+ > if (run_events(smbd_event_context(), selrtn, &r_fds, &w_fds)) { > return NT_STATUS_RETRY; > } >-- >1.7.0.4 > > >From 82536c14ec07abae4bec4c5027264793e2673aa1 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Mon, 24 Jan 2011 08:47:12 +0100 >Subject: [PATCH 3/3] s3:lib/events: use DLIST_DEMOTE() for fd events > >This makes sure that fd events doesn't dry out, >because a fd with a lower number is busy. > >metze > >Autobuild-User: Stefan Metzmacher <metze@samba.org> >Autobuild-Date: Mon Jan 31 16:59:44 CET 2011 on sn-devel-104 >(cherry picked from commit ad10289ebcc78ab62ec86abb29f81eb769d17f4e) >(cherry picked from commit 3d2f72844a221dbdfe94fbf6e2b45c98ee158a9b) >--- > source3/lib/events.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/source3/lib/events.c b/source3/lib/events.c >index 6281f33..c529038 100644 >--- a/source3/lib/events.c >+++ b/source3/lib/events.c >@@ -145,6 +145,7 @@ bool run_events(struct tevent_context *ev, > if (FD_ISSET(fde->fd, write_fds)) flags |= EVENT_FD_WRITE; > > if (flags & fde->flags) { >+ DLIST_DEMOTE(ev->fd_events, fde, struct tevent_fd *); > fde->handler(ev, fde, flags, fde->private_data); > return true; > } >-- >1.7.0.4 >
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:
vl
:
review+
Actions:
View
Attachments on
bug 7942
:
6235
| 6236