| Date | Wed, 15 May 2013 11:41:48 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [patch 06/15] clocksource: Split out user string input |
| |
On Mon, 29 Apr 2013, John Stultz wrote: > On Thu, Apr 25, 2013 at 1:31 PM, Thomas Gleixner <tglx@linutronix.de> wrote: > So you probably want something like the following patch to fix this.
Yep, stupid me.
> thanks > -john > > > > diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c > index e9c4f04..5f6c324 100644 > --- a/kernel/time/clocksource.c > +++ b/kernel/time/clocksource.c > @@ -836,6 +836,8 @@ sysfs_show_current_clocksources(struct device *dev, > > static size_t clocksource_get_uname(const char *buf, char *dst, size_t cnt) > { > + size_t ret = cnt; > + > /* strings from sysfs write are not 0 terminated! */ > if (!cnt || cnt >= CS_NAME_LEN) > return -EINVAL; > @@ -846,7 +848,7 @@ static size_t clocksource_get_uname(const char *buf, char > *dst, size_t cnt) > if (cnt > 0) > memcpy(dst, buf, cnt); > dst[cnt] = 0; > - return cnt; > + return ret; > } > > /** >
|