lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 30 Dec 2014 19:28:43 +0100
From:	Nicholas Mc Guire <>
To:	Sergei Shtylyov <>
Cc:	Kalle Valo <>,
	Michal Kazior <>,
	Ben Greear <>,
	Chun-Yeow Yeoh <>,
	Yanbo Li <>,,,,
Subject: Re: [PATCH 0/4] ath10k: a few incorrect return handling fix-up

On Tue, 30 Dec 2014, Sergei Shtylyov wrote:

> Hello.
> On 12/30/2014 03:20 PM, Nicholas Mc Guire wrote:
>> wait_for_completion_timeout does not return negative values so the tests
>> for <= 0 are not needed and the case differentiation in the error handling
>> path unnecessary.
>    I decided to verify your statement and I saw that it seems wrong.  
> do_wait_for_common() can return -ERESTARTSYS and the return value gets  
> returned by its callers unchanged.

the -ERESTARTSYS only can be returned if state matches but
wait_for_completion_timemout passes TASK_UNINTERRUPTIBLE
so signal_pending_state will return 0 and never negativ

my understanding of the callchain is:
wait_for_completion_timemout with TASK_UNINTERRUPTIBLE
  -> wait_for_common(...TASK_UNINTERRUPTIBLE)
    -> __wait_for_common(...TASK_UNINTERRUPTIBLE)
      -> do_wait_for_common(...TASK_UNINTERRUPTIBLE)
        -> signal_pending_state(TASK_UNINTERRUPTIBLE...)

static inline int signal_pending_state(long state, struct task_struct *p)
        if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
                return 0;

so wait_for_completion_timemout should return 0 or 1 only

>> patch was only compile tested x86_64_defconfig + CONFIG_ATH_CARDS=m
>> patch is against linux-next 3.19.0-rc1 -next-20141226
>    Rather patches. It would have been better to send one patch instead of 
> 4 patches with the same name.
sorry for that - I had split it into separate patches as it was
in different files - giving them the same name of course was a bit

please do give it one more look - if the above argument is invalid
I apologize for the noise.

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists