Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp670289imm; Fri, 21 Sep 2018 06:28:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbL+Xs0fnzkh0v0L/xpPIbcRJJ9cDaTsNPwyOoZtOrrwZlZjaMQeKlg8RLqyH9hQo8EEauv X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr7133776plr.208.1537536532476; Fri, 21 Sep 2018 06:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537536532; cv=none; d=google.com; s=arc-20160816; b=MLsNdmGTLGwy0xDs+XbMt71I8MQZ+vhM77WeURR9iAK0Rq02qleRJqXqQ0pGAbkLjV 105Oh8MA2touS3r7xdG2Fd0R6Sk1Ip83knPy27fgIv1jz9Ogzt8279ctA1/S2kXs3m8K 7iPfP+7Nrtfw5k/EqPTYGvnJYFWtEFaFi2fTZkpTCZc5U+Sq0P5Cu89wBKSNPNPU1acG WuCDuZvXdK2i0kDBYajeCFHUtnFG+1gy7GIWJ9SLq4ernZcdtwgWQa49dEGHJxu9+ScY FsC73BhU7uyPT5XreSnOjGg/5dC3GBaU0P89FbMqX1w8vU3sAx9urJYq+R64S6DFzl3f muwQ== 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=tdLT5jUe+d2vDbQg52pWu6NFIAIBE3IP8IxZkkBdNdg=; b=P+473NCRkYoYe1QTMY02QqbIoARsQce9a/GT1RGQb5pkx+8V4AglJaztIv/7cH5xS6 wuo/fyc+uWp7n9DOobotv1BZcH1xsKvFL4RMu4mPU4OWzed0Uh0FwzlqaIA7oHPx/9Pi 15k5ewbLQl0fOINXllsxRWGAUfbEUu2vuqLrkR8lJKlfMSvXRAN5u1dR1agUJkF4oZWh nlZZZtUm51ugwcwK2U7yog0AjmINmAkC1EXtnguc5qHe/hUxsrvwwbapb1QkgnClQ0cX oVsGP7Y5K0o/eL94LHv+CPvAwzx5V1D8c4D41ic3FE3neVk71lXaZ3KfJzDPgG3gVzxd M77g== 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 k190-v6si25888300pgd.80.2018.09.21.06.28.21; Fri, 21 Sep 2018 06:28:52 -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 S2390197AbeIUTQS (ORCPT + 99 others); Fri, 21 Sep 2018 15:16:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:58050 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727392AbeIUTQS (ORCPT ); Fri, 21 Sep 2018 15:16:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 121D4AFF9; Fri, 21 Sep 2018 13:27:25 +0000 (UTC) Message-ID: <1537535934.15252.3.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: Fri, 21 Sep 2018 15:18:54 +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. Try as i may, I don't see the difference. Could you put a comment exactly describing the issue into the code itself, lest this problem reappear? Regards Oliver