From patchwork Thu Dec 13 08:38:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shamir Rabinovitch X-Patchwork-Id: 10728155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7ECEC174F for ; Thu, 13 Dec 2018 08:38:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E99E29D6D for ; Thu, 13 Dec 2018 08:38:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E8B229D35; Thu, 13 Dec 2018 08:38:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C45E28A22 for ; Thu, 13 Dec 2018 08:38:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727075AbeLMIig (ORCPT ); Thu, 13 Dec 2018 03:38:36 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:59348 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbeLMIig (ORCPT ); Thu, 13 Dec 2018 03:38:36 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBD8YHJf154612; Thu, 13 Dec 2018 08:38:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=LzcjofST3qV/LdgDY6KXKUxjswprWTZvC/ZO/w78APw=; b=dNQWse38irhJAyI4B9MA1H7EqNbt3riPWi7aPXH1hsxfMWgrQdUqFfclFl1FVNmtIYsr BIBKNbUAnGaxvKiGNVJoqxSUrMAwSf82lUzcwNm5G3H7ylJeaWVI5552Q2YM0/KW6HCz 6V5q/HUCnXDzH86HF7WSLyEoTKqxijWr7eAfpyJ/zTJzw6QtY/HjXivjgRjPn7g6fxv6 0Hi88adwJRuBul2dRV9XE5m6Xmp3N/aegt4dYScNJtNzIi59+rhAzwAFpFOg8lm81wL2 0S5vardlBy48e8kgNKt3mbycuaxjhwDBksb1lukcJl0torbTr/zeYPvFwyMpEr3Rhj5X GA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2pb7tf2u3y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Dec 2018 08:38:33 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wBD8cW3g013679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Dec 2018 08:38:32 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wBD8cW9C020030; Thu, 13 Dec 2018 08:38:32 GMT Received: from localhost.localdomain (/10.175.31.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 13 Dec 2018 00:38:32 -0800 From: Shamir Rabinovitch To: linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com Cc: shamir.rabinovitch@oracle.com, gerd.rausch@oracle.com, santosh.shilimkar@oracle.com, haakon.bugge@oracle.com, davem@davemloft.net Subject: [PATCH rds linux-next v3 0/2] WARNING in rds_message_alloc_sgs Date: Thu, 13 Dec 2018 10:38:12 +0200 Message-Id: <20181213083814.2340-1-shamir.rabinovitch@oracle.com> X-Mailer: git-send-email 2.17.2 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9105 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=652 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812130080 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: shamir rabinovitch This patch set fix google syzbot rds bug found in linux-next. The first patch solve the syzbot issue. The second patch fix issue mentioned by Leon Romanovsky that drivers should not call WARN_ON as result from user input. syzbot bug report can be foud here: https://lkml.org/lkml/2018/10/31/28 v1->v2: - patch 1: make rds_iov_vector fields name more descriptive (Hakon) - patch 1: fix potential mem leak in rds_rm_size if krealloc fail (Hakon) v2->v3: - patch 2: harden rds_sendmsg for invalid number of sgs (Gerd) Santosh - we need your ack on both patches now shamir rabinovitch (2): net/rds: fix warn in rds_message_alloc_sgs net/rds: remove user triggered WARN_ON in rds_sendmsg net/rds/message.c | 24 +++++++++++---- net/rds/rdma.c | 75 +++++++++++++++++++++++------------------------ net/rds/rds.h | 23 +++++++++++---- net/rds/send.c | 59 ++++++++++++++++++++++++++++++------- 4 files changed, 120 insertions(+), 61 deletions(-)