From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Sun, 11 Nov 2018 10:13:45 -0800 From: Omar Sandoval To: linux-block@vger.kernel.org Cc: Jens Axboe , kernel-team@fb.com, Jordan Glover Subject: Re: [PATCH] kyber: fix wrong strlcpy() size in trace_kyber_latency() Message-ID: <20181111181345.GB24956@vader> References: <8233c3aac03494d50bf463787661edc523292ae4.1541957005.git.osandov@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <8233c3aac03494d50bf463787661edc523292ae4.1541957005.git.osandov@fb.com> List-ID: On Sun, Nov 11, 2018 at 09:25:27AM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > 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", but let's fix it. Oh, I forgot Fixes: 6c3b7af1c975 ("kyber: add tracepoints") > Reported-by: Jordan Glover > Signed-off-by: Omar Sandoval > --- > include/trace/events/kyber.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/trace/events/kyber.h b/include/trace/events/kyber.h > index a9834c37ac40..7aaa298375ad 100644 > --- a/include/trace/events/kyber.h > +++ b/include/trace/events/kyber.h > @@ -32,7 +32,7 @@ TRACE_EVENT(kyber_latency, > TP_fast_assign( > __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); > strlcpy(__entry->domain, domain, DOMAIN_LEN); > - strlcpy(__entry->type, type, DOMAIN_LEN); > + strlcpy(__entry->type, type, LATENCY_TYPE_LEN); > __entry->percentile = percentile; > __entry->numerator = numerator; > __entry->denominator = denominator; > -- > 2.19.1 >