forked from Minki/linux
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits) pkt_sched: Fix lockdep warning on est_tree_lock in gen_estimator ipvs: avoid oops for passive FTP Revert "sky2: don't do GRO on second port" gro: fix different skb headrooms bridge: Clear INET control block of SKBs passed into ip_fragment(). 3c59x: Remove incorrect locking; correct documented lock hierarchy sky2: don't do GRO on second port ipv4: minor fix about RPF in help of Kconfig xfrm_user: avoid a warning with some compiler net/sched/sch_hfsc.c: initialize parent's cl_cfmin properly in init_vf() pxa168_eth: fix a mdiobus leak net sched: fix kernel leak in act_police vhost: stop worker only if created MAINTAINERS: Add ehea driver as Supported ath9k_hw: fix parsing of HT40 5 GHz CTLs ath9k_hw: Fix EEPROM uncompress block reading on AR9003 wireless: register wiphy rfkill w/o holding cfg80211_mutex netlink: Make NETLINK_USERSOCK work again. irda: Correctly clean up self->ias_obj on irda_bind() failure. wireless extensions: fix kernel heap content leak ...
This commit is contained in:
commit
608307e6de
@ -2201,6 +2201,12 @@ L: linux-rdma@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/infiniband/hw/ehca/
|
||||
|
||||
EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER
|
||||
M: Breno Leitao <leitao@linux.vnet.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ehea/
|
||||
|
||||
EMBEDDED LINUX
|
||||
M: Paul Gortmaker <paul.gortmaker@windriver.com>
|
||||
M: Matt Mackall <mpm@selenic.com>
|
||||
@ -4603,7 +4609,7 @@ F: include/linux/preempt.h
|
||||
PRISM54 WIRELESS DRIVER
|
||||
M: "Luis R. Rodriguez" <mcgrof@gmail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
W: http://prism54.org
|
||||
W: http://wireless.kernel.org/en/users/Drivers/p54
|
||||
S: Obsolete
|
||||
F: drivers/net/wireless/prism54/
|
||||
|
||||
|
@ -647,7 +647,7 @@ struct vortex_private {
|
||||
u16 io_size; /* Size of PCI region (for release_region) */
|
||||
|
||||
/* Serialises access to hardware other than MII and variables below.
|
||||
* The lock hierarchy is rtnl_lock > lock > mii_lock > window_lock. */
|
||||
* The lock hierarchy is rtnl_lock > {lock, mii_lock} > window_lock. */
|
||||
spinlock_t lock;
|
||||
|
||||
spinlock_t mii_lock; /* Serialises access to MII */
|
||||
@ -2984,7 +2984,6 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
{
|
||||
int err;
|
||||
struct vortex_private *vp = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
pci_power_t state = 0;
|
||||
|
||||
if(VORTEX_PCI(vp))
|
||||
@ -2994,9 +2993,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
||||
|
||||
if(state != 0)
|
||||
pci_set_power_state(VORTEX_PCI(vp), PCI_D0);
|
||||
spin_lock_irqsave(&vp->lock, flags);
|
||||
err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL);
|
||||
spin_unlock_irqrestore(&vp->lock, flags);
|
||||
if(state != 0)
|
||||
pci_set_power_state(VORTEX_PCI(vp), state);
|
||||
|
||||
|
@ -1637,6 +1637,7 @@ static struct pcmcia_device_id pcnet_ids[] = {
|
||||
PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCETTX", 0x547e66dc, 0x6fc5459b),
|
||||
PCMCIA_DEVICE_PROD_ID12("iPort", "10/100 Ethernet Card", 0x56c538d2, 0x11b0ffc0),
|
||||
PCMCIA_DEVICE_PROD_ID12("KANSAI ELECTRIC CO.,LTD", "KLA-PCM/T", 0xb18dc3b4, 0xcc51a956),
|
||||
PCMCIA_DEVICE_PROD_ID12("KENTRONICS", "KEP-230", 0xaf8144c9, 0x868f6616),
|
||||
PCMCIA_DEVICE_PROD_ID12("KCI", "PE520 PCMCIA Ethernet Adapter", 0xa89b87d3, 0x1eb88e64),
|
||||
PCMCIA_DEVICE_PROD_ID12("KINGMAX", "EN10T2T", 0x7bcb459a, 0xa5c81fa5),
|
||||
PCMCIA_DEVICE_PROD_ID12("Kingston", "KNE-PC2", 0x1128e633, 0xce2a89b3),
|
||||
|
@ -1606,6 +1606,8 @@ static int pxa168_eth_remove(struct platform_device *pdev)
|
||||
|
||||
iounmap(pep->base);
|
||||
pep->base = NULL;
|
||||
mdiobus_unregister(pep->smi_bus);
|
||||
mdiobus_free(pep->smi_bus);
|
||||
unregister_netdev(dev);
|
||||
flush_scheduled_work();
|
||||
free_netdev(dev);
|
||||
|
@ -1327,6 +1327,10 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
|
||||
PCI_DMA_TODEVICE);
|
||||
|
||||
rate = ieee80211_get_tx_rate(sc->hw, info);
|
||||
if (!rate) {
|
||||
ret = -EINVAL;
|
||||
goto err_unmap;
|
||||
}
|
||||
|
||||
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
|
||||
flags |= AR5K_TXDESC_NOACK;
|
||||
|
@ -797,7 +797,7 @@ static bool ar9300_uncompress_block(struct ath_hw *ah,
|
||||
length = block[it+1];
|
||||
length &= 0xff;
|
||||
|
||||
if (length > 0 && spot >= 0 && spot+length < mdataSize) {
|
||||
if (length > 0 && spot >= 0 && spot+length <= mdataSize) {
|
||||
ath_print(common, ATH_DBG_EEPROM,
|
||||
"Restore at %d: spot=%d "
|
||||
"offset=%d length=%d\n",
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
#define SD_NO_CTL 0xE0
|
||||
#define NO_CTL 0xff
|
||||
#define CTL_MODE_M 7
|
||||
#define CTL_MODE_M 0xf
|
||||
#define CTL_11A 0
|
||||
#define CTL_11B 1
|
||||
#define CTL_11G 2
|
||||
|
@ -31,7 +31,6 @@ enum ctl_group {
|
||||
#define NO_CTL 0xff
|
||||
#define SD_NO_CTL 0xE0
|
||||
#define NO_CTL 0xff
|
||||
#define CTL_MODE_M 7
|
||||
#define CTL_11A 0
|
||||
#define CTL_11B 1
|
||||
#define CTL_11G 2
|
||||
|
@ -128,7 +128,7 @@ struct if_sdio_card {
|
||||
bool helper_allocated;
|
||||
bool firmware_allocated;
|
||||
|
||||
u8 buffer[65536];
|
||||
u8 buffer[65536] __attribute__((aligned(4)));
|
||||
|
||||
spinlock_t lock;
|
||||
struct if_sdio_packet *packets;
|
||||
|
@ -446,7 +446,7 @@ static void p54_rx_frame_sent(struct p54_common *priv, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
|
||||
(!payload->status))
|
||||
!(payload->status & P54_TX_FAILED))
|
||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
||||
if (payload->status & P54_TX_PSM_CANCELLED)
|
||||
info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
|
||||
|
@ -323,7 +323,10 @@ void vhost_dev_cleanup(struct vhost_dev *dev)
|
||||
dev->mm = NULL;
|
||||
|
||||
WARN_ON(!list_empty(&dev->work_list));
|
||||
kthread_stop(dev->worker);
|
||||
if (dev->worker) {
|
||||
kthread_stop(dev->worker);
|
||||
dev->worker = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz)
|
||||
|
@ -761,9 +761,11 @@ static int br_nf_dev_queue_xmit(struct sk_buff *skb)
|
||||
{
|
||||
if (skb->nfct != NULL && skb->protocol == htons(ETH_P_IP) &&
|
||||
skb->len + nf_bridge_mtu_reduction(skb) > skb->dev->mtu &&
|
||||
!skb_is_gso(skb))
|
||||
!skb_is_gso(skb)) {
|
||||
/* BUG: Should really parse the IP options here. */
|
||||
memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
|
||||
return ip_fragment(skb, br_dev_queue_push_xmit);
|
||||
else
|
||||
} else
|
||||
return br_dev_queue_push_xmit(skb);
|
||||
}
|
||||
#else
|
||||
|
@ -232,7 +232,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
|
||||
est->last_packets = bstats->packets;
|
||||
est->avpps = rate_est->pps<<10;
|
||||
|
||||
spin_lock(&est_tree_lock);
|
||||
spin_lock_bh(&est_tree_lock);
|
||||
if (!elist[idx].timer.function) {
|
||||
INIT_LIST_HEAD(&elist[idx].list);
|
||||
setup_timer(&elist[idx].timer, est_timer, idx);
|
||||
@ -243,7 +243,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
|
||||
|
||||
list_add_rcu(&est->list, &elist[idx].list);
|
||||
gen_add_node(est);
|
||||
spin_unlock(&est_tree_lock);
|
||||
spin_unlock_bh(&est_tree_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -270,7 +270,7 @@ void gen_kill_estimator(struct gnet_stats_basic_packed *bstats,
|
||||
{
|
||||
struct gen_estimator *e;
|
||||
|
||||
spin_lock(&est_tree_lock);
|
||||
spin_lock_bh(&est_tree_lock);
|
||||
while ((e = gen_find_node(bstats, rate_est))) {
|
||||
rb_erase(&e->node, &est_root);
|
||||
|
||||
@ -281,7 +281,7 @@ void gen_kill_estimator(struct gnet_stats_basic_packed *bstats,
|
||||
list_del_rcu(&e->list);
|
||||
call_rcu(&e->e_rcu, __gen_kill_estimator);
|
||||
}
|
||||
spin_unlock(&est_tree_lock);
|
||||
spin_unlock_bh(&est_tree_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(gen_kill_estimator);
|
||||
|
||||
@ -320,9 +320,9 @@ bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats,
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
spin_lock(&est_tree_lock);
|
||||
spin_lock_bh(&est_tree_lock);
|
||||
res = gen_find_node(bstats, rate_est) != NULL;
|
||||
spin_unlock(&est_tree_lock);
|
||||
spin_unlock_bh(&est_tree_lock);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -2573,6 +2573,10 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
|
||||
__copy_skb_header(nskb, skb);
|
||||
nskb->mac_len = skb->mac_len;
|
||||
|
||||
/* nskb and skb might have different headroom */
|
||||
if (nskb->ip_summed == CHECKSUM_PARTIAL)
|
||||
nskb->csum_start += skb_headroom(nskb) - headroom;
|
||||
|
||||
skb_reset_mac_header(nskb);
|
||||
skb_set_network_header(nskb, skb->mac_len);
|
||||
nskb->transport_header = (nskb->network_header +
|
||||
@ -2702,8 +2706,8 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
|
||||
} else if (skb_gro_len(p) != pinfo->gso_size)
|
||||
return -E2BIG;
|
||||
|
||||
headroom = skb_headroom(p);
|
||||
nskb = netdev_alloc_skb(p->dev, headroom + skb_gro_offset(p));
|
||||
headroom = NET_SKB_PAD + NET_IP_ALIGN;
|
||||
nskb = alloc_skb(headroom + skb_gro_offset(p), GFP_ATOMIC);
|
||||
if (unlikely(!nskb))
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -46,7 +46,7 @@ config IP_ADVANCED_ROUTER
|
||||
rp_filter on use:
|
||||
|
||||
echo 1 > /proc/sys/net/ipv4/conf/<device>/rp_filter
|
||||
and
|
||||
or
|
||||
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter
|
||||
|
||||
Note that some distributions enable it in startup scripts.
|
||||
|
@ -824,8 +824,8 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
|
||||
err = irda_open_tsap(self, addr->sir_lsap_sel, addr->sir_name);
|
||||
if (err < 0) {
|
||||
kfree(self->ias_obj->name);
|
||||
kfree(self->ias_obj);
|
||||
irias_delete_object(self->ias_obj);
|
||||
self->ias_obj = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -732,6 +732,12 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
/*
|
||||
* Now all work items will be gone, but the
|
||||
* timer might still be armed, so delete it
|
||||
*/
|
||||
del_timer_sync(&local->work_timer);
|
||||
|
||||
cancel_work_sync(&local->reconfig_filter);
|
||||
|
||||
ieee80211_clear_tx_pending(local);
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <linux/netfilter.h>
|
||||
#include <net/netfilter/nf_conntrack.h>
|
||||
#include <net/netfilter/nf_conntrack_expect.h>
|
||||
#include <net/netfilter/nf_nat.h>
|
||||
#include <net/netfilter/nf_nat_helper.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <net/protocol.h>
|
||||
@ -359,7 +360,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
|
||||
buf_len = strlen(buf);
|
||||
|
||||
ct = nf_ct_get(skb, &ctinfo);
|
||||
if (ct && !nf_ct_is_untracked(ct)) {
|
||||
if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) {
|
||||
/* If mangling fails this function will return 0
|
||||
* which will cause the packet to be dropped.
|
||||
* Mangling can only fail under memory pressure,
|
||||
|
@ -2102,6 +2102,26 @@ static void __net_exit netlink_net_exit(struct net *net)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __init netlink_add_usersock_entry(void)
|
||||
{
|
||||
unsigned long *listeners;
|
||||
int groups = 32;
|
||||
|
||||
listeners = kzalloc(NLGRPSZ(groups) + sizeof(struct listeners_rcu_head),
|
||||
GFP_KERNEL);
|
||||
if (!listeners)
|
||||
panic("netlink_add_usersock_entry: Cannot allocate listneres\n");
|
||||
|
||||
netlink_table_grab();
|
||||
|
||||
nl_table[NETLINK_USERSOCK].groups = groups;
|
||||
nl_table[NETLINK_USERSOCK].listeners = listeners;
|
||||
nl_table[NETLINK_USERSOCK].module = THIS_MODULE;
|
||||
nl_table[NETLINK_USERSOCK].registered = 1;
|
||||
|
||||
netlink_table_ungrab();
|
||||
}
|
||||
|
||||
static struct pernet_operations __net_initdata netlink_net_ops = {
|
||||
.init = netlink_net_init,
|
||||
.exit = netlink_net_exit,
|
||||
@ -2150,6 +2170,8 @@ static int __init netlink_proto_init(void)
|
||||
hash->rehash_time = jiffies;
|
||||
}
|
||||
|
||||
netlink_add_usersock_entry();
|
||||
|
||||
sock_register(&netlink_family_ops);
|
||||
register_pernet_subsys(&netlink_net_ops);
|
||||
/* The netlink device handler may be needed early. */
|
||||
|
@ -350,22 +350,19 @@ tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
|
||||
{
|
||||
unsigned char *b = skb_tail_pointer(skb);
|
||||
struct tcf_police *police = a->priv;
|
||||
struct tc_police opt;
|
||||
struct tc_police opt = {
|
||||
.index = police->tcf_index,
|
||||
.action = police->tcf_action,
|
||||
.mtu = police->tcfp_mtu,
|
||||
.burst = police->tcfp_burst,
|
||||
.refcnt = police->tcf_refcnt - ref,
|
||||
.bindcnt = police->tcf_bindcnt - bind,
|
||||
};
|
||||
|
||||
opt.index = police->tcf_index;
|
||||
opt.action = police->tcf_action;
|
||||
opt.mtu = police->tcfp_mtu;
|
||||
opt.burst = police->tcfp_burst;
|
||||
opt.refcnt = police->tcf_refcnt - ref;
|
||||
opt.bindcnt = police->tcf_bindcnt - bind;
|
||||
if (police->tcfp_R_tab)
|
||||
opt.rate = police->tcfp_R_tab->rate;
|
||||
else
|
||||
memset(&opt.rate, 0, sizeof(opt.rate));
|
||||
if (police->tcfp_P_tab)
|
||||
opt.peakrate = police->tcfp_P_tab->rate;
|
||||
else
|
||||
memset(&opt.peakrate, 0, sizeof(opt.peakrate));
|
||||
NLA_PUT(skb, TCA_POLICE_TBF, sizeof(opt), &opt);
|
||||
if (police->tcfp_result)
|
||||
NLA_PUT_U32(skb, TCA_POLICE_RESULT, police->tcfp_result);
|
||||
|
@ -761,8 +761,8 @@ init_vf(struct hfsc_class *cl, unsigned int len)
|
||||
if (f != cl->cl_f) {
|
||||
cl->cl_f = f;
|
||||
cftree_update(cl);
|
||||
update_cfmin(cl->cl_parent);
|
||||
}
|
||||
update_cfmin(cl->cl_parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -475,12 +475,10 @@ int wiphy_register(struct wiphy *wiphy)
|
||||
mutex_lock(&cfg80211_mutex);
|
||||
|
||||
res = device_add(&rdev->wiphy.dev);
|
||||
if (res)
|
||||
goto out_unlock;
|
||||
|
||||
res = rfkill_register(rdev->rfkill);
|
||||
if (res)
|
||||
goto out_rm_dev;
|
||||
if (res) {
|
||||
mutex_unlock(&cfg80211_mutex);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* set up regulatory info */
|
||||
wiphy_update_regulatory(wiphy, NL80211_REGDOM_SET_BY_CORE);
|
||||
@ -509,13 +507,18 @@ int wiphy_register(struct wiphy *wiphy)
|
||||
cfg80211_debugfs_rdev_add(rdev);
|
||||
mutex_unlock(&cfg80211_mutex);
|
||||
|
||||
/*
|
||||
* due to a locking dependency this has to be outside of the
|
||||
* cfg80211_mutex lock
|
||||
*/
|
||||
res = rfkill_register(rdev->rfkill);
|
||||
if (res)
|
||||
goto out_rm_dev;
|
||||
|
||||
return 0;
|
||||
|
||||
out_rm_dev:
|
||||
device_del(&rdev->wiphy.dev);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&cfg80211_mutex);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(wiphy_register);
|
||||
|
@ -1420,6 +1420,9 @@ int cfg80211_wext_giwessid(struct net_device *dev,
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
|
||||
data->flags = 0;
|
||||
data->length = 0;
|
||||
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
return cfg80211_ibss_wext_giwessid(dev, info, data, ssid);
|
||||
|
@ -782,6 +782,22 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd,
|
||||
}
|
||||
}
|
||||
|
||||
if (IW_IS_GET(cmd) && !(descr->flags & IW_DESCR_FLAG_NOMAX)) {
|
||||
/*
|
||||
* If this is a GET, but not NOMAX, it means that the extra
|
||||
* data is not bounded by userspace, but by max_tokens. Thus
|
||||
* set the length to max_tokens. This matches the extra data
|
||||
* allocation.
|
||||
* The driver should fill it with the number of tokens it
|
||||
* provided, and it may check iwp->length rather than having
|
||||
* knowledge of max_tokens. If the driver doesn't change the
|
||||
* iwp->length, this ioctl just copies back max_token tokens
|
||||
* filled with zeroes. Hopefully the driver isn't claiming
|
||||
* them to be valid data.
|
||||
*/
|
||||
iwp->length = descr->max_tokens;
|
||||
}
|
||||
|
||||
err = handler(dev, info, (union iwreq_data *) iwp, extra);
|
||||
|
||||
iwp->length += essid_compat;
|
||||
|
@ -1801,7 +1801,7 @@ static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
struct xfrm_user_expire *ue = nlmsg_data(nlh);
|
||||
struct xfrm_usersa_info *p = &ue->state;
|
||||
struct xfrm_mark m;
|
||||
u32 mark = xfrm_mark_get(attrs, &m);;
|
||||
u32 mark = xfrm_mark_get(attrs, &m);
|
||||
|
||||
x = xfrm_state_lookup(net, mark, &p->id.daddr, p->id.spi, p->id.proto, p->family);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user