Linux 3.0.35
Greg KH
maintainerI'm announcing the release of the 3.0.35 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/powerpc/kernel/module_32.c | 11 ++--- arch/x86/crypto/aesni-intel_asm.S | 6 ++- arch/x86/kernel/cpu/mcheck/mce_amd.c | 55 +++++++++++++++++++++++------ drivers/acpi/video.c | 5 +- drivers/char/agp/intel-agp.c | 1 drivers/char/agp/intel-agp.h | 1 drivers/hwmon/fam15h_power.c | 8 ++-- drivers/net/can/c_can/c_can.c | 16 ++++---- drivers/net/can/c_can/c_can.h | 1 drivers/net/e1000/e1000.h | 2 + drivers/net/e1000/e1000_main.c | 18 ++++----- drivers/net/usb/sierra_net.c | 14 +++++-- drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 2 - fs/fuse/dir.c | 1 fs/fuse/fuse_i.h | 3 + fs/fuse/inode.c | 17 ++++++++ kernel/sched.c | 9 +--- lib/btree.c | 4 +- mm/hugetlb.c | 29 ++++++++++++--- mm/vmalloc.c | 11 +++-- net/mac80211/iface.c | 12 ++++++ net/mac80211/offchannel.c | 16 ++++++++ net/wireless/util.c | 19 +++++++++- 24 files changed, 195 insertions(+), 68 deletions(-)
Alan Cox (1):
acpi_video: fix leaking PCI references
Andre Przywara (1):
hwmon: (fam15h_power) Increase output resolution
AnilKumar Ch (3):
can: c_can: fix "BUG! echo_skb is occupied!" during transmit
can: c_can: fix an interrupt thrash issue with c_can driver
can: c_can: fix race condition in c_can_open()
Bjørn Mork (1):
net: sierra_net: device IDs for Aircard 320U++
Borislav Petkov (1):
x86, MCE, AMD: Make APIC LVT thresholding interrupt optional
Dave Hansen (1):
hugetlb: fix resv_map leak in error path
Dean Nelson (1):
e1000: save skb counts in TX to avoid cache misses
Dimitri Sivanich (1):
sched: Fix the relax_domain_level boot parameter
Emmanuel Grumbach (1):
iwlwifi: don't mess up the SCD when removing a key
Eugeni Dodonov (1):
char/agp: add another Ironlake host bridge
Greg Kroah-Hartman (1):
Linux 3.0.35
Johannes Berg (2):
mac80211: clean up remain-on-channel on interface stop
cfg80211: fix interface combinations check
KyongHo (1):
mm: fix faulty initialization in vmalloc_init()
Mathias Krause (1):
crypto: aesni-intel - fix unaligned cbc decrypt for x86-32
Minchan Kim (1):
mm/vmalloc.c: change void* into explict vm_struct*
Pavel Shilovsky (1):
fuse: fix stat call on 32 bit platforms
Roland Dreier (1):
btree: fix tree corruption in btree_get_prev()
Steffen Rumler (1):
powerpc: Fix kernel panic during kernel module load
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 34 +SUBLEVEL = 35 EXTRAVERSION = NAME = Sneaky Weasel
arch/powerpc/kernel/module_32.c +5 -6
@@ -187,8 +187,8 @@ int apply_relocate(Elf32_Shdr *sechdrs,static inline int entry_matches (struct ppc_plt_entry *entry,Elf32_Addr val) { -if (entry->jump[0 ] ==0x3d600000 + ((val +0x8000 ) >>16 ) - && entry->jump[1 ] ==0x396b0000 + (val &0xffff )) +if (entry->jump[0 ] ==0x3d800000 + ((val +0x8000 ) >>16 ) + && entry->jump[1 ] ==0x398c0000 + (val &0xffff ))return 1 ;return 0 ; }
@@ -215,10 +215,9 @@ static uint32_t do_plt_call(void *location, entry++; } -/* Stolen from Paul Mackerras as well... */ - entry->jump[0 ] =0x3d600000 +((val+0x8000 )>>16 );/* lis r11,sym@ha */ - entry->jump[1 ] =0x396b0000 + (val&0xffff );/* addi r11,r11,sym@l*/ - entry->jump[2 ] =0x7d6903a6 ;/* mtctr r11 */ + entry->jump[0 ] =0x3d800000 +((val+0x8000 )>>16 );/* lis r12,sym@ha */ + entry->jump[1 ] =0x398c0000 + (val&0xffff );/* addi r12,r12,sym@l*/ + entry->jump[2 ] =0x7d8903a6 ;/* mtctr r12 */ entry->jump[3 ] =0x4e800420 ;/* bctr */ DEBUGP ("Initialized plt for 0x%x at %p\n" , val, entry);
arch/x86/crypto/aesni-intel_asm.S +4 -2
@@ -2460,10 +2460,12 @@ ENTRY(aesni_cbc_dec) pxor IN3, STATE4 movaps IN4, IV #else - pxor (INP), STATE2 - pxor 0x10(INP), STATE3 pxor IN1, STATE4 movaps IN2, IV + movups (INP), IN1 + pxor IN1, STATE2 + movups 0x10(INP), IN2 + pxor IN2, STATE3 #endif movups STATE1, (OUTP) movups STATE2, 0x10(OUTP)
arch/x86/kernel/cpu/mcheck/mce_amd.c +44 -11
105 lines not on this page · raw message
drivers/acpi/video.c +3 -2
@@ -1732,6 +1732,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)static int __init intel_opregion_present (void ) { +int i915 =0 ;#if defined(CONFIG_DRM_I915 ) || defined(CONFIG_DRM_I915_MODULE )struct pci_dev *dev =NULL ;u32 address;
@@ -1744,10 +1745,10 @@ static int __init intel_opregion_present(void)pci_read_config_dword (dev,0xfc , &address);if (!address)continue ; - return 1; + i915 = 1; }#endif -return 0 ; +return i915; }int acpi_video_register (void )
drivers/char/agp/intel-agp.c +1 -0
@@ -897,6 +897,7 @@ static struct pci_device_id agp_intel_pci_table[] = {ID (PCI_DEVICE_ID_INTEL_B43_HB ),ID (PCI_DEVICE_ID_INTEL_B43_1_HB ),ID (PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB ), +ID (PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB ),ID (PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB ),ID (PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB ), ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB),
drivers/char/agp/intel-agp.h +1 -0
@@ -211,6 +211,7 @@#define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30#define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB 0x0040 +#define PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB 0x0069#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG 0x0042#define PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB 0x0044#define PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB 0x0062
drivers/hwmon/fam15h_power.c +4 -4
@@ -61,14 +61,14 @@ static ssize_t show_power(struct device *dev, REG_TDP_RUNNING_AVERAGE, &val); running_avg_capture = (val >>4 ) &0x3fffff ; running_avg_capture =sign_extend32 (running_avg_capture,21 ); - running_avg_range = val &0xf ; + running_avg_range = (val &0xf ) +1 ;pci_bus_read_config_dword (f4->bus,PCI_DEVFN (PCI_SLOT (f4->devfn),5 ),REG_TDP_LIMIT3 , &val); tdp_limit = val >>16 ; - curr_pwr_watts = tdp_limit + data->base_tdp - - (s32)(running_avg_capture >> (running_avg_range +1 )); + curr_pwr_watts = (tdp_limit + data->base_tdp) << running_avg_range; + curr_pwr_watts -= running_avg_capture; curr_pwr_watts *= data->tdp_to_watts;/*
@@ -78,7 +78,7 @@ static ssize_t show_power(struct device *dev,* scaling factor 1/(2^16). For conversion we use * (10^6)/(2^16) = 15625/(2^10) */ - curr_pwr_watts = (curr_pwr_watts *15625 ) >>10 ; + curr_pwr_watts = (curr_pwr_watts *15625 ) >> (10 + running_avg_range);return sprintf (buf,"%u\n" , (unsigned int ) curr_pwr_watts); } static DEVICE_ATTR(power1_input, S_IRUGO, show_power, NULL);
drivers/net/can/c_can/c_can.c +9 -7
@@ -688,7 +688,7 @@ static int c_can_get_berr_counter(const struct net_device *dev,* * We iterate from priv->tx_echo to priv->tx_next and check if the * packet has been transmitted, echo it back to the CAN framework. -* If we discover a not yet transmitted package, stop looking for more. +* If we discover a not yet transmitted packet, stop looking for more. */ static void c_can_do_tx (struct net_device *dev) {
@@ -700,7 +700,7 @@ static void c_can_do_tx(struct net_device *dev)for (/* nix */ ; (priv->tx_next - priv->tx_echo) >0 ; priv->tx_echo++) { msg_obj_no =get_tx_echo_msg_obj (priv); val =c_can_read_reg32 (priv, &priv->regs->txrqst1); -if (!(val & (1 << msg_obj_no))) { +if (!(val & (1 << (msg_obj_no -1 )))) {can_get_echo_skb (dev, msg_obj_no -C_CAN_MSG_OBJ_TX_FIRST ); stats->tx_bytes += priv->read_reg(priv,
@@ -708,6 +708,8 @@ static void c_can_do_tx(struct net_device *dev) &IF_MCONT_DLC_MASK ; stats->tx_packets++;c_can_inval_msg_object (dev,0 , msg_obj_no); + }else { +break ; } }
@@ -952,7 +954,7 @@ static int c_can_poll(struct napi_struct *napi, int quota)struct net_device *dev = napi->dev;struct c_can_priv *priv =netdev_priv (dev); - irqstatus = priv->read_reg (priv, &priv->regs->interrupt); + irqstatus = priv->irqstatus;if (!irqstatus) goto end;
@@ -1030,12 +1032,11 @@ end:static irqreturn_t c_can_isr (int irq,void *dev_id) { -u16 irqstatus;struct net_device *dev = (struct net_device *)dev_id;struct c_can_priv *priv =netdev_priv (dev); - irqstatus = priv->read_reg (priv, &priv->regs->interrupt); -if (!irqstatus) + priv->irqstatus = priv->read_reg (priv, &priv->regs->interrupt); +if (!priv->irqstatus)return IRQ_NONE ;/* disable all interrupts and schedule the NAPI */
@@ -1065,10 +1066,11 @@ static int c_can_open(struct net_device *dev) goto exit_irq_fail; } +napi_enable (&priv->napi); +/* start the c_can controller */ c_can_start (dev); -napi_enable (&priv->napi);netif_start_queue (dev);return 0 ;
drivers/net/can/c_can/c_can.h +1 -0
@@ -76,6 +76,7 @@ struct c_can_priv {unsigned int tx_next;unsigned int tx_echo;void *priv;/* for board-specific data */ +u16 irqstatus; };struct net_device *alloc_c_can_dev (void );
drivers/net/e1000/e1000.h +2 -0
@@ -150,6 +150,8 @@ struct e1000_buffer {unsigned long time_stamp;u16 length;u16 next_to_watch; +unsigned int segs; +unsigned int bytecount;u16 mapped_as_page; };
drivers/net/e1000/e1000_main.c +9 -9
@@ -2798,7 +2798,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,struct e1000_buffer *buffer_info;unsigned int len =skb_headlen (skb);unsigned int offset =0 , size, count =0 , i; -unsigned int f; +unsigned int f, bytecount, segs; i = tx_ring->next_to_use;
@@ -2899,7 +2899,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter, } } + segs =skb_shinfo (skb)->gso_segs ?:1 ; +/* multiply data chunks by size of headers */ + bytecount = ((segs -1 ) *skb_headlen (skb)) + skb->len; + tx_ring->buffer_info[i].skb = skb; + tx_ring->buffer_info[i].segs = segs; + tx_ring->buffer_info[i].bytecount = bytecount; tx_ring->buffer_info[first].next_to_watch = i;return count;
@@ -3573,14 +3579,8 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter, cleaned = (i == eop);if (cleaned) { -struct sk_buff *skb = buffer_info->skb; -unsigned int segs, bytecount; - segs =skb_shinfo (skb)->gso_segs ?:1 ; -/* multiply data chunks by size of headers */ - bytecount = ((segs -1 ) *skb_headlen (skb)) + - skb->len; - total_tx_packets += segs; - total_tx_bytes += bytecount; + total_tx_packets += buffer_info->segs; + total_tx_bytes += buffer_info->bytecount; }e1000_unmap_and_free_tx_resource (adapter, buffer_info); tx_desc->upper.data =0 ;
drivers/net/usb/sierra_net.c +10 -4
@@ -943,7 +943,7 @@ struct sk_buff *sierra_net_tx_fixup(struct usbnet *dev, struct sk_buff *skb, }static const u8 sierra_net_ifnum_list[] = {7 ,10 ,11 }; -static const struct sierra_net_info_data sierra_net_info_data_68A3 = { +static const struct sierra_net_info_data sierra_net_info_data_direct_ip = { .rx_urb_size =8 *1024 , .whitelist = { .infolen =ARRAY_SIZE (sierra_net_ifnum_list),
@@ -951,7 +951,7 @@ static const struct sierra_net_info_data sierra_net_info_data_68A3 = { } }; -static const struct driver_info sierra_net_info_68A3 = { +static const struct driver_info sierra_net_info_direct_ip = { .description ="Sierra Wireless USB-to-WWAN Modem" , .flags =FLAG_WWAN |FLAG_SEND_ZLP , .bind = sierra_net_bind,
@@ -959,12 +959,18 @@ static const struct driver_info sierra_net_info_68A3 = { .status = sierra_net_status, .rx_fixup = sierra_net_rx_fixup, .tx_fixup = sierra_net_tx_fixup, - .data = (unsigned long)&sierra_net_info_data_68A3, + .data = (unsigned long)&sierra_net_info_data_direct_ip, };static const struct usb_device_id products[] = { {USB_DEVICE (0x1199 ,0x68A3 ),/* Sierra Wireless USB-to-WWAN modem */ - .driver_info = (unsigned long ) &sierra_net_info_68A3}, + .driver_info = (unsigned long ) &sierra_net_info_direct_ip}, + {USB_DEVICE (0x0F3D ,0x68A3 ),/* AT&T Direct IP modem */ + .driver_info = (unsigned long ) &sierra_net_info_direct_ip}, + {USB_DEVICE (0x1199 ,0x68AA ),/* Sierra Wireless Direct IP LTE modem */ + .driver_info = (unsigned long ) &sierra_net_info_direct_ip}, + {USB_DEVICE (0x0F3D ,0x68AA ),/* AT&T Direct IP LTE modem */ + .driver_info = (unsigned long ) &sierra_net_info_direct_ip}, {},/* last item */ };
drivers/net/wireless/iwlwifi/iwl-agn-sta.c +1 -1
@@ -477,7 +477,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, sizeof(struct iwl_keyinfo)); priv->stations[sta_id].sta.key.key_flags =STA_KEY_FLG_NO_ENC |STA_KEY_FLG_INVALID ; - priv->stations[sta_id].sta.key.key_offset =WEP_INVALID_OFFSET ; + priv->stations[sta_id].sta.key.key_offset = keyconf->hw_key_idx; priv->stations[sta_id].sta.sta.modify_mask =STA_MODIFY_KEY_MASK ; priv->stations[sta_id].sta.mode =STA_CONTROL_MODIFY_MSK ;
fs/fuse/dir.c +1 -0
@@ -858,6 +858,7 @@ int fuse_update_attributes(struct inode *inode, struct kstat *stat,if (stat) {generic_fillattr (inode, stat); stat->mode = fi->orig_i_mode; + stat->ino = fi->orig_ino; } }
fs/fuse/fuse_i.h +3 -0
@@ -82,6 +82,9 @@ struct fuse_inode {preserve the original mode */ mode_t orig_i_mode; +/** 64 bit inode number */ +u64 orig_ino; +/** Version of last attribute change */ u64 attr_version;
fs/fuse/inode.c +16 -1
@@ -91,6 +91,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb) fi->nlookup =0 ; fi->attr_version =0 ; fi->writectr =0 ; + fi->orig_ino =0 ;INIT_LIST_HEAD (&fi->write_files);INIT_LIST_HEAD (&fi->queued_writes);INIT_LIST_HEAD (&fi->writepages);
@@ -140,6 +141,18 @@ static int fuse_remount_fs(struct super_block *sb, int *flags, char *data)return 0 ; } +/* +* ino_t is 32-bits on 32-bit arch. We have to squash the 64-bit value down +* so that it will fit. +*/ +static ino_t fuse_squash_ino (u64 ino64) +{ +ino_t ino = (ino_t ) ino64; +if (sizeof (ino_t) <sizeof (u64)) + ino ^= ino64 >> (sizeof (u64) -sizeof (ino_t)) *8 ; +return ino; +} +void fuse_change_attributes_common (struct inode *inode,struct fuse_attr *attr,u64 attr_valid) {
@@ -149,7 +162,7 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr, fi->attr_version = ++fc->attr_version; fi->i_time = attr_valid; - inode->i_ino = attr->ino; + inode->i_ino =fuse_squash_ino (attr->ino); inode->i_mode = (inode->i_mode &S_IFMT ) | (attr->mode &07777 ); inode->i_nlink = attr->nlink; inode->i_uid = attr->uid;
@@ -175,6 +188,8 @@ void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr, fi->orig_i_mode = inode->i_mode;if (!(fc->flags &FUSE_DEFAULT_PERMISSIONS )) inode->i_mode &= ~S_ISVTX ; + + fi->orig_ino = attr->ino; } void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr,
kernel/sched.c +3 -6
@@ -7220,11 +7220,8 @@ int sched_domain_level_max;static int __init setup_relax_domain_level (char *str) { -unsigned long val; - - val =simple_strtoul (str,NULL ,0 ); -if (val < sched_domain_level_max) - default_relax_domain_level = val; +if (kstrtoint (str,0 , &default_relax_domain_level)) +pr_warn ("Unable to set relax_domain_level\n" );return 1 ; }
@@ -7417,7 +7414,6 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl,if (!sd)return child; -set_domain_attribute (sd, attr);cpumask_and (sched_domain_span (sd), cpu_map, tl->mask (cpu));if (child) { sd->level = child->level +1 ;
@@ -7425,6 +7421,7 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl, child->parent = sd; } sd->child = child; +set_domain_attribute (sd, attr);return sd; }
lib/btree.c +2 -2
@@ -319,8 +319,8 @@ void *btree_get_prev(struct btree_head *head, struct btree_geo *geo,if (head->height ==0 )return NULL ; -retry:longcpy (key, __key, geo->keylen); +retry:dec_key (geo, key); node = head->node;
@@ -351,7 +351,7 @@ retry: } miss:if (retry_key) { - __key = retry_key; +longcpy (key, retry_key, geo->keylen); retry_key =NULL ; goto retry; }
mm/hugetlb.c +23 -6
@@ -2060,6 +2060,15 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma)kref_get (&reservations->refs); } +static void resv_map_put (struct vm_area_struct *vma) +{ +struct resv_map *reservations =vma_resv_map (vma); + +if (!reservations) +return ; +kref_put (&reservations->refs, resv_map_release); +} +static void hugetlb_vm_op_close (struct vm_area_struct *vma) {struct hstate *h =hstate_vma (vma);
@@ -2075,7 +2084,7 @@ static void hugetlb_vm_op_close(struct vm_area_struct *vma) reserve = (end - start) -region_count (&reservations->regions, start, end); -kref_put (&reservations->refs, resv_map_release); +resv_map_put (vma);if (reserve) {hugetlb_acct_memory (h, -reserve);
@@ -2877,12 +2886,16 @@ int hugetlb_reserve_pages(struct inode *inode,set_vma_resv_flags (vma,HPAGE_RESV_OWNER ); } -if (chg <0 ) -return chg; +if (chg <0 ) { + ret = chg; + goto out_err; + }/* There must be enough filesystem quota for the mapping */ -if (hugetlb_get_quota (inode->i_mapping, chg)) -return -ENOSPC ; +if (hugetlb_get_quota (inode->i_mapping, chg)) { + ret = -ENOSPC ; + goto out_err; + }/* * Check enough hugepages are available for the reservation.
@@ -2891,7 +2904,7 @@ int hugetlb_reserve_pages(struct inode *inode, ret =hugetlb_acct_memory (h, chg);if (ret <0 ) {hugetlb_put_quota (inode->i_mapping, chg); -return ret; + goto out_err; }/*
@@ -2908,6 +2921,10 @@ int hugetlb_reserve_pages(struct inode *inode,if (!vma || vma->vm_flags &VM_MAYSHARE )region_add (&inode->i_mapping->private_list, from, to);return 0 ; +out_err: +if (vma) +resv_map_put (vma); +return ret; }void hugetlb_unreserve_pages (struct inode *inode,long offset,long freed)
mm/vmalloc.c +6 -5
@@ -256,7 +256,7 @@ struct vmap_area {struct rb_node rb_node;/* address sorted rbtree */ struct list_head list;/* address sorted list */ struct list_head purge_list;/* "lazy purge" list */ -void *private; +struct vm_struct *vm;struct rcu_head rcu_head; };
@@ -1174,9 +1174,10 @@ void __init vmalloc_init(void)/* Import existing vmlist entries. */ for (tmp = vmlist; tmp; tmp = tmp->next) { va =kzalloc (sizeof (struct vmap_area ),GFP_NOWAIT ); - va->flags = tmp->flags |VM_VM_AREA ; + va->flags =VM_VM_AREA ; va->va_start = (unsigned long )tmp->addr; va->va_end = va->va_start + tmp->size; + va->vm = tmp;__insert_vmap_area (va); }
@@ -1274,7 +1275,7 @@ static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, vm->addr = (void *)va->va_start; vm->size = va->va_end - va->va_start; vm->caller = caller; - va->private = vm; + va->vm = vm; va->flags |=VM_VM_AREA ; }
@@ -1397,7 +1398,7 @@ static struct vm_struct *find_vm_area(const void *addr) va =find_vmap_area ((unsigned long )addr);if (va && va->flags &VM_VM_AREA ) -return va->private; +return va->vm;return NULL ; }
@@ -1416,7 +1417,7 @@ struct vm_struct *remove_vm_area(const void *addr) va =find_vmap_area ((unsigned long )addr);if (va && va->flags &VM_VM_AREA ) { -struct vm_struct *vm = va->private; +struct vm_struct *vm = va->vm;if (!(vm->flags &VM_UNLIST )) {struct vm_struct *tmp, **p;
net/mac80211/iface.c +12 -0
@@ -498,6 +498,18 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,ieee80211_configure_filter (local);break ;default : +mutex_lock (&local->mtx); +if (local->hw_roc_dev == sdata->dev && + local->hw_roc_channel) { +/* ignore return value since this is racy */ +drv_cancel_remain_on_channel (local); +ieee80211_queue_work (&local->hw, &local->hw_roc_done); + } +mutex_unlock (&local->mtx); + +flush_work (&local->hw_roc_start); +flush_work (&local->hw_roc_done); +flush_work (&sdata->work);/* * When we get here, the interface is marked down.
net/mac80211/offchannel.c +16 -0
@@ -251,6 +251,22 @@ static void ieee80211_hw_roc_done(struct work_struct *work)return ; } +/* was never transmitted */ +if (local->hw_roc_skb) { +u64 cookie; + + cookie = local->hw_roc_cookie ^2 ; + +cfg80211_mgmt_tx_status (local->hw_roc_dev, cookie, + local->hw_roc_skb->data, + local->hw_roc_skb->len, false, +GFP_KERNEL ); + +kfree_skb (local->hw_roc_skb); + local->hw_roc_skb =NULL ; + local->hw_roc_skb_for_status =NULL ; + } +if (!local->hw_roc_for_tx) cfg80211_remain_on_channel_expired(local->hw_roc_dev, local->hw_roc_cookie,
net/wireless/util.c +18 -1
@@ -937,6 +937,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype) {struct wireless_dev *wdev_iter; +u32 used_iftypes =BIT (iftype);int num[NUM_NL80211_IFTYPES ];int total =1 ;int i, j;
@@ -970,12 +971,14 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, num[wdev_iter->iftype]++; total++; + used_iftypes |=BIT (wdev_iter->iftype); }mutex_unlock (&rdev->devlist_mtx);for (i =0 ; i < rdev->wiphy.n_iface_combinations; i++) {const struct ieee80211_iface_combination *c;struct ieee80211_iface_limit *limits; +u32 all_iftypes =0 ; c = &rdev->wiphy.iface_combinations[i];
@@ -990,6 +993,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,if (rdev->wiphy.software_iftypes &BIT (iftype))continue ;for (j =0 ; j < c->n_limits; j++) { + all_iftypes |= limits[j].types;if (!(limits[j].types &BIT (iftype)))continue ;if (limits[j].max < num[iftype])
@@ -997,7 +1001,20 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, limits[j].max -= num[iftype]; } } -/* yay, it fits */ + +/* +* Finally check that all iftypes that we're currently +* using are actually part of this combination. If they +* aren't then we can't use this combination and have +* to continue to the next. +*/ +if ((all_iftypes & used_iftypes) != used_iftypes) + goto cont; + +/* +* This combination covered all interface types and +* supported the requested numbers, so we're good. +*/ kfree (limits);return 0 ; cont: