[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] patch for log_enqueue in multipath-tools-0.4.4-pre11
- From: Benjamin Marzinski <bmarzins redhat com>
- To: device-mapper development <dm-devel redhat com>
- Subject: [dm-devel] patch for log_enqueue in multipath-tools-0.4.4-pre11
- Date: Mon, 11 Apr 2005 15:59:50 -0500
It looks to me like log_enqueue can accidentally mess up its la->tail ptr,
if it runs out of space for the new message.
If the la->head is just past la->start, and la->tail is just before la->end,
la->tail will get updated to be la->start, because there is no room at the
end of the buffer for the message. Then when it realizes that there is no
room at the start of the buffer, la->tail will be updated to la->start - fwd
And the next message will be written before the buffer.
This patch fixes that.
-Ben
Ben Marzinski
bmarzins redhat com
(612) 638-0517
diff -urN multipath-tools-0.4.4-pre11/multipathd/log.c multipath-tools-0.4.4-log-fixed/multipathd/log.c
--- multipath-tools-0.4.4-pre11/multipathd/log.c 2005-03-31 03:25:06.000000000 -0600
+++ multipath-tools-0.4.4-log-fixed/multipathd/log.c 2005-04-11 14:27:41.000000000 -0500
@@ -119,7 +119,7 @@
logdbg(stderr, "enqueue: log area overrun, drop msg\n");
if (!la->empty)
- la->tail -= fwd;
+ la->tail = lastmsg;
return 1;
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]