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=-17.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 BEB7CC47096 for ; Thu, 3 Jun 2021 09:01:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A092F6136E for ; Thu, 3 Jun 2021 09:01:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbhFCJDi (ORCPT ); Thu, 3 Jun 2021 05:03:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbhFCJDi (ORCPT ); Thu, 3 Jun 2021 05:03:38 -0400 Received: from proxima.lasnet.de (proxima.lasnet.de [IPv6:2a01:4f8:121:31eb:3::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2BC3C06174A; Thu, 3 Jun 2021 02:01:53 -0700 (PDT) Received: from [IPv6:2003:e9:d722:28a1:9240:5b8a:f037:504] (p200300e9d72228a192405b8af0370504.dip0.t-ipconnect.de [IPv6:2003:e9:d722:28a1:9240:5b8a:f037:504]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id B82F1C0542; Thu, 3 Jun 2021 11:01:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datenfreihafen.org; s=2021; t=1622710911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EquOF3L85NGLb2EjoTiXBRVqUAA5DMvQV13UsmvqEj8=; b=V1t42NxkMUQBsS21i8B1xRB5X0c/XHSOrjXe01m+OQ2HlF1EWB0++h5b4xOO1CEFYriMWL ++267Qzf0j5t1ktsLufano9KlUwMulqeuoMspOqV4pwJUGMtMOKWYmDGv4/mlIFDwVmP6a t6CwmiCOIqsB1zldc7s693PwVfOWEtn8LzlFHTaXIkH+kxxRyuRQ+bc/ltTavEEigJnBn8 Wu7DD0JzTd41A8DaCWtPSSgMr1esvMh+c6VsWal6o84hlyrztWeMB6BswO1yz8LaPaDQx4 Y28gzW7S+Zo4FFs7L+Hd6aiNc8HChCt6Qw9EMwGr5lRr7DksnWT24vG1rnui3g== Subject: Re: [PATCH net-next] ieee802154: fix error return code in ieee802154_llsec_getparams() To: Wei Yongjun , Alexander Aring , "David S. Miller" , Jakub Kicinski Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, Hulk Robot References: <20210519141614.3040055-1-weiyongjun1@huawei.com> From: Stefan Schmidt Message-ID: Date: Thu, 3 Jun 2021 11:01:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210519141614.3040055-1-weiyongjun1@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org Hello. On 19.05.21 16:16, Wei Yongjun wrote: > Fix to return negative error code -ENOBUFS from the error handling > case instead of 0, as done elsewhere in this function. > > Reported-by: Hulk Robot > Signed-off-by: Wei Yongjun > --- > net/ieee802154/nl-mac.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c > index 0c1b0770c59e..c23c152860b7 100644 > --- a/net/ieee802154/nl-mac.c > +++ b/net/ieee802154/nl-mac.c > @@ -680,8 +680,10 @@ int ieee802154_llsec_getparams(struct sk_buff *skb, struct genl_info *info) > nla_put_u8(msg, IEEE802154_ATTR_LLSEC_SECLEVEL, params.out_level) || > nla_put_u32(msg, IEEE802154_ATTR_LLSEC_FRAME_COUNTER, > be32_to_cpu(params.frame_counter)) || > - ieee802154_llsec_fill_key_id(msg, ¶ms.out_key)) > + ieee802154_llsec_fill_key_id(msg, ¶ms.out_key)) { > + rc = -ENOBUFS; > goto out_free; > + } > > dev_put(dev); This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks! regards Stefan Schmidt