diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hidp/core.c | 9 | ||||
-rw-r--r-- | net/bridge/br_multicast.c | 10 | ||||
-rw-r--r-- | net/can/proc.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_cong.c | 2 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/mac80211/driver-ops.h | 2 | ||||
-rw-r--r-- | net/netfilter/nf_log.c | 2 | ||||
-rw-r--r-- | net/nfc/llcp/sock.c | 4 | ||||
-rw-r--r-- | net/rfkill/core.c | 4 | ||||
-rw-r--r-- | net/sctp/endpointola.c | 2 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 2 |
11 files changed, 23 insertions, 18 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 0c0028463fa..b2bcbe2dc32 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -945,6 +945,13 @@ static int hidp_setup_hid(struct hidp_session *session, hid->hid_get_raw_report = hidp_get_raw_report; hid->hid_output_raw_report = hidp_output_raw_report; + /* True if device is blacklisted in drivers/hid/hid-core.c */ + if (hid_ignore(hid)) { + hid_destroy_device(session->hid); + session->hid = NULL; + return -ENODEV; + } + return 0; fault: @@ -1017,7 +1024,7 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, if (req->rd_size > 0) { err = hidp_setup_hid(session, req); - if (err) + if (err && err != -ENODEV) goto purge; } diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 977c3ee02e6..1093c89095d 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -622,7 +622,7 @@ out: struct net_bridge_port_group *br_multicast_new_port_group( struct net_bridge_port *port, struct br_ip *group, - struct net_bridge_port_group *next) + struct net_bridge_port_group __rcu *next) { struct net_bridge_port_group *p; @@ -632,7 +632,7 @@ struct net_bridge_port_group *br_multicast_new_port_group( p->addr = *group; p->port = port; - p->next = next; + rcu_assign_pointer(p->next, next); hlist_add_head(&p->mglist, &port->mglist); setup_timer(&p->timer, br_multicast_port_group_expired, (unsigned long)p); @@ -1138,7 +1138,7 @@ static int br_ip6_multicast_query(struct net_bridge *br, struct sk_buff *skb) { const struct ipv6hdr *ip6h = ipv6_hdr(skb); - struct mld_msg *mld = (struct mld_msg *) icmp6_hdr(skb); + struct mld_msg *mld; struct net_bridge_mdb_entry *mp; struct mld2_query *mld2q; struct net_bridge_port_group *p; @@ -1165,6 +1165,7 @@ static int br_ip6_multicast_query(struct net_bridge *br, if (max_delay) group = &mld->mld_mca; } else if (skb->len >= sizeof(*mld2q)) { + u16 mrc; if (!pskb_may_pull(skb, sizeof(*mld2q))) { err = -EINVAL; goto out; @@ -1172,7 +1173,8 @@ static int br_ip6_multicast_query(struct net_bridge *br, mld2q = (struct mld2_query *)icmp6_hdr(skb); if (!mld2q->mld2q_nsrcs) group = &mld2q->mld2q_mca; - max_delay = mld2q->mld2q_mrc ? MLDV2_MRC(mld2q->mld2q_mrc) : 1; + mrc = ntohs(mld2q->mld2q_mrc); + max_delay = mrc ? MLDV2_MRC(mrc) : 1; } if (!group) diff --git a/net/can/proc.c b/net/can/proc.c index 3b6dd318049..ae566902d2b 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -397,7 +397,7 @@ static inline void can_rcvlist_sff_proc_show_one(struct seq_file *m, int i; int all_empty = 1; - /* check wether at least one list is non-empty */ + /* check whether at least one list is non-empty */ for (i = 0; i < 0x800; i++) if (!hlist_empty(&d->rx_sff[i])) { all_empty = 0; diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index baf28611b33..291f2ed7cc3 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -1,7 +1,7 @@ /* * Plugable TCP congestion control support and newReno * congestion control. - * Based on ideas from I/O scheduler suport and Web100. + * Based on ideas from I/O scheduler support and Web100. * * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org> */ diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 4c02e6ab96e..f2a007b7bde 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -151,8 +151,8 @@ static inline int ndisc_opt_addr_space(struct net_device *dev) static u8 *ndisc_fill_addr_option(u8 *opt, int type, void *data, int data_len, unsigned short addr_type) { - int space = NDISC_OPT_SPACE(data_len); int pad = ndisc_addr_option_pad(addr_type); + int space = NDISC_OPT_SPACE(data_len + pad); opt[0] = type; opt[1] = space>>3; diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index c6560cc7a9d..698dc7e6f30 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -634,7 +634,7 @@ static inline void drv_reset_tsf(struct ieee80211_local *local, static inline int drv_tx_last_beacon(struct ieee80211_local *local) { - int ret = 0; /* default unsuported op for less congestion */ + int ret = 0; /* default unsupported op for less congestion */ might_sleep(); diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 703fb26aa48..9e312695c81 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -32,7 +32,7 @@ static struct nf_logger *__find_logger(int pf, const char *str_logger) return NULL; } -/* return EEXIST if the same logger is registred, 0 on success. */ +/* return EEXIST if the same logger is registered, 0 on success. */ int nf_log_register(u_int8_t pf, struct nf_logger *logger) { const struct nf_logger *llog; diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 0fa1e92ceac..fea22eb41b8 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c @@ -614,10 +614,6 @@ static int llcp_sock_sendmsg(struct kiocb *iocb, struct socket *sock, if (msg->msg_namelen < sizeof(*addr)) { release_sock(sk); - - pr_err("Invalid socket address length %d\n", - msg->msg_namelen); - return -EINVAL; } diff --git a/net/rfkill/core.c b/net/rfkill/core.c index a5c95274127..9b9be5279f5 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -676,7 +676,7 @@ static ssize_t rfkill_soft_store(struct device *dev, rfkill_set_block(rfkill, state); mutex_unlock(&rfkill_global_mutex); - return err ?: count; + return count; } static u8 user_state_from_blocked(unsigned long state) @@ -721,7 +721,7 @@ static ssize_t rfkill_state_store(struct device *dev, rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED); mutex_unlock(&rfkill_global_mutex); - return err ?: count; + return count; } static ssize_t rfkill_claim_show(struct device *dev, diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 32ab55b1828..17a001bac2c 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -163,7 +163,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, list_add(&null_key->key_list, &ep->endpoint_shared_keys); - /* Allocate and initialize transorms arrays for suported HMACs. */ + /* Allocate and initialize transorms arrays for supported HMACs. */ err = sctp_auth_init_hmacs(ep, gfp); if (err) goto nomem_hmacs; diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index ebcd1eedb11..618ec7e216c 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -4000,7 +4000,7 @@ static sctp_ierror_t sctp_sf_authenticate(struct net *net, chunk->subh.auth_hdr = auth_hdr; skb_pull(chunk->skb, sizeof(struct sctp_authhdr)); - /* Make sure that we suport the HMAC algorithm from the auth + /* Make sure that we support the HMAC algorithm from the auth * chunk. */ if (!sctp_auth_asoc_verify_hmac_id(asoc, auth_hdr->hmac_id)) |