Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754979AbbHDRaQ (ORCPT ); Tue, 4 Aug 2015 13:30:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36194 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753139AbbHDRaO (ORCPT ); Tue, 4 Aug 2015 13:30:14 -0400 Date: Tue, 4 Aug 2015 14:30:11 -0300 From: Marcelo Ricardo Leitner To: Oleg Nesterov Cc: "David S. Miller" , Huang Ying , Alexei Starovoitov , Jan Stancek , Jesper Brouer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: pktgen: don't abuse current->state in pktgen_thread_worker() Message-ID: <20150804173011.GC2758@localhost.localdomain> References: <20150804163334.GA31842@redhat.com> <20150804164056.GA2758@localhost.localdomain> <20150804170827.GA1264@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150804170827.GA1264@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1361 Lines: 31 On Tue, Aug 04, 2015 at 07:08:27PM +0200, Oleg Nesterov wrote: > On 08/04, Marcelo Ricardo Leitner wrote: > > > > On Tue, Aug 04, 2015 at 06:33:34PM +0200, Oleg Nesterov wrote: > > > Commit 1fbe4b46caca "net: pktgen: kill the Wait for kthread_stop > > > code in pktgen_thread_worker()" removed (in particular) the final > > > __set_current_state(TASK_RUNNING) and I didn't notice the previous > > > set_current_state(TASK_INTERRUPTIBLE). This triggers the warning > > > in __might_sleep() after return. > > > > > > Afaics, we can simply remove both set_current_state()'s, and we > > > could do this a long ago right after ef87979c273a2 "pktgen: better > > > scheduler friendliness" which changed pktgen_thread_worker() to > > > use wait_event_interruptible_timeout(). > > > > > > Reported-by: Huang Ying > > > Signed-off-by: Oleg Nesterov > > > > Interesting that it didn't happen in my tests yet per description it > > should have. Huang, did you do anything special to trigger this? > > Do you have CONFIG_DEBUG_ATOMIC_SLEEP=y ? Ahh yes, probably not. Thanks. Marcelo -- 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/