From: Nicolai Stange <nicstange@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: nicstange@gmail.com, edumazet@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net, socket, socket_wq: fix missing initialization of flags
Date: Thu, 31 Dec 2015 11:53:48 +0100 [thread overview]
Message-ID: <8760ze99dv.fsf@gmail.com> (raw)
In-Reply-To: <20151230.163915.990334768673899184.davem@davemloft.net> (David Miller's message of "Wed, 30 Dec 2015 16:39:15 -0500 (EST)")
David Miller <davem@davemloft.net> writes:
> From: Nicolai Stange <nicstange@gmail.com>
> Date: Tue, 29 Dec 2015 13:29:55 +0100
>
>> Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection")
>>
>> Commit ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") from
>> the current 4.4 release cycle introduced a new flags member in
>> struct socket_wq and moved SOCKWQ_ASYNC_NOSPACE and SOCKWQ_ASYNC_WAITDATA
>> from struct socket's flags member into that new place.
>>
>> Unfortunately, the new flags field is never initialized properly, at least
>> not for the struct socket_wq instance created in sock_alloc_inode().
>>
>> One particular issue I encountered because of this is that my GNU Emacs
>> failed to draw anything on my desktop -- i.e. what I got is a transparent
>> window, including the title bar. Bisection lead to the commit mentioned
>> above and further investigation by means of strace told me that Emacs
>> is indeed speaking to my Xorg through an O_ASYNC AF_UNIX socket. This is
>> reproducible 100% of times and the fact that properly initializing the
>> struct socket_wq ->flags fixes the issue leads me to the conclusion that
>> somehow SOCKWQ_ASYNC_WAITDATA got set in the uninitialized ->flags,
>> preventing my Emacs from receiving any SIGIO's due to data becoming
>> available and it got stuck.
>>
>> Make sock_alloc_inode() set the newly created struct socket_wq's ->flags
>> member to zero.
>>
>> Signed-off-by: Nicolai Stange <nicstange@gmail.com>
>
> Applied, but please in the future please put the Fixes: tag right
> above the first signoff/ack, like this:
>
> Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection")
> Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Thank you very much!
Regarding the correct position of the "Fixes:" tag: lesson learned.
prev parent reply other threads:[~2015-12-31 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-27 20:00 [PATCH] net, socket, socket_wq: fix missing initialization of flags Nicolai Stange
2015-12-28 17:19 ` Eric Dumazet
2015-12-29 12:29 ` [PATCH v2] " Nicolai Stange
2015-12-29 19:03 ` Eric Dumazet
2015-12-30 21:39 ` David Miller
2015-12-31 10:53 ` Nicolai Stange [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760ze99dv.fsf@gmail.com \
--to=nicstange@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).