public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH] CDROM: use kmalloced buffers instead of buffers on stack
Date: Sun, 23 Mar 2008 14:47:43 +0300	[thread overview]
Message-ID: <20080323114743.GB7612@cvg> (raw)
In-Reply-To: <20080323111532.19DBFC2DFF@solo.franken.de>

[Thomas Bogendoerfer - Sun, Mar 23, 2008 at 12:15:32PM +0100]
| If cdrom commands are issued to a scsi drive in most cases the buffer
| will be filled via dma. This leads to bad stack corruption on non coherent
| platforms, because the buffers are neither cache line aligned nor is
| the size a multiple of the cache line size. Using kmalloced buffers
| avoids this.
| 
| Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
| ---
| 
|  drivers/cdrom/cdrom.c |  274 ++++++++++++++++++++++++++++++++-----------------
|  1 files changed, 181 insertions(+), 93 deletions(-)
| 
[...]

Hi Thomas,

maybe would be better to use one memory pool instead?

		- Cyrill -

  reply	other threads:[~2008-03-23 11:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-23 11:15 [PATCH] CDROM: use kmalloced buffers instead of buffers on stack Thomas Bogendoerfer
2008-03-23 11:47 ` Cyrill Gorcunov [this message]
2008-03-26 11:13 ` Jens Axboe

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=20080323114743.GB7612@cvg \
    --to=gorcunov@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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