From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752546AbcF1NDk (ORCPT ); Tue, 28 Jun 2016 09:03:40 -0400 Received: from forward2j.cmail.yandex.net ([5.255.227.20]:59969 "EHLO forward2j.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbcF1NDi (ORCPT ); Tue, 28 Jun 2016 09:03:38 -0400 X-Greylist: delayed 448 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Jun 2016 09:03:37 EDT Authentication-Results: mxback8j.mail.yandex.net; dkim=pass header.i=@yandex.ru From: Evgeniy Polyakov Envelope-From: drustafa@yandex.ru To: Aaron Campbell , "linux-kernel@vger.kernel.org" Cc: "netdev@vger.kernel.org" , Jon DeVree In-Reply-To: <1466773532-16596-1-git-send-email-aaron@monkey.org> References: <1466773532-16596-1-git-send-email-aaron@monkey.org> Subject: Re: [PATCH] connector: fix out-of-order cn_proc netlink message delivery MIME-Version: 1.0 Message-Id: <1710991467118565@web17j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 28 Jun 2016 15:56:05 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Aaron 24.06.2016, 16:07, "Aaron Campbell" : > The proc connector messages include a sequence number, allowing userspace > programs to detect lost messages. However, performing this detection is > currently more difficult than necessary, since netlink messages can be > delivered to the application out-of-order. To fix this, leave pre-emption > disabled during cn_netlink_send(), and use GFP_NOWAIT. > > The following was written as a test case. Building the kernel w/ make -j32 > proved a reliable way to generate out-of-order cn_proc messages. This is not actually about out-of-order sending which is impossible iirc, but the way fork pushes messages into socket queue in parallel. What you've done is syncing one more layer higher. I'm not against this patch if you think it does fix some issues, but wording is not correct imo.