From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933576Ab3BLRho (ORCPT ); Tue, 12 Feb 2013 12:37:44 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:41699 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932404Ab3BLRhn (ORCPT ); Tue, 12 Feb 2013 12:37:43 -0500 Date: Tue, 12 Feb 2013 09:37:37 -0800 From: Tejun Heo To: Hillf Danton Cc: Namhyung Kim , Rusty Russell , Andrew Morton , Ingo Molnar , LKML Subject: Re: [PATCH 1/2] stop_machine: check work->done while handling enqueued works Message-ID: <20130212173737.GF7348@htj.dyndns.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 10, 2013 at 01:22:43PM +0800, Hillf Danton wrote: > In cpu_stopper_thread(), @work->done may be NULL if the cpu stop work > is queued from stop_one_cpu_nowait(); however, cpu_stopper_thread() > updates @done->ret without checking whether @done exists or not when > the work function fails. > > While this can lead to oops, the only current user of > stop_one_cpu_nowait() - active_load_balance_cpu_stop() - always > returns 0 and thus there's no in-kernel user which triggers this bug. > > Fix it by checking whether @done exists before updating @done->ret. > > Thanks Tejun for sharing commit message. > > Signed-off-by: Hillf Danton > Reviewed-by: Namhyung Kim Acked-by: Tejun Heo Andrew, can you please take this? Thanks. -- tejun