mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: <marcelo.tosatti@cyclades.com>
Cc: zaitcev@redhat.com, linux-kernel@vger.kernel.org
Subject: USB: add free_len=0 initialization to ipaq.c
Date: Tue, 27 Jul 2004 11:40:24 -0700	[thread overview]
Message-ID: <20040727114024.2ea5e2ba@lembas.zaitcev.lan> (raw)

This is what happens when driver writers neglect memset after kmalloc.
Patch by Ganesh Varadaraja.

diff -urp -X dontdiff linux-2.4.27-rc3/drivers/usb/serial/ipaq.c linux-2.4.27-rc3-usbx/drivers/usb/serial/ipaq.c
--- linux-2.4.27-rc3/drivers/usb/serial/ipaq.c	2003-11-29 18:53:05.000000000 -0800
+++ linux-2.4.27-rc3-usbx/drivers/usb/serial/ipaq.c	2004-07-27 10:30:49.000000000 -0700
@@ -188,6 +188,7 @@ static int ipaq_open(struct usb_serial_p
 	port->private = (void *)priv;
 	priv->active = 0;
 	priv->queue_len = 0;
+	priv->free_len = 0;
 	INIT_LIST_HEAD(&priv->queue);
 	INIT_LIST_HEAD(&priv->freelist);
 

                 reply	other threads:[~2004-07-27 18:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040727114024.2ea5e2ba@lembas.zaitcev.lan \
    --to=zaitcev@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®