Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299629
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] net, socket, socket_wq: fix missing initialization of flags |
| Date | 2015-12-31 12:00 +0100 |
| Message-ID | <qLJ7z-3mu-5@gated-at.bofh.it> (permalink) |
| References | <qKw3k-3Io-753@gated-at.bofh.it> <qKJMl-5aJ-3@gated-at.bofh.it> <qL1Jh-xv-13@gated-at.bofh.it> <qLwDo-3xs-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] net, socket, socket_wq: fix missing initialization of flags Nicolai Stange <nicstange@gmail.com> - 2015-12-28 03:50 +0100
Re: [PATCH] net, socket, socket_wq: fix missing initialization of flags Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-28 18:30 +0100
[PATCH v2] net, socket, socket_wq: fix missing initialization of flags Nicolai Stange <nicstange@gmail.com> - 2015-12-29 13:40 +0100
Re: [PATCH v2] net, socket, socket_wq: fix missing initialization of flags Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-29 20:10 +0100
Re: [PATCH v2] net, socket, socket_wq: fix missing initialization of flags David Miller <davem@davemloft.net> - 2015-12-30 22:40 +0100
Re: [PATCH v2] net, socket, socket_wq: fix missing initialization of flags Nicolai Stange <nicstange@gmail.com> - 2015-12-31 12:00 +0100
csiph-web