From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932877AbbBINpn (ORCPT ); Mon, 9 Feb 2015 08:45:43 -0500 Received: from mail-qc0-f171.google.com ([209.85.216.171]:63413 "EHLO mail-qc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbbBINpl (ORCPT ); Mon, 9 Feb 2015 08:45:41 -0500 Date: Mon, 9 Feb 2015 08:45:37 -0500 From: Tejun Heo To: Konstantin Khlebnikov Cc: Jens Axboe , linux-kernel@vger.kernel.org, Vivek Goyal , stable@vger.kernel.org Subject: Re: [PATCH] cfq-iosched: handle failure of cfq group allocation Message-ID: <20150209134537.GG3220@htj.duckdns.org> References: <20150209134249.12420.97482.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150209134249.12420.97482.stgit@buzz> 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 On Mon, Feb 09, 2015 at 04:42:49PM +0300, Konstantin Khlebnikov wrote: > Cfq_lookup_create_cfqg() allocates struct blkcg_gq using GFP_ATOMIC. > In cfq_find_alloc_queue() possible allocation failure is not handled. > As a result kernel oopses on NULL pointer dereference when > cfq_link_cfqq_cfqg() calls cfqg_get() for NULL pointer. > > Bug was introduced in v3.5 in commit cd1604fab4f9 ("blkcg: factor > out blkio_group creation"). Prior to that commit cfq group lookup > had returned pointer to root group as fallback. > > This patch handles this error using existing fallback oom_cfqq. > > Signed-off-by: Konstantin Khlebnikov Oops, Acked-by: Tejun Heo Thanks. -- tejun