From: Michael Moese <mmoese@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] Add library support for /proc/sys/kernel/tainted
Date: Thu, 25 Jan 2018 13:26:40 +0100 [thread overview]
Message-ID: <20180125122640.ekdiy3pxyxpvbis7@linux.suse> (raw)
In-Reply-To: <20180125121641.26795-1-mmoese@suse.de>
Hi,
I'm sorry I sent the wrong patch file.
I will wait if you have other remarks, then re-send this.
> +void tst_taint_init(unsigned int mask)
> +{
> + unsigned int taint = -1;
> +
> + if (mask == 0)
> + tst_brk(TBROK, "mask is not allowed to be 0");
> +
> + if (tst_taint_check_kver(mask) < 0)
> + tst_res(TCONF, "Kernel is too old for requested mask");
> +
> + taint = tst_taint_read();
> + if ((taint & mask) != 0)
> + tst_res(TCONF, "Kernel is already tainted: %u", taint);
> +
> + taint_mask = mask;
This line above should go before the call to tst_taint_read()
Thx,
Michael
--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2018-01-25 12:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 12:16 [LTP] [PATCH v2] Add library support for /proc/sys/kernel/tainted Michael Moese
2018-01-25 12:26 ` Michael Moese [this message]
2018-01-25 13:28 ` Cyril Hrubis
2018-01-25 14:20 ` Michael Moese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125122640.ekdiy3pxyxpvbis7@linux.suse \
--to=mmoese@suse.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox