Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1727664pxx; Fri, 30 Oct 2020 18:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZby8Hkug/5aL72D/zP0n8JaX0ekn1m86SEqvHP1Ux/kSLtCI9HGU0fdtwyOkOYt54p3rq X-Received: by 2002:a17:906:4705:: with SMTP id y5mr5211439ejq.112.1604107248293; Fri, 30 Oct 2020 18:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604107248; cv=none; d=google.com; s=arc-20160816; b=V3uZ2wGCe+w5gmMniv2u78i7+4D2AtOzTZC/e4W2zZUe5TqFgxsuUUfXN6YwHvO+k4 x+r01hLNKZCog6QfklPoy9xpvsueomEKgHKpyHDfRy8n48xhCGRwTw45qFSSi8ZYKeNd jSB+HZ7GN1bzQM47vdVP70v6fYqbYRuLNqrWGZywZrl5woAeudCtA96U+GNuXrcyls9U qwBXvZ2GxC7RoSBzaPwFo6K8KMsmpJhljPi6IBzTBdoOFT7R4hPqqI8NKYyPNh/TKoz8 ScPyqdp4LIBU687ChkN/2teitn83L1JjAUXNxOdeNTz2gb+oKnS/NcMja2VgZlOByuHI jlKA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gDYwG7c8zeXeDMOw9HHioLVyITiirt+sm8nK9TFw5AQ=; b=nTQBUijdI/UKn+ZkVRtPF9fV+IPlDw3m2O3IH6Aybh7jMWJTVLT/jgWu4DbTrOulDh 47YXXR0q0Bw1xJMqjQYb82BpgZdoHbF9IYisUFkkoV1rEoxvu6m/bWLUyQD3DSOfGtoK 7RpuarMh5UoT0D+eBTDPmtdtdvXabri7agk0CtAaKAyXIfT6zbnWaFNhY8q3l7HfBo+N EDLh5Cm6TAahyx7nZoaKXxNW6GU25xelR5x58QwIkAqt+Lm8L2gU0yNNEptmgA7B0PWf mmhcBQdFhaEJihrkpemdlj0ZqmydOn0kEJfU3VvS9Fp0lUZ6dbfTrnsz1rxYysQIc9hw FPVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t5rIi5Pl; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si6745118ejv.268.2020.10.30.18.20.25; Fri, 30 Oct 2020 18:20:48 -0700 (PDT) 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=@kernel.org header.s=default header.b=t5rIi5Pl; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbgJaBQd (ORCPT + 99 others); Fri, 30 Oct 2020 21:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:33968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgJaBQc (ORCPT ); Fri, 30 Oct 2020 21:16:32 -0400 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (unknown [163.114.132.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EAF3207DE; Sat, 31 Oct 2020 01:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604106992; bh=jPhvz6sDtZw43rKUdScv4T/17xaM5vPNHsQCmncvDyw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=t5rIi5Pl94lQ5NNzRwJBlnBPgCiv0CwWpOrchNKBTB6/RrMqXTOUPjCOv7fwq2hQj Ox/22xvvKDUu4OTLpSczL83q9eK+QEbbfZDVi2QK/6Q8CIGuhz6MyrYZw7nTlvBxFZ C2g/Ls3VIRpgahcGbyk93z3ittpMEG/QZ/H4v3Gs= Date: Fri, 30 Oct 2020 18:16:31 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: Microchip Linux Driver Support , Claudiu Manoil , Alexandre Belloni , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 4/5] net: mscc: ocelot: make entry_type a member of struct ocelot_multicast Message-ID: <20201030181631.20692b43@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201029022738.722794-5-vladimir.oltean@nxp.com> References: <20201029022738.722794-1-vladimir.oltean@nxp.com> <20201029022738.722794-5-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Oct 2020 04:27:37 +0200 Vladimir Oltean wrote: > + mc = devm_kzalloc(ocelot->dev, sizeof(*mc), GFP_KERNEL); > + if (!mc) > + return -ENOMEM; > + > + mc->entry_type = ocelot_classify_mdb(mdb->addr); > + ether_addr_copy(mc->addr, mdb->addr); > + mc->vid = vid; > + > + pgid = ocelot_mdb_get_pgid(ocelot, mc); > > if (pgid < 0) { > dev_err(ocelot->dev, > @@ -1038,24 +1044,19 @@ int ocelot_port_mdb_add(struct ocelot *ocelot, int port, > return -ENOSPC; > } Transitionally leaking mc here on pgid < 0