From 230baeee81488332dececa0c0cebac8b45fb3ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Vavru=C5=A1a?= <marek.vavrusa@nic.cz> Date: Thu, 20 Mar 2014 17:31:36 +0100 Subject: [PATCH] ddns-update: better comment to explain the zone_release situation --- src/knot/nameserver/update.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/knot/nameserver/update.c b/src/knot/nameserver/update.c index 9b9e213ac..ac3b18c13 100644 --- a/src/knot/nameserver/update.c +++ b/src/knot/nameserver/update.c @@ -479,9 +479,11 @@ static int zones_process_update_auth(struct query_data *qdata) zones_schedule_zonefile_sync(zone, 0); } - /* Release old zone, as it may be removed in the process. */ + /* Since we unlocked RCU read lock, it is possible that the + * zone was modified/removed in the background. Therefore, + * we must NOT touch the zone after we release it here. */ zone_release(zone); - qdata->zone = NULL; /* Zone may not be valid now. */ + qdata->zone = NULL; return ret; } -- GitLab