From patchwork Tue Feb 13 11:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 128214 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4173188ljc; Tue, 13 Feb 2018 03:58:00 -0800 (PST) X-Google-Smtp-Source: AH8x225TL0trLtt1TGP5Bz2YKGBgMQL1IWcQtdQRWGypIZWbgORgO87qSCc0KZxdeRUUvLazE5av X-Received: by 2002:a17:902:9897:: with SMTP id s23-v6mr907983plp.238.1518523080105; Tue, 13 Feb 2018 03:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518523080; cv=none; d=google.com; s=arc-20160816; b=l3rcMpc+VaeyFF0qm7aVClr27N+JnGtmIFudPH0r9Lvx8SShdeQB+1RcikrEZ9qxte 7mHfvEzv7YrrCFW+6zc+7z2wwJd/Gp9yT4t0+xF6dTMRTLYftJ/8QI4nFUFnYBzmI/Rk VMTXc1/a5Q6bnd9WeOdYVK6rbF+S+WFYuTe4h82ZLL+sDs+bCZc5BTOtVETOVH4XJxcq BJJNM3IrVObqDEDfI8lvdutQoh2nju47mn+VpDxlDrvExNCBrvqrAzynEkIhEYeoRpef pjN1lLFafZUaK/YWUjv+iG64+oloMq8WXKuw/OCpRJQ4jQcPa1YGfvWszTd5ifiCQ0xE X9kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=Tnf+0gjruLA6pYmfG4TFwW4cLFI+sRp0LcwGMbVdMYU=; b=0jz5Dobw8Ol59b0XvLvkGBfIf1jkcA8E3rzPjouQARWfyIzFm0BTwWGHQIOEo9ndw/ l1oqIYgq23zZxATCogR44YKv36wH0s3OQVSR3rRK2rbv5qS6ER2VyQJOaweGruWUJYSq R6L3WlvZQWPMpc3NBeE5fA+zHfpIjQYA8+CVK/8MbR6nkLLs9xCvJ7i6WmftwY2v2X4P 50leFX4go3NZtCylm68ar9fdsn6rgVXxS+DE5MEjVy24VQe5+voHUraC7pFqtH1Cogqk ftrm38u7VJedK+9dZYwrLdc2SL7N08VjeH87Jaiz4ybYiaY7+2QJAMl9QcT3F8C5B9Ar 6BNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PjlW7KFq; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b185si2002547pga.370.2018.02.13.03.57.59; Tue, 13 Feb 2018 03:58:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PjlW7KFq; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id A6F767827F; Tue, 13 Feb 2018 11:57:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by mail.openembedded.org (Postfix) with ESMTP id 405BA60777 for ; Tue, 13 Feb 2018 11:57:52 +0000 (UTC) Received: by mail-lf0-f65.google.com with SMTP id a204so24710534lfa.2 for ; Tue, 13 Feb 2018 03:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=1klL5QWSZ0vB3IXQGELe06dpL+BKwzWhqJx8mOMrzvg=; b=PjlW7KFqytH6cpcJ81+ugGpqe0zgq6LDU5y9tbEfEpJuiW0vMXeLPPZerX/JQV7eeO YA/zinEkud3htRY50Qmtkl8BDZqJUU15p8FpI6C5FTrtXbDqdRo/aIE647lhPcY3N+IN 9Uub4pgMzbB6ee7v3MqN3sx40wl7Q06uRxg2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1klL5QWSZ0vB3IXQGELe06dpL+BKwzWhqJx8mOMrzvg=; b=qR8TFwPKTdTOzhzNkEyMTAv0lm/yXs2wNbIjiiTVBF8sKWA3xH2LA/6AKRV+Ts5ZKB 4OUr5PxysMqm+MmESGJcfoFIPRC8GngJblRq+7jyJp43fIWpqjwoq21Pccnqir+E6ucw ctpryL5XM/FvIPuurDlE7pvsacSvj0MYYNA+KeKQn2XsnmstfRXyBHoEzSVll2toB3SH H0XBgurKyzqS115Spn4htxcq5SYbBuW3gOgHr2A77lJp0FqzqoL8FK/7hyz7HZpKdO79 ikZI3elFpQPcChhrwa15/La9wJnXzLE3cHm3NRKlzN/CwMk37ISNkVltkGAusfyaRjuH A8pw== X-Gm-Message-State: APf1xPDpaZtpYjOVQfCDlzxV9eRf6nRlxiSZjdiiFdpQ9VLdCCQzwwTI T6dnuIULWL3y9tpG9aHBu6z4VqzlJgw= X-Received: by 10.46.29.138 with SMTP id w10mr757315lje.120.1518523073323; Tue, 13 Feb 2018 03:57:53 -0800 (PST) Received: from localhost (c-2c3d70d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id s9sm2146114lfe.48.2018.02.13.03.57.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 03:57:52 -0800 (PST) From: Anders Roxell To: openembedded-core@lists.openembedded.org Date: Tue, 13 Feb 2018 12:57:48 +0100 Message-Id: <20180213115748.3135-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH v3] ltp: fix fanotify06 test X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Anders Roxell --- ...-make-is_fuse-return-zero-if-fs_type-is-N.patch | 40 ++++++++++++++++++++++ meta/recipes-extended/ltp/ltp_20180118.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core Tested-by: Maxin B. John diff --git a/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch b/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch new file mode 100644 index 0000000000..5096a85c1e --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch @@ -0,0 +1,40 @@ +From 67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d Mon Sep 17 00:00:00 2001 +From: Li Wang +Date: Tue, 23 Jan 2018 17:46:35 +0800 +Subject: [PATCH] safe_macros: make is_fuse() return zero if fs_type is NULL + +This commmit 28507e514c(safe_mount: Do not try mount() syscall for FUSE fs) +involves FUSE fs check in safe_mount(), but we'd better guarantee the "fs_type" +is legal to check in is_fuse() function otherwise system will kill the program. + + cmdline="fanotify06" + contacts="" + analysis=exit + <<>> + tst_test.c:980: INFO: Timeout per run is 0h 10m 00s + tst_test.c:1025: BROK: Test killed by SIGSEGV! + +Signed-off-by: Li Wang +Acked-by: Jan Stancek +Upstream-Status: Accepted [https://github.com/linux-test-project/ltp/commit/67af7dbe8bdf29f9ed980d8d29feeae32a0a7a1d] +--- + lib/safe_macros.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/safe_macros.c b/lib/safe_macros.c +index c48e436dc..abdeca013 100644 +--- a/lib/safe_macros.c ++++ b/lib/safe_macros.c +@@ -708,6 +708,9 @@ static int is_fuse(const char *fs_type) + { + unsigned int i; + ++ if (!fs_type) ++ return 0; ++ + for (i = 0; i < ARRAY_SIZE(fuse_fs_types); i++) { + if (!strcmp(fuse_fs_types[i], fs_type)) + return 1; +-- +2.11.0 + diff --git a/meta/recipes-extended/ltp/ltp_20180118.bb b/meta/recipes-extended/ltp/ltp_20180118.bb index 369b98df9b..b7cac8592a 100644 --- a/meta/recipes-extended/ltp/ltp_20180118.bb +++ b/meta/recipes-extended/ltp/ltp_20180118.bb @@ -43,6 +43,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ file://0035-fix-test_proc_kill-hang.patch \ file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \ file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \ + file://0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch \ " S = "${WORKDIR}/git"