Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11470297pxu; Thu, 31 Dec 2020 10:10:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/3/h+JFnQOXsw/QIl6E2MyLErFgNJ+K5a+1/GRw0oo5n4M9MwnbRImSr1aAGHIk4KBYeO X-Received: by 2002:a17:906:229a:: with SMTP id p26mr54295592eja.291.1609438204753; Thu, 31 Dec 2020 10:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609438204; cv=none; d=google.com; s=arc-20160816; b=bFEFsSiCdNKVaV6KakvAXLBdJsoAqJe3hQbj9miS/l65+3vG3W2gZr2vZ5wo0A0qVH hL9z+gpsINTAL4jUH1ELozi3Qknp1OaWuJ+5ekdE0S6Y6vms/fJ+5dUryvpL43m8Hu89 ldNPRwM8EQxW7rx9cWlXeQ4AGTiOIQBmt1UIxouo8XoenO5ApVN9hSj5TxH+t/qD8w3C Hni2Y1gIg4Rb9z98iM2n+D6OXphlqz4yDnVGlsDOs/DQDoZW5Gl4vxjHd8Iq0iR47PCf euhuDFSrXHZ1YUQu/8dx+0Lph/CuFZoJs5InoPF9llBm6vfy1pj8BIW4EP/I8Kdgy9xz 17Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ia8tv0h5ZzJ5gNszPbUc817/+eyTpNW6AgHWJu4KE0Y=; b=nS4OI4aGQF7GsZWwR+E2/s0ZwQKvJiBcSytrXyGzqsjwIXgYj92u34TtCdDMqjop8p p+LTTXOWV+IKp1a/+YxX9+2U1dKA3CexR9KByD0gT/lWmg5yKX4b/cuFIeZzrScS4G5B j8X42LfTAf9+FiYoB+b6gRIu06qZ3FO0h0ivVg+R7Bp3jdA92gl39dbSJd7oWZaVzv9c UVU9DmqZ0IEbjnQjaVVjhzwmNSR218qhcApN8TTNYnnYTqUEUvKFzQrztlbUY7hq7AnO y5s01X+KLPXRiLnVmnmdBha3IOGhfuaW4Wcw4XFFsQ0KBeoAVMeOW2aXu25xod2/5dyJ 38GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vh4Al7Tq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si24343621eds.248.2020.12.31.10.09.30; Thu, 31 Dec 2020 10:10:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vh4Al7Tq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727251AbgLaRoV (ORCPT + 99 others); Thu, 31 Dec 2020 12:44:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbgLaRoV (ORCPT ); Thu, 31 Dec 2020 12:44:21 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF856C061575; Thu, 31 Dec 2020 09:43:40 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id d2so11530668pfq.5; Thu, 31 Dec 2020 09:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ia8tv0h5ZzJ5gNszPbUc817/+eyTpNW6AgHWJu4KE0Y=; b=vh4Al7TqcE4Rzb9O5aoDb84kXwnxrrNb53k3LgYmbhsbaxGJNktNhFbYmODUnEMEBy DIujNqCXaIKxUgK8Vsa+803NJa5flHuEYx/GXMqG+wwCbanP7BdLiGkgZwi7C+M+/0Ay PTVPl1/NoS7SHHXjXrijudUoGg5AtpFBvJ0BoyMKzDbI3zSqmNySh7O3CK9XPg0ohcdM aEiArn6py+h/xLadFZ6BfAyGS7c89rLZIYhyejflPTNAUr3KQySVnAumumIbuGXrRGCL 9aF+EKtzpmiK2boJEjGSCRJR0fIV4x9vdOH+44PjRZkgdUtfVMukTfhQXbFH6WcxhBAW xY2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ia8tv0h5ZzJ5gNszPbUc817/+eyTpNW6AgHWJu4KE0Y=; b=gFrlqbKPMewcreGtAY+Pg8iXUDX9S4cTsLrH2qxN7VOEDYjHsYq790/pDk7scrOJEx HzBIUf7Z2MCss4xgDPC8ES151l/Vyce6E8/4XILxqw8kUWobWMXdbfxjcVTFkrJp8ylj BvRqwIfiEWbETYMvyj+rtTaBAcRhXW4wUx1PdyyonSrkj8wIcq8bN+K6FjFD/A6+Lms9 oroAlOtgcQ5HFTISr9M9g5Ng69Qi4RkNhPpcg3u1x/Z8fGuwUC5BHFh2PAxMWRH3LcVI NaaDBuFN6Que5Wnw5pT50m7sQGZV1WXHgAc5zquNw+1KEaAfMTH/R3CUoGDQXnVcVbQF y+cQ== X-Gm-Message-State: AOAM533zcW50h0zF1Mu9J7syUZnrwzxIz7/WjRZxhmZAvbPccTSF0eQB /Sq2Y4lm8CBfmTeRsF3DWkE= X-Received: by 2002:a63:2352:: with SMTP id u18mr17934963pgm.385.1609436620358; Thu, 31 Dec 2020 09:43:40 -0800 (PST) Received: from shane-XPS-13-9380.hsd1.ca.comcast.net ([2601:646:8800:1c00:8bca:1c1d:98:f137]) by smtp.gmail.com with ESMTPSA id x15sm45384045pfn.118.2020.12.31.09.43.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 09:43:39 -0800 (PST) From: Xie He To: "David S. Miller" , Jakub Kicinski , linux-x25@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schiller Cc: Xie He Subject: [PATCH net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event Date: Thu, 31 Dec 2020 09:43:31 -0800 Message-Id: <20201231174331.64539-1-xie.he.0141@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In lapb_device_event, lapb_devtostruct is called to get a reference to an object of "struct lapb_cb". lapb_devtostruct increases the refcount of the object and returns a pointer to it. However, we didn't decrease the refcount after we finished using the pointer. This patch fixes this problem. Fixes: a4989fa91110 ("net/lapb: support netdev events") Cc: Martin Schiller Signed-off-by: Xie He --- net/lapb/lapb_iface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 213ea7abc9ab..40961889e9c0 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c @@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block *this, unsigned long event, break; } + lapb_put(lapb); return NOTIFY_DONE; } -- 2.27.0