From: Al Viro <viro@ZenIV.linux.org.uk>
To: Joe Eykholt <jeykholt@cisco.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
"Sachin P. Sant" <sachinp@in.ibm.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: next Feb 13 drivers/scsi/aha1542.ko build break
Date: Fri, 13 Feb 2009 19:34:44 +0000 [thread overview]
Message-ID: <20090213193444.GL28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <4995C66E.1000800@cisco.com>
On Fri, Feb 13, 2009 at 11:13:50AM -0800, Joe Eykholt wrote:
> > I'm seeing that also. I think that it's this line in aha1542.c:
> >
> > 495: mbo = (scsi2int(mb[mbi].ccbptr) - (SCSI_BUF_PA(&ccb[0]))) / sizeof(struct ccb);
> >
> > since I can comment out the "/ sizeof(struct ccb)" and the driver builds successfully.
> >
> > This may need a patch to use one of the div() macros (?).
>
> In the above case, this problem might not occur if sizeof(struct ccb) happened to
> be a power of 2, since the compiler generates a shift in that case.
> Then later someone could increase the size of the struct and introduce this problem.
The real problem, of course, is that we should _not_ be doing 64bit-division
here, be it by shifts or by __udiv...; if anything, we ought to store the
bus version of HOSTDATA(...)->ccb at the time we'd checked that allocation
got us a small enough address (i.e. after scsi_register()). And store it
in u32.
next prev parent reply other threads:[~2009-02-13 19:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 6:55 linux-next: Tree for February 13 Stephen Rothwell
2009-02-13 10:03 ` [S390] next Feb13 build break appldata/built-in.o Sachin P. Sant
2009-02-13 11:28 ` [Patch] [S390] Fix appldata build break with !NET Sachin P. Sant
2009-02-13 13:43 ` Heiko Carstens
2009-02-13 11:44 ` next Feb 13 drivers/scsi/aha1542.ko build break Sachin P. Sant
2009-02-13 18:22 ` Randy Dunlap
2009-02-13 18:52 ` James Bottomley
2009-02-13 20:03 ` Ingo Molnar
2009-02-13 19:13 ` Joe Eykholt
2009-02-13 19:34 ` Al Viro [this message]
2009-02-13 19:35 ` Bart Van Assche
2009-02-13 19:22 ` [PATCH -next] usb: fix ehci printk formats Randy Dunlap
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=20090213193444.GL28946@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jeykholt@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sachinp@in.ibm.com \
--cc=sfr@canb.auug.org.au \
/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.