Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933928AbXF2Q75 (ORCPT ); Fri, 29 Jun 2007 12:59:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758787AbXF2Q7t (ORCPT ); Fri, 29 Jun 2007 12:59:49 -0400 Received: from nz-out-0506.google.com ([64.233.162.226]:7066 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756962AbXF2Q7s (ORCPT ); Fri, 29 Jun 2007 12:59:48 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=NE52r3MvxtXv4M7RcyDbd+vREadmKiiBG1lcNBqmm0HPK5qd2ZKLXwI3/RLa/tkpG0x/hbHVSUx5u3l8p3E1Finb2pLJJLZr9nLHNxWvmWL+oxl5PBTB3KxeCbXw2kxzw1APUKY1v4DIVfmtTNtSbmNVBeZxv/7GN6c3CbE+N38= Message-ID: Date: Fri, 29 Jun 2007 12:59:46 -0400 From: "Dmitry Torokhov" To: "Ingo Molnar" Subject: Re: 2.6.22-rc6 spurious hangs Cc: "Oleg Nesterov" , "Thomas Sattler" , "Linux Kernel Mailing List" , "Alan Cox" , "Daniel Mack" , "Holger Waechtler" , "Mauro Carvalho Chehab" , "Mariusz Kozlowski" , v4l-dvb-maintainer@linuxtv.org In-Reply-To: <20070629141059.GA8995@elte.hu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_72983_4434692.1183136386438" References: <20070628144741.GA437@tv-sign.ru> <20070628150826.GA487@tv-sign.ru> <4683F145.2060705@gmx.de> <4683F48F.9010603@gmx.de> <20070628181044.GA613@tv-sign.ru> <4684B132.2070405@gmx.de> <20070629130955.GA284@tv-sign.ru> <20070629131605.GA25964@elte.hu> <20070629135848.GA332@tv-sign.ru> <20070629141059.GA8995@elte.hu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 18773 Lines: 281 ------=_Part_72983_4434692.1183136386438 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/29/07, Ingo Molnar wrote: > > * Oleg Nesterov wrote: > > > > > ->disconnect_pending is used without any locks/barriers, perhaps > > > > this is the reason. > > > > I misread cinergyt2_release, it checks !->disconnect_pending, so it is > > very clear why cinergyt2_query_rc() tries to take the mutex. > > > > > > I'll try to look further tomorrow. In any case, cinergyT2 should not > > > > use flush_scheduled_work() at all. > > > > > > would the hack below be worth trying, to see whether there are any > > > further problems? > [...] > > I don't think we can just kill flush_scheduled_work(). We can use > > cancel_rearming_delayed_work() instead of > > cancel_delayed_work()+flush_scheduled_work() > > > > Still we can't do this under cinergyt2->sem, because cinergyt2_query() > > takes it too. This all looks very wrong to me, I hope maintaners can > > explain. > > i've Cc:-ed the maintainers. > Well, not really maintainer but I think the short term soluton (at least for the RC part) is to alter cinergyt2_query_rc to take cinergyt2->sem only around cinergyt2_command(). Ther rest of the polling function need not be protected as it does nto tun concurently with itself. The longer trem solution is to convert cinergyt2 to use polled input device framework (as in attached patch - untested). Unfortunately it depends on adding suspend/resume support to polled devices now that workqueues are not being freezed again. Overall the driver makes me cringe... - Why does it take cinergyt2->sem in its cinergyt2_poll() function before calling poll_wait()? Most of the places that try to wake up polling process (such as FE_SET_FRONTEND) attempt to take the same mutex and will promptly deadlock unless I am missing something. - cinergyt2_query() wakes up pollers before altering poll condition. - cinergyt2->iunuse is racy... -- Dmitry ------=_Part_72983_4434692.1183136386438 Content-Type: text/plain; name=cinergyt-to-polldev.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_f3iwu1um Content-Disposition: attachment; filename="cinergyt-to-polldev.patch" U2lnbmVkLW9mZi1ieTogRG1pdHJ5IFRvcm9raG92IDxkdG9yQG1haWwucnU+Ci0tLQogZHJpdmVy cy9tZWRpYS9kdmIvY2luZXJ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xheWVkX3Jl YXJtaW5nX3dvcmsoJmNpbmVyZ3l0Mi0+cXVlcnlfd29yayk7CiAJd2FrZV91cF9pbnRlcnJ1cHRp YmxlKCZjaW5lcmd5dDItPnBvbGxfd3EpOwogCiAJY2luZXJneXQyLT5kZW11eC5kbXguY2xvc2Uo JmNpbmVyZ3l0Mi0+ZGVtdXguZG14KTsKQEAgLTk5OCw3ICs5ODAsNiBAQCBzdGF0aWMgaW50IGNp bmVyZ3l0Ml9zdXNwZW5kIChzdHJ1Y3QgdXNiCiAJaWYgKDEpIHsKIAkJc3RydWN0IGNpbmVyZ3l0 MiAqY2luZXJneXQyID0gdXNiX2dldF9pbnRmZGF0YSAoaW50Zik7CiAKLQkJY2luZXJneXQyX3N1 c3BlbmRfcmMoY2luZXJneXQyKTsKIAkJY2FuY2VsX2RlbGF5ZWRfd29yaygmY2luZXJneXQyLT5x dWVyeV93b3JrKTsKIAkJaWYgKGNpbmVyZ3l0Mi0+c3RyZWFtaW5nKQogCQkJY2luZXJneXQyX3N0 b3Bfc3RyZWFtX3hmZXIoY2luZXJneXQyKTsKQEAgLTEwMjYsOCArMTAwNyw2IEBAIHN0YXRpYyBp bnQgY2luZXJneXQyX3Jlc3VtZSAoc3RydWN0IHVzYl8KIAkJc2NoZWR1bGVfZGVsYXllZF93b3Jr KCZjaW5lcmd5dDItPnF1ZXJ5X3dvcmssIEhaLzIpOwogCX0KIAotCWNpbmVyZ3l0Ml9yZXN1bWVf cmMoY2luZXJneXQyKTsKLQogCW11dGV4X3VubG9jaygmY2luZXJneXQyLT5zZW0pOwogCXJldHVy biAwOwogfQo= ------=_Part_72983_4434692.1183136386438-- - 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/