All of lore.kernel.org
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] timerfd_settime01: initialise itimerspec new_value
Date: Wed, 20 Aug 2014 16:04:16 +0200	[thread overview]
Message-ID: <20140820140416.GA23235@rei> (raw)
In-Reply-To: <98fd8c728c27239472b635ea5e61ee69c3685a16.1408524328.git.jstancek@redhat.com>

Hi!
> Before kernel validates that fd is valid, it checks itimerspec struct
> with timespec_valid(). This struct is currently not initialised in test,
> which can cause failures, for example:
> 
> timerfd_settime01    1  TFAIL  :  timerfd_settime01.c:121: timerfd_settime()
>                         failed unexpectedly; expected: 9 - Bad file
>                         descriptor: TEST_ERRNO=EINVAL(22): Invalid argument
> timerfd_settime01    2  TFAIL  :  timerfd_settime01.c:121: timerfd_settime()
>                         failed unexpectedly; expected: 14 - Bad address:
>                         TEST_ERRNO=EINVAL(22): Invalid argument
> 
> Fix this by giving fields in this struct some deterministic values
> (zero in this patch).

I've reproduced the failure and tested the fix.

Tested and acked.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2014-08-20 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  8:46 [LTP] [PATCH] timerfd_settime01: initialise itimerspec new_value Jan Stancek
2014-08-20  8:57 ` Wanlong Gao
2014-08-20 10:22 ` Zeng Linggang
2014-08-20 14:04 ` chrubis [this message]

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=20140820140416.GA23235@rei \
    --to=chrubis@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.