Index: drivers/2.6.21/stub_rx.c
===================================================================
--- drivers/2.6.21/stub_rx.c	(Revision 49)
+++ drivers/2.6.21/stub_rx.c	(Arbeitskopie)
@@ -311,28 +346,28 @@
 			return usb_rcvctrlpipe(udev, 0);
 	}
 
-	if (usb_endpoint_xfer_control(epd)) {
+	if ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_CONTROL) {
 		if (dir == USBIP_DIR_OUT)
 			return usb_sndctrlpipe(udev, epnum);
 		else
 			return usb_rcvctrlpipe(udev, epnum);
 	}
 
-	if (usb_endpoint_xfer_bulk(epd)) {
+	if ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
 		if (dir == USBIP_DIR_OUT)
 			return usb_sndbulkpipe(udev, epnum);
 		else
 			return usb_rcvbulkpipe(udev, epnum);
 	}
 
-	if (usb_endpoint_xfer_int(epd)) {
+	if ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) {
 		if (dir == USBIP_DIR_OUT)
 			return usb_sndintpipe(udev, epnum);
 		else
 			return usb_rcvintpipe(udev, epnum);
 	}
 
-	if (usb_endpoint_xfer_isoc(epd)) {
+	if ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_ISOC) {
 		if (dir == USBIP_DIR_OUT)
 			return usb_sndisocpipe(udev, epnum);
 		else
@@ -373,21 +408,35 @@
 	/* set priv->urb->transfer_buffer */
 	if (pdu->u.cmd_submit.transfer_buffer_length > 0) {
 		priv->urb->transfer_buffer =
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+			kmalloc(pdu->u.cmd_submit.transfer_buffer_length, GFP_KERNEL);
+#else
 			kzalloc(pdu->u.cmd_submit.transfer_buffer_length, GFP_KERNEL);
+#endif
 		if (!priv->urb->transfer_buffer) {
 			uerr("malloc x_buff\n");
 			usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
 			return;
 		}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+		memset(priv->urb->transfer_buffer, 0, pdu->u.cmd_submit.transfer_buffer_length);
+#endif
 	}
 
 	/* set priv->urb->setup_packet */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	priv->urb->setup_packet = kmalloc(8, GFP_KERNEL);
+#else
 	priv->urb->setup_packet = kzalloc(8, GFP_KERNEL);
+#endif
 	if (!priv->urb->setup_packet) {
 		uerr("allocate setup_packet\n");
 		usbip_event_add(ud, SDEV_EVENT_ERROR_MALLOC);
 		return;
 	}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	memset(priv->urb->setup_packet, 0, 8);
+#endif
 	memcpy(priv->urb->setup_packet, &pdu->u.cmd_submit.setup, 8);
 
 	/* set other members from the base header of pdu */
Index: drivers/2.6.21/stub_tx.c
===================================================================
--- drivers/2.6.21/stub_tx.c	(Revision 49)
+++ drivers/2.6.21/stub_tx.c	(Arbeitskopie)
@@ -45,13 +45,21 @@
 {
 	struct stub_unlink *unlink;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	unlink = kmalloc(sizeof(struct stub_unlink), GFP_ATOMIC);
+#else
 	unlink = kzalloc(sizeof(struct stub_unlink), GFP_ATOMIC);
+#endif
 	if (!unlink) {
 		uerr("alloc stub_unlink\n");
 		usbip_event_add(&sdev->ud, VDEV_EVENT_ERROR_MALLOC);
 		return;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	memset(unlink, 0, sizeof(struct stub_unlink));
+#endif
+
 	unlink->seqnum = seqnum;
 	unlink->status = status;
 
Index: drivers/2.6.21/usbip_common.c
===================================================================
--- drivers/2.6.21/usbip_common.c	(Revision 49)
+++ drivers/2.6.21/usbip_common.c	(Arbeitskopie)
@@ -847,10 +847,18 @@
 	ssize_t size = np * sizeof(*iso);
 	int i;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	buff = kmalloc(size, GFP_KERNEL);
+#else
 	buff = kzalloc(size, GFP_KERNEL);
+#endif
 	if (!buff)
 		return NULL;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	memset(buff, 0, size);
+#endif
+
 	for (i = 0; i < np; i++) {
 		iso = buff + (i * sizeof(*iso));
 
@@ -877,10 +885,18 @@
 	if (!usb_pipeisoc(urb->pipe))
 		return 0;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	buff = kmalloc(size, GFP_KERNEL);
+#else
 	buff = kzalloc(size, GFP_KERNEL);
+#endif
 	if (!buff)
 		return -ENOMEM;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	memset(buff, 0, size);
+#endif
+
 	ret = usbip_xmit(0, ud->tcp_socket, buff, size, 0);
 	if (ret != size) {
 		uerr("recv iso_frame_descriptor, %d\n", ret);
Index: drivers/2.6.21/stub_dev.c
===================================================================
--- drivers/2.6.21/stub_dev.c	(Revision 49)
+++ drivers/2.6.21/stub_dev.c	(Arbeitskopie)
@@ -327,12 +327,20 @@
 
 	udbg("allocating stub device");
 	/* yes, it's a new device */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	sdev = (struct stub_device *) kmalloc(sizeof(struct stub_device), GFP_KERNEL);
+#else
 	sdev = (struct stub_device *) kzalloc(sizeof(struct stub_device), GFP_KERNEL);
+#endif
 	if (!sdev) {
 		uerr("no memory for stub_device\n");
 		return NULL;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+	memset(sdev, 0, sizeof(struct stub_device));
+#endif
+
 	sdev->interface = interface;
 	sdev->devid     = (busnum << 16) | devnum;
 
