From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42002 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbdHDUhz (ORCPT ); Fri, 4 Aug 2017 16:37:55 -0400 Subject: Patch "drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set" has been added to the 4.9-stable tree To: jcrouse@codeaurora.org, alexander.levin@verizon.com, gregkh@linuxfoundation.org, robdclark@gmail.com Cc: , From: Date: Fri, 04 Aug 2017 13:37:52 -0700 Message-ID: <150187907223949@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 drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set to the 4.9-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: drm-msm-verify-that-msm_submit_bo_flags-are-set.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Aug 4 13:32:40 PDT 2017 From: Jordan Crouse Date: Tue, 20 Dec 2016 08:54:31 -0700 Subject: drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set From: Jordan Crouse [ Upstream commit a6cb3b864b21b7345f824a4faa12b723c8aaf099 ] For every submission buffer object one of MSM_SUBMIT_BO_WRITE and MSM_SUBMIT_BO_READ must be set (and nothing else). If we allowed zero then the buffer object would never get queued to be unreferenced. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/msm_gem_submit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -106,7 +106,8 @@ static int submit_lookup_objects(struct pagefault_disable(); } - if (submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS) { + if ((submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS) || + !(submit_bo.flags & MSM_SUBMIT_BO_FLAGS)) { DRM_ERROR("invalid flags: %x\n", submit_bo.flags); ret = -EINVAL; goto out_unlock; Patches currently in stable-queue which might be from jcrouse@codeaurora.org are queue-4.9/drm-msm-verify-that-msm_submit_bo_flags-are-set.patch queue-4.9/drm-msm-put-back-the-vaddr-in-submit_reloc.patch queue-4.9/drm-msm-ensure-that-the-hardware-write-pointer-is-valid.patch