lkml.org 
[lkml]   [2018]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups
From
Date
On Sat, 2018-08-04 at 15:49 -0700, Nathan Chancellor wrote:
> dmesg output attached, please let me know if you need anything else.

Could you try with this diff instead?
It looks like, I'm too bad with shifts and shifted for 64 bytes.

--
Thanks,
Dmitrydiff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7d860a22e5fb..b78bb7dc06fe 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1011,7 +1011,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,

if (nlk->ngroups == 0)
groups = 0;
- else
+ else if (nlk->ngroups < 64)
groups &= (1ULL << nlk->ngroups) - 1;

bound = nlk->bound;
\
 
 \ /
  Last update: 2018-08-05 01:13    [W:0.086 / U:6.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site