Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752874AbbHESuU (ORCPT ); Wed, 5 Aug 2015 14:50:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34740 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbbHESuR (ORCPT ); Wed, 5 Aug 2015 14:50:17 -0400 Date: Wed, 5 Aug 2015 11:50:16 -0700 From: "gregkh@linuxfoundation.org" To: "Wang, Biao" Cc: "arve@android.com" , "riandrews@android.com" , "devel@driverdev.osuosl.org" , "Zhang, Di" , "Li, Fei" , "linux-kernel@vger.kernel.org" , "joe@perches.com" , "dan.carpenter@oracle.com" Subject: Re: [PATCH V3] staging: android: lowmemorykiller: imporve lmk to avoid deadlock issue Message-ID: <20150805185016.GA13866@kroah.com> References: <09CB0B4607EB8F4DB7E0BE3B06BFBD051DA2E90F@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09CB0B4607EB8F4DB7E0BE3B06BFBD051DA2E90F@SHSMSX101.ccr.corp.intel.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 21 On Mon, Aug 03, 2015 at 08:26:40AM +0000, Wang, Biao wrote: > Consider the following case: > Task A trigger lmk with a lock held, while task B try to get this lock, but unfortunately B is the very culprit task lmk select to kill. Then B will never be killed, and A will forever select B to kill. > Such dead lock will trigger softlock up issue. > > This patch try to pick the next task to break this loop. > > Signed-off-by: Wang Biao > Reviewed-by: Zhang Di > --- > drivers/staging/android/lowmemorykiller.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Please address Dave's review comments, I'll not take this as-is, sorry. greg k-h -- 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/