[DRBD-cvs] svn commit by phil - r2490 - trunk/drbd - There was the space for the closing TT_END tag missing

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Oct 3 10:29:15 CEST 2006


Author: phil
Date: 2006-10-03 10:29:14 +0200 (Tue, 03 Oct 2006)
New Revision: 2490

Modified:
   trunk/drbd/drbd_nl.c
Log:
There was the space for the closing TT_END tag missing on all
buffers used to send netlink_connector messages back to user
space.


Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c	2006-10-02 21:15:14 UTC (rev 2489)
+++ trunk/drbd/drbd_nl.c	2006-10-03 08:29:14 UTC (rev 2490)
@@ -1491,8 +1491,10 @@
 	struct drbd_nl_cfg_reply* reply;
 	drbd_dev *mdev;
 	int retcode,rr;
-	int reply_size = sizeof(struct cn_msg) + sizeof(struct drbd_nl_cfg_reply);
-	
+	int reply_size = sizeof(struct cn_msg) 
+		+ sizeof(struct drbd_nl_cfg_reply)
+		+ sizeof(short int);
+
 	if(!try_module_get(THIS_MODULE)) {
 		printk(KERN_ERR DEVICE_NAME "try_module_get() failed!\n");
 		return;
@@ -1548,7 +1550,8 @@
 {
 	char buffer[sizeof(struct cn_msg)+
 		    sizeof(struct drbd_nl_cfg_reply)+
-		    sizeof(struct get_state_tag_len_struct)];
+		    sizeof(struct get_state_tag_len_struct)+
+		    sizeof(short int)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
 	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply*)cn_reply->data;
 	unsigned short *tl = reply->tag_list;
@@ -1578,7 +1581,8 @@
 {
 	char buffer[sizeof(struct cn_msg)+
 		    sizeof(struct drbd_nl_cfg_reply)+
-		    sizeof(struct call_helper_tag_len_struct)];
+		    sizeof(struct call_helper_tag_len_struct)+
+		    sizeof(short int)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
 	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply*)cn_reply->data;
 	unsigned short *tl = reply->tag_list;



More information about the drbd-cvs mailing list