mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>,
	j.dumon@option.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, security@kernel.org, davem@davemloft.net,
	stable@kernel.org
Subject: Re: [PATCH v2] drivers/net/usb/hso.c: prevent reading uninitialized memory
Date: Thu, 16 Sep 2010 13:36:25 -0400	[thread overview]
Message-ID: <1284658585.23787.43.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20100916184735.1699492e@lxorguk.ukuu.org.uk>

On Thu, 2010-09-16 at 18:47 +0100, Alan Cox wrote:

> If you want to micro-optimise it you can enumerate the cases that
> tiocmget can be NULL in that driver..

Heh, I think that's going a bit too far. Of course mico-optimizations
usually make the system go faster, but not enough to show out of the
noise, and micro-optimizations most of the time just make the code
harder to understand and more error prone.

A lot of the patches in this patch set could just do the:

	struct foo bar = { 0 };

This would let gcc optimize what needs to be done, and avoids a function
call to memset.

-- Steve



  reply	other threads:[~2010-09-16 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 21:43 Dan Rosenberg
2010-09-16 15:57 ` Steven Rostedt
2010-09-16 17:07   ` Alan Cox
2010-09-16 16:52     ` Steven Rostedt
2010-09-16 17:47       ` Alan Cox
2010-09-16 17:36         ` Steven Rostedt [this message]
2010-09-17  4:55 ` David Miller

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=1284658585.23787.43.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@davemloft.net \
    --cc=drosenberg@vsecurity.com \
    --cc=j.dumon@option.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=stable@kernel.org \
    /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®