Do notify userspace when there is change in uts_kern_table.
PATCH 1/1 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
--- kernel/sys.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/sys.c +2 -2
@@ -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; }
Signature · 1 line
1.7.3.4
Quoted 5 lines · Sasikantha babu
sethostname and setdomainname notifies userspace on failure (without modifying
uts_kern_table) tooNotify userspace if there is change in
uts_kern_table, on failure don't notify userspaceSigned-off-by Sasikantha babu <[email protected]>
Looks reasonable to me.
A message that is not in the archive (sent off-list or not yet received): CAOJFanVhC5AAzDVRmm9qFTj8wk5k-3svKQG3i5GGiGx=zqU5dw@mail.gmail.com
Quoted 2 lines · Sasikanth babu
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.
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Sasikantha babu <[email protected]>Reviewed-by Cyrill Gorcunov <[email protected]>Looks reasonable to me.
Cyrill