Received: by 10.192.165.148 with SMTP id m20csp4181495imm; Mon, 30 Apr 2018 13:20:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoq03/Q0EpSaygKFJEZ1ROQYUpxdBpTOsrvmDXQQGqRzf7qITbLjYsGIJzATbEmA/nAoYv5 X-Received: by 2002:a17:902:ab93:: with SMTP id f19-v6mr12732983plr.392.1525119632611; Mon, 30 Apr 2018 13:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525119632; cv=none; d=google.com; s=arc-20160816; b=RmhTEmww5KzQercnOBqq1Nr5Z2dzFF5wBVr85IuC8CvzJ64o4d1AgaZAktAqAlhSTH emIG4uzxYYloizfqOl5VFDX+p7uo8hLD4Cp/xBndVRRZYuegeV3/pt47Dme3MQZD6AeX 6N0c3symG5C8yxyCTYxEHCaSjiglbl7nDDgYFITnuaO6LR9v3ksdxDNMjBvLq1RpXYvA wmfnMtUWWsyLtviqTR4wybLGWjtG5LI1tNohgp53bvWJYRdK2AVILlMsYWeAU0DRSggv 9fTLpL/JISPVDUkpXVrNSy0GBCxQCE/0KFNGTMkMoc6XFwjEP8F/PCFZn4nYBnzu0gKD 61qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=nzdf+xBcTKbLt+OZLmltrxW9UspAb041uhFkSSb1z/M=; b=cJVShssHJkWkXa1H+Uzr1aEhI8QNiILRjpVXrw/3eKMa+yFlw3OfkFk5GASF4dBB32 rSwk8/+5/Bn7tm1x+OY+fiY+QTZX9Sld+66UgIwU1DjAOVFiYYrjZXtf8KbJritvT/9/ 2btKdv32pFprepeaGswmQREsAUKvYT455FD3FZVE2W2kf8GpD9vGo5bhYGEdFbQ37C25 gfdVLXunyBliQVvME3yKOUpHGe7FiVfIuEHDH+bS2XFrS5RuAUb890M0JQxX/l79vBlq on2Azig+j4f1VXKqsFdTla8rkiGxz2bRJj7pjAZRgO0JpcRc/dGkvs3h6UCxc8cdo5IK 7Pqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10-v6si6484258pgt.109.2018.04.30.13.19.48; Mon, 30 Apr 2018 13:20:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755845AbeD3USt (ORCPT + 99 others); Mon, 30 Apr 2018 16:18:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:32848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755816AbeD3T0y (ORCPT ); Mon, 30 Apr 2018 15:26:54 -0400 Received: from localhost (unknown [104.132.1.102]) (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 C382022E02; Mon, 30 Apr 2018 19:26:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C382022E02 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Vyukov , syzbot+209c0f67f99fec8eb14b@syzkaller.appspotmail.com, syzbot+7fb6d9525a4528104e05@syzkaller.appspotmail.com, syzbot+2e63711063e2d8f9ea27@syzkaller.appspotmail.com, syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com Subject: [PATCH 4.9 39/61] kobject: dont use WARN for registration failures Date: Mon, 30 Apr 2018 12:24:42 -0700 Message-Id: <20180430183954.632232883@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430183951.312721450@linuxfoundation.org> References: <20180430183951.312721450@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry Vyukov commit 3e14c6abbfb5c94506edda9d8e2c145d79375798 upstream. This WARNING proved to be noisy. The function still returns an error and callers should handle it. That's how most of kernel code works. Downgrade the WARNING to pr_err() and leave WARNINGs for kernel bugs. Signed-off-by: Dmitry Vyukov Reported-by: syzbot+209c0f67f99fec8eb14b@syzkaller.appspotmail.com Reported-by: syzbot+7fb6d9525a4528104e05@syzkaller.appspotmail.com Reported-by: syzbot+2e63711063e2d8f9ea27@syzkaller.appspotmail.com Reported-by: syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman --- lib/kobject.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- a/lib/kobject.c +++ b/lib/kobject.c @@ -234,14 +234,12 @@ static int kobject_add_internal(struct k /* be noisy on error issues */ if (error == -EEXIST) - WARN(1, "%s failed for %s with " - "-EEXIST, don't try to register things with " - "the same name in the same directory.\n", - __func__, kobject_name(kobj)); + pr_err("%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n", + __func__, kobject_name(kobj)); else - WARN(1, "%s failed for %s (error: %d parent: %s)\n", - __func__, kobject_name(kobj), error, - parent ? kobject_name(parent) : "'none'"); + pr_err("%s failed for %s (error: %d parent: %s)\n", + __func__, kobject_name(kobj), error, + parent ? kobject_name(parent) : "'none'"); } else kobj->state_in_sysfs = 1;