Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 156575 Details for
Bug 235760
ip_vs_sync_state not cleared when setsockopt(IP_VS_SO_SET_STARTDAEMON) fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
new patch
ipvs.patch (text/plain), 2.56 KB, created by
Neil Horman
on 2007-06-08 13:55:00 UTC
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
Neil Horman
Created:
2007-06-08 13:55:00 UTC
Size:
2.56 KB
patch
obsolete
>--- linux-2.6.9/net/ipv4/ipvs/ip_vs_sync.c.orig 2007-06-08 09:25:18.000000000 -0400 >+++ linux-2.6.9/net/ipv4/ipvs/ip_vs_sync.c 2007-06-08 09:44:02.000000000 -0400 >@@ -65,6 +65,11 @@ > struct ip_vs_seq out_seq; /* outgoing seq. struct */ > }; > >+struct ip_vs_sync_thread_data { >+ struct completion *startup; >+ int state; >+}; >+ > #define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ) > #define SIMPLE_CONN_SIZE (sizeof(struct ip_vs_sync_conn)) > #define FULL_CONN_SIZE \ >@@ -743,6 +748,7 @@ > mm_segment_t oldmm; > int state; > const char *name; >+ struct ip_vs_sync_thread_data *tinfo = startup; > > /* increase the module use count */ > ip_vs_use_count_inc(); >@@ -781,7 +787,14 @@ > add_wait_queue(&sync_wait, &wait); > > set_sync_pid(state, current->pid); >- complete((struct completion *)startup); >+ complete(tinfo->startup); >+ >+ /* >+ * once we call the completion queue above, we should >+ * null out that reference, since its allocated on the >+ * stack of the creating kernel thread >+ */ >+ tinfo->startup = NULL; > > /* processing master/backup loop here */ > if (state == IP_VS_STATE_MASTER) >@@ -793,6 +806,14 @@ > remove_wait_queue(&sync_wait, &wait); > > /* thread exits */ >+ >+ /* >+ * If we weren't explicitly stopped, then we >+ * exited in error, and should undo our state >+ */ >+ if ((!stop_master_sync) && (!stop_backup_sync)) >+ ip_vs_sync_state -= tinfo->state; >+ > set_sync_pid(state, 0); > IP_VS_INFO("sync thread stopped!\n"); > >@@ -804,6 +825,11 @@ > set_stop_sync(state, 0); > wake_up(&stop_sync_wait); > >+ /* >+ * we need to free the structure that was allocated >+ * for us in start_sync_thread >+ */ >+ kfree(tinfo); > return 0; > } > >@@ -831,11 +857,19 @@ > { > DECLARE_COMPLETION(startup); > pid_t pid; >+ struct ip_vs_sync_thread_data *tinfo; > > if ((state == IP_VS_STATE_MASTER && sync_master_pid) || > (state == IP_VS_STATE_BACKUP && sync_backup_pid)) > return -EEXIST; > >+ /* >+ * Note that tinfo will be freed in sync_thread on exit >+ */ >+ tinfo = kmalloc(sizeof(struct ip_vs_sync_thread_data), GFP_KERNEL); >+ if (!tinfo) >+ return -ENOMEM; >+ > IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, current->pid); > IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n", > sizeof(struct ip_vs_sync_conn)); >@@ -849,8 +883,11 @@ > ip_vs_backup_syncid = syncid; > } > >+ tinfo->state = state; >+ tinfo->startup = &startup; >+ > repeat: >- if ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) { >+ if ((pid = kernel_thread(fork_sync_thread, &tinfo, 0)) < 0) { > IP_VS_ERR("could not create fork_sync_thread due to %d... " > "retrying.\n", pid); > current->state = TASK_UNINTERRUPTIBLE;
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235760
:
156574
|
156575
|
156585