From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56854 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934032AbdIYQ6k (ORCPT ); Mon, 25 Sep 2017 12:58:40 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8PGw9RB093343 for ; Mon, 25 Sep 2017 12:58:40 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d74g6v700-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 25 Sep 2017 12:58:36 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 25 Sep 2017 17:54:34 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8PGsWPg10027236 for ; Mon, 25 Sep 2017 16:54:32 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F416BAE055 for ; Mon, 25 Sep 2017 17:49:16 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9E47AE053 for ; Mon, 25 Sep 2017 17:49:16 +0100 (BST) Received: from bblock-ThinkPad-W530 (unknown [9.145.46.238]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Mon, 25 Sep 2017 17:49:16 +0100 (BST) Date: Mon, 25 Sep 2017 18:54:31 +0200 From: Benjamin Block To: Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, Steffen Maier , stable@vger.kernel.org Subject: Re: [PATCH 1/1] bsg-lib: fix use-after-free under memory-pressure References: <9040282c25a027344945e9be2c3afc3d90386909.1506016742.git.bblock@linux.vnet.ibm.com> <20170925155307.GA27522@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170925155307.GA27522@infradead.org> Message-Id: <20170925165431.GA3283@bblock-ThinkPad-W530> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Sep 25, 2017 at 08:53:07AM -0700, Christoph Hellwig wrote: > > if (!q) > > return ERR_PTR(-ENOMEM); > > q->cmd_size = sizeof(struct bsg_job) + dd_job_size; > > - q->init_rq_fn = bsg_init_rq; > > - q->exit_rq_fn = bsg_exit_rq; > > + q->init_rq_fn = bsg_init_job; > > + q->exit_rq_fn = bsg_exit_job; > > + q->initialize_rq_fn = bsg_init_rq; > > Please use function names that match the method names, that is keep > the existing names and name the new helper bsg_initialize_rq; > OK, I can change that. Beste Gr��e / Best regards, - Benjamin Block > > Except for that the patch looks fine to me: > > Reviewed-by: Christoph Hellwig > -- Linux on z Systems Development / IBM Systems & Technology Group IBM Deutschland Research & Development GmbH Vorsitz. AufsR.: Martina Koederitz / Gesch�ftsf�hrung: Dirk Wittkopp Sitz der Gesellschaft: B�blingen / Registergericht: AmtsG Stuttgart, HRB 243294