Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778AbcKRLZI (ORCPT ); Fri, 18 Nov 2016 06:25:08 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35391 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750AbcKRLZG (ORCPT ); Fri, 18 Nov 2016 06:25:06 -0500 From: Dmitry Vyukov To: dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, leon@kernel.org Cc: Dmitry Vyukov , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com Subject: [PATCH] infiniband: remove WARN that is not kernel bug Date: Fri, 18 Nov 2016 12:24:37 +0100 Message-Id: <1479468277-50798-1-git-send-email-dvyukov@google.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 33 WARNINGs mean kernel bugs. The one in ucma_write() points to user programming error or a malicious attempt. This is not a kernel bug, remove it. BUG/WARNs that are not kernel bugs hinder automated testing effots. Signed-off-by: Dmitry Vyukov Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: syzkaller@googlegroups.com --- drivers/infiniband/core/ucma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 9520154..ff60373 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -1584,7 +1584,7 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf, struct rdma_ucm_cmd_hdr hdr; ssize_t ret; - if (WARN_ON_ONCE(!ib_safe_file_access(filp))) + if (!ib_safe_file_access(filp)) return -EACCES; if (len < sizeof(hdr)) -- 2.8.0.rc3.226.g39d4020