Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753316AbbBWWV3 (ORCPT ); Mon, 23 Feb 2015 17:21:29 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:38412 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbbBWWV2 (ORCPT ); Mon, 23 Feb 2015 17:21:28 -0500 Date: Mon, 23 Feb 2015 17:21:25 -0500 (EST) Message-Id: <20150223.172125.1327512956032057269.davem@davemloft.net> To: fabf@skynet.be Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, samuel@sortiz.org, netdev@vger.kernel.org Subject: Re: [PATCH 1/1 net-next] irda: replace current->state by set_current_state() From: David Miller In-Reply-To: <1424713105-12845-1-git-send-email-fabf@skynet.be> References: <1424713105-12845-1-git-send-email-fabf@skynet.be> X-Mailer: Mew version 6.5 on Emacs 24.1 / 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]); Mon, 23 Feb 2015 14:21:27 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 19 From: Fabian Frederick Date: Mon, 23 Feb 2015 18:38:24 +0100 > Use helper functions to access current->state. > Direct assignments are prone to races and therefore buggy. > > current->state = TASK_RUNNING can be 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/