From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH v3 04/16] lockdep: check that no locks held at freeze time Date: Tue, 7 May 2013 14:29:07 +0200 Message-ID: <20130507122906.GC2585@elf.ucw.cz> References: <1367884221-20462-1-git-send-email-ccross@android.com> <1367884221-20462-5-git-send-email-ccross@android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Rafael J. Wysocki" , Peter Zijlstra , Ingo Molnar , Andrew Morton , Mandeep Singh Baines , Oleg Nesterov , linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Torvalds , Tejun Heo , Ben Chan , Len Brown To: Colin Cross Return-path: Content-Disposition: inline In-Reply-To: <1367884221-20462-5-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Mon 2013-05-06 16:50:09, Colin Cross wrote: > From: Mandeep Singh Baines > > We shouldn't try_to_freeze if locks are held. Holding a lock can cause a > deadlock if the lock is later acquired in the suspend or hibernate path > (e.g. by dpm). Holding a lock can also cause a deadlock in the case of > cgroup_freezer if a lock is held inside a frozen cgroup that is later > acquired by a process outside that group. > > History: > This patch was originally applied as 6aa9707099c and reverted in > dbf520a9d7d4 because NFS was freezing with locks held. It was > deemed better to keep the bad freeze point in NFS to allow laptops > to suspend consistently. The previous patch in this series converts > NFS to call _unsafe versions of the freezable helpers so that > lockdep doesn't complain about them until a more correct fix > can be applied. > > [akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org: export debug_check_no_locks_held] > Signed-off-by: Mandeep Singh Baines > Cc: Ben Chan > Cc: Oleg Nesterov > Cc: Tejun Heo > Cc: Rafael J. Wysocki > Cc: Ingo Molnar > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > [ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org: don't warn if try_to_freeze_unsafe is called] > Signed-off-by: Colin Cross Acked-by: Pavel Machek -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html