From: James Smart <James.Smart@Emulex.Com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"roel.kluin@gmail.com" <roel.kluin@gmail.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] lpfc: Read buffer overflow
Date: Tue, 4 Aug 2009 09:39:45 -0400 [thread overview]
Message-ID: <4A783A21.3070801@emulex.com> (raw)
In-Reply-To: <1249345878.3943.240.camel@mulgrave.site>
James Bottomley wrote:
> I'd suggest not:
>
> jejb@mulgrave:~/git/linux-2.6/drivers/scsi/lpfc> git grep 'max_vports && vports'|wc -l
> 17
>
> Assuming this secures agreement as a patch, I don't really want to wade
> through another 16 patches for the remaining ones. You definitely can't
> reduce the vport array length until they're all fixed.
>
> What I hear is that it's not a problem, but it's a possible
> micro-optimisation. Assuming the maintainer agrees, it's far better
> just to fix everything at once. However, I'm equally happy to leave it
> as is since there's no actual problem given the allocation definition.
>
>> What prevents the loop in lpfc_create_vport_work_array() from wandering
>> off the end of vports[], btw?
>
> We refuse to create any vports beyond this number ... the iterator
> counts the number of created vports (it's actually a firmware limited
> number, I believe).
>
> James
Agree. It's a style thing from one of the contributors to the driver. There
is no issue, I don't believe that optimizing 1 less pointer's worth of
allocation is a big deal (good, yes, but...). However, I do recognize it is a
much better coding style.
I'll roll the changes for it into the next driver patch set. (Yes, it is a
firmware limited number).
-- james s
prev parent reply other threads:[~2009-08-04 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-02 8:08 [PATCH] lpfc: Read buffer overflow Roel Kluin
2009-08-03 15:02 ` James Smart
2009-08-03 17:15 ` Joe Eykholt
2009-08-04 13:29 ` James Smart
2009-08-03 23:42 ` Andrew Morton
2009-08-04 0:31 ` James Bottomley
2009-08-04 13:39 ` James Smart [this message]
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=4A783A21.3070801@emulex.com \
--to=james.smart@emulex.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=linux-scsi@vger.kernel.org \
--cc=roel.kluin@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.