2014-06-14 21:48:19

by Fabian Frédérick

[permalink] [raw]
Subject: [PATCH 1/1] net/netlink/af_netlink.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE

use mm.h definition

Cc: "David S. Miller" <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Signed-off-by: Fabian Frederick <[email protected]>
---
net/netlink/af_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 15c731f..935fea2 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -376,7 +376,7 @@ static int netlink_set_ring(struct sock *sk, struct nl_mmap_req *req,

if ((int)req->nm_block_size <= 0)
return -EINVAL;
- if (!IS_ALIGNED(req->nm_block_size, PAGE_SIZE))
+ if (!PAGE_ALIGNED(req->nm_block_size))
return -EINVAL;
if (req->nm_frame_size < NL_MMAP_HDRLEN)
return -EINVAL;
--
1.8.4.5