Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2445768imm; Mon, 24 Sep 2018 04:38:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV63yq+tTXIBdaLkq/PaWcZS73hCN+APEoD4NevDWkwlTTUOs/QKbG3xI82N7VMt4dvS+zPZG X-Received: by 2002:a62:444d:: with SMTP id r74-v6mr9997001pfa.96.1537789102602; Mon, 24 Sep 2018 04:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537789102; cv=none; d=google.com; s=arc-20160816; b=xKhBGWIrn0iUAkvTZNscmv/dOHc5wt3IhaqWsmn7PmeIDi8HVQK1goNKMVUxK7eJRn 3Gsxz1GSDJld656LHZPwHO1i8OCVD0Ubh0ha+0Ex1vwm0c+50sNlOiX5gr8INaPcKGIS padlEtutDc6d5b1QTvOtt3RJhyW2IHJjzOqqz4LQD8p56ehNr4Y2rZcEVr0DjxrpZ8Yo u4mIbphs5lveufrcYrQ++YB0/i89tpXpIijZ4LaM4XQ/DPJ1kcT3xrGe5w8JrxoHmzGp 7UfRy4oAF7NR5eudn6jbCmGBWRYDAiPV2L2YMEI71KL9hw24/mVJ90ov2c/D5IrHCziE NACw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=TStN83bWLJGQEZDrqj2fJFh43/Jxr6n1nx+fCuIebKk=; b=qXEfAmD1T8OOZjmErq2UDnoyqQSc3BQHKzFNl0l1efQDifxc0KZpjuoYalSkfAkIwn 5tobsO45EkEgZhitZ77p5FhDKsIAlKfvvkYkhxLp8B55sd9pvrfSA+f2tbFBXBzjNOyt XodqHRFu3MM/PURY7fTCqleCwbx2fULqmpUpMLDly5k2VfR/UE5WK8KxqnCn9/ommqaA UUQ+unAexO7WZn00nXQK1wS4Tp0kEEheYMp/KAD8zLimXfWsYRAAxGx8vxAKFxTpKUNo JOSOSqxDdzuAIGLQdGQ+1HgTv3bo9wVjJYHnEUzGuMGxZJPEuh79RaoG9FLftj+WN572 CpOQ== 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 g24-v6si10106247pgh.584.2018.09.24.04.38.07; Mon, 24 Sep 2018 04:38:22 -0700 (PDT) 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 S1728961AbeIXRiw (ORCPT + 99 others); Mon, 24 Sep 2018 13:38:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:60750 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728432AbeIXRiv (ORCPT ); Mon, 24 Sep 2018 13:38:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C95BAAD33; Mon, 24 Sep 2018 11:37:11 +0000 (UTC) Message-ID: <1537788518.22022.6.camel@suse.com> Subject: Re: [PATCH] usb: cdc_acm: Do not leak URB buffers From: Oliver Neukum To: Romain Izard , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Mon, 24 Sep 2018 13:28:38 +0200 In-Reply-To: <20180920144904.24911-1-romain.izard.pro@gmail.com> References: <20180920144904.24911-1-romain.izard.pro@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote: > When the ACM TTY port is disconnected, the URBs it uses must be killed, and > then the buffers must be freed. Unfortunately a previous refactor removed > the code freeing the buffers because it looked extremely similar to the > code killing the URBs. > > As a result, there were many new leaks for each plug/unplug cycle of a > CDC-ACM device, that were detected by kmemleak. > > Restore the missing code, and the memory leak is removed. > > Fixes: ba8c931ded8d ("cdc-acm: refactor killing urbs") > Signed-off-by: Romain Izard Acked-by: Oliver Neukum