From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 6 Jul 2017 21:18:26 +0100 From: Al Viro To: Kees Cook Cc: Linus Torvalds , LKML , "linux-fsdevel@vger.kernel.org" , Andrew Morton Subject: Re: [git pull] vfs.git pile 11 Message-ID: <20170706201826.GW10672@ZenIV.linux.org.uk> References: <20170706091256.GN10672@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thu, Jul 06, 2017 at 12:45:36PM -0700, Kees Cook wrote: > > + if (unlikely(!check_copy_size(addr, bytes, false))) > + return false; > + else > + return _copy_from_iter_full(addr, bytes, i); > > Can these be rewritten to avoid the double-negative? Matter of taste - I've no strong preferences here. > + might_fault(); > > Should this be might_sleep()? Just from reading the patch it looked > like you were adding might_sleep()s in the other cases. D'oh - shouldn't have written that pull request message before the first cup of coffee... might_sleep() it is, of course.