Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758518Ab3EGM2J (ORCPT ); Tue, 7 May 2013 08:28:09 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47136 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757131Ab3EGM2I (ORCPT ); Tue, 7 May 2013 08:28:08 -0400 Date: Tue, 7 May 2013 14:28:04 +0200 From: Pavel Machek To: Colin Cross Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Ingo Molnar , Andrew Morton , Mandeep Singh Baines , Oleg Nesterov , linux-nfs@vger.kernel.org, linux-pm@vger.kernel.org, netdev@vger.kernel.org, Linus Torvalds , Tejun Heo , Len Brown Subject: Re: [PATCH v3 02/16] freezer: add unsafe versions of freezable helpers for CIFS Message-ID: <20130507122803.GA2585@elf.ucw.cz> References: <1367884221-20462-1-git-send-email-ccross@android.com> <1367884221-20462-3-git-send-email-ccross@android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1367884221-20462-3-git-send-email-ccross@android.com> X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1565 Lines: 31 On Mon 2013-05-06 16:50:07, Colin Cross wrote: > CIFS calls wait_event_freezekillable_unsafe with a VFS lock held, > which is unsafe and will cause lockdep warnings when 6aa9707 > "lockdep: check that no locks held at freeze time" is reapplied > (it was reverted in dbf520a). CIFS shouldn't be doing this, but > it has long-running syscalls that must hold a lock but also > shouldn't block suspend. Until CIFS freeze handling is rewritten > to use a signal to exit out of the critical section, add a new > wait_event_freezekillable_unsafe helper that will not run the > lockdep test when 6aa9707 is reapplied, and call it from CIFS. > > In practice the likley result of holding the lock while freezing > is that a second task blocked on the lock will never freeze, > aborting suspend, but it is possible to manufacture a case using > the cgroup freezer, the lock, and the suspend freezer to create > a deadlock. Silencing the lockdep warning here will allow > problems to be found in other drivers that may have a more > serious deadlock risk, and prevent new problems from being added. > > 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/