Revision 18e962ac0781bcb70d433de3b2a325ff792b4288 authored by Omar Sandoval on 12 November 2018, 08:08:46 UTC, committed by Jens Axboe on 12 November 2018, 15:28:37 UTC
When copying to the latency type, we should be passing LATENCY_TYPE_LEN, not DOMAIN_LEN (this isn't a problem in practice because we only pass "total" or "I/O"). Fix it by changing all of the strlcpy() calls to use sizeof(). Fixes: 6c3b7af1c975 ("kyber: add tracepoints") Reported-by: Jordan Glover <Golden_Miller83@protonmail.ch> Tested-by: Jordan Glover <Golden_Miller83@protonmail.ch> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent de7b75d
debug_page_ref.c
// SPDX-License-Identifier: GPL-2.0
#include <linux/mm_types.h>
#include <linux/tracepoint.h>
#define CREATE_TRACE_POINTS
#include <trace/events/page_ref.h>
void __page_ref_set(struct page *page, int v)
{
trace_page_ref_set(page, v);
}
EXPORT_SYMBOL(__page_ref_set);
EXPORT_TRACEPOINT_SYMBOL(page_ref_set);
void __page_ref_mod(struct page *page, int v)
{
trace_page_ref_mod(page, v);
}
EXPORT_SYMBOL(__page_ref_mod);
EXPORT_TRACEPOINT_SYMBOL(page_ref_mod);
void __page_ref_mod_and_test(struct page *page, int v, int ret)
{
trace_page_ref_mod_and_test(page, v, ret);
}
EXPORT_SYMBOL(__page_ref_mod_and_test);
EXPORT_TRACEPOINT_SYMBOL(page_ref_mod_and_test);
void __page_ref_mod_and_return(struct page *page, int v, int ret)
{
trace_page_ref_mod_and_return(page, v, ret);
}
EXPORT_SYMBOL(__page_ref_mod_and_return);
EXPORT_TRACEPOINT_SYMBOL(page_ref_mod_and_return);
void __page_ref_mod_unless(struct page *page, int v, int u)
{
trace_page_ref_mod_unless(page, v, u);
}
EXPORT_SYMBOL(__page_ref_mod_unless);
EXPORT_TRACEPOINT_SYMBOL(page_ref_mod_unless);
void __page_ref_freeze(struct page *page, int v, int ret)
{
trace_page_ref_freeze(page, v, ret);
}
EXPORT_SYMBOL(__page_ref_freeze);
EXPORT_TRACEPOINT_SYMBOL(page_ref_freeze);
void __page_ref_unfreeze(struct page *page, int v)
{
trace_page_ref_unfreeze(page, v);
}
EXPORT_SYMBOL(__page_ref_unfreeze);
EXPORT_TRACEPOINT_SYMBOL(page_ref_unfreeze);
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...