public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike@sf-mail.de>
To: Dave Jones <davej@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Saripalli, Venkata Ramanamurthy (STSD)" <saripalli@hp.com>,
	linux-scsi@vger.kernel.org, axboe@suse.de
Subject: Re: [PATCH 1/2] cpqfc: fix for "Using too much stach" in 2.6 kernel
Date: Thu, 4 Aug 2005 19:11:38 +0200	[thread overview]
Message-ID: <200508041911.46911@bilbo.math.uni-mannheim.de> (raw)
In-Reply-To: <20050804164259.GD22886@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Dave Jones wrote:
>On Thu, Aug 04, 2005 at 05:56:14PM +0200, Rolf Eike Beer wrote:
> > Am Donnerstag, 4. August 2005 17:40 schrieb Dave Jones:
> > >On Thu, Aug 04, 2005 at 11:38:30AM +0200, Rolf Eike Beer wrote:
> > > > >+	  ulFibreFrame = kmalloc((2048/4), GFP_KERNEL);
> > > >
> > > > The size bug was already found by Dave Jones. This never should be
> > > > written this way (not your fault). The array should have been
> > > > [2048/sizeof(ULONG)].
> > >
> > >wasteful. We only ever use 2048 bytes of this array, so doubling
> > >its size on 64bit is pointless, unless you make changes later on
> > >in the driver. (Which I think don't make sense, as we just copy
> > >32 64byte chunks).
> >
> > No, this is how it should have been before. This way it would have been
> > clear where the magic 4 came from.
>
>It's pointless to fix this, without fixing also CpqTsGetSFQEntry()
>...

At least half of the file should be rewritten.

> > >we're trashing the last 48 bytes of every copy we make.
> > >Does this driver even work ?
> >
> > No, ulDestPtr ist ULONG* so we increase it by sizeof(ULONG)*16 which is
> > 64.
>
>Duh, yes.  That is broken on 64-bit however, where it will advance 128 bytes
>instead of 64 bytes.

ULONG is defined to __u32 in some of the cpq* headers.

Eike

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-08-04 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-04  4:39 [PATCH 1/2] cpqfc: fix for "Using too much stach" in 2.6 kernel Saripalli, Venkata Ramanamurthy (STSD)
2005-08-04  4:49 ` Dave Jones
2005-08-04  9:38 ` Rolf Eike Beer
2005-08-04 12:13   ` Denis Vlasenko
2005-08-04 15:40   ` Dave Jones
2005-08-04 15:56     ` Rolf Eike Beer
2005-08-04 16:42       ` Dave Jones
2005-08-04 17:11         ` Rolf Eike Beer [this message]
2005-08-04 17:38           ` Dave Jones
2005-08-04 13:53 ` Jesper Juhl
2005-08-06  1:13   ` Jesper Juhl

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=200508041911.46911@bilbo.math.uni-mannheim.de \
    --to=eike@sf-mail.de \
    --cc=axboe@suse.de \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=saripalli@hp.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