From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162Ab2HVDPT (ORCPT ); Tue, 21 Aug 2012 23:15:19 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:50855 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752264Ab2HVDPQ (ORCPT ); Tue, 21 Aug 2012 23:15:16 -0400 Message-ID: <1345605221.2366.2.camel@falcor.watson.ibm.com> Subject: Re: [PATCH] task_work: add a scheduling point in task_work_run() From: Mimi Zohar To: Eric Dumazet Cc: Al Viro , Oleg Nesterov , Linus Torvalds , ". James Morris" , linux-security-module@vger.kernel.org, linux-kernel , David Howells Date: Tue, 21 Aug 2012 23:13:41 -0400 In-Reply-To: <1345584725.5158.550.camel@edumazet-glaptop> References: <1341014197.2342.7.camel@falcor.watson.ibm.com> <20120630050238.GZ14083@ZenIV.linux.org.uk> <1341172202.2556.13.camel@falcor> <20120701205722.GD22927@ZenIV.linux.org.uk> <1341193591.2249.3.camel@falcor> <20120702034310.GE22927@ZenIV.linux.org.uk> <20120702051155.GF22927@ZenIV.linux.org.uk> <1341229790.2350.1.camel@falcor> <20120702120259.GG22927@ZenIV.linux.org.uk> <1341234091.2166.5.camel@falcor> <20120702133329.GH22927@ZenIV.linux.org.uk> <1341240603.2086.1.camel@falcor> <1345554314.5158.490.camel@edumazet-glaptop> <1345581470.2815.14.camel@falcor.watson.ibm.com> <1345584725.5158.550.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 (3.2.3-3.fc16) Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12082203-7606-0000-0000-000002FE0102 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2012-08-21 at 23:32 +0200, Eric Dumazet wrote: > On Tue, 2012-08-21 at 16:37 -0400, Mimi Zohar wrote: > > > We're here, because fput() called schedule_work() to delay the last > > fput(). The execution needs to take place before the syscall returns to > > userspace. Need to read __schedule()... Do you know if cond_resched() > > can guarantee that it will be executed before the return to userspace? > > Some clarifications : > > - fput() does not call schedule_work() in this case but task_work_add() > > - cond_resched() wont return to userspace. Thanks for the clarification. Mimi