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=-5.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 18FBDC282C8 for ; Mon, 28 Jan 2019 07:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C23A020881 for ; Mon, 28 Jan 2019 07:08:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="IOc3qc2k"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="YK0vjAkv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbfA1HH7 (ORCPT ); Mon, 28 Jan 2019 02:07:59 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:47255 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726612AbfA1HH7 (ORCPT ); Mon, 28 Jan 2019 02:07:59 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 55E9A10925; Mon, 28 Jan 2019 02:07:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 28 Jan 2019 02:07:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm2; bh=+ jqKs9PJPUQy4/O/gdlCKCo/zb40+Dt+raxBjswIaqQ=; b=IOc3qc2kAKAHJMbFZ 7wZLPX3Q2kfQbzfYoTjfqUJTjgnCAa7TMFJa6o8wnhmIzyY/7ngsmtrLMdvCPLHr Tx3q5dUvkqVEj454NccMUIVPNQdDOpmSTZ/qBYF+JGOG7w7hRzwPRu1wZXttwIDE c8LvzVir8PN64nl25iiGIoRieoxzgIE9voXZaCirKyg59dU9NxF5vplmbmwHxCfc Q+CL25hiDjakOd7Vm5F91sDoFjuODtCnC4pKB2TugbPVSmq/PxNFcjOkAHaiO89l uzD6FdhsOOQkVXwbGDlOR03vnHSYago5gf2aYATSzbr741PEHKGGqHEkVC1whD2E 9TyeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=+jqKs9PJPUQy4/O/gdlCKCo/zb40+Dt+raxBjswIa qQ=; b=YK0vjAkvC1FUBNkw2jVqFr74dJC3utxt7jDaZK8e3x4N4FScFGHuxKnSk PF6uVbf7THZ6nL0fJfoBaF2Qozt/c/Xq+1rUZBihwYi5g5QbfHuC1pfztuo6s9xW KIftXd3ai1SDUcCaBEn2xWU1JEX3LZNglS91cCSQQyfIIoJmc2NYbljXM1T+X15M 1+738yBr+h1tj8bnqun2PbZ73CvtIHDjzKXrLxfBJcizu5djc5ZD/G1qGUMRC0B3 xlfXgi9UT9UI54m2pD8mMqGZpXMsY6YIo8OGoMhG+xZTo58O/2OPjUE5RGNLESsz zv2HaZaBSiHg0FPZl/znvEI4E4R2A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrieelgddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogfuphgrmhfkphculdeftd dtmdenucfjughrpeffhffvuffkfhggtggugfgjfgesthekredttderudenucfhrhhomhep ifhrvghgucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecukfhppeekfedrkeeird ekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgt ohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F470E4124; Mon, 28 Jan 2019 02:07:57 -0500 (EST) Date: Mon, 28 Jan 2019 08:07:54 +0100 From: Greg KH To: "Yavuz, Tuba" Cc: "netdev@vger.kernel.org" Subject: Re: [PATCH] : net : hso : unregister_netdev only if it has been registered Message-ID: <20190128070754.GA2091@kroah.com> References: <1548620073263.88642@ece.ufl.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1548620073263.88642@ece.ufl.edu> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Jan 27, 2019 at 08:14:33PM +0000, Yavuz, Tuba wrote: > > On an error path inside the hso_create_net_device function of the hso  > driver, hso_free_net_device gets called. This causes potentially a  > negative reference count in the net device if register_netdev has not  > been called yet as hso_free_net_device calls unregister_netdev  > regardless. I think the driver should distinguish these cases and call  > unregister_netdev only if register_netdev has been called. > > > Reported-by: Tuba Yavuz > Signed-off-by: Tuba Yavuz No need for a reported-by if you wrote the patch and sign off on it. > --- > > > --- drivers/net/usb/hso.c.orig 2019-01-27 14:45:58.232683119 -0500 > +++ drivers/net/usb/hso.c 2019-01-27 14:47:43.592683629 -0500 Your patches need to be one more level deep. Please see the documentatino for how to do this, git should also create this automatically correctly for you. thanks, greg k-h