Received: by 10.192.165.148 with SMTP id m20csp4191397imm; Mon, 30 Apr 2018 13:32:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZouoXaeJxXryh+DZ3BD3KiQODYAAI9bnFlSm7+W2CrbsxXzPhrlHc9fIIp9WprgD6ewXkol X-Received: by 2002:a17:902:9344:: with SMTP id g4-v6mr13928268plp.10.1525120360210; Mon, 30 Apr 2018 13:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525120360; cv=none; d=google.com; s=arc-20160816; b=VYk+hUWz/AQuNw4n7vY2NoWivq3taJWq/vZdwQyUfJjCWNf0SWnd0813I6P68R0Oso AqBGU4tw4vWuEuHrGQc8tS7oNEnLhs1seqkpSh4o96qoxtftlOi/X5rj0K2YuU/+bDr9 TPzxMVxCHfq/q2P5ppx3xLFby+OMJDuSmcLxb6SMOvaOY/kPGri6ACiiinzyZhEuz2yd yeX2mYfQF3ITXaHohf98oOFXypDnraahZoihxMuuzgFADPqdEjToIMuK0dK2ZwHYcB2w L+0z2Hd1kgKmUyTx4nJOIUXDTTs+owoMZ0AmhPkg/m6jpYdaH5TGyR4RQ0+9As2WVPZJ NfXA== 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=+H6hkA9OcBCtDPpiEwUAI5O13kLS07qUFcTrFT1E9PY=; b=w6lM1HB9a9K/z/axHuu8bu8wRzix+4SICXgDKpr5CjgZP/GvIyd4kB+TIt26wMOBUI xek45dV9ZGv/RSOxtk7pTXJS+ju72coPOw2wcXsHreJ4Uw/G2/itKSL0R+JmchrCgQWX 3U8Kq3jKA5YFSaW/psf+MIuUELeM18NKvNN4t9GMaAI8rT+e44hc8TnsEGRJVzSMRKG3 PBn2xFp3QqUIdCaMA6PopUfdlQ8/EliDA9onk9UZ+JrOJmIauB/PkqYuy7+r9uT54uSU pVNxEuZB/5liWbzIg8P5Jk53N8JTy+MItFl7SvWknGKPidr88iNIaQ7ZqxUbAvWrB3y9 IQvA== 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 l7-v6si8306744plt.197.2018.04.30.13.32.26; Mon, 30 Apr 2018 13:32:40 -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 S1755506AbeD3T0H (ORCPT + 99 others); Mon, 30 Apr 2018 15:26:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:59110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755465AbeD3T0B (ORCPT ); Mon, 30 Apr 2018 15:26:01 -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 005D622DC9; Mon, 30 Apr 2018 19:25:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 005D622DC9 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.4 33/44] kobject: dont use WARN for registration failures Date: Mon, 30 Apr 2018 12:24:44 -0700 Message-Id: <20180430190947.658962823@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430190946.093694747@linuxfoundation.org> References: <20180430190946.093694747@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.4-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;