From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3944C4338F for ; Sun, 1 Aug 2021 12:15:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B31FA610CF for ; Sun, 1 Aug 2021 12:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbhHAMPv (ORCPT ); Sun, 1 Aug 2021 08:15:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:37626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231527AbhHAMPu (ORCPT ); Sun, 1 Aug 2021 08:15:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B69D261040; Sun, 1 Aug 2021 12:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627820142; bh=b337yLMU93oCLHMmPJGsSWR+APUTiA0AXSuK+QsueqQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qBSF/DMNPW4WA/IICbAR39WkunP0YBE2pQrsZZ2kWWEZGnIafRXlXIR+M3t0itRJ0 /lEqTMpC8KWgdKGTXpBHGtBiL59od9HIwflkDzQKzOsHbMtPmdaAyedijTdNNOS0Lq diBO/t3teHUc9cKCBzNJeZDB+yXQ9oEgXMrbi6TU= Date: Sun, 1 Aug 2021 14:15:15 +0200 From: Greg KH To: nil Yi Cc: johan@kernel.org, linux-usb@vger.kernel.org Subject: Re: [BUG]drivers: usb: serial: mos7840.c: dangling pointer in function mos7840_open Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Sun, Aug 01, 2021 at 05:03:30PM +0800, nil Yi wrote: > Hi, there is a dangling pointer in mos7840_port->write_urb_pool[j] in function > mos7840_open in v5.14-rc3. > > in function mos7840_open err path : > > 717: err: > 718: for (j = 0; j < NUM_URBS; ++j) { > 719: urb = mos7840_port->write_urb_pool[j]; > 720: if (!urb) > 721: continue; > 722: kfree(urb->transfer_buffer); > 723: usb_free_urb(urb); > } > > leave a dangling pointer here, I'm not sure whether it can be > triggered somewhere. What exactly do you mean by "dangling pointer"? What specifically is the bug here? thanks, greg k-h