Received: by 10.192.165.148 with SMTP id m20csp4168263imm; Mon, 30 Apr 2018 13:04:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4Gxh9lgsMoikXJQ60p/ppLJ74rWezB4bdgQl/lFnfTwzul9A10wovTZ2msIfb0zK5k4GS X-Received: by 2002:a63:8ac4:: with SMTP id y187-v6mr10947067pgd.64.1525118677867; Mon, 30 Apr 2018 13:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118677; cv=none; d=google.com; s=arc-20160816; b=Y0KfnOUUPZTW9Xy7fp/rds6orA+n76G01ctv8iiAitqmCizNBcSe7lMFrfdPeYfmA/ L91bvNOrjj5C2GWVm4XhSYAE4LJJQ42u5c7MTkQ/b2Guw+k2Bh5spiO3/cGL5tl6h3np +aANMkOMpWyuPJB+qZHqGAJZMU+2awh/aSYEHSLrtIRmgqVzwR3XLyuZv07t3UVbAEBG 9fFPc75avoElXwyVCX0MQ7M5fGf2QNLmVdEAJR2TV07atYNX9HSYVtCqJ6C/1QYXJDN8 BL2DM6yOd7Zq8Nb8FnURxT6Y2GZJLnsFmW3Eb6aMSSu4e7i8mGZkeveJcmNfpgoKxsgW 4jVg== 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=XER83H+ptP6lW8rK2aGVUJgpFesRNp4rVRLC973Ioqw=; b=WMgra4Xvp+8bSMMGeMgBuYAOO3G0LHxGatNuz+49KqgPlz+tFfIF27mFpuXJ79JIxg HPqN1/CkyV4q/uEtWfevyb9+5UZTh4CyZlSxE20ELZTqrkCRikPKFq5npPcDHBID2O+B hj1sMxV+ITMT4gqH1P4IAg8s6kQfKG+zRmd1WlOCGa07xAtoHA1D3cSn8Wudae9gmEKA g7MJztGscUiE2XPiSRxQIb90gYMqlrXeb64HpZFGIZno++b+jG+M3Ugq6Zz/ZIvMAAmk O0LOzt3GhAb63ADlvqyAzexjcBqZL+l2OLE/x8yR/ATDDzEfUc4Hj6BqZlikeC9jVc4x WzIQ== 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 b3-v6si8196951pli.0.2018.04.30.13.03.52; Mon, 30 Apr 2018 13:04:37 -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 S932203AbeD3T1e (ORCPT + 99 others); Mon, 30 Apr 2018 15:27:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:33854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755958AbeD3T1Z (ORCPT ); Mon, 30 Apr 2018 15:27:25 -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 9DA9722DC1; Mon, 30 Apr 2018 19:27:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DA9722DC1 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.14 55/91] kobject: dont use WARN for registration failures Date: Mon, 30 Apr 2018 12:24:37 -0700 Message-Id: <20180430184007.053623683@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@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.14-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;