From: Dan Carpenter <error27@gmail.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
Greg Kroah-Hartman <gregkh@suse.de>, Al Cho <acho@novell.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: keucr: check kmalloc() return value
Date: Sun, 12 Sep 2010 22:52:49 +0200 [thread overview]
Message-ID: <20100912205248.GE25351@bicker> (raw)
In-Reply-To: <1284317808-4850-1-git-send-email-segooon@gmail.com>
On Sun, Sep 12, 2010 at 10:56:43PM +0400, Vasiliy Kulikov wrote:
> kmalloc() may fail, if so return error code.
> Also don't alloc 16 bytes from the heap, use stack instead.
I don't have ENE_SendScsiCmd() in my repo, but I think it's a DMA
function. You're not supposed to use stack memory for DMA transfers.
This is documented in: Documentation/DMA-API-HOWTO.txt
So the original code is correct here (except that there is no error
handling).
regards,
dan carpenter
next prev parent reply other threads:[~2010-09-12 20:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 18:56 [PATCH] staging: keucr: check kmalloc() return value Vasiliy Kulikov
2010-09-12 20:52 ` Dan Carpenter [this message]
2010-09-16 19:32 ` Greg KH
2010-09-19 7:36 ` [PATCH v2] " Vasiliy Kulikov
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=20100912205248.GE25351@bicker \
--to=error27@gmail.com \
--cc=acho@novell.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox