This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added patch to avoid crash when async_terminate destroys async object…
… in free_async_queue.
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...s/server-free_async_queue/0001-server-Avoid-crash-when-async_terminate-destroys-asy.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 6844c121a7cd8a7f90afc0c033cf1c3519fd8d9a Mon Sep 17 00:00:00 2001 | ||
From: Sebastian Lackner <sebastian@fds-team.de> | ||
Date: Fri, 28 Jul 2017 02:41:27 +0200 | ||
Subject: server: Avoid crash when async_terminate destroys async object in | ||
free_async_queue. | ||
|
||
--- | ||
server/async.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/server/async.c b/server/async.c | ||
index 926c121f6f9..9e91f9eadf3 100644 | ||
--- a/server/async.c | ||
+++ b/server/async.c | ||
@@ -194,10 +194,12 @@ void free_async_queue( struct async_queue *queue ) | ||
|
||
LIST_FOR_EACH_ENTRY_SAFE( async, next, &queue->queue, struct async, queue_entry ) | ||
{ | ||
+ grab_object( &async->obj ); | ||
if (!async->completion) async->completion = fd_get_completion( async->fd, &async->comp_key ); | ||
async->fd = NULL; | ||
async_terminate( async, STATUS_HANDLES_CLOSED ); | ||
async->queue = NULL; | ||
+ release_object( &async->obj ); | ||
} | ||
} | ||
|
||
-- | ||
2.13.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixes: Avoid crash when async_terminate destroys async object in free_async_queue |