Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Dilger, Andreas
On May 18, 2017, at 17:13, Mathias Rav wrote: > > On Thu, 18 May 2017 14:48:25 + > "Dilger, Andreas" wrote: > >> On May 18, 2017, at 15:53, Greg Kroah-Hartman >> wrote: >>> >>> On Thu, May 04, 2017 at 12:13:38PM

Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Mathias Rav
On Thu, 18 May 2017 14:48:25 + "Dilger, Andreas" wrote: > On May 18, 2017, at 15:53, Greg Kroah-Hartman > wrote: > > > > On Thu, May 04, 2017 at 12:13:38PM -0400, Mathias Rav wrote: > >> Prefer kstrtouint_from_user to

Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Dilger, Andreas
On May 18, 2017, at 15:53, Greg Kroah-Hartman wrote: > > On Thu, May 04, 2017 at 12:13:38PM -0400, Mathias Rav wrote: >> Prefer kstrtouint_from_user to copy_from_user+simple_strtoul. >> >> The helper function lprocfs_wr_uint() is only used to implement >>

Re: [PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-18 Thread Greg Kroah-Hartman
On Thu, May 04, 2017 at 12:13:38PM -0400, Mathias Rav wrote: > Prefer kstrtouint_from_user to copy_from_user+simple_strtoul. > > The helper function lprocfs_wr_uint() is only used to implement > "dump_granted_max" in debugfs. > > Note the slight change in semantics: The previous implementation

[PATCH 1/2] staging: lustre: lprocfs: Use kstrtouint_from_user

2017-05-04 Thread Mathias Rav
Prefer kstrtouint_from_user to copy_from_user+simple_strtoul. The helper function lprocfs_wr_uint() is only used to implement "dump_granted_max" in debugfs. Note the slight change in semantics: The previous implementation using simple_strtoul allows garbage after the number, whereas kstrtox only