From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:53980 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751990AbdLFR0r (ORCPT ); Wed, 6 Dec 2017 12:26:47 -0500 Subject: Patch "s390: vfio-ccw: Do not attempt to free no-op, test and tic cda." has been added to the 4.14-stable tree To: jjherne@linux.vnet.ibm.com, alexander.levin@verizon.com, bjsdjshi@linux.vnet.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, gregkh@linuxfoundation.org, pasic@linux.vnet.ibm.com, pmorel@linux.vnet.ibm.com Cc: , From: Date: Wed, 06 Dec 2017 18:26:31 +0100 In-Reply-To: <1510068152-21988-1-git-send-email-jjherne@linux.vnet.ibm.com> Message-ID: <1512581191134172@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: s390-vfio-ccw-do-not-attempt-to-free-no-op-test-and-tic-cda.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Wed Dec 6 18:04:41 CET 2017 From: "Jason J. Herne" Date: Tue, 7 Nov 2017 10:22:32 -0500 Subject: s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. From: "Jason J. Herne" [ Upstream commit 408358b50deaf59b07c82a7bff8c7e7cce031fae ] Because we do not make use of the cda (channel data address) for test, no-op ccws no address translation takes place. This means cda could contain a guest address which we do not want to attempt to free. Let's check the command type and skip cda free when it is not needed. For a TIC ccw, ccw->cda points to either a ccw in an existing chain or it points to a whole new allocated chain. In either case the data will be freed when the owning chain is freed. Signed-off-by: Jason J. Herne Reviewed-by: Dong Jia Shi Reviewed-by: Pierre Morel Message-Id: <1510068152-21988-1-git-send-email-jjherne@linux.vnet.ibm.com> Reviewed-by: Halil Pasic Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/s390/cio/vfio_ccw_cp.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/s390/cio/vfio_ccw_cp.c +++ b/drivers/s390/cio/vfio_ccw_cp.c @@ -330,6 +330,8 @@ static void ccwchain_cda_free(struct ccw { struct ccw1 *ccw = chain->ch_ccw + idx; + if (ccw_is_test(ccw) || ccw_is_noop(ccw) || ccw_is_tic(ccw)) + return; if (!ccw->count) return; Patches currently in stable-queue which might be from jjherne@linux.vnet.ibm.com are queue-4.14/s390-vfio-ccw-do-not-attempt-to-free-no-op-test-and-tic-cda.patch