Re: [PATCH] sunrpc - fixup userspace buffer possible overrun v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Oeser
Date: Sunday, August 31, 2008 - 7:09 am

Hi Cyrill,

On Sunday 31 August 2008, Cyrill Gorcunov wrote:

Why not use  simple_read_from_buffer() for the read case and
keep the -EINVAL for the write case.

+ ssize_t ret;

        len = svc_print_xprts(tmpbuf, sizeof(tmpbuf));
	ret = simple_read_from_buffer(buffer, ppos, tmpbuf, len);
	if (ret >= 0) {
		*lenp = ret;
		ret = 0;
	}

	return ret;
   }


Best Regards

Ingo Oeser
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] sunrpc - fixup userspace buffer possible overrun v2, Cyrill Gorcunov, (Sun Aug 31, 3:08 am)
Re: [PATCH] sunrpc - fixup userspace buffer possible overr ..., Ingo Oeser, (Sun Aug 31, 7:09 am)