On Thu, Jan 10 2008, Oliver Neukum wrote:
> Am Donnerstag, 10. Januar 2008 14:05:25 schrieb Boaz Harrosh:
> > On Thu, Jan 10 2008 at 14:33 +0200, Oliver Neukum <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > could you explain to me why this code can get away with allocating the
> > > sense buffer on the stack?
> > >
> > > static int sg_io(struct file *file, struct request_queue *q,
> > > struct gendisk *bd_disk, struct sg_io_hdr *hdr)
> > > {
> > > unsigned long start_time;
> > > int writing = 0, ret = 0, has_write_perm = 0;
> > > struct request *rq;
> > > char sense[SCSI_SENSE_BUFFERSIZE];
> > >
> > > Regards
> > > Oliver
> > > -
> > where? what? do you mean in scsi_ioctl.c?
> > why not it's a synchronous call?
> > Do you mean 96 bytes is too big?
> > Do you mean DMA alignment and cache coherency? I'm working
> > on that for scsi devices.
>
> Yes, you are doing DMA on the stack.
There are many offenders like that, just take a peek in cdrom.c for
instance.
--
Jens Axboe
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html