Re: [PATCH 1/2] signal: simplify deadlock-avoidance in lock_task_sighand()

From: Rik van Riel
Date: Tue Sep 23 2014 - 07:46:30 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/22/2014 05:24 PM, Steven Rostedt wrote:
> On Mon, 22 Sep 2014 21:11:30 +0200 Oleg Nesterov <oleg@xxxxxxxxxx>
> wrote:

>> so this patch doesn't try to change the rules.
>>
>> But perhaps we can simply remove this preempt_disable/enable?
>>
>> Or. We can shift rcu_read_unlock() from lock_task_sighand() to
>> unlock_task_sighand(). This way we can avoid preempt_disable too,
>> but I'd prefer to not do this.
>
> I really thing the preempt_disable/enable is not needed.
>
> Paul, Thomas, care to comment?

I suspect you are right. On normal kernels, rcu_read_lock() will
ensure preemption is disabled.

On -rt, the locks within are all sleepable mutexes.

Either way, things should be ok.

- --
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJUIV1SAAoJEM553pKExN6DXroIAIFFNLb1tDCHZCmW5q/so0U9
sd0MLhN/oRx9+tZuZw7RfIglTDEukMKuFI7lRvoIkH+uZ9ObRVqjGB35CWNVRaWy
wzEyjIPO9OboHTCygBdxmLgC6I9Lg3qFQP2tuwLyEeWJMFylWuDDBtHCmVnbq78G
AvUxyz9z+XuFSHLumD+DYMLkYSpMhzzCSSQ7uiOEYP+LA3a2DJuFgNxBvZWQAIu4
j7uWcWLlv3TJYkK7iTudJyXl4DqyhanILh5pHLXIv3w2I0tAycpPv73QH64Qog6S
3R5BoIrfFvfgldx1YaB26lk6jvg3jgi61fSaUx6ZoaMGBM+QBfxiNdI4G7Yn/8k=
=EKgM
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/