From: Matthew Wilcox <willy@debian.org>
To: linux-scsi@vger.kernel.org
Cc: Janitors <kernel-janitor-discuss@lists.sourceforge.net>
Subject: GFP_DMA Janitation
Date: Sat, 14 Dec 2002 05:35:18 +0000 [thread overview]
Message-ID: <20021214053518.K10991@parcelfarce.linux.theplanet.co.uk> (raw)
I know there's a lot of clean-up and janitorial work going on at the
moment, so maybe someone already fixed the bogus uses of GFP_DMA in
drivers/scsi? For those who're not aware, GFP_DMA is _only_ a flag,
not a full specifier. ie it should be used as
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
rather than
buffer = kmalloc(512, GFP_DMA);
which is how sr.c uses it at present.
Current offenders:
drivers/scsi/aha1542.c:703: SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_DMA);
drivers/scsi/megaraid.c:5020: _tv = (void *)__get_free_pages(GFP_DMA, order);
drivers/scsi/pluto.c:120: fcs = (struct ctrl_inquiry *) kmalloc (sizeof (struct ctrl_inquiry) * fcscount, GFP_DMA);
drivers/scsi/sd.c:1124: buffer = kmalloc(512, GFP_DMA);
drivers/scsi/sr.c:596: buffer = kmalloc(512, GFP_DMA);
drivers/scsi/sr.c:708: buffer = kmalloc(512, GFP_DMA);
drivers/scsi/sr_ioctl.c:99: bounce_buffer = (char *) kmalloc(cgc->buflen, GFP_DMA);
The other users of GFP_DMA seem to use it correctly.
BTW, not specifing anything with GFP_DMA leads to the allocation currently
being performed as GFP_ATOMIC, only without the permission to access
the emergency pools. A terribly risky situation.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next reply other threads:[~2002-12-14 5:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-14 5:35 Matthew Wilcox [this message]
2002-12-16 21:33 ` GFP_DMA Janitation Matt Domsch
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=20021214053518.K10991@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=kernel-janitor-discuss@lists.sourceforge.net \
--cc=linux-scsi@vger.kernel.org \
/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.