Commit b94d525e58dc9638dd3f98094cb468bcfb262039

Authored by Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "Here is a quick pull request primarily meant to address the deconfig
  fallout from changing SCSI_NETLINK from being used via 'select' to
  being used via 'depends'.

  I applied a set of 5 patches written by Michal Marek, and then I
  carefully audited all of the remaining config files, basically:

   1) I scanned every arch config file, and if it mentioned CONFIG_INET
      or CONFIG_UNIX, I made sure it had CONFIG_NET=y

   2) After that, I scanned every arch config file, and if it did not
      have CONFIG_NET=y I made sure it did not reference any networking
      config options.

  Finally, we have some late breaking wireless fixes in here from John
  Linville and co"

[ And there's a sparc bpf fix snuck in too ]

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  sparc: bpf_jit: fix loads from negative offsets
  parisc: Update defconfigs which were missing CONFIG_NET.
  powerpc: Update defconfigs which were missing CONFIG_NET.
  s390: Update defconfigs which were missing CONFIG_NET.
  mips: Update some more defconfigs which were missing CONFIG_NET.
  sparc: Set CONFIG_NET=y in defconfigs
  sh: Set CONFIG_NET=y in defconfigs
  powerpc: Set CONFIG_NET=y in defconfigs
  parisc: Set CONFIG_NET=y in defconfigs
  mips: Set CONFIG_NET=y in defconfigs
  brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()
  ath9k: Fix NULL pointer dereference on early irq
  net: rfkill: gpio: Fix clock status
  NFC: st21nfca: Fix potential depmod dependency cycle
  NFC: st21nfcb: Fix depmod dependency cycle
  NFC: microread: Potential overflows in microread_target_discovered()

Showing 35 changed files Side-by-side Diff

arch/mips/configs/gpr_defconfig
... ... @@ -19,6 +19,7 @@
19 19 # CONFIG_BLK_DEV_BSG is not set
20 20 CONFIG_PCI=y
21 21 CONFIG_BINFMT_MISC=m
  22 +CONFIG_NET=y
22 23 CONFIG_PACKET=y
23 24 CONFIG_UNIX=y
24 25 CONFIG_INET=y
arch/mips/configs/ip27_defconfig
... ... @@ -28,6 +28,7 @@
28 28 CONFIG_MIPS32_O32=y
29 29 CONFIG_MIPS32_N32=y
30 30 CONFIG_PM=y
  31 +CONFIG_NET=y
31 32 CONFIG_PACKET=y
32 33 CONFIG_UNIX=y
33 34 CONFIG_XFRM_USER=m
arch/mips/configs/jazz_defconfig
... ... @@ -18,6 +18,7 @@
18 18 CONFIG_MODVERSIONS=y
19 19 CONFIG_BINFMT_MISC=m
20 20 CONFIG_PM=y
  21 +CONFIG_NET=y
21 22 CONFIG_PACKET=m
22 23 CONFIG_UNIX=y
23 24 CONFIG_NET_KEY=m
arch/mips/configs/loongson3_defconfig
... ... @@ -59,6 +59,7 @@
59 59 CONFIG_MIPS32_O32=y
60 60 CONFIG_MIPS32_N32=y
61 61 CONFIG_PM_RUNTIME=y
  62 +CONFIG_NET=y
62 63 CONFIG_PACKET=y
63 64 CONFIG_UNIX=y
64 65 CONFIG_XFRM_USER=y
arch/mips/configs/malta_defconfig
... ... @@ -19,6 +19,7 @@
19 19 CONFIG_MODVERSIONS=y
20 20 CONFIG_MODULE_SRCVERSION_ALL=y
21 21 CONFIG_PCI=y
  22 +CONFIG_NET=y
22 23 CONFIG_PACKET=y
23 24 CONFIG_UNIX=y
24 25 CONFIG_XFRM_USER=m
arch/mips/configs/malta_kvm_defconfig
... ... @@ -20,6 +20,7 @@
20 20 CONFIG_MODVERSIONS=y
21 21 CONFIG_MODULE_SRCVERSION_ALL=y
22 22 CONFIG_PCI=y
  23 +CONFIG_NET=y
23 24 CONFIG_PACKET=y
24 25 CONFIG_UNIX=y
25 26 CONFIG_XFRM_USER=m
arch/mips/configs/malta_kvm_guest_defconfig
... ... @@ -19,6 +19,7 @@
19 19 CONFIG_MODVERSIONS=y
20 20 CONFIG_MODULE_SRCVERSION_ALL=y
21 21 CONFIG_PCI=y
  22 +CONFIG_NET=y
22 23 CONFIG_PACKET=y
23 24 CONFIG_UNIX=y
24 25 CONFIG_XFRM_USER=m
arch/mips/configs/mtx1_defconfig
... ... @@ -27,6 +27,7 @@
27 27 CONFIG_I82092=m
28 28 CONFIG_BINFMT_MISC=m
29 29 CONFIG_PM=y
  30 +CONFIG_NET=y
30 31 CONFIG_PACKET=m
31 32 CONFIG_UNIX=y
32 33 CONFIG_XFRM_USER=m
arch/mips/configs/nlm_xlp_defconfig
... ... @@ -63,6 +63,7 @@
63 63 CONFIG_MIPS32_N32=y
64 64 CONFIG_PM_RUNTIME=y
65 65 CONFIG_PM_DEBUG=y
  66 +CONFIG_NET=y
66 67 CONFIG_PACKET=y
67 68 CONFIG_UNIX=y
68 69 CONFIG_XFRM_USER=m
arch/mips/configs/nlm_xlr_defconfig
... ... @@ -43,6 +43,7 @@
43 43 CONFIG_BINFMT_MISC=m
44 44 CONFIG_PM_RUNTIME=y
45 45 CONFIG_PM_DEBUG=y
  46 +CONFIG_NET=y
46 47 CONFIG_PACKET=y
47 48 CONFIG_UNIX=y
48 49 CONFIG_XFRM_USER=m
arch/mips/configs/rm200_defconfig
... ... @@ -20,6 +20,7 @@
20 20 CONFIG_PCI=y
21 21 CONFIG_BINFMT_MISC=m
22 22 CONFIG_PM=y
  23 +CONFIG_NET=y
23 24 CONFIG_PACKET=m
24 25 CONFIG_UNIX=y
25 26 CONFIG_NET_KEY=m
arch/parisc/configs/a500_defconfig
... ... @@ -31,6 +31,7 @@
31 31 CONFIG_I82092=m
32 32 # CONFIG_SUPERIO is not set
33 33 # CONFIG_CHASSIS_LCD_LED is not set
  34 +CONFIG_NET=y
34 35 CONFIG_PACKET=y
35 36 CONFIG_UNIX=y
36 37 CONFIG_XFRM_USER=m
arch/parisc/configs/c8000_defconfig
... ... @@ -33,6 +33,7 @@
33 33 # CONFIG_PDC_CHASSIS_WARN is not set
34 34 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
35 35 CONFIG_BINFMT_MISC=m
  36 +CONFIG_NET=y
36 37 CONFIG_PACKET=y
37 38 CONFIG_UNIX=y
38 39 CONFIG_XFRM_USER=m
arch/powerpc/configs/c2k_defconfig
... ... @@ -29,6 +29,7 @@
29 29 CONFIG_PCI_MSI=y
30 30 CONFIG_HOTPLUG_PCI=y
31 31 CONFIG_HOTPLUG_PCI_SHPC=m
  32 +CONFIG_NET=y
32 33 CONFIG_PACKET=y
33 34 CONFIG_UNIX=y
34 35 CONFIG_XFRM_USER=y
arch/powerpc/configs/pmac32_defconfig
... ... @@ -31,6 +31,7 @@
31 31 CONFIG_APM_EMULATION=y
32 32 CONFIG_PCCARD=m
33 33 CONFIG_YENTA=m
  34 +CONFIG_NET=y
34 35 CONFIG_PACKET=y
35 36 CONFIG_UNIX=y
36 37 CONFIG_XFRM_USER=y
arch/powerpc/configs/ppc64_defconfig
... ... @@ -58,6 +58,7 @@
58 58 CONFIG_HOTPLUG_PCI=y
59 59 CONFIG_HOTPLUG_PCI_RPA=m
60 60 CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
  61 +CONFIG_NET=y
61 62 CONFIG_PACKET=y
62 63 CONFIG_UNIX=y
63 64 CONFIG_XFRM_USER=m
arch/powerpc/configs/ppc64e_defconfig
... ... @@ -33,6 +33,7 @@
33 33 CONFIG_PCI_MSI=y
34 34 CONFIG_PCCARD=y
35 35 CONFIG_HOTPLUG_PCI=y
  36 +CONFIG_NET=y
36 37 CONFIG_PACKET=y
37 38 CONFIG_UNIX=y
38 39 CONFIG_XFRM_USER=m
arch/powerpc/configs/pseries_defconfig
... ... @@ -53,6 +53,7 @@
53 53 CONFIG_HOTPLUG_PCI=y
54 54 CONFIG_HOTPLUG_PCI_RPA=m
55 55 CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
  56 +CONFIG_NET=y
56 57 CONFIG_PACKET=y
57 58 CONFIG_UNIX=y
58 59 CONFIG_XFRM_USER=m
arch/powerpc/configs/pseries_le_defconfig
... ... @@ -55,6 +55,7 @@
55 55 CONFIG_HOTPLUG_PCI=y
56 56 CONFIG_HOTPLUG_PCI_RPA=m
57 57 CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
  58 +CONFIG_NET=y
58 59 CONFIG_PACKET=y
59 60 CONFIG_UNIX=y
60 61 CONFIG_XFRM_USER=m
arch/s390/configs/default_defconfig
... ... @@ -63,6 +63,7 @@
63 63 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
64 64 CONFIG_BINFMT_MISC=m
65 65 CONFIG_HIBERNATION=y
  66 +CONFIG_NET=y
66 67 CONFIG_PACKET=y
67 68 CONFIG_PACKET_DIAG=m
68 69 CONFIG_UNIX=y
arch/s390/configs/gcov_defconfig
... ... @@ -61,6 +61,7 @@
61 61 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
62 62 CONFIG_BINFMT_MISC=m
63 63 CONFIG_HIBERNATION=y
  64 +CONFIG_NET=y
64 65 CONFIG_PACKET=y
65 66 CONFIG_PACKET_DIAG=m
66 67 CONFIG_UNIX=y
arch/s390/configs/performance_defconfig
... ... @@ -59,6 +59,7 @@
59 59 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
60 60 CONFIG_BINFMT_MISC=m
61 61 CONFIG_HIBERNATION=y
  62 +CONFIG_NET=y
62 63 CONFIG_PACKET=y
63 64 CONFIG_PACKET_DIAG=m
64 65 CONFIG_UNIX=y
arch/s390/configs/zfcpdump_defconfig
... ... @@ -23,6 +23,7 @@
23 23 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
24 24 # CONFIG_SECCOMP is not set
25 25 # CONFIG_IUCV is not set
  26 +CONFIG_NET=y
26 27 CONFIG_ATM=y
27 28 CONFIG_ATM_LANE=y
28 29 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
... ... @@ -50,6 +50,7 @@
50 50 CONFIG_CRASH_DUMP=y
51 51 CONFIG_BINFMT_MISC=m
52 52 CONFIG_HIBERNATION=y
  53 +CONFIG_NET=y
53 54 CONFIG_PACKET=y
54 55 CONFIG_UNIX=y
55 56 CONFIG_NET_KEY=y
arch/sh/configs/sdk7780_defconfig
... ... @@ -30,6 +30,7 @@
30 30 CONFIG_PCCARD=y
31 31 CONFIG_YENTA=y
32 32 CONFIG_HOTPLUG_PCI=y
  33 +CONFIG_NET=y
33 34 CONFIG_PACKET=y
34 35 CONFIG_UNIX=y
35 36 CONFIG_INET=y
arch/sh/configs/sh2007_defconfig
... ... @@ -25,6 +25,7 @@
25 25 CONFIG_CMDLINE="console=ttySC1,115200 ip=dhcp root=/dev/nfs rw nfsroot=/nfs/rootfs,rsize=1024,wsize=1024 earlyprintk=sh-sci.1"
26 26 CONFIG_PCCARD=y
27 27 CONFIG_BINFMT_MISC=y
  28 +CONFIG_NET=y
28 29 CONFIG_PACKET=y
29 30 CONFIG_UNIX=y
30 31 CONFIG_XFRM_USER=y
arch/sparc/configs/sparc64_defconfig
... ... @@ -29,6 +29,7 @@
29 29 CONFIG_PCI_MSI=y
30 30 CONFIG_SUN_OPENPROMFS=m
31 31 CONFIG_BINFMT_MISC=m
  32 +CONFIG_NET=y
32 33 CONFIG_PACKET=y
33 34 CONFIG_UNIX=y
34 35 CONFIG_XFRM_USER=m
arch/sparc/net/bpf_jit_asm.S
... ... @@ -6,10 +6,12 @@
6 6 #define SAVE_SZ 176
7 7 #define SCRATCH_OFF STACK_BIAS + 128
8 8 #define BE_PTR(label) be,pn %xcc, label
  9 +#define SIGN_EXTEND(reg) sra reg, 0, reg
9 10 #else
10 11 #define SAVE_SZ 96
11 12 #define SCRATCH_OFF 72
12 13 #define BE_PTR(label) be label
  14 +#define SIGN_EXTEND(reg)
13 15 #endif
14 16  
15 17 #define SKF_MAX_NEG_OFF (-0x200000) /* SKF_LL_OFF from filter.h */
... ... @@ -135,6 +137,7 @@
135 137 save %sp, -SAVE_SZ, %sp; \
136 138 mov %i0, %o0; \
137 139 mov r_OFF, %o1; \
  140 + SIGN_EXTEND(%o1); \
138 141 call bpf_internal_load_pointer_neg_helper; \
139 142 mov (LEN), %o2; \
140 143 mov %o0, r_TMP; \
arch/sparc/net/bpf_jit_comp.c
... ... @@ -184,7 +184,7 @@
184 184 */
185 185 #define emit_alu_K(OPCODE, K) \
186 186 do { \
187   - if (K) { \
  187 + if (K || OPCODE == AND || OPCODE == MUL) { \
188 188 unsigned int _insn = OPCODE; \
189 189 _insn |= RS1(r_A) | RD(r_A); \
190 190 if (is_simm13(K)) { \
drivers/net/wireless/ath/ath9k/main.c
... ... @@ -513,7 +513,7 @@
513 513 * touch anything. Note this can happen early
514 514 * on if the IRQ is shared.
515 515 */
516   - if (test_bit(ATH_OP_INVALID, &common->op_flags))
  516 + if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
517 517 return IRQ_NONE;
518 518  
519 519 /* shared irq, not for us */
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
... ... @@ -4921,7 +4921,7 @@
4921 4921 struct brcmu_chan ch;
4922 4922 int i;
4923 4923  
4924   - for (i = 0; i <= total; i++) {
  4924 + for (i = 0; i < total; i++) {
4925 4925 ch.chspec = (u16)le32_to_cpu(chlist->element[i]);
4926 4926 cfg->d11inf.decchspec(&ch);
4927 4927  
drivers/nfc/microread/microread.c
... ... @@ -501,9 +501,13 @@
501 501 targets->sens_res =
502 502 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
503 503 targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
504   - memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
505   - skb->data[MICROREAD_EMCF_A_LEN]);
506 504 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
  505 + if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
  506 + r = -EINVAL;
  507 + goto exit_free;
  508 + }
  509 + memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
  510 + targets->nfcid1_len);
507 511 break;
508 512 case MICROREAD_GATE_ID_MREAD_ISO_A_3:
509 513 targets->supported_protocols =
510 514  
... ... @@ -511,9 +515,13 @@
511 515 targets->sens_res =
512 516 be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
513 517 targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
514   - memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
515   - skb->data[MICROREAD_EMCF_A3_LEN]);
516 518 targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
  519 + if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
  520 + r = -EINVAL;
  521 + goto exit_free;
  522 + }
  523 + memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
  524 + targets->nfcid1_len);
517 525 break;
518 526 case MICROREAD_GATE_ID_MREAD_ISO_B:
519 527 targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;
drivers/nfc/st21nfca/Makefile
... ... @@ -2,8 +2,9 @@
2 2 # Makefile for ST21NFCA HCI based NFC driver
3 3 #
4 4  
5   -st21nfca_i2c-objs = i2c.o
  5 +st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
  6 +obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o
6 7  
7   -obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o
  8 +st21nfca_i2c-objs = i2c.o
8 9 obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o
drivers/nfc/st21nfcb/Makefile
... ... @@ -2,8 +2,9 @@
2 2 # Makefile for ST21NFCB NCI based NFC driver
3 3 #
4 4  
5   -st21nfcb_i2c-objs = i2c.o
  5 +st21nfcb_nci-objs = ndlc.o st21nfcb.o
  6 +obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o
6 7  
7   -obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o
  8 +st21nfcb_i2c-objs = i2c.o
8 9 obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o
net/rfkill/rfkill-gpio.c
... ... @@ -54,7 +54,7 @@
54 54 if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
55 55 clk_disable(rfkill->clk);
56 56  
57   - rfkill->clk_enabled = blocked;
  57 + rfkill->clk_enabled = !blocked;
58 58  
59 59 return 0;
60 60 }