How did multiple list_del occur? Did you call saMsgQueueClose followed
by saMsgFinalize?
I'm not sure this is the best way to deal with this.
On Tue, May 19, 2009 at 03:43:09PM +0200, Jan Friesse wrote:
> Hi,
> included patch solves multiple list_del in saMsgQueueClose, which leads
> to segfault.
>
> Regards,
> Honza
> diff --git a/trunk/lib/msg.c b/trunk/lib/msg.c
> index 1c20119..689ffbc 100644
> --- a/trunk/lib/msg.c
> +++ b/trunk/lib/msg.c
> @@ -78,6 +78,7 @@ struct queueInstance {
> SaMsgQueueHandleT queue_handle;
> SaMsgQueueOpenFlagsT open_flags;
> SaMsgQueueCreationAttributesT create_attrs;
> + int finalize;
> struct list_head list;
> };
>
> @@ -96,6 +97,8 @@ static struct saVersionDatabase msgVersionDatabase = {
>
> static void queueInstanceFinalize (struct queueInstance *queueInstance)
> {
> + queueInstance->finalize = 1;
> +
> list_del (&queueInstance->list);
>
> hdb_handle_destroy (&queueHandleDatabase, queueInstance->queue_handle);
> @@ -713,10 +719,11 @@ saMsgQueueClose (
> goto error_put; /* ! */
> }
>
> - list_del (&queueInstance->list);
> + if (!queueInstance->finalize) {
> + queueInstanceFinalize (queueInstance);
> + }
>
> hdb_handle_put (&queueHandleDatabase, queueHandle);
> - hdb_handle_destroy (&queueHandleDatabase, queueHandle);
>
> return (error);
>
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais