diff options
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/host.c | 3 | ||||
-rw-r--r-- | fs/lockd/xdr.c | 4 | ||||
-rw-r--r-- | fs/lockd/xdr4.c | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index ed103387964d..dc41e46ef74c 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -453,9 +453,10 @@ void nlm_release_host(struct nlm_host *host) | |||
453 | */ | 453 | */ |
454 | void nlm_host_rebooted(const struct nlm_reboot *info) | 454 | void nlm_host_rebooted(const struct nlm_reboot *info) |
455 | { | 455 | { |
456 | __be32 *p = (__be32 *)&info->priv.data; | ||
456 | const struct sockaddr_in sin = { | 457 | const struct sockaddr_in sin = { |
457 | .sin_family = AF_INET, | 458 | .sin_family = AF_INET, |
458 | .sin_addr.s_addr = info->addr, | 459 | .sin_addr.s_addr = *p, |
459 | }; | 460 | }; |
460 | struct hlist_head *chain; | 461 | struct hlist_head *chain; |
461 | struct hlist_node *pos; | 462 | struct hlist_node *pos; |
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 1f226290c67c..4cc7d01a1eb5 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -349,8 +349,8 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) | |||
349 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) | 349 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) |
350 | return 0; | 350 | return 0; |
351 | argp->state = ntohl(*p++); | 351 | argp->state = ntohl(*p++); |
352 | /* Preserve the address in network byte order */ | 352 | memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); |
353 | argp->addr = *p++; | 353 | p += XDR_QUADLEN(SM_PRIV_SIZE); |
354 | return xdr_argsize_check(rqstp, p); | 354 | return xdr_argsize_check(rqstp, p); |
355 | } | 355 | } |
356 | 356 | ||
diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c index 50c493a8ad8e..61d1714a470e 100644 --- a/fs/lockd/xdr4.c +++ b/fs/lockd/xdr4.c | |||
@@ -356,8 +356,8 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp | |||
356 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) | 356 | if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) |
357 | return 0; | 357 | return 0; |
358 | argp->state = ntohl(*p++); | 358 | argp->state = ntohl(*p++); |
359 | /* Preserve the address in network byte order */ | 359 | memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); |
360 | argp->addr = *p++; | 360 | p += XDR_QUADLEN(SM_PRIV_SIZE); |
361 | return xdr_argsize_check(rqstp, p); | 361 | return xdr_argsize_check(rqstp, p); |
362 | } | 362 | } |
363 | 363 | ||