Received: by 10.223.185.116 with SMTP id b49csp5465918wrg; Wed, 7 Mar 2018 12:14:12 -0800 (PST) X-Google-Smtp-Source: AG47ELu1zS1sqQhey6aI8ftVMRHSvDo685HkfbGUM47ruzr6SWft04+wiFNMEsbWHWh5kzAY9y1j X-Received: by 10.99.125.16 with SMTP id y16mr18869671pgc.3.1520453652703; Wed, 07 Mar 2018 12:14:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453652; cv=none; d=google.com; s=arc-20160816; b=ypAODsyA27Jz9xal8YUOcJgFPxp3nfFr3MZ06rLPUEctvc6mtTHH3lGm2vcLfJy7fs a5DKVlZrPIn82qW1T0AIKijVTkV8kkRB9eVJWhQooieF21MilzcLuo624si2lmxoJSaQ /FQ13ttOFrykf7AJEpvYRuRM+cn8ooDjTanqDFv1WbzNWtl46yPGZQHbAnQH9RgoirwM aJZWth9A/iGAnvDy9So3n9lGzCv65+EdRvjdeNDH9axyVbzf2fxv+hEGFRMiV3EUVnzT wHTVIL020VlX0bTauYFq+JdXqBkQ1iU5qOw8Wc16q66XWDQLiLFwnjxj6Sq2BxoWxm8r gpDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=VAVbr0HDIyzcsb7jv54x5zX0phLc2gjjieMOzTxJlR0=; b=b0Pk5yBUAM/VAt0ZWRbr7+5WXtDNpP2Am90nnmPw+9Asm5NTgrV+QNIewdkIeVnFqC mCgAhs7v7O55WabVw6sKmTlt42aXvzgvta5utR/kY+g70c8OSPTXpkaTcJAMg0X38rBg RV2qWBgWJ7yK0w/4WUKQwhMjbSKwBvKlqi6tifYn01zQevrSjaUfi/v7wMWEfLoAKJNl BEE6IpTPcEkUYCLODcx9p5uGbBGPDV99DZQa+gmfFd9ynsoEKHBDWkl7IMgEZHRcflwB DZUiI01bi3H5RvK7rIrF7x/8MXaICVAYfo7SbeeFpe8lc/1EKY47acVMhriX2jz9ozCg UT9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si11756896pgq.491.2018.03.07.12.13.58; Wed, 07 Mar 2018 12:14:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965264AbeCGTpM (ORCPT + 99 others); Wed, 7 Mar 2018 14:45:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44052 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965182AbeCGTpJ (ORCPT ); Wed, 7 Mar 2018 14:45:09 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 77EE731; Wed, 7 Mar 2018 19:45:08 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Valente , Omar Sandoval , Bart Van Assche , Ming Lei , Jens Axboe Subject: [PATCH 4.14 026/110] block: kyber: fix domain token leak during requeue Date: Wed, 7 Mar 2018 11:38:09 -0800 Message-Id: <20180307191043.068755214@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191039.748351103@linuxfoundation.org> References: <20180307191039.748351103@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ming Lei commit ba989a01469d027861e55c8f1121edadef757797 upstream. When requeuing request, the domain token should have been freed before re-inserting the request to io scheduler. Otherwise, the assigned domain token will be leaked, and IO hang can be caused. Cc: Paolo Valente Cc: Omar Sandoval Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/kyber-iosched.c | 1 + 1 file changed, 1 insertion(+) --- a/block/kyber-iosched.c +++ b/block/kyber-iosched.c @@ -814,6 +814,7 @@ static struct elevator_type kyber_sched .limit_depth = kyber_limit_depth, .prepare_request = kyber_prepare_request, .finish_request = kyber_finish_request, + .requeue_request = kyber_finish_request, .completed_request = kyber_completed_request, .dispatch_request = kyber_dispatch_request, .has_work = kyber_has_work,