From nobody Sat May 4 20:18:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500107546779562.1916694972874; Sat, 15 Jul 2017 01:32:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D569C0467D5; Sat, 15 Jul 2017 08:32:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFDE778156; Sat, 15 Jul 2017 08:32:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C2EBD1853E31; Sat, 15 Jul 2017 08:32:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6F8WF8s005227 for ; Sat, 15 Jul 2017 04:32:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3358077ECE; Sat, 15 Jul 2017 08:32:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52B4077EEB; Sat, 15 Jul 2017 08:32:13 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1 with cipher RC4-SHA (112/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 364DF81222; Sat, 15 Jul 2017 08:32:08 +0000 (UTC) Received: from 172.30.72.56 (EHLO dggeml405-hub.china.huawei.com) ([172.30.72.56]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ARD49046; Sat, 15 Jul 2017 16:31:57 +0800 (CST) Received: from localhost (10.177.25.200) by dggeml405-hub.china.huawei.com (10.3.17.49) with Microsoft SMTP Server id 14.3.301.0; Sat, 15 Jul 2017 16:31:49 +0800 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D569C0467D5 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3D569C0467D5 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 364DF81222 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=caoxinhua@huawei.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 364DF81222 From: "xinhua.Cao" To: , Date: Sat, 15 Jul 2017 16:31:39 +0800 Message-ID: <20170715083139.14420-1-caoxinhua@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.25.200] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.5969D2FE.0041, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1415e839cbaaef8e1de003089066b4d3 X-Greylist: Delayed for 01:49:07 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 15 Jul 2017 08:32:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 15 Jul 2017 08:32:11 +0000 (UTC) for IP:'45.249.212.189' DOMAIN:'szxga03-in.huawei.com' HELO:'szxga03-in.huawei.com' FROM:'caoxinhua@huawei.com' RCPT:'' X-RedHat-Spam-Score: 0.398 (BAYES_50, DCC_REPUT_00_12, RP_MATCHES_RCVD, SPF_PASS) 45.249.212.189 szxga03-in.huawei.com 45.249.212.189 szxga03-in.huawei.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: "xinhua.Cao" , yanqiangjun@huawei.com, weidong.huang@huawei.com, weifuqiang@huawei.com Subject: [libvirt] [PATCH] security: Use VIR_DEBUG instead of VIR_INFO in virSecurityDACSetOwnershipInternal X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 15 Jul 2017 08:32:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" virSecurityDACSetOwnershipInternal was called by libvirt child process, so if we log message by VIR_INFO at normal scene, it would probability occu= rs dead lock sence, then libvirtd will also by dead lock because libvirtd is waitting for child= message. so our suggest is use VIR_DEBUG instead of VIR_INFO to avoid this sence. --- src/security/security_dac.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index ca7a6af..7bfd090 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -552,8 +552,8 @@ virSecurityDACSetOwnershipInternal(const virSecurityDAC= Data *priv, else if (rc > 0) return 0; =20 - VIR_INFO("Setting DAC user and group on '%s' to '%ld:%ld'", - NULLSTR(src ? src->path : path), (long) uid, (long) gid); + VIR_DEBUG("Setting DAC user and group on '%s' to '%ld:%ld'", + NULLSTR(src ? src->path : path), (long) uid, (long) gid); =20 if (priv && src && priv->chownCallback) { rc =3D priv->chownCallback(src, uid, gid); @@ -591,17 +591,17 @@ virSecurityDACSetOwnershipInternal(const virSecurityD= ACData *priv, =20 if (rc < 0) { if (errno =3D=3D EOPNOTSUPP || errno =3D=3D EINVAL) { - VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not " - "supported by filesystem", - (long) uid, (long) gid, path); + VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not " + "supported by filesystem", + (long) uid, (long) gid, path); } else if (errno =3D=3D EPERM) { - VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not " - "permitted", - (long) uid, (long) gid, path); + VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not " + "permitted", + (long) uid, (long) gid, path); } else if (errno =3D=3D EROFS) { - VIR_INFO("Setting user and group to '%ld:%ld' on '%s' not " - "possible on readonly filesystem", - (long) uid, (long) gid, path); + VIR_DEBUG("Setting user and group to '%ld:%ld' on '%s' not " + "possible on readonly filesystem", + (long) uid, (long) gid, path); } else { virReportSystemError(errno, _("unable to set user and group to '%ld:%= ld' " --=20 2.8.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list