Skip to contentSkip to conversation

Use 1KB buffer in rndis_unbind

PATCH Superseded Jussi Kivilinna 2 participants 2 messages Jan 20, 2008 – Jan 25, 2008

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/14 Use 1KB buffer in rndis_unbind

rndis_command requires the caller to pass in a buffer of at least 1KB.

---

 drivers/net/usb/rndis_host.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/usb/rndis_host.c +1 -1
index 96ef6a9..42b161c 100644
@@ -577,7 +577,7 @@ static void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
 	struct rndis_halt	*halt;
 
 	/* try to clear any rndis state/activity (no i/o from stack!) */
-	halt = kzalloc(sizeof *halt, GFP_KERNEL);
+	halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL);
 	if (halt) {
 		halt->msg_type = RNDIS_MSG_HALT;
 		halt->msg_len = ccpu2(sizeof *halt);
Acked-by on v1 3/14
#1 lore raw
Quoted 4 lines · Jussi Kivilinna

rndis_command requires the caller to pass in a buffer of at least 1KB.

Quoted 19 lines

---

 drivers/net/usb/rndis_host.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/usb/rndis_host.c +1 -1
index 96ef6a9..42b161c 100644
@@ -577,7 +577,7 @@ static void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
 	struct rndis_halt	*halt;
 
 	/* try to clear any rndis state/activity (no i/o from stack!) */
-	halt = kzalloc(sizeof *halt, GFP_KERNEL);
+	halt = kzalloc(CONTROL_BUFFER_SIZE, GFP_KERNEL);
 	if (halt) {
 		halt->msg_type = RNDIS_MSG_HALT;
 		halt->msg_len = ccpu2(sizeof *halt);