Re: Why care about signal when instantiate an crypt template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fan Du <fan.du@xxxxxxxxxxxxx> wrote:
> Hi,
> 
> I recently bump into a issue, ike daemon got interrupted(EINTR),
> after looking at the code, it seems there are places in crypto code
> where returning EINTR when current tasks has signal pending.
> 
> For example:
> crypto_alloc_base and crypto_alloc_tfm
> 
> 435 err:
> 436                 if (err != -EAGAIN)
> 437                         break;
> 438                 if (signal_pending(current)) {
> 439                         err = -EINTR;
> 440                         break;
> 441                 }
> 442         }
> 
> I can't understand why the codes here needs to care about signals?

Because otherwise you may end up with something that you can't
kill from user-space.  You should fix your app.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux