From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752556AbbJXUJ3 (ORCPT ); Sat, 24 Oct 2015 16:09:29 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:54197 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752204AbbJXUJ2 (ORCPT ); Sat, 24 Oct 2015 16:09:28 -0400 Date: Sat, 24 Oct 2015 22:09:18 +0200 From: Markus Pargmann To: Oleg Nesterov Cc: akpm@linux-foundation.org, balbi@ti.com, dwmw2@infradead.org, tj@kernel.org, linux-kernel@vger.kernel.org Subject: Re: + signal-turn-dequeue_signal_lock-into-kernel_dequeue_signal.patch added to -mm tree Message-ID: <20151024200918.GB16521@pengutronix.de> References: <5612e95f.di8YWOS7lWDxbMSm%akpm@linux-foundation.org> <20151024191053.GA16521@pengutronix.de> <20151024194826.GA14895@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jho1yZJdad60DJr+" Content-Disposition: inline In-Reply-To: <20151024194826.GA14895@redhat.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 22:05:15 up 35 days, 9:26, 125 users, load average: 0.84, 0.56, 1.33 User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jho1yZJdad60DJr+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Oleg, On Sat, Oct 24, 2015 at 09:48:26PM +0200, Oleg Nesterov wrote: > Hi Markus, >=20 > s/mm-commits/lkml/ >=20 > On 10/24, Markus Pargmann wrote: > > > > On Mon, Oct 05, 2015 at 02:19:27PM -0700, akpm@linux-foundation.org wro= te: > > > > > > Subject: signal: turn dequeue_signal_lock() into kernel_dequeue_signa= l() > > > > > > 1. Rename dequeue_signal_lock() to kernel_dequeue_signal(). This > > > matches another "for kthreads only" kernel_sigaction() helper. > > > > > > 2. Remove the "tsk" and "mask" arguments, they are always current > > > and current->blocked. And it is simply wrong if tsk !=3D current. > > > > > > 3. We could also remove the 3rd "siginfo_t *info" arg but it looks > > > potentially useful. However we can simplify the callers if we > > > change kernel_dequeue_signal() to accept info =3D> NULL. > > > > > > 4. Remove _irqsave, it is never called from atomic context. > > > > I just realised that this patch will conflict with a fixup patch for nbd > > that will be included in rc7. > > > > dcc909d90ccd (nbd: Add locking for tasks) > > > > I think there is basically one new instance of dequeue_signal_lock() th= at > > needs to be replaced with kernel_dequeue_signal(). >=20 > Thanks! I'll send *-fix.patch to Andrew. >=20 > But you know, dcc909d90ccd (nbd: Add locking for tasks) doesn't look exac= tly > right at first glance, although I need to re-check tomorrow... In which regard? Is the locking incorrect or am I doing something wrong with the signal handling? >=20 > One question, can sock_xmit() be called from user space? Or it is only ca= lled > by kthreads? sock_xmit() can be called by a thread that entered from userspace. In general the idea is that there are no pending signals when it leaves into userspace again. Best Regards, Markus --=20 Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --jho1yZJdad60DJr+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWK+VuAAoJEEpcgKtcEGQQ5KIQAJicwEXOMVMJDbsN+DEJs7tz F8KcKgUImiFbs95av64cEhfwbMoaYymJDeDze6CiD91HRTMAnX60fbxd7lj8vk6H U1y9GUvZU27EKfu4DlgTHwSpMKBiSrXLL586RYiiiXw+scnSPhkx0hK+q+CIO4P+ a10FZZNxNCX2wA2rBStPQfusiVFYqiNbgElstk+D0LV+HT7bAAZjEqOl/4OE/6YD kj3zu3xv+KjzycsQPgC4cP5zfMLSW8QSqbCzv5l8gqzXLhsoMNsw4rHsAVkeYSTS pcBCDoUvPOg8XxL0faYBM0B9/6RWRhD/9chC5OApq9+cz9XTEvcQLQ7nVsak2wSA DXyY95wD5gvydzmXO23kkAXld+ct33TiVLZjosZ7hfiCy26J/zlJtQHukPoG0Xfk Hm3m9sVer1SLvWpFmqnRaBeIZPFuftkb6SauB2SxMI8ylQ3KAmZWDGtAtzu0mFa1 UHTprK60kQKXnayi0EEdbtbJYrfW/kOGwxQEfN4YpVuPGYtJo6KJagjoqFz3kkrQ rBDX5YeQ7JFSDtYHIWO5fHnHAyGq321CQvTE6Dx3Uh2/DgLZsCePSH1mt3Vkd1Gk nqSWGoNpsh3zve3xPkuR+VpUFEtlpfHyBrfzsNVcNAm1OTtu7WHciZ2oVFfA4wjZ j595WtJY16FXdAuP2iWw =bn0p -----END PGP SIGNATURE----- --jho1yZJdad60DJr+--