Re: [PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Greg Kroah-Hartman
On Fri, Apr 28, 2017 at 06:53:32PM -0700, Joe Perches wrote: > On Sat, 2017-04-29 at 09:45 +0800, Geliang Tang wrote: > > Use memdup_user() helper instead of open-coding to simplify the code. > > While I doubt this is a problem, this loses > the multiplication overflow check for > sizeof(*insns)

Re: [PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Greg Kroah-Hartman
On Fri, Apr 28, 2017 at 06:53:32PM -0700, Joe Perches wrote: > On Sat, 2017-04-29 at 09:45 +0800, Geliang Tang wrote: > > Use memdup_user() helper instead of open-coding to simplify the code. > > While I doubt this is a problem, this loses > the multiplication overflow check for > sizeof(*insns)

Re: [PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Joe Perches
On Sat, 2017-04-29 at 09:45 +0800, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. While I doubt this is a problem, this loses the multiplication overflow check for sizeof(*insns) * insnlist.n_isns > diff --git a/drivers/staging/comedi/comedi_fops.c >

Re: [PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Joe Perches
On Sat, 2017-04-29 at 09:45 +0800, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. While I doubt this is a problem, this loses the multiplication overflow check for sizeof(*insns) * insnlist.n_isns > diff --git a/drivers/staging/comedi/comedi_fops.c >

[PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/staging/comedi/comedi_fops.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c

[PATCH] staging: comedi: use memdup_user

2017-04-28 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/staging/comedi/comedi_fops.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c