diff options
| -rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index ea4567fae5dd..0fe35664c687 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
| @@ -369,6 +369,18 @@ gss_setup_upcall(struct rpc_clnt *clnt, struct gss_auth *gss_auth, struct rpc_cr | |||
| 369 | return gss_msg; | 369 | return gss_msg; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | static void warn_gssd(void) | ||
| 373 | { | ||
| 374 | static unsigned long ratelimit; | ||
| 375 | unsigned long now = jiffies; | ||
| 376 | |||
| 377 | if (time_after(now, ratelimit)) { | ||
| 378 | printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" | ||
| 379 | "Please check user daemon is running.\n"); | ||
| 380 | ratelimit = now + 15*HZ; | ||
| 381 | } | ||
| 382 | } | ||
| 383 | |||
| 372 | static inline int | 384 | static inline int |
| 373 | gss_refresh_upcall(struct rpc_task *task) | 385 | gss_refresh_upcall(struct rpc_task *task) |
| 374 | { | 386 | { |
| @@ -568,21 +580,14 @@ static void | |||
| 568 | gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) | 580 | gss_pipe_destroy_msg(struct rpc_pipe_msg *msg) |
| 569 | { | 581 | { |
| 570 | struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg); | 582 | struct gss_upcall_msg *gss_msg = container_of(msg, struct gss_upcall_msg, msg); |
| 571 | static unsigned long ratelimit; | ||
| 572 | 583 | ||
| 573 | if (msg->errno < 0) { | 584 | if (msg->errno < 0) { |
| 574 | dprintk("RPC: gss_pipe_destroy_msg releasing msg %p\n", | 585 | dprintk("RPC: gss_pipe_destroy_msg releasing msg %p\n", |
| 575 | gss_msg); | 586 | gss_msg); |
| 576 | atomic_inc(&gss_msg->count); | 587 | atomic_inc(&gss_msg->count); |
| 577 | gss_unhash_msg(gss_msg); | 588 | gss_unhash_msg(gss_msg); |
| 578 | if (msg->errno == -ETIMEDOUT) { | 589 | if (msg->errno == -ETIMEDOUT) |
| 579 | unsigned long now = jiffies; | 590 | warn_gssd(); |
| 580 | if (time_after(now, ratelimit)) { | ||
| 581 | printk(KERN_WARNING "RPC: AUTH_GSS upcall timed out.\n" | ||
| 582 | "Please check user daemon is running!\n"); | ||
| 583 | ratelimit = now + 15*HZ; | ||
| 584 | } | ||
| 585 | } | ||
| 586 | gss_release_msg(gss_msg); | 591 | gss_release_msg(gss_msg); |
| 587 | } | 592 | } |
| 588 | } | 593 | } |
