Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1570885pxb; Tue, 8 Feb 2022 22:39:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwh4bTxSgGt9zFP4ejnt232otwyXz7mNIkPnvZ2KdJ11CXZpLC8wI1YquyeTCnUQt57za5C X-Received: by 2002:a17:907:2d0e:: with SMTP id gs14mr618794ejc.225.1644388759139; Tue, 08 Feb 2022 22:39:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644388759; cv=none; d=google.com; s=arc-20160816; b=jw2CGYrIAGLUTmbbJUZP77GjOVaJeZ0P8Xp6JMSI2WvmzICEq6KzxVFht5zfqWMAf7 EopBoKrAyv6Lxp7K7fjUjZXMl+08nt7ZNFGFAmnqzi6IDdPYFZFImFAyeSsXax59QCUc IYnOLiUqL4+1ViaZhRSsAnRUO7UMaGAyn0Xc3+/rpTmxl78H0otsmTEbdAC68o4MayhF DCKLgXIgrHmngheqpyPLBwfi4BigcxJDOxe39qXZJxpuoOSUWdnTpJputyp2vBcF3JBR FvbwCI+EwvLjx8j78EX7oJoZOJ8NNJKCij++xWKtMlxqKwBA3R+WbQJET+klwMYiGGlC CUkw== 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; bh=Agt5csuscsnsC9ZqYFSBxxfn2NHT4tHPe+PJBCPYwTY=; b=Pg0CAzqNJc8E/XxZtQXtYls3EQ9Jz4ki8DKRZ5+i1MDxV5gPoIyQfjhnU80NsLxbdq QWJjUxgcvvfoO3e2oQkCseSN1v0Evff/VSIlHiU4mHQHa0hx7CMHW6vFU+24n6BUVibA Z3CgISWUkg8JvLFNxwGeWmClzeXemlZzU8oTe3IKNJOPA6bEt9pr7mcHBQQxkzbNp7DH p7I/VWrta4+D7BcJPQ394N+NiFWh0Km4pic02fWw3JYUq2iuaBKQWz18xYnkmyErqlot TLZIJuNJLqRKoObrSYPm0s3KF6TXbF0H1+HOH5R7AAHAM+EwUQwsnVULcHzSkLWqYZoS kUkg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do3si5270089ejc.933.2022.02.08.22.38.54; Tue, 08 Feb 2022 22:39:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387542AbiBHWYw (ORCPT + 99 others); Tue, 8 Feb 2022 17:24:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345032AbiBHWUw (ORCPT ); Tue, 8 Feb 2022 17:20:52 -0500 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F734C0612B8; Tue, 8 Feb 2022 14:20:50 -0800 (PST) Received: from localhost.localdomain (ip5f5aebc2.dynamic.kabel-deutschland.de [95.90.235.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 16BEA61E64846; Tue, 8 Feb 2022 23:20:47 +0100 (CET) From: Paul Menzel To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S. Miller" , Jakub Kicinski Cc: Paul Menzel , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Revert "Bluetooth: Fix passing NULL to PTR_ERR" Date: Tue, 8 Feb 2022 23:19:10 +0100 Message-Id: <20220208221911.57058-1-pmenzel@molgen.mpg.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 266191aa8d14b84958aaeb5e96ee4e97839e3d87, so that commit 81be03e026dc ("Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg"), introducing a regression, can be reverted. Signed-off-by: Paul Menzel --- include/net/bluetooth/bluetooth.h | 2 +- net/bluetooth/rfcomm/sock.c | 2 +- net/bluetooth/sco.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 4b3d0b16c185..318df161e6d3 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -505,7 +505,7 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk, struct sk_buff *tmp; tmp = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom); - if (IS_ERR(tmp)) { + if (IS_ERR_OR_NULL(tmp)) { kfree_skb(skb); return tmp; } diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 4bf4ea6cbb5e..5938af3e9936 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c @@ -583,7 +583,7 @@ static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg, skb = bt_skb_sendmmsg(sk, msg, len, d->mtu, RFCOMM_SKB_HEAD_RESERVE, RFCOMM_SKB_TAIL_RESERVE); - if (IS_ERR(skb)) + if (IS_ERR_OR_NULL(skb)) return PTR_ERR(skb); sent = rfcomm_dlc_send(d, skb); diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 8eabf41b2993..7ebc9d294f0c 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -734,7 +734,7 @@ static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg, return -EOPNOTSUPP; skb = bt_skb_sendmsg(sk, msg, len, len, 0, 0); - if (IS_ERR(skb)) + if (IS_ERR_OR_NULL(skb)) return PTR_ERR(skb); lock_sock(sk); -- 2.34.1