crypto/async_pq: use __free_page() instead of put_page()
PATCH 1/1 crypto/async_pq: use __free_page() instead of put_page()
The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls put_page from its exit function, resulting in a link error:
.exit.text' referenced in section __jump_table' of crypto/built-in.o: defined in discarded section `.exit.text' of crypto/built-in.o
Quoted 1 line
From a cursory look at that this driver, it seems that it may be
doing the wrong thing here anyway, as the page gets allocated using 'alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'.
With this patch, I no longer get any other build errors from the page_ref patch, so hopefully we can assume that it's always wrong to call any of those functions from __exit code, and that no other driver does it.
--- crypto/async_tx/async_pq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/async_tx/async_pq.c +1 -1
@@ -444,7 +444,7 @@ static int __init async_pq_init(void) static void __exit async_pq_exit(void) { -put_page (pq_scribble_page); +__free_page (pq_scribble_page); }module_init (async_pq_init);
Signature · 1 line
2.7.0
Quoted 11 lines · Arnd Bergmann
The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls
put_pagefrom its exit function, resulting in a link error:
.exit.text' referenced in section__jump_table' ofcrypto/built-in.o: defined in discarded section `.exit.text' ofcrypto/built-in.oFrom a cursory look at that this driver, it seems that it may be doing the wrong thing here anyway, as the page gets allocated using '
alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'.
Quoted 7 lines
With this patch, I no longer get any other build errors from the
page_refpatch, so hopefully we can assume that it's always wrong to call any of those functions from__exitcode, and that no other driver does it.Fixes 0f80830dd044 ("mm/page_ref: add tracepoint to track down page reference manipulation")Signed-off-by Arnd Bergmann <[email protected]>
Vinod, will you take this one?
2016-03-01 3:04 GMT+09:00 Dan Williams <[email protected]>:
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines
The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls
put_pagefrom its exit function, resulting in a link error:
.exit.text' referenced in section__jump_table' ofcrypto/built-in.o: defined in discarded section `.exit.text' ofcrypto/built-in.oFrom a cursory look at that this driver, it seems that it may be doing the wrong thing here anyway, as the page gets allocated using '
alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'.With this patch, I no longer get any other build errors from the
page_refpatch, so hopefully we can assume that it's always wrong to call any of those functions from__exitcode, and that no other driver does it.
Quoted 6 lines
Quoted 2 lines
Fixes 0f80830dd044 ("mm/page_ref: add tracepoint to track down page reference manipulation")Signed-off-by Arnd Bergmann <[email protected]>Acked-by Dan Williams <[email protected]>Vinod, will you take this one?
Problematic patch ("mm/page_ref: ~~~") is not yet merged one. It is on mmotm and this fix should go together with it or before it. I think that handling this fix by
Andrew is easier to all.
Thanks.
Quoted 21 lines · Joonsoo Kim
2016-03-01 3:04 GMT+09:00 Dan Williams <[email protected]>:
Quoted 20 lines · Arnd Bergmann
Quoted 18 lines
The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls
put_pagefrom its exit function, resulting in a link error:
.exit.text' referenced in section__jump_table' ofcrypto/built-in.o: defined in discarded section `.exit.text' ofcrypto/built-in.oFrom a cursory look at that this driver, it seems that it may be doing the wrong thing here anyway, as the page gets allocated using '
alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'.With this patch, I no longer get any other build errors from the
page_refpatch, so hopefully we can assume that it's always wrong to call any of those functions from__exitcode, and that no other driver does it.Fixes 0f80830dd044 ("mm/page_ref: add tracepoint to track down page reference manipulation")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 8 lines
Quoted 3 lines
Acked-by Dan Williams <[email protected]>Vinod, will you take this one?
Problematic patch ("
mm/page_ref: ~~~") is not yet merged one. It is on mmotm and this fix should go together with it or before it. I think that handling this fix by
Andrew is easier to all.
Okay fine by me.
Signature · 7 lines
~Vinod -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Arnd Bergmann
The addition of tracepoints to the page reference tracking had an unfortunate side-effect in at least one driver that calls
put_pagefrom its exit function, resulting in a link error:
.exit.text' referenced in section__jump_table' ofcrypto/built-in.o: defined in discarded section `.exit.text' ofcrypto/built-in.oFrom a cursory look at that this driver, it seems that it may be doing the wrong thing here anyway, as the page gets allocated using '
alloc_page()', and should be freed using '__free_page()' rather than 'put_page()'.
Quoted 4 lines
With this patch, I no longer get any other build errors from the
page_refpatch, so hopefully we can assume that it's always wrong to call any of those functions from__exitcode, and that no other driver does it.
Hopefully that's true. If any such driver was leaking references to those pages, so the put_page() didn't actually result in freeing, the explicit __free_page should catch this via built-in checks.
Quoted 1 line
Fixes 0f80830dd044 ("mm/page_ref: add tracepoint to track down page reference manipulation")
Since it's in mmotm which is quilt-based, the commit hash from -next is not stable.
Quoted 1 line
Signed-off-by Arnd Bergmann <[email protected]>
Quoted 18 lines
--- crypto/async_tx/async_pq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)crypto/async_tx/async_pq.c +1
-1@@ -444,7 +444,7 @@ static int __init async_pq_init(void) static void __exit async_pq_exit(void) { -put_page (pq_scribble_page); +__free_page (pq_scribble_page); }module_init (async_pq_init);