* md: Fix userspace free_pages() macro
@ 2011-12-14 13:34 Steven Rostedt
2011-12-14 21:15 ` H. Peter Anvin
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2011-12-14 13:34 UTC (permalink / raw)
To: LKML; +Cc: NeilBrown, Dan Williams, H. Peter Anvin
While using etags to find free_pages(), I stumbled across this debug
definition of free_pages() that is to be used while debugging some raid
code in userspace. The __get_free_pages() allocates the correct size,
but the free_pages() does not match. free_pages(), like
__get_free_pages(), takes an order and not a size.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h
index 2b59cc8..53272e9 100644
--- a/include/linux/raid/pq.h
+++ b/include/linux/raid/pq.h
@@ -132,7 +132,7 @@ void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
PROT_READ|PROT_WRITE, \
MAP_PRIVATE|MAP_ANONYMOUS,\
0, 0))
-# define free_pages(x, y) munmap((void *)(x), (y)*PAGE_SIZE)
+# define free_pages(x, y) munmap((void *)(x), PAGE_SIZE << (y))
static inline void cpu_relax(void)
{
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: md: Fix userspace free_pages() macro
2011-12-14 13:34 md: Fix userspace free_pages() macro Steven Rostedt
@ 2011-12-14 21:15 ` H. Peter Anvin
2011-12-15 5:33 ` NeilBrown
0 siblings, 1 reply; 3+ messages in thread
From: H. Peter Anvin @ 2011-12-14 21:15 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, NeilBrown, Dan Williams
On 12/14/2011 05:34 AM, Steven Rostedt wrote:
> While using etags to find free_pages(), I stumbled across this debug
> definition of free_pages() that is to be used while debugging some raid
> code in userspace. The __get_free_pages() allocates the correct size,
> but the free_pages() does not match. free_pages(), like
> __get_free_pages(), takes an order and not a size.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
Acked-by: H. Peter Anvin <hpa@zytor.com>
-hpa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: md: Fix userspace free_pages() macro
2011-12-14 21:15 ` H. Peter Anvin
@ 2011-12-15 5:33 ` NeilBrown
0 siblings, 0 replies; 3+ messages in thread
From: NeilBrown @ 2011-12-15 5:33 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Steven Rostedt, LKML, Dan Williams
[-- Attachment #1: Type: text/plain, Size: 634 bytes --]
On Wed, 14 Dec 2011 13:15:31 -0800 "H. Peter Anvin" <hpa@linux.intel.com>
wrote:
> On 12/14/2011 05:34 AM, Steven Rostedt wrote:
> > While using etags to find free_pages(), I stumbled across this debug
> > definition of free_pages() that is to be used while debugging some raid
> > code in userspace. The __get_free_pages() allocates the correct size,
> > but the free_pages() does not match. free_pages(), like
> > __get_free_pages(), takes an order and not a size.
> >
> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> >
>
> Acked-by: H. Peter Anvin <hpa@zytor.com>
>
Applied. Thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-15 5:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 13:34 md: Fix userspace free_pages() macro Steven Rostedt
2011-12-14 21:15 ` H. Peter Anvin
2011-12-15 5:33 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).