Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752340AbbBVUZN (ORCPT ); Sun, 22 Feb 2015 15:25:13 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:48922 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbbBVUZI (ORCPT ); Sun, 22 Feb 2015 15:25:08 -0500 Date: Sun, 22 Feb 2015 15:25:05 -0500 (EST) Message-Id: <20150222.152505.101749483886283097.davem@davemloft.net> To: fabf@skynet.be Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, gregkh@linuxfoundation.org, kas@fi.muni.cz, netdev@vger.kernel.org Subject: Re: [PATCH 6/7 linux-next] wan: cosa: replace current->state by set_current_state() From: David Miller In-Reply-To: <1424455977-21903-6-git-send-email-fabf@skynet.be> References: <1424455977-21903-1-git-send-email-fabf@skynet.be> <1424455977-21903-6-git-send-email-fabf@skynet.be> X-Mailer: Mew version 6.6 on Emacs 24.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Sun, 22 Feb 2015 12:25:07 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 695 Lines: 19 From: Fabian Frederick Date: Fri, 20 Feb 2015 19:12:56 +0100 > Use helper functions to access current->state. > Direct assignments are prone to races and therefore buggy. > > current->state = TASK_RUNNING is replaced by __set_current_state() > > Thanks to Peter Zijlstra for the exact definition of the problem. > > Suggested-By: Peter Zijlstra > Signed-off-by: Fabian Frederick Applied. -- 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/