[DRBD-cvs] svn commit by lars - r2287 - branches/drbd-0.7/drbd -
While verifying the fix for the "syncer stalled" bug,
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Wed Jul 19 16:34:21 CEST 2006
w
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: lars
Date: 2006-07-19 16:34:20 +0200 (Wed, 19 Jul 2006)
New Revision: 2287
Modified:
branches/drbd-0.7/drbd/drbd_main.c
Log:
While verifying the fix for the "syncer stalled" bug,
we hit yet an other bug.
Symptoms: Primary get stuck in WFReportParams;
if you try to drbdadm disconnect,
it hits a NULL pointer dereference
(kernel Oops) in force_sig.
Modified: branches/drbd-0.7/drbd/drbd_main.c
===================================================================
--- branches/drbd-0.7/drbd/drbd_main.c 2006-07-19 08:40:02 UTC (rev 2286)
+++ branches/drbd-0.7/drbd/drbd_main.c 2006-07-19 14:34:20 UTC (rev 2287)
@@ -660,6 +660,13 @@
if (sock == mdev->data.socket) {
down(&mdev->data.mutex);
+ if (sock != mdev->data.socket) {
+ /* verify drbd_disconnect: drbd_free_sock may free this
+ * socket while we have been waiting in down.
+ */
+ up(&mdev->data.mutex);
+ return 0; /* not ok */
+ }
spin_lock(&mdev->send_task_lock);
mdev->send_task=current;
spin_unlock(&mdev->send_task_lock);
More information about the drbd-cvs
mailing list