public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Cc: Meng Yang <yangm50@chinatelecom.cn>, Mingyu Li <limy83@chinatelecom.cn>
Subject: Re: [LTP] [PATCH 1/2] safe_keyctl: Skip with TCONF on EOPNOTSUPP
Date: Tue, 9 Dec 2025 20:48:10 +0100	[thread overview]
Message-ID: <20251209194810.GA24627@pevik> (raw)
In-Reply-To: <20251208150542.704006-2-pvorel@suse.cz>

...
> +++ b/include/lapi/keyctl.h
> @@ -209,10 +209,11 @@ static inline long safe_keyctl(const char *file, const int lineno,
>  {
>  	long rval;
>  	int failure = 0;
> +	int res = errno == EOPNOTSUPP ? TCONF : TBROK | TERRNO;

Obviously set variable before calling keyctl() is wrong,
as Mingyu Li reported
https://lore.kernel.org/ltp/20251209124041.216542-1-simplemessager@163.com/

Therefore his patch which does not store value before use should be used:
https://patchwork.ozlabs.org/project/ltp/patch/20251209122937.212641-2-simplemessager@163.com/
https://lore.kernel.org/ltp/20251209124041.216542-2-simplemessager@163.com/

Kind regards,
Petr

>  	rval = keyctl(cmd, arg2, arg3, arg4, arg5);
>  	if (rval == -1) {
> -		tst_brk_(file, lineno, TBROK | TERRNO,
> +		tst_brk_(file, lineno, res,
>  			"keyctl(%d, %lu, %lu, %lu, %lu)",
>  			cmd, arg2, arg3, arg4, arg5);
>  	}

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-12-09 19:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08 15:05 [LTP] [PATCH 0/2] safe_keyctl: Skip with TCONF on EOPNOTSUPP Petr Vorel
2025-12-08 15:05 ` [LTP] [PATCH 1/2] " Petr Vorel
2025-12-09 19:48   ` Petr Vorel [this message]
2025-12-08 15:05 ` [LTP] [PATCH 2/2] wqueue0*: Use SAFE_KEYCTL() Petr Vorel
2025-12-12 15:22   ` Petr Vorel
2025-12-09 12:29 ` [LTP] [PATCH 0/2] safe_keyctl: Skip with TCONF on EOPNOTSUPP simplemessager
2025-12-09 12:29   ` [LTP] [PATCH] " simplemessager
2025-12-09 12:37 ` [LTP] [PATCH 0/2] " simplemessager
2025-12-09 12:37   ` [LTP] [PATCH] " simplemessager
2025-12-09 19:53     ` Petr Vorel
2025-12-11  8:11       ` simplemessager
2025-12-11  8:11         ` [LTP] [PATCH 1/1] " simplemessager
2025-12-12 15:21           ` Petr Vorel
2025-12-09 19:50   ` [LTP] [PATCH 0/2] " Petr Vorel

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=20251209194810.GA24627@pevik \
    --to=pvorel@suse.cz \
    --cc=limy83@chinatelecom.cn \
    --cc=ltp@lists.linux.it \
    --cc=yangm50@chinatelecom.cn \
    /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