aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig1
-rw-r--r--net/bluetooth/hci_core.c9
-rw-r--r--net/core/netpoll.c1
-rw-r--r--net/core/utils.c22
-rw-r--r--net/ipv4/inet_fragment.c2
-rw-r--r--net/mac80211/main.c2
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c4
-rw-r--r--net/sunrpc/sched.c2
-rw-r--r--net/sunrpc/svc.c2
-rw-r--r--net/unix/af_unix.c3
10 files changed, 14 insertions, 34 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 2ddc9046868e..6dfe1c636a80 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -5,6 +5,7 @@
5menuconfig NET 5menuconfig NET
6 bool "Networking support" 6 bool "Networking support"
7 select NLATTR 7 select NLATTR
8 select GENERIC_NET_UTILS
8 ---help--- 9 ---help---
9 Unless you really know what you are doing, you should say Y here. 10 Unless you really know what you are doing, you should say Y here.
10 The reason is that some programs need kernel networking support even 11 The reason is that some programs need kernel networking support even
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ace5e55fe5a3..db7de80b88a2 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2211,16 +2211,15 @@ int hci_register_dev(struct hci_dev *hdev)
2211 list_add(&hdev->list, &hci_dev_list); 2211 list_add(&hdev->list, &hci_dev_list);
2212 write_unlock(&hci_dev_list_lock); 2212 write_unlock(&hci_dev_list_lock);
2213 2213
2214 hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND | 2214 hdev->workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND |
2215 WQ_MEM_RECLAIM, 1); 2215 WQ_MEM_RECLAIM, 1, hdev->name);
2216 if (!hdev->workqueue) { 2216 if (!hdev->workqueue) {
2217 error = -ENOMEM; 2217 error = -ENOMEM;
2218 goto err; 2218 goto err;
2219 } 2219 }
2220 2220
2221 hdev->req_workqueue = alloc_workqueue(hdev->name, 2221 hdev->req_workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND |
2222 WQ_HIGHPRI | WQ_UNBOUND | 2222 WQ_MEM_RECLAIM, 1, hdev->name);
2223 WQ_MEM_RECLAIM, 1);
2224 if (!hdev->req_workqueue) { 2223 if (!hdev->req_workqueue) {
2225 destroy_workqueue(hdev->workqueue); 2224 destroy_workqueue(hdev->workqueue);
2226 error = -ENOMEM; 2225 error = -ENOMEM;
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index cec074be8c43..35a9f0804b6f 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -12,6 +12,7 @@
12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 12#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
13 13
14#include <linux/moduleparam.h> 14#include <linux/moduleparam.h>
15#include <linux/kernel.h>
15#include <linux/netdevice.h> 16#include <linux/netdevice.h>
16#include <linux/etherdevice.h> 17#include <linux/etherdevice.h>
17#include <linux/string.h> 18#include <linux/string.h>
diff --git a/net/core/utils.c b/net/core/utils.c
index 3c7f5b51b979..aa88e23fc87a 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -338,25 +338,3 @@ void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb,
338 csum_unfold(*sum))); 338 csum_unfold(*sum)));
339} 339}
340EXPORT_SYMBOL(inet_proto_csum_replace16); 340EXPORT_SYMBOL(inet_proto_csum_replace16);
341
342int mac_pton(const char *s, u8 *mac)
343{
344 int i;
345
346 /* XX:XX:XX:XX:XX:XX */
347 if (strlen(s) < 3 * ETH_ALEN - 1)
348 return 0;
349
350 /* Don't dirty result unless string is valid MAC. */
351 for (i = 0; i < ETH_ALEN; i++) {
352 if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1]))
353 return 0;
354 if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':')
355 return 0;
356 }
357 for (i = 0; i < ETH_ALEN; i++) {
358 mac[i] = (hex_to_bin(s[i * 3]) << 4) | hex_to_bin(s[i * 3 + 1]);
359 }
360 return 1;
361}
362EXPORT_SYMBOL(mac_pton);
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 7e06641e36ae..cec539458307 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -93,7 +93,7 @@ void inet_frags_init(struct inet_frags *f)
93 } 93 }
94 rwlock_init(&f->lock); 94 rwlock_init(&f->lock);
95 95
96 f->rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ 96 f->rnd = (u32) ((totalram_pages ^ (totalram_pages >> 7)) ^
97 (jiffies ^ (jiffies >> 6))); 97 (jiffies ^ (jiffies >> 6)));
98 98
99 setup_timer(&f->secret_timer, inet_frag_secret_rebuild, 99 setup_timer(&f->secret_timer, inet_frag_secret_rebuild,
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 8a7bfc47d577..8eae74ac4e1e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -921,7 +921,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
921 hw->queues = IEEE80211_MAX_QUEUES; 921 hw->queues = IEEE80211_MAX_QUEUES;
922 922
923 local->workqueue = 923 local->workqueue =
924 alloc_ordered_workqueue(wiphy_name(local->hw.wiphy), 0); 924 alloc_ordered_workqueue("%s", 0, wiphy_name(local->hw.wiphy));
925 if (!local->workqueue) { 925 if (!local->workqueue) {
926 result = -ENOMEM; 926 result = -ENOMEM;
927 goto fail_workqueue; 927 goto fail_workqueue;
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 29b4ba93ab3c..b05ace4c5f12 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1330,7 +1330,7 @@ static int wait_for_gss_proxy(struct net *net, struct file *file)
1330static ssize_t write_gssp(struct file *file, const char __user *buf, 1330static ssize_t write_gssp(struct file *file, const char __user *buf,
1331 size_t count, loff_t *ppos) 1331 size_t count, loff_t *ppos)
1332{ 1332{
1333 struct net *net = PDE_DATA(file->f_path.dentry->d_inode); 1333 struct net *net = PDE_DATA(file_inode(file));
1334 char tbuf[20]; 1334 char tbuf[20];
1335 unsigned long i; 1335 unsigned long i;
1336 int res; 1336 int res;
@@ -1358,7 +1358,7 @@ static ssize_t write_gssp(struct file *file, const char __user *buf,
1358static ssize_t read_gssp(struct file *file, char __user *buf, 1358static ssize_t read_gssp(struct file *file, char __user *buf,
1359 size_t count, loff_t *ppos) 1359 size_t count, loff_t *ppos)
1360{ 1360{
1361 struct net *net = PDE_DATA(file->f_path.dentry->d_inode); 1361 struct net *net = PDE_DATA(file_inode(file));
1362 unsigned long p = *ppos; 1362 unsigned long p = *ppos;
1363 char tbuf[10]; 1363 char tbuf[10];
1364 size_t len; 1364 size_t len;
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 5356b120dbf8..77d251e02593 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -254,7 +254,7 @@ static int rpc_wait_bit_killable(void *word)
254{ 254{
255 if (fatal_signal_pending(current)) 255 if (fatal_signal_pending(current))
256 return -ERESTARTSYS; 256 return -ERESTARTSYS;
257 freezable_schedule(); 257 freezable_schedule_unsafe();
258 return 0; 258 return 0;
259} 259}
260 260
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 89a588b4478b..b974571126fe 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -740,7 +740,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
740 740
741 __module_get(serv->sv_module); 741 __module_get(serv->sv_module);
742 task = kthread_create_on_node(serv->sv_function, rqstp, 742 task = kthread_create_on_node(serv->sv_function, rqstp,
743 node, serv->sv_name); 743 node, "%s", serv->sv_name);
744 if (IS_ERR(task)) { 744 if (IS_ERR(task)) {
745 error = PTR_ERR(task); 745 error = PTR_ERR(task);
746 module_put(serv->sv_module); 746 module_put(serv->sv_module);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 826e09938bff..c4ce243824bb 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -114,6 +114,7 @@
114#include <linux/mount.h> 114#include <linux/mount.h>
115#include <net/checksum.h> 115#include <net/checksum.h>
116#include <linux/security.h> 116#include <linux/security.h>
117#include <linux/freezer.h>
117 118
118struct hlist_head unix_socket_table[2 * UNIX_HASH_SIZE]; 119struct hlist_head unix_socket_table[2 * UNIX_HASH_SIZE];
119EXPORT_SYMBOL_GPL(unix_socket_table); 120EXPORT_SYMBOL_GPL(unix_socket_table);
@@ -1879,7 +1880,7 @@ static long unix_stream_data_wait(struct sock *sk, long timeo,
1879 1880
1880 set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1881 set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
1881 unix_state_unlock(sk); 1882 unix_state_unlock(sk);
1882 timeo = schedule_timeout(timeo); 1883 timeo = freezable_schedule_timeout(timeo);
1883 unix_state_lock(sk); 1884 unix_state_lock(sk);
1884 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1885 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
1885 } 1886 }