From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 2/2] kernel/fork: handle put_user errors for CLONE_PARENT_SETTID Date: Fri, 6 Feb 2015 22:07:38 +0100 Message-ID: <20150206210738.GA18332@redhat.com> References: <20150206162301.18031.32251.stgit@buzz> <20150206162303.18031.37408.stgit@buzz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Torvalds Cc: Konstantin Khlebnikov , Linux API , Andrew Morton , Linux Kernel Mailing List , Roman Gushchin , Nikita Vetoshkin , Pavel Emelyanov List-Id: linux-api@vger.kernel.org I am not sure about these changes too, but On 02/06, Linus Torvalds wrote: > > What's the upside? If somebody passes in a bad pointer, it's their > problem. Yes. But unless I am totally confused (quite possible) this put_user() can fail even if the pointer is valid. So at least I think Konstantin has found a real problem. Which (I think) shoud be fixed, and this is not connected to fork. > insane with the whole "readable vs writable" thing. Agreed, this part doesn't look nice in any case. Oleg.