All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Do notify userspace when there is change in uts_kern_table.
@ 2012-04-04 11:36 Sasikantha babu
  2012-04-04 11:54 ` Cyrill Gorcunov
  0 siblings, 1 reply; 3+ messages in thread
From: Sasikantha babu @ 2012-04-04 11:36 UTC (permalink / raw)
  To: Andrew Morton, Paul Gortmaker, Greg Kroah-Hartman, WANG Cong,
	Cyrill Gorcunov
  Cc: linux-kernel, Sasikantha babu

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@gmail.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do notify userspace when there is change in uts_kern_table.
  2012-04-04 11:36 [PATCH] Do notify userspace when there is change in uts_kern_table Sasikantha babu
@ 2012-04-04 11:54 ` Cyrill Gorcunov
       [not found]   ` <CAOJFanVhC5AAzDVRmm9qFTj8wk5k-3svKQG3i5GGiGx=zqU5dw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2012-04-04 11:54 UTC (permalink / raw)
  To: Sasikantha babu
  Cc: Andrew Morton, Paul Gortmaker, Greg Kroah-Hartman, WANG Cong,
	linux-kernel

On Wed, Apr 04, 2012 at 05:06:31PM +0530, Sasikantha babu wrote:
> 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@gmail.com>

Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>

Looks reasonable to me.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Do notify userspace when there is change in uts_kern_table.
       [not found]   ` <CAOJFanVhC5AAzDVRmm9qFTj8wk5k-3svKQG3i5GGiGx=zqU5dw@mail.gmail.com>
@ 2012-04-19 14:51     ` Cyrill Gorcunov
  0 siblings, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2012-04-19 14:51 UTC (permalink / raw)
  To: Sasikanth babu
  Cc: Andrew Morton, Paul Gortmaker, Greg Kroah-Hartman, WANG Cong,
	linux-kernel

On Thu, Apr 19, 2012 at 08:04:30PM +0530, Sasikanth babu wrote:
> Any comments on this patch?.
> 

Dont top-post please. As I said, it's looks reasonable to me.
Now it's up to maintainers to decide if the patch should be
taken or not.

> > > Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
> >
> > Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
> >
> > Looks reasonable to me.
> >

	Cyrill

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-19 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 11:36 [PATCH] Do notify userspace when there is change in uts_kern_table Sasikantha babu
2012-04-04 11:54 ` Cyrill Gorcunov
     [not found]   ` <CAOJFanVhC5AAzDVRmm9qFTj8wk5k-3svKQG3i5GGiGx=zqU5dw@mail.gmail.com>
2012-04-19 14:51     ` Cyrill Gorcunov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.