Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp47200pxu; Wed, 14 Oct 2020 19:50:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+DzfWPL2FYTDYDQvrt6NI0u6dnFLm/FNUYieDhJhjs1ciWSyBGRkj+TA7FBq74bcheA2a X-Received: by 2002:a05:6402:890:: with SMTP id e16mr2086345edy.272.1602730244739; Wed, 14 Oct 2020 19:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602730244; cv=none; d=google.com; s=arc-20160816; b=mXEZY42OEE/hM+msf6B3mmKqw3CFAtDxzQqr9DODWLbVV0BC0gYiv98JCsoWikZAkT +46nYBCJe72eri7/X//KFuWhkwuwBLCfAFyB+nQhahZEhZtk4kdU2YV3muLi4OdmXfmb KIeKZz642FTAGKBohOL26Xqi84mFy+2qQEFpM+FNZYz792i8z29doTb3+e/6xKmnFIKG glWHNL7r6ZZ2HdpC3wapGKpWLdEwS2GS7B3oMf+U8mdBpRQNCmwCAjtvB/ZY8s6OdOJS 2xQkAtauy7vbwdXTvpkTu/HotIt9I753zQyW1AQfr9mtZEaCLkcx0bJOA3+MRQ8I1XxO WBVg== 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=Y7qL7b5EhRpHNHrUr0cSnu3QzT274C9At2ZFpLlqUEA=; b=IaeyNSAOREh/A9/23PAFgSZBJbaZseteqU2ltj0jSyll0yC0fk+th3zo+gah3HyEiq gM0+6OVhwEuC6hsVl0PGy7WC2bQNxYRb0CzmO2Me3A/y+lxG7mEDsbYguHGnkbnsFLeQ rINO/kKfotfcgct28wdWvZPs/GAGg7xpFdOJkOOOLlikyeTExIWvsWFw1LVU6lu+2G5I E2ssFmd6r9/+ss4f9cdki0rIHhth06h068G+9cWR7pYfqdskFsQlJFOCdt7mZSJTxCKd ExOYAIho8WDOtth7+7R7BfDyaEqbIGAckNoru5iNec6WtCm/cpLkhA0CcSGuK6QP/c3F YiUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fgN6ZvZY; 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 v7si1341241edj.392.2020.10.14.19.50.23; Wed, 14 Oct 2020 19:50:44 -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=fgN6ZvZY; 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 S1729442AbgJNXAB (ORCPT + 99 others); Wed, 14 Oct 2020 19:00:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgJNXAB (ORCPT ); Wed, 14 Oct 2020 19:00:01 -0400 Received: from kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net (c-67-180-217-166.hsd1.ca.comcast.net [67.180.217.166]) (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 4293420776; Wed, 14 Oct 2020 23:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602716400; bh=qUBUKi9Uhs8lwmVMgMRaCqfD9agAtCwndy7lYGBk0yU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fgN6ZvZYNVWAQiqZrNS9uUImAjj6mzR5LbgtovtEqMUMFtkfG1qqut3r6Tf05xKLL feG1uoZaCrWOsFy2kzvfGYHLCaXRULH7DQGNDtE6K8whEkEfWTksRpxsaVoJY3zAPw YOUnMIoYH4dSKrS6J/nAmipv7jfckZntPP/3vrm8= Date: Wed, 14 Oct 2020 15:59:58 -0700 From: Jakub Kicinski To: Henrik Bjoernlund Cc: , , , , , , , , , Horatiu Vultur Subject: Re: [PATCH net-next v5 05/10] bridge: cfm: Kernel space implementation of CFM. CCM frame TX added. Message-ID: <20201014155958.12e38308@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20201012140428.2549163-6-henrik.bjoernlund@microchip.com> References: <20201012140428.2549163-1-henrik.bjoernlund@microchip.com> <20201012140428.2549163-6-henrik.bjoernlund@microchip.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 Mon, 12 Oct 2020 14:04:23 +0000 Henrik Bjoernlund wrote: > + skb = dev_alloc_skb(CFM_CCM_MAX_FRAME_LENGTH); > + if (!skb) > + return NULL; > + > + rcu_read_lock(); > + b_port = rcu_dereference(mep->b_port); > + if (!b_port) { > + rcu_read_unlock(); > + return NULL; > + } At a quick scan I noticed you appear to be leaking the skb here. So let me point out some more nit picks.