Merge branch 'devel' into for-linus
This commit is contained in:
@@ -938,10 +938,12 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
|
||||
char transport[16];
|
||||
int port;
|
||||
if (sscanf(buf, "%15s %4d", transport, &port) == 2) {
|
||||
if (port < 1 || port > 65535)
|
||||
return -EINVAL;
|
||||
err = nfsd_create_serv();
|
||||
if (!err) {
|
||||
err = svc_create_xprt(nfsd_serv,
|
||||
transport, port,
|
||||
transport, PF_INET, port,
|
||||
SVC_SOCK_ANONYMOUS);
|
||||
if (err == -ENOENT)
|
||||
/* Give a reasonable perror msg for
|
||||
@@ -960,7 +962,7 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
|
||||
char transport[16];
|
||||
int port;
|
||||
if (sscanf(&buf[1], "%15s %4d", transport, &port) == 2) {
|
||||
if (port == 0)
|
||||
if (port < 1 || port > 65535)
|
||||
return -EINVAL;
|
||||
if (nfsd_serv) {
|
||||
xprt = svc_find_xprt(nfsd_serv, transport,
|
||||
|
@@ -229,7 +229,6 @@ int nfsd_create_serv(void)
|
||||
|
||||
atomic_set(&nfsd_busy, 0);
|
||||
nfsd_serv = svc_create_pooled(&nfsd_program, nfsd_max_blksize,
|
||||
AF_INET,
|
||||
nfsd_last_thread, nfsd, THIS_MODULE);
|
||||
if (nfsd_serv == NULL)
|
||||
err = -ENOMEM;
|
||||
@@ -244,7 +243,7 @@ static int nfsd_init_socks(int port)
|
||||
if (!list_empty(&nfsd_serv->sv_permsocks))
|
||||
return 0;
|
||||
|
||||
error = svc_create_xprt(nfsd_serv, "udp", port,
|
||||
error = svc_create_xprt(nfsd_serv, "udp", PF_INET, port,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
if (error < 0)
|
||||
return error;
|
||||
@@ -253,7 +252,7 @@ static int nfsd_init_socks(int port)
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
error = svc_create_xprt(nfsd_serv, "tcp", port,
|
||||
error = svc_create_xprt(nfsd_serv, "tcp", PF_INET, port,
|
||||
SVC_SOCK_DEFAULTS);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user