Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267926AbUIJVl4 (ORCPT ); Fri, 10 Sep 2004 17:41:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267934AbUIJVl4 (ORCPT ); Fri, 10 Sep 2004 17:41:56 -0400 Received: from ausc60ps301.us.dell.com ([143.166.148.206]:19363 "EHLO ausc60ps301.us.dell.com") by vger.kernel.org with ESMTP id S267926AbUIJVlu convert rfc822-to-8bit (ORCPT ); Fri, 10 Sep 2004 17:41:50 -0400 X-Ironport-AV: i="3.84,150,1091422800"; d="scan'208"; a="74103803:sNHT24024072" X-MimeOLE: Produced By Microsoft Exchange V6.0.6527.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 8BIT Subject: RE: flock/posix lock question Date: Fri, 10 Sep 2004 16:41:50 -0500 Message-ID: <7A8F92187EF7A249BF847F1BF4903C046306E5@ausx2kmpc103.aus.amer.dell.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: flock/posix lock question Thread-Index: AcSXfr0aomLk/XJMTCOZBH5sE5sjQgAABNRQ From: To: Cc: X-OriginalArrivalTime: 10 Sep 2004 21:41:50.0262 (UTC) FILETIME=[FACCDD60:01C4977E] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 41 Hello-- This question regards file locks and code in fs/locks.c. I am seeing the kernel get stuck in posix_locks_deadlock() checking for deadlocks. It appears that samba (smbd) is getting both an flock and a posix lock for the same file, which results in a circular dependency in the blocked_list... and posix_locks_deadlock() is getting stuck in that circle. The circular dependency gets into the blocked_list because deadlock situations aren't checked for when inserting flock requests into the blocked_list. Since flocks aren't supposed to do any deadlock checking, it seems like the right solution to this would be to modify posix_locks_deadlock() to only check for deadlock situations with other posix locks and lock requests, and ignore flocks. Of course, samba should also probably be fixed so that it doesn't do that, too... but it shouldn't be able to cause a kernel hang by doing so. Does this sound correct? Am I missing something? (I am seeing this on a RHEL3 update 3 (2.4.21-20) kernel.) Thanks! Stuart - 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/