[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Apr 2012 17:06:31 +0530
From: Sasikantha babu <sasikanth.v19@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
WANG Cong <amwang@...hat.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: linux-kernel@...r.kernel.org,
Sasikantha babu <sasikanth.v19@...il.com>
Subject: [PATCH] Do notify userspace when there is change in uts_kern_table.
sethostname and setdomainname notifies userspace on failure (without modifying uts_kern_table) too
Notify userspace if there is change in uts_kern_table, on failure don't notify userspace
Signed-off-by: Sasikantha babu <sasikanth.v19@...il.com>
---
kernel/sys.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sys.c b/kernel/sys.c
index e7006eb..6c569a8 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1295,8 +1295,8 @@ SYSCALL_DEFINE2(sethostname, char __user *, name, int, len)
memcpy(u->nodename, tmp, len);
memset(u->nodename + len, 0, sizeof(u->nodename) - len);
errno = 0;
+ uts_proc_notify(UTS_PROC_HOSTNAME);
}
- uts_proc_notify(UTS_PROC_HOSTNAME);
up_write(&uts_sem);
return errno;
}
@@ -1346,8 +1346,8 @@ SYSCALL_DEFINE2(setdomainname, char __user *, name, int, len)
memcpy(u->domainname, tmp, len);
memset(u->domainname + len, 0, sizeof(u->domainname) - len);
errno = 0;
+ uts_proc_notify(UTS_PROC_DOMAINNAME);
}
- uts_proc_notify(UTS_PROC_DOMAINNAME);
up_write(&uts_sem);
return errno;
}
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists