mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
netlink: Queue the kernel socket after setting the flag.
Queueing the socket after setting the NETLINK_KERNEL_SOCKET on the kernel socket. This change is required in-order to avoid the BUG check which is caused due to race condition between setting this flag and a message from the app space for this kernel netlink sock. Change-Id: I19a8edf2fe009a3020b194684a6172654f8f257a CRs-Fixed: 681815 Signed-off-by: Vinay Krishna Eranna <veran@codeaurora.org>
This commit is contained in:
parent
dee710f640
commit
6059ddb2dd
1 changed files with 3 additions and 3 deletions
|
@ -2268,12 +2268,12 @@ __netlink_kernel_create(struct net *net, int unit, struct module *module,
|
|||
if (cfg && cfg->input)
|
||||
nlk_sk(sk)->netlink_rcv = cfg->input;
|
||||
|
||||
if (netlink_insert(sk, net, 0))
|
||||
goto out_sock_release;
|
||||
|
||||
nlk = nlk_sk(sk);
|
||||
nlk->flags |= NETLINK_KERNEL_SOCKET;
|
||||
|
||||
if (netlink_insert(sk, net, 0))
|
||||
goto out_sock_release;
|
||||
|
||||
netlink_table_grab();
|
||||
if (!nl_table[unit].registered) {
|
||||
nl_table[unit].groups = groups;
|
||||
|
|
Loading…
Reference in a new issue