Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S946330AbdDTOUN (ORCPT ); Thu, 20 Apr 2017 10:20:13 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:34119 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946277AbdDTOUJ (ORCPT ); Thu, 20 Apr 2017 10:20:09 -0400 Date: Thu, 20 Apr 2017 08:19:44 -0600 From: Jens Axboe To: Colin King Cc: Paolo Valente , linux-block@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][-next] block, bfq: don't dereference bic before null checking it Message-ID: <20170420141944.GB10057@kernel.dk> References: <20170420140718.19694-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170420140718.19694-1-colin.king@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 349 Lines: 12 On Thu, Apr 20 2017, Colin King wrote: > From: Colin Ian King > > The call to bfq_check_ioprio_change will dereference bic, however, > the null check for bic is after this call. Move the the null > check on bic to before the call to avoid any potential null > pointer dereference issues. Thanks, added. -- Jens Axboe