0820681560
Resolves: bz#1547903 bz#1566336 bz#1568896 bz#1578716 bz#1581047 Resolves: bz#1581231 bz#1582066 bz#1593865 bz#1597506 bz#1597511 Resolves: bz#1597654 bz#1597768 bz#1598105 bz#1598356 bz#1599037 Resolves: bz#1599823 bz#1600057 bz#1601314 Signed-off-by: Milind Changire <mchangir@redhat.com>
60 lines
2.3 KiB
Diff
60 lines
2.3 KiB
Diff
From f6b4b4308b838b29f17b2a4a54385269991f0118 Mon Sep 17 00:00:00 2001
|
|
From: Mohit Agrawal <moagrawal@redhat.com>
|
|
Date: Thu, 5 Jul 2018 15:02:06 +0530
|
|
Subject: [PATCH 315/325] changelog: fix br-state-check.t crash for brick_mux
|
|
|
|
Problem: br-state-check.t is getting crash
|
|
|
|
Solution: Check condition in rpcsvc_request_create
|
|
before allocate memory from rxpool
|
|
|
|
> BUG: 1597776
|
|
> Change-Id: I4fde1ade6073f603c32453f1840395db9a9155b7
|
|
> fixes: bz#1597776
|
|
> (cherry picked from commit e31c7a7c0c1ea3f6e931935226fb976a92779ba7)
|
|
> (Reviewed on upstream link https://review.gluster.org/#/c/20132/)
|
|
|
|
BUG: 1597768
|
|
Change-Id: I3a0dc8f9625a6ab9ce8364119413ae45e321e620
|
|
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/143719
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
---
|
|
rpc/rpc-lib/src/rpcsvc.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
|
|
index 3acaa8b..8d0c409 100644
|
|
--- a/rpc/rpc-lib/src/rpcsvc.c
|
|
+++ b/rpc/rpc-lib/src/rpcsvc.c
|
|
@@ -447,7 +447,7 @@ rpcsvc_request_create (rpcsvc_t *svc, rpc_transport_t *trans,
|
|
size_t msglen = 0;
|
|
int ret = -1;
|
|
|
|
- if (!svc || !trans)
|
|
+ if (!svc || !trans || !svc->rxpool)
|
|
return NULL;
|
|
|
|
/* We need to allocate the request before actually calling
|
|
@@ -1473,6 +1473,7 @@ rpcsvc_get_listener (rpcsvc_t *svc, uint16_t port, rpc_transport_t *trans)
|
|
{
|
|
rpcsvc_listener_t *listener = NULL;
|
|
char found = 0;
|
|
+ rpcsvc_listener_t *next = NULL;
|
|
uint32_t listener_port = 0;
|
|
|
|
if (!svc) {
|
|
@@ -1481,7 +1482,7 @@ rpcsvc_get_listener (rpcsvc_t *svc, uint16_t port, rpc_transport_t *trans)
|
|
|
|
pthread_mutex_lock (&svc->rpclock);
|
|
{
|
|
- list_for_each_entry (listener, &svc->listeners, list) {
|
|
+ list_for_each_entry_safe (listener, next, &svc->listeners, list) {
|
|
if (listener && trans) {
|
|
if (listener->trans == trans) {
|
|
found = 1;
|
|
--
|
|
1.8.3.1
|
|
|