Linux 3.0.59
Greg KH
maintainerI'm announcing the release of the 3.0.59 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/head_64.S | 2 arch/powerpc/kernel/time.c | 5 arch/powerpc/kvm/44x_emulate.c | 2 arch/x86/kernel/cpu/amd.c | 14 + drivers/acpi/scan.c | 7 drivers/ata/libata-core.c | 1 drivers/ata/libata-eh.c | 1 drivers/ata/libata-scsi.c | 6 drivers/ata/sata_promise.c | 15 + drivers/block/aoe/aoe.h | 2 drivers/block/aoe/aoeblk.c | 5 drivers/firewire/net.c | 13 - drivers/gpu/drm/i915/i915_reg.h | 2 drivers/gpu/drm/i915/intel_display.c | 6 drivers/gpu/drm/i915/intel_lvds.c | 8 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 8 drivers/infiniband/core/netlink.c | 2 drivers/infiniband/hw/nes/nes.h | 1 drivers/infiniband/hw/nes/nes_hw.c | 9 drivers/infiniband/hw/nes/nes_verbs.c | 9 drivers/md/dm-ioctl.c | 8 drivers/mfd/mfd-core.c | 15 + drivers/net/wimax/i2400m/i2400m-usb.h | 3 drivers/net/wimax/i2400m/usb.c | 6 drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h | 172 +++++++++---------- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 6 drivers/pci/intel-iommu.c | 11 - drivers/s390/cio/device_pgid.c | 10 - drivers/scsi/mvsas/mv_94xx.h | 14 - drivers/scsi/mvsas/mv_sas.h | 2 drivers/scsi/qla2xxx/qla_os.c | 4 drivers/staging/comedi/Kconfig | 1 drivers/staging/comedi/comedi_fops.c | 21 ++ drivers/staging/comedi/comedidev.h | 1 drivers/staging/comedi/drivers.c | 34 +-- drivers/staging/comedi/drivers/comedi_test.c | 2 drivers/staging/comedi/internal.h | 1 drivers/staging/rtl8712/usb_intf.c | 2 drivers/staging/speakup/synth.c | 4 drivers/staging/vt6656/dpc.c | 4 drivers/staging/vt6656/key.c | 53 +++-- drivers/staging/vt6656/key.h | 8 drivers/staging/vt6656/mac.c | 6 drivers/staging/vt6656/rf.c | 3 drivers/staging/vt6656/rxtx.c | 18 + drivers/staging/vt6656/ttype.h | 16 - drivers/staging/vt6656/wcmd.c | 20 +- drivers/staging/vt6656/wpa2.h | 4 drivers/target/tcm_fc/tfc_sess.c | 2 drivers/usb/class/cdc-acm.c | 3 drivers/usb/core/hub.c | 12 - drivers/usb/gadget/dummy_hcd.c | 9 drivers/usb/host/xhci-mem.c | 2 drivers/usb/serial/ftdi_sio.c | 2 drivers/usb/serial/ftdi_sio_ids.h | 6 drivers/usb/serial/option.c | 18 + drivers/video/mxsfb.c | 3 fs/eventpoll.c | 22 ++ fs/ext4/acl.c | 6 fs/ext4/extents.c | 22 +- fs/ext4/super.c | 4 fs/gfs2/lops.c | 18 - fs/gfs2/trans.c | 8 fs/jbd2/transaction.c | 3 fs/jffs2/nodemgmt.c | 6 fs/udf/inode.c | 11 - include/linux/if_link.h | 1 include/linux/netlink.h | 6 include/linux/rtnetlink.h | 3 include/net/rtnetlink.h | 7 kernel/trace/ring_buffer.c | 2 mm/compaction.c | 6 mm/huge_memory.c | 3 mm/memory.c | 18 + mm/page_alloc.c | 2 net/bridge/br_netlink.c | 15 + net/core/fib_rules.c | 6 net/core/neighbour.c | 11 - net/core/rtnetlink.c | 127 +++++++++++--- net/dcb/dcbnl.c | 4 net/decnet/dn_dev.c | 6 net/decnet/dn_fib.c | 4 net/decnet/dn_route.c | 5 net/ipv4/devinet.c | 6 net/ipv4/fib_frontend.c | 6 net/ipv4/inet_diag.c | 2 net/ipv4/ipmr.c | 3 net/ipv4/route.c | 2 net/ipv6/addrconf.c | 16 + net/ipv6/addrlabel.c | 9 net/ipv6/ip6_fib.c | 3 net/ipv6/ip6mr.c | 3 net/ipv6/route.c | 6 net/mac80211/sta_info.c | 2 net/netfilter/ipset/ip_set_core.c | 2 net/netfilter/nf_conntrack_netlink.c | 4 net/netlink/af_netlink.c | 17 + net/netlink/genetlink.c | 2 net/phonet/pn_netlink.c | 13 - net/sched/act_api.c | 7 net/sched/cls_api.c | 6 net/sched/sch_api.c | 12 - net/sunrpc/sched.c | 27 ++ net/xfrm/xfrm_user.c | 3 sound/arm/pxa2xx-ac97-lib.c | 8 sound/soc/codecs/wm2000.c | 4 107 files changed, 730 insertions(+), 385 deletions(-)
Aaron Lu (1):
libata: set dma_mode to 0xff in reset
Alasdair G Kergon (1):
dm ioctl: prevent unsafe change to dm_ioctl data_size
Alexander Graf (1):
KVM: PPC: 44x: fix DCR read/write
Alexey Khoroshilov (1):
jffs2: hold erase_completion_lock on exit
Andre Przywara (1):
x86, amd: Disable way access filter on Piledriver CPUs
Anton Blanchard (1):
powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build
Benjamin Marzinski (1):
GFS2: Test bufdata with buffer locked and gfs2_log_lock held
Bjørn Mork (2):
USB: option: blacklist network interface on ZTE MF880
USB: option: add Telekom Speedstick LTE II
Charles Keepax (1):
mfd: Only unregister platform devices allocated by the mfd core
Dan Williams (1):
i2400m: add Intel 6150 device IDs
Daniel Vetter (1):
Revert "drm/i915: no lvds quirk for Zotac ZDBOX SD ID12/ID13"
David Jeffery (1):
SCSI: qla2xxx: Test and clear FCPORT_UPDATE_NEEDED atomically.
David Rientjes (1):
thp, memcg: split hugepage for memcg oom on cow
Denis N Ladin (1):
USB: cdc-acm: Add support for "PSC Scanning, Magellan 800i"
Dzianis Kahanovich (1):
USB: option: add Nexpring NP10T terminal id
Ed L. Cashin (1):
aoe: do not call bdi_init after blk_alloc_queue
Eric Dumazet (1):
rtnetlink: fix rtnl_calcit() and rtnl_dump_ifinfo()
Eric Wong (1):
epoll: prevent missed events on EPOLL_CTL_MOD
Eugene Shatokhin (1):
ext4: fix memory leak in ext4_xattr_set_acl()'s error path
Felix Fietkau (1):
Revert "ath9k_hw: Update AR9003 high_power tx gain table"
Forrest Liu (1):
ext4: fix extent tree corruption caused by hole punch
Gabor Juhos (1):
ath9k: ar9003: fix OTP register offsets for AR9340
Greg Kroah-Hartman (1):
Linux 3.0.59
Greg Rose (2):
rtnetlink: Compute and store minimum ifinfo dump size
rtnetlink: Fix problem with buffer allocation
Ian Abbott (4):
staging: comedi: prevent auto-unconfig of manually configured devices
staging: comedi: comedi_test: fix race when cancelling command
staging: comedi: don't hijack hardware device private data
staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
Jan Kara (1):
jbd2: fix assertion failure in jbd2_journal_flush()
Jason Liu (1):
mm: compaction: fix echo 1 > compact_memory return error issue
Jerome Glisse (1):
radeon/kms: force rn50 chip to always report connected on analog output
Johannes Berg (1):
mac80211: use del_timer_sync for final sta cleanup timer deletion
Larry Finger (1):
staging: r8712u: Add new device ID
Laura Abbott (1):
mm: use aligned zone start for pfn_to_bitidx calculation
Lothar Waßmann (1):
video: mxsfb: fix crash when unblanking the display
Malcolm Priestley (6):
staging: vt6656: [BUG] out of bound array reference in RFbSetPower.
staging: vt6656: 64 bit fixes: use u32 for QWORD definition.
staging: vt6656: 64 bit fixes : correct all type sizes
staging: vt6656: 64 bit fixes: fix long warning messages.
staging: vt6656: 64bit fixes: key.c/h change unsigned long to u32
staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer.
Mark Brown (1):
ASoC: wm2000: Fix sense of speech clarity enable
Michael Tokarev (1):
ext4: do not try to write superblock on ro remount w/o journal
Mikael Pettersson (1):
sata_promise: fix hardreset lockdep error
Mike Dunn (1):
ALSA: pxa27x: fix ac97 cold reset
Namjae Jeon (2):
udf: fix memory leak while allocating blocks during write
udf: don't increment lenExtents while writing to a hole
Nickolai Zeldovich (1):
staging: speakup: avoid out-of-range access in synth_init()
Oliver Neukum (1):
USB: hub: handle claim of enabled remote wakeup after reset
Paulo Zanoni (1):
drm/i915: make the panel fitter work on pipes B and C on IVB
Quentin.Li (1):
USB: option: Add new MEDIATEK PID support
Samuel Thibault (1):
staging: speakup: avoid out-of-range access in synth_add()
Sarah Sharp (2):
USB: Increase reset timeout.
xhci: Handle HS bulk/ctrl endpoints that don't NAK.
Sebastian Andrzej Siewior (1):
usb: gadget: dummy: fix enumeration with g_multi
Sebastian Ott (1):
s390/cio: fix pgid reserved check
Shan Hai (1):
powerpc/vdso: Remove redundant locking in update_vsyscall_tz()
Stephan Gatzka (1):
firewire: net: Fix handling of fragmented multicast/broadcast packets.
Steven Rostedt (1):
ring-buffer: Fix race between integrity check and readers
Tatyana Nikolova (2):
RDMA/nes: Fix for crash when registering zero length MR for CQ RDMA/nes: Fix for terminate timer crash
Theodore Ts'o (1):
ext4: lock i_mutex when truncating orphan inodes
Tomasz Mloduchowski (1):
usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added
Trond Myklebust (1):
SUNRPC: Ensure that we free the rpc_task after cleanups are done
Woodhouse, David (1):
intel-iommu: Free old page tables before creating superpage
Xi Wang (1):
SCSI: mvsas: fix undefined bit shift
Xiaotian Feng (1):
libata: fix Null pointer dereference on disk error
Yi Zou (1):
target/tcm_fc: fix the lockdep warning due to inconsistent lock state
Zhang Rui (1):
ACPI : do not use Lid and Sleep button for S5 wakeup
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 58 +SUBLEVEL = 59 EXTRAVERSION = NAME = Sneaky Weasel
arch/powerpc/kernel/head_64.S +1 -1
@@ -425,7 +425,7 @@ _STATIC(__after_prom_start) tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */ #endif -#ifdef CONFIG_CRASH_DUMP +#ifdef CONFIG_RELOCATABLE /* * Check if the kernel has to be running as relocatable kernel based on the * variable __run_at_load, if it is set the kernel is treated as relocatable
arch/powerpc/kernel/time.c +0 -5
@@ -859,13 +859,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,void update_vsyscall_tz (void ) { -/* Make userspace gettimeofday spin until we're done. */ - ++vdso_data->tb_update_count; -smp_mb (); vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; vdso_data->tz_dsttime = sys_tz.tz_dsttime; -smp_mb (); - ++vdso_data->tb_update_count; }static void __init clocksource_init (void )
arch/powerpc/kvm/44x_emulate.c +2 -0
@@ -79,6 +79,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data =0 ; run->dcr.is_write =0 ; + vcpu->arch.dcr_is_write =0 ; vcpu->arch.io_gpr = rt; vcpu->arch.dcr_needed =1 ;kvmppc_account_exit (vcpu,DCR_EXITS );
@@ -100,6 +101,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data =kvmppc_get_gpr (vcpu, rs); run->dcr.is_write =1 ; + vcpu->arch.dcr_is_write =1 ; vcpu->arch.dcr_needed =1 ;kvmppc_account_exit (vcpu,DCR_EXITS ); emulated =EMULATE_DO_DCR ;
arch/x86/kernel/cpu/amd.c +14 -0
@@ -568,6 +568,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) } } +/* +* The way access filter has a performance penalty on some workloads. +* Disable it on the affected CPUs. +*/ +if ((c->x86 ==0x15 ) && + (c->x86_model >=0x02 ) && (c->x86_model <0x20 )) { +u64 val; + +if (!rdmsrl_safe (0xc0011021 , &val) && !(val &0x1E )) { + val |=0x1E ; +checking_wrmsrl (0xc0011021 , val); + } + } +cpu_detect_cache_sizes (c);/* Multi core CPU? */
drivers/acpi/scan.c +6 -1
@@ -789,8 +789,8 @@ acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,static void acpi_bus_set_run_wake_flags (struct acpi_device *device) {struct acpi_device_id button_device_ids[] = { - {"PNP0C0D" ,0 }, {"PNP0C0C" ,0 }, + {"PNP0C0D" ,0 }, {"PNP0C0E" ,0 }, {"" ,0 }, };
@@ -802,6 +802,11 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)/* Power button, Lid switch always enable wakeup */ if (!acpi_match_device_ids (device, button_device_ids)) { device->wakeup.flags.run_wake =1 ; +if (!acpi_match_device_ids (device, &button_device_ids[1 ])) { +/* Do not use Lid/sleep button for S5 wakeup */ +if (device->wakeup.sleep_state ==ACPI_STATE_S5 ) + device->wakeup.sleep_state =ACPI_STATE_S4 ; + }device_set_wakeup_capable (&device->dev, true);return ; }
drivers/ata/libata-core.c +1 -0
@@ -2543,6 +2543,7 @@ int ata_bus_probe(struct ata_port *ap)* bus as we may be talking too fast. */ dev->pio_mode =XFER_PIO_0 ; + dev->dma_mode =0xff ;/* If the controller has a pio mode setup function * then use it to set the chipset to rights. Don't
drivers/ata/libata-eh.c +1 -0
@@ -2602,6 +2602,7 @@ int ata_eh_reset(struct ata_link *link, int classify,* bus as we may be talking too fast. */ dev->pio_mode =XFER_PIO_0 ; + dev->dma_mode =0xff ;/* If the controller has a pio mode setup function * then use it to set the chipset to rights. Don't
drivers/ata/libata-scsi.c +4 -2
@@ -308,7 +308,8 @@ ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,struct ata_port *ap =ata_shost_to_port (sdev->host);struct ata_device *atadev =ata_scsi_find_dev (ap, sdev); -if (ap->ops->sw_activity_show && (ap->flags &ATA_FLAG_SW_ACTIVITY )) +if (atadev && ap->ops->sw_activity_show && + (ap->flags &ATA_FLAG_SW_ACTIVITY ))return ap->ops->sw_activity_show (atadev, buf);return -EINVAL ; }
@@ -323,7 +324,8 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,enum sw_activity val;int rc; -if (ap->ops->sw_activity_store && (ap->flags &ATA_FLAG_SW_ACTIVITY )) { +if (atadev && ap->ops->sw_activity_store && + (ap->flags &ATA_FLAG_SW_ACTIVITY )) { val =simple_strtoul (buf,NULL ,0 );switch (val) {case OFF :case BLINK_ON :case BLINK_OFF :
drivers/ata/sata_promise.c +13 -2
@@ -147,6 +147,10 @@ struct pdc_port_priv {dma_addr_t pkt_dma; }; +struct pdc_host_priv { +spinlock_t hard_reset_lock; +}; +static int pdc_sata_scr_read (struct ata_link *link,unsigned int sc_reg,u32 *val);static int pdc_sata_scr_write (struct ata_link *link,unsigned int sc_reg,u32 val);static int pdc_ata_init_one (struct pci_dev *pdev,const struct pci_device_id *ent);
@@ -801,9 +805,10 @@ static void pdc_hard_reset_port(struct ata_port *ap)void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR ];void __iomem *pcictl_b1_mmio = host_mmio +PDC_PCI_CTL +1 ;unsigned int ata_no =pdc_ata_port_to_ata_no (ap); +struct pdc_host_priv *hpriv = ap->host->private_data;u8 tmp; -spin_lock (&ap->host->lock); +spin_lock (&hpriv->hard_reset_lock); tmp =readb (pcictl_b1_mmio); tmp &= ~(0x10 << ata_no);
@@ -814,7 +819,7 @@ static void pdc_hard_reset_port(struct ata_port *ap)writeb (tmp, pcictl_b1_mmio);readb (pcictl_b1_mmio);/* flush */ -spin_unlock (&ap->host->lock); +spin_unlock (&hpriv->hard_reset_lock); } static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
@@ -1183,6 +1188,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev,const struct ata_port_info *pi = &pdc_port_info[ent->driver_data];const struct ata_port_info *ppi[PDC_MAX_PORTS ];struct ata_host *host; +struct pdc_host_priv *hpriv;void __iomem *host_mmio;int n_ports, i, rc;int is_sataii_tx4;
@@ -1220,6 +1226,11 @@ static int pdc_ata_init_one(struct pci_dev *pdev,dev_printk (KERN_ERR , &pdev->dev,"failed to allocate host\n" );return -ENOMEM ; } + hpriv =devm_kzalloc (&pdev->dev,sizeof *hpriv,GFP_KERNEL ); +if (!hpriv) +return -ENOMEM ; +spin_lock_init (&hpriv->hard_reset_lock); + host->private_data = hpriv; host->iomap =pcim_iomap_table (pdev); is_sataii_tx4 =pdc_is_sataii_tx4 (pi->flags);
drivers/block/aoe/aoe.h +1 -1
@@ -1,5 +1,5 @@/* Copyright (c) 2007 Coraid, Inc. See COPYING for GPL terms. */ -#define VERSION "47" +#define VERSION "47q"#define AOE_MAJOR 152#define DEVICE_NAME "aoe"
drivers/block/aoe/aoeblk.c +0 -5
@@ -277,8 +277,6 @@ aoeblk_gdalloc(void *vp) goto err_mempool;blk_queue_make_request (d->blkq, aoeblk_make_request); d->blkq->backing_dev_info.name ="aoe" ; -if (bdi_init (&d->blkq->backing_dev_info)) - goto err_blkq;spin_lock_irqsave (&d->lock, flags); gd->major =AOE_MAJOR ; gd->first_minor = d->sysminor *AOE_PARTITIONS ;
@@ -299,9 +297,6 @@ aoeblk_gdalloc(void *vp)aoedisk_add_sysfs (d);return ; -err_blkq: -blk_cleanup_queue (d->blkq); - d->blkq =NULL ; err_mempool:mempool_destroy (d->bufpool); err_disk:
drivers/firewire/net.c +9 -4
@@ -863,8 +863,8 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,if (specifier_id ==IANA_SPECIFIER_ID && ver ==RFC2734_SW_VERSION ) { buf_ptr +=2 ; length -=IEEE1394_GASP_HDR_SIZE ; -fwnet_incoming_packet (dev, buf_ptr, length, - source_node_id,-1 , true); +fwnet_incoming_packet (dev, buf_ptr, length, source_node_id, + context->card->generation, true); } packet.payload_length = dev->rcv_buffer_size;
@@ -959,7 +959,12 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)break ; } -skb_pull (skb, ptask->max_payload); +if (ptask->dest_node ==IEEE1394_ALL_NODES ) { +skb_pull (skb, + ptask->max_payload +IEEE1394_GASP_HDR_SIZE ); + }else { +skb_pull (skb, ptask->max_payload); + }if (ptask->outstanding_pkts >1 ) {fwnet_make_sf_hdr (&ptask->hdr,RFC2374_HDR_INTFRAG , dg_size, fg_off, datagram_label);
@@ -1062,7 +1067,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)smp_rmb (); node_id = dev->card->node_id; - p =skb_push (ptask->skb,8 ); + p =skb_push (ptask->skb,IEEE1394_GASP_HDR_SIZE );put_unaligned_be32 (node_id <<16 |IANA_SPECIFIER_ID >>8 , p);put_unaligned_be32 ((IANA_SPECIFIER_ID &0xff ) <<24 |RFC2734_SW_VERSION , &p[4 ]);
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -2754,6 +2754,8 @@#define _PFA_CTL_1 0x68080#define _PFB_CTL_1 0x68880#define PF_ENABLE (1<<31) +#define PF_PIPE_SEL_MASK_IVB (3<<29) +#define PF_PIPE_SEL_IVB (pipe) ((pipe)<<29)#define PF_FILTER_MASK (3<<23)#define PF_FILTER_PROGRAMMED (0<<23)#define PF_FILTER_MED_3x3 (1<<23)
drivers/gpu/drm/i915/intel_display.c +5 -1
@@ -2696,7 +2696,11 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)* as some pre-programmed values are broken, * e.g. x201. */ -I915_WRITE (PF_CTL (pipe),PF_ENABLE | PF_FILTER_MED_3x3); +if (IS_IVYBRIDGE (dev)) +I915_WRITE (PF_CTL (pipe),PF_ENABLE | PF_FILTER_MED_3x3 | +PF_PIPE_SEL_IVB (pipe)); +else +I915_WRITE (PF_CTL (pipe),PF_ENABLE | PF_FILTER_MED_3x3);I915_WRITE (PF_WIN_POS (pipe), dev_priv->pch_pf_pos);I915_WRITE (PF_WIN_SZ (pipe), dev_priv->pch_pf_size); }
drivers/gpu/drm/i915/intel_lvds.c +0 -8
@@ -753,14 +753,6 @@ static const struct dmi_system_id intel_no_lvds[] = { }, { .callback = intel_no_lvds_dmi_callback, - .ident = "ZOTAC ZBOXSD-ID12/ID13", - .matches = { -DMI_MATCH (DMI_BOARD_VENDOR ,"ZOTAC" ), - DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"), - }, - }, - { - .callback = intel_no_lvds_dmi_callback, .ident = "Gigabyte GA-D525TUD", .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +8 -0
@@ -617,6 +617,14 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_encenum drm_connector_status found = connector_status_disconnected;bool color = true; +/* just don't bother on RN50 those chip are often connected to remoting +* console hw and often we get failure to load detect those. So to make +* everyone happy report the encoder as always connected. +*/ +if (ASIC_IS_RN50 (rdev)) { +return connector_status_connected; + } +/* save the regs we need */ vclk_ecp_cntl =RREG32_PLL (RADEON_VCLK_ECP_CNTL ); crtc_ext_cntl =RREG32 (RADEON_CRTC_EXT_CNTL );
drivers/infiniband/core/netlink.c +1 -1
@@ -148,7 +148,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)return -EINVAL ;return netlink_dump_start (nls, skb, nlh, client->cb_table[op].dump, -NULL ); +NULL ,0 ); } }
drivers/infiniband/hw/nes/nes.h +1 -0
@@ -511,6 +511,7 @@ void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *);int nes_destroy_cqp (struct nes_device *);int nes_nic_cm_xmit (struct sk_buff *,struct net_device *);void nes_recheck_link_status (struct work_struct *work); +void nes_terminate_timeout (unsigned long context);/* nes_nic.c */ struct net_device *nes_netdev_init (struct nes_device *,void __iomem *);
drivers/infiniband/hw/nes/nes_hw.c +2 -7
@@ -75,7 +75,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,static void process_critical_error (struct nes_device *nesdev);static void nes_process_mac_intr (struct nes_device *nesdev,u32 mac_number);static unsigned int nes_reset_adapter_ne020 (struct nes_device *nesdev,u8 *OneG_Mode); -static void nes_terminate_timeout (unsigned long context);static void nes_terminate_start_timer (struct nes_qp *nesqp);#ifdef CONFIG_INFINIBAND_NES_DEBUG
@@ -3496,7 +3495,7 @@ static void nes_terminate_received(struct nes_device *nesdev, }/* Timeout routine in case terminate fails to complete */ -static void nes_terminate_timeout (unsigned long context) +void nes_terminate_timeout (unsigned long context) {struct nes_qp *nesqp = (struct nes_qp *)(unsigned long )context;
@@ -3506,11 +3505,7 @@ static void nes_terminate_timeout(unsigned long context)/* Set a timer in case hw cannot complete the terminate sequence */ static void nes_terminate_start_timer (struct nes_qp *nesqp) { -init_timer (&nesqp->terminate_timer); - nesqp->terminate_timer.function = nes_terminate_timeout; - nesqp->terminate_timer.expires = jiffies +HZ ; - nesqp->terminate_timer.data = (unsigned long )nesqp; -add_timer (&nesqp->terminate_timer); +mod_timer (&nesqp->terminate_timer, (jiffies +HZ )); }/**
drivers/infiniband/hw/nes/nes_verbs.c +8 -1
@@ -1414,6 +1414,9 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd, } nesqp->sig_all = (init_attr->sq_sig_type ==IB_SIGNAL_ALL_WR ); +init_timer (&nesqp->terminate_timer); + nesqp->terminate_timer.function = nes_terminate_timeout; + nesqp->terminate_timer.data = (unsigned long )nesqp;/* update the QP table */ nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN ] = nesqp;
@@ -1423,7 +1426,6 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,return &nesqp->ibqp; } -/** * nes_clean_cq */
@@ -2568,6 +2570,11 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,return ibmr;case IWNES_MEMREG_TYPE_QP :case IWNES_MEMREG_TYPE_CQ : +if (!region->length) { +nes_debug (NES_DBG_MR ,"Unable to register zero length region for CQ\n" ); +ib_umem_release (region); +return ERR_PTR (-EINVAL ); + } nespbl =kzalloc (sizeof (*nespbl),GFP_KERNEL );if (!nespbl) {nes_debug (NES_DBG_MR ,"Unable to allocate PBL\n" );
drivers/md/dm-ioctl.c +8 -0
@@ -1524,6 +1524,14 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)if (copy_from_user (dmi, user, tmp.data_size)) goto bad; +/* +* Abort if something changed the ioctl data while it was being copied. +*/ +if (dmi->data_size != tmp.data_size) { +DMERR ("rejecting ioctl: data size modified while processing parameters" ); + goto bad; + } +/* Wipe the user buffer so we do not return it to userspace */ if (secure_data &&clear_user (user, tmp.data_size)) goto bad;
drivers/mfd/mfd-core.c +13 -2
@@ -18,6 +18,10 @@#include <linux/pm_runtime.h> #include <linux/slab.h> +static struct device_type mfd_dev_type = { + .name ="mfd_device" , +}; +int mfd_cell_enable (struct platform_device *pdev) {const struct mfd_cell *cell =mfd_get_cell (pdev);
@@ -87,6 +91,7 @@ static int mfd_add_device(struct device *parent, int id, goto fail_device; pdev->dev.parent = parent; + pdev->dev.type = &mfd_dev_type;if (cell->pdata_size) { ret = platform_device_add_data(pdev,
@@ -182,10 +187,16 @@ EXPORT_SYMBOL(mfd_add_devices);static int mfd_remove_devices_fn (struct device *dev,void *c) { -struct platform_device *pdev =to_platform_device (dev); -const struct mfd_cell *cell =mfd_get_cell (pdev); +struct platform_device *pdev; +const struct mfd_cell *cell;atomic_t **usage_count = c; +if (dev->type != &mfd_dev_type) +return 0 ; + + pdev =to_platform_device (dev); + cell =mfd_get_cell (pdev); +/* find the base address of usage_count pointers (for freeing) */ if (!*usage_count || (cell->usage_count < *usage_count)) *usage_count = cell->usage_count;
drivers/net/wimax/i2400m/i2400m-usb.h +3 -0
@@ -152,6 +152,9 @@ enum {/* Device IDs */ USB_DEVICE_ID_I6050 =0x0186 ,USB_DEVICE_ID_I6050_2 =0x0188 , +USB_DEVICE_ID_I6150 =0x07d6 , +USB_DEVICE_ID_I6150_2 =0x07d7 , +USB_DEVICE_ID_I6150_3 =0x07d9 , USB_DEVICE_ID_I6250 = 0x0187, };
drivers/net/wimax/i2400m/usb.c +6 -0
@@ -491,6 +491,9 @@ int i2400mu_probe(struct usb_interface *iface,switch (id->idProduct) {case USB_DEVICE_ID_I6050 :case USB_DEVICE_ID_I6050_2 : +case USB_DEVICE_ID_I6150 : +case USB_DEVICE_ID_I6150_2 : +case USB_DEVICE_ID_I6150_3 :case USB_DEVICE_ID_I6250 : i2400mu->i6050 =1 ;break ;
@@ -740,6 +743,9 @@ staticstruct usb_device_id i2400mu_id_table[] = { {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6050 ) }, {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6050_2 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150_2 ) }, + {USB_DEVICE (0x8087 ,USB_DEVICE_ID_I6150_3 ) }, {USB_DEVICE (0x8086 ,USB_DEVICE_ID_I6250 ) }, {USB_DEVICE (0x8086 ,0x0181 ) }, {USB_DEVICE (0x8086 ,0x1403 ) },
drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h +86 -86
184 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +3 -3
@@ -69,13 +69,13 @@#define AR9300_BASE_ADDR 0x3ff#define AR9300_BASE_ADDR_512 0x1ff -#define AR9300_OTP_BASE 0x14000 -#define AR9300_OTP_STATUS 0x15f18 +#define AR9300_OTP_BASE (AR_SREV_9340(ah) ? 0x30000 : 0x14000) +#define AR9300_OTP_STATUS (AR_SREV_9340(ah) ? 0x30018 : 0x15f18)#define AR9300_OTP_STATUS_TYPE 0x7#define AR9300_OTP_STATUS_VALID 0x4#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2#define AR9300_OTP_STATUS_SM_BUSY 0x1 -#define AR9300_OTP_READ_DATA 0x15f1c +#define AR9300_OTP_READ_DATA (AR_SREV_9340(ah) ? 0x3001c : 0x15f1c)enum targetPowerHTRates {HT_TARGET_RATE_0_8_16 ,
drivers/pci/intel-iommu.c +9 -2
@@ -1793,10 +1793,17 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,if (!pte)return -ENOMEM ;/* It is large page*/ -if (largepage_lvl >1 ) +if (largepage_lvl >1 ) { pteval |=DMA_PTE_LARGE_PAGE ; -else +/* Ensure that old small page tables are removed to make room +for superpage, if they exist. */ +dma_pte_clear_range (domain, iov_pfn, + iov_pfn +lvl_to_nr_pages (largepage_lvl) -1 ); +dma_pte_free_pagetable (domain, iov_pfn, + iov_pfn +lvl_to_nr_pages (largepage_lvl) -1 ); + }else { pteval &= ~(uint64_t )DMA_PTE_LARGE_PAGE ; + } }/* We don't need lock here, nobody else
drivers/s390/cio/device_pgid.c +5 -5
@@ -234,7 +234,7 @@ static int pgid_cmp(struct pgid *p1, struct pgid *p2)* Determine pathgroup state from PGID data. */ static void pgid_analyze (struct ccw_device *cdev,struct pgid **p, -int *mismatch,int *reserved,u8 *reset) +int *mismatch,u8 *reserved,u8 *reset) {struct pgid *pgid = &cdev->private->pgid[0 ];struct pgid *first =NULL ;
@@ -248,7 +248,7 @@ static void pgid_analyze(struct ccw_device *cdev, struct pgid **p,if ((cdev->private->pgid_valid_mask & lpm) ==0 )continue ;if (pgid->inf.ps.state2 ==SNID_STATE2_RESVD_ELSE ) - *reserved =1 ; + *reserved |= lpm;if (pgid_is_reset (pgid)) { *reset |= lpm;continue ;
@@ -316,14 +316,14 @@ static void snid_done(struct ccw_device *cdev, int rc)struct subchannel *sch =to_subchannel (cdev->dev.parent);struct pgid *pgid;int mismatch =0 ; -int reserved =0 ; +u8 reserved =0 ;u8 reset =0 ;u8 donepm;if (rc) goto out;pgid_analyze (cdev, &pgid, &mismatch, &reserved, &reset); -if (reserved) +if (reserved == cdev->private->pgid_valid_mask) rc = -EUSERS ;else if (mismatch) rc = -EOPNOTSUPP ;
@@ -336,7 +336,7 @@ static void snid_done(struct ccw_device *cdev, int rc) } out:CIO_MSG_EVENT (2 ,"snid: device 0.%x.%04x: rc=%d pvm=%02x vpm=%02x " -"todo=%02x mism=%d rsvd=%d reset=%02x\n" , id->ssid, +"todo=%02x mism=%d rsvd=%02x reset=%02x\n" , id->ssid, id->devno, rc, cdev->private->pgid_valid_mask, sch->vpm, cdev->private->pgid_todo_mask, mismatch, reserved, reset);switch (rc) {
drivers/scsi/mvsas/mv_94xx.h +2 -12
@@ -193,21 +193,11 @@ struct mvs_prd {#define SPI_ADDR_VLD_94XX (1U << 1)#define SPI_CTRL_SpiStart_94XX (1U << 0) -#define mv_ffc (x) ffz(x) -static inline int mv_ffc64 (u64 v) { -int i; - i =mv_ffc ((u32 )v); -if (i >=0 ) -return i; - i =mv_ffc ((u32)(v>>32 )); - -if (i !=0 ) -return 32 + i; - -return -1 ; +u64 x = ~v; +return x ?__ffs64 (x) :-1 ; }#define r_reg_set_enable (i) \
drivers/scsi/mvsas/mv_sas.h +1 -1
@@ -73,7 +73,7 @@ extern struct kmem_cache *mvs_task_list_cache;#define DEV_IS_EXPANDER (type) \ ((type == EDGE_DEV) || (type == FANOUT_DEV)) -#define bit (n) ((u32)1 << n) +#define bit (n) ((u64)1 << n)#define for_each_phy (__lseq_mask, __mc, __lseq) \ for ((__mc) = (__lseq_mask), (__lseq) = 0; \
drivers/scsi/qla2xxx/qla_os.c +2 -2
@@ -3406,9 +3406,9 @@ qla2x00_do_dpc(void *data) base_vha->host_no)); } -if (test_bit (FCPORT_UPDATE_NEEDED , &base_vha->dpc_flags)) { +if (test_and_clear_bit (FCPORT_UPDATE_NEEDED , + &base_vha->dpc_flags)) {qla2x00_update_fcports (base_vha); -clear_bit (FCPORT_UPDATE_NEEDED , &base_vha->dpc_flags); }if (test_bit (ISP_QUIESCE_NEEDED , &base_vha->dpc_flags)) {
drivers/staging/comedi/Kconfig +1 -0
@@ -424,6 +424,7 @@ config COMEDI_ADQ12B config COMEDI_NI_AT_A2150 tristate "NI AT-A2150 ISA card support" + select COMEDI_FC depends on COMEDI_NI_COMMON depends on VIRT_TO_BUS default N
drivers/staging/comedi/comedi_fops.c +21 -0
@@ -138,6 +138,9 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,if (cmd ==COMEDI_DEVCONFIG ) { rc =do_devconfig_ioctl (dev, (struct comedi_devconfig __user *)arg); +if (rc ==0 ) +/* Evade comedi_auto_unconfig(). */ + dev_file_info->hardware_device =NULL ; goto done; }
@@ -2207,6 +2210,7 @@ int comedi_alloc_board_minor(struct device *hardware_device)kfree (info);return -ENOMEM ; } + info->hardware_device = hardware_device;comedi_device_init (info->device);spin_lock_irqsave (&comedi_file_info_table_lock, flags);for (i =0 ; i <COMEDI_NUM_BOARD_MINORS ; ++i) {
@@ -2296,6 +2300,23 @@ void comedi_free_board_minor(unsigned minor) } } +int comedi_find_board_minor (struct device *hardware_device) +{ +int minor; +struct comedi_device_file_info *info; + +for (minor =0 ; minor <COMEDI_NUM_BOARD_MINORS ; minor++) { +spin_lock (&comedi_file_info_table_lock); + info = comedi_file_info_table[minor]; +if (info && info->hardware_device == hardware_device) { +spin_unlock (&comedi_file_info_table_lock); +return minor; + } +spin_unlock (&comedi_file_info_table_lock); + } +return -ENODEV ; +} +int comedi_alloc_subdevice_minor (struct comedi_device *dev,struct comedi_subdevice *s) {
drivers/staging/comedi/comedidev.h +1 -0
@@ -237,6 +237,7 @@ struct comedi_device_file_info {struct comedi_device *device;struct comedi_subdevice *read_subdevice;struct comedi_subdevice *write_subdevice; +struct device *hardware_device; };#ifdef CONFIG_COMEDI_DEBUG
drivers/staging/comedi/drivers.c +10 -24
@@ -819,25 +819,14 @@ static int comedi_auto_config(struct device *hardware_device,int minor;struct comedi_device_file_info *dev_file_info;int retval; -unsigned *private_data =NULL ; -if (!comedi_autoconfig) { -dev_set_drvdata (hardware_device,NULL ); +if (!comedi_autoconfig)return 0 ; - } minor =comedi_alloc_board_minor (hardware_device);if (minor <0 )return minor; - private_data =kmalloc (sizeof (unsigned ),GFP_KERNEL ); -if (private_data ==NULL ) { - retval = -ENOMEM ; - goto cleanup; - } - *private_data = minor; -dev_set_drvdata (hardware_device, private_data); - dev_file_info =comedi_get_device_file_info (minor);memset (&it,0 ,sizeof (it));
@@ -850,25 +839,22 @@ static int comedi_auto_config(struct device *hardware_device, retval =comedi_device_attach (dev_file_info->device, &it);mutex_unlock (&dev_file_info->device->mutex); -cleanup: -if (retval <0 ) { -kfree (private_data); +if (retval <0 )comedi_free_board_minor (minor); - }return retval; }static void comedi_auto_unconfig (struct device *hardware_device) { -unsigned *minor = (unsigned *)dev_get_drvdata (hardware_device); -if (minor ==NULL ) -return ; - -BUG_ON (*minor >=COMEDI_NUM_BOARD_MINORS ); +int minor; -comedi_free_board_minor (*minor); -dev_set_drvdata (hardware_device,NULL ); -kfree (minor); +if (hardware_device ==NULL ) +return ; + minor =comedi_find_board_minor (hardware_device); +if (minor <0 ) +return ; +BUG_ON (minor >=COMEDI_NUM_BOARD_MINORS ); +comedi_free_board_minor (minor); }int comedi_pci_auto_config (struct pci_dev *pcidev,const char *board_name)
drivers/staging/comedi/drivers/comedi_test.c +1 -1
@@ -461,7 +461,7 @@ static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s) { devpriv->timer_running =0 ; -del_timer (&devpriv->timer); +del_timer_sync (&devpriv->timer);return 0 ; }
drivers/staging/comedi/internal.h +1 -0
@@ -7,6 +7,7 @@ int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);int comedi_alloc_board_minor (struct device *hardware_device);void comedi_free_board_minor (unsigned minor); +int comedi_find_board_minor (struct device *hardware_device);void comedi_reset_async_buf (struct comedi_async *async);int comedi_buf_alloc (struct comedi_device *dev,struct comedi_subdevice *s,unsigned long new_size);
drivers/staging/rtl8712/usb_intf.c +2 -0
@@ -62,6 +62,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { {USB_DEVICE(0x0B05, 0x1791)}, /* 11n mode disable *//* Belkin */ {USB_DEVICE(0x050D, 0x945A)}, +/* ISY IWL - Belkin clone */ + {USB_DEVICE(0x050D, 0x11F1)},/* Corega */ {USB_DEVICE(0x07AA, 0x0047)},/* D-Link */
drivers/staging/speakup/synth.c +2 -2
@@ -342,7 +342,7 @@ int synth_init(char *synth_name)mutex_lock (&spk_mutex);/* First, check if we already have it loaded. */ -for (i =0 ; synths[i] !=NULL && i <MAXSYNTHS ; i++) +for (i =0 ; i <MAXSYNTHS && synths[i] !=NULL ; i++)if (strcmp (synths[i]->name, synth_name) ==0 ) synth = synths[i];
@@ -423,7 +423,7 @@ int synth_add(struct spk_synth *in_synth)int i;int status =0 ;mutex_lock (&spk_mutex); -for (i =0 ; synths[i] !=NULL && i <MAXSYNTHS ; i++) +for (i =0 ; i <MAXSYNTHS && synths[i] !=NULL ; i++)/* synth_remove() is responsible for rotating the array down */ if (in_synth == synths[i]) {mutex_unlock (&spk_mutex);
drivers/staging/vt6656/dpc.c +2 -2
@@ -1256,7 +1256,7 @@ static BOOL s_bHandleRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV)); }else {
@@ -1367,7 +1367,7 @@ static BOOL s_bHostWepRxEncryption ( PayloadLen -= (WLAN_HDR_ADDR3_LEN +8 +4 );// 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc *pdwRxTSC47_16 =cpu_to_le32 (*(PDWORD )(pbyIV +4 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %lx\n" ,*pdwRxTSC47_16); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ExtIV: %x\n" , *pdwRxTSC47_16);if (byDecMode ==KEY_CTL_TKIP ) { *pwRxTSC15_0 =cpu_to_le16 (MAKEWORD (*(pbyIV+2 ), *pbyIV));
drivers/staging/vt6656/key.c +36 -17
133 lines not on this page · raw message
drivers/staging/vt6656/key.h +4 -4
@@ -58,7 +58,7 @@ typedef struct tagSKeyItem { BOOL bKeyValid; - unsigned long uKeyLength; + u32 uKeyLength; BYTE abyKey[MAX_KEY_LEN]; QWORD KeyRSC; DWORD dwTSC47_16;
@@ -107,7 +107,7 @@ BOOL KeybSetKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
@@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey(void *pDeviceHandler, PSKeyManagement pTable, DWORD dwKeyIndex, - unsigned long uKeyLength, + u32 uKeyLength, PQWORD pKeyRSC, PBYTE pbyKey, BYTE byKeyDecMode
drivers/staging/vt6656/mac.c +4 -2
@@ -262,7 +262,8 @@ BYTE pbyData[24]; dwData1 <<=16 ; dwData1 |=MAKEWORD (*(pbyAddr+4 ), *(pbyAddr+5 )); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %lX, KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "1. wOffset: %d, Data: %X," \ +" KeyCtl:%X\n" , wOffset, dwData1, wKeyCtl);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
@@ -279,7 +280,8 @@ BYTE pbyData[24]; dwData2 <<=8 ; dwData2 |= *(pbyAddr+0 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %lX\n" , wOffset, dwData2); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "2. wOffset: %d, Data: %X\n" , + wOffset, dwData2);//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset); //VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
drivers/staging/vt6656/rf.c +3 -0
@@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;return TRUE; } +if (uCH ==0 ) +return -EINVAL ; +switch (uRATE) {case RATE_1M :case RATE_2M :
drivers/staging/vt6656/rxtx.c +12 -6
@@ -377,7 +377,8 @@ s_vFillTxKey ( *(pbyIVHead+3 ) = (BYTE )(((pDevice->byKeyIndex <<6 ) &0xc0 ) |0x20 );// 0x20 is ExtIV // Append IV&ExtIV after Mac Header *pdwExtIV =cpu_to_le32 (pTransmitKey->dwTSC47_16); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %lx\n" , *pdwExtIV); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "vFillTxKey()---- pdwExtIV: %x\n" , + *pdwExtIV); }else if (pTransmitKey->byCipherSuite ==KEY_CTL_CCMP ) { pTransmitKey->wTSC15_0++;
@@ -1753,7 +1754,8 @@ s_bPacketToWirelessUsb(MIC_vAppend ((PBYTE )&(psEthHeader->abyDstAddr[0 ]),12 ); dwMIC_Priority =0 ;MIC_vAppend ((PBYTE )&dwMIC_Priority,4 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC KEY: %lX, %lX\n" , dwMICKey0, dwMICKey1); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC KEY: %X, %X\n" , + dwMICKey0, dwMICKey1);///////////////////////////////////////////////////////////////////
@@ -2635,7 +2637,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {MIC_vAppend ((PBYTE )&(sEthHeader.abyDstAddr[0 ]),12 ); dwMIC_Priority =0 ;MIC_vAppend ((PBYTE )&dwMIC_Priority,4 ); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "DMA0_tx_8021:MIC KEY: %lX, %lX\n" , dwMICKey0, dwMICKey1); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "DMA0_tx_8021:MIC KEY:" \ +" %X, %X\n" , dwMICKey0, dwMICKey1); uLength = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen;
@@ -2655,7 +2658,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "uLength: %d, %d\n" , uLength, cbFrameBodySize);DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "cbReqCount:%d, %d, %d, %d\n" , cbReqCount, cbHeaderSize, uPadding, cbIVlen); -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC:%lx, %lx\n" , *pdwMIC_L, *pdwMIC_R); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "MIC:%x, %x\n" , + *pdwMIC_L, *pdwMIC_R); }
@@ -3029,7 +3033,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "error: KEY is GTK!!~~\n" ); }else { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%lX]\n" , pTransmitKey->dwKeyIndex); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%X]\n" , + pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } }
@@ -3043,7 +3048,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)if (pDevice->bEnableHostWEP) {if ((uNodeIndex !=0 ) && (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex &PAIRWISE_KEY )) { -DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%lX]\n" , pTransmitKey->dwKeyIndex); +DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "Find PTK [%X]\n" , + pTransmitKey->dwKeyIndex); bNeedEncryption = TRUE; } }
drivers/staging/vt6656/ttype.h +9 -7
@@ -29,6 +29,8 @@#ifndef __TTYPE_H__#define __TTYPE_H__ +#include <linux/types.h> +/******* Common definitions and typedefs ***********************************/ typedef int BOOL ;
@@ -42,17 +44,17 @@ typedef int BOOL;/****** Simple typedefs ***************************************************/ -typedef unsigned char BYTE ;// 8-bit -typedef unsigned short WORD ;// 16-bit -typedef unsigned long DWORD ;// 32-bit +typedef u8 BYTE ; +typedef u16 WORD ; +typedef u32 DWORD ;// QWORD is for those situation that we want // an 8-byte-aligned 8 byte long structure // which is NOT really a floating point number. typedef union tagUQuadWord {struct { -DWORD dwLowDword; -DWORD dwHighDword; +u32 dwLowDword; +u32 dwHighDword; } u;double DoNotUseThisField; }UQuadWord ;
@@ -60,8 +62,8 @@ typedef UQuadWord QWORD; // 64-bit/****** Common pointer types ***********************************************/ -typedef unsigned long ULONG_PTR ;// 32-bit -typedef unsigned long DWORD_PTR ;// 32-bit +typedef u32 ULONG_PTR ; +typedef u32 DWORD_PTR ;// boolean pointer
drivers/staging/vt6656/wcmd.c +11 -9
@@ -316,17 +316,19 @@ s_MgrMakeProbeRequest(return pTxPacket; } -void vCommandTimerWait (void *hDeviceContext,unsigned int MSecond) +void vCommandTimerWait (void *hDeviceContext,unsigned long MSecond) { -PSDevice pDevice = (PSDevice )hDeviceContext; +PSDevice pDevice = (PSDevice )hDeviceContext; -init_timer (&pDevice->sTimerCommand); - pDevice->sTimerCommand.data = (unsigned long )pDevice; - pDevice->sTimerCommand.function = (TimerFunction )vRunCommand; -// RUN_AT :1 msec ~= (HZ/1024) - pDevice->sTimerCommand.expires = (unsigned int )RUN_AT ((MSecond *HZ ) >>10 ); -add_timer (&pDevice->sTimerCommand); -return ; +init_timer (&pDevice->sTimerCommand); + + pDevice->sTimerCommand.data = (unsigned long )pDevice; + pDevice->sTimerCommand.function = (TimerFunction )vRunCommand; + pDevice->sTimerCommand.expires =RUN_AT ((MSecond *HZ ) /1000 ); + +add_timer (&pDevice->sTimerCommand); + +return ; }void vRunCommand (void *hDeviceContext)
drivers/staging/vt6656/wpa2.h +2 -2
@@ -45,8 +45,8 @@ typedef struct tagsPMKIDInfo { } PMKIDInfo, *PPMKIDInfo;typedef struct tagSPMKIDCache { -unsigned long BSSIDInfoCount; -PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE ]; +u32 BSSIDInfoCount; +PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE ]; }SPMKIDCache , *PSPMKIDCache ;
drivers/target/tcm_fc/tfc_sess.c +1 -1
@@ -468,7 +468,6 @@ static void ft_sess_rcu_free(struct rcu_head *rcu) { struct ft_sess *sess = container_of(rcu, struct ft_sess, rcu); -transport_deregister_session (sess->se_sess);kfree (sess); }
@@ -476,6 +475,7 @@ static void ft_sess_free(struct kref *kref) { struct ft_sess *sess = container_of(kref, struct ft_sess, kref); +transport_deregister_session (sess->se_sess);call_rcu (&sess->rcu, ft_sess_rcu_free); }
drivers/usb/class/cdc-acm.c +3 -0
@@ -1509,6 +1509,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */ .driver_info =NO_UNION_NORMAL , }, + { USB_DEVICE(0x05f9, 0x4002), /* PSC Scanning, Magellan 800i */ + .driver_info = NO_UNION_NORMAL, + }, { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ },
drivers/usb/core/hub.c +9 -3
@@ -2050,7 +2050,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)#define HUB_ROOT_RESET_TIME 50/* times are in msec */ #define HUB_SHORT_RESET_TIME 10#define HUB_LONG_RESET_TIME 200 -#define HUB_RESET_TIMEOUT 500 +#define HUB_RESET_TIMEOUT 800static int hub_port_wait_reset (struct usb_hub *hub,int port1,struct usb_device *udev,unsigned int delay)
@@ -2413,7 +2413,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)static int finish_port_resume (struct usb_device *udev) {int status =0 ; -u16 devstatus; +u16 devstatus =0 ;/* caller owns the udev device lock */ dev_dbg(&udev->dev, "%s\n",
@@ -2458,7 +2458,13 @@ static int finish_port_resume(struct usb_device *udev)if (status) {dev_dbg (&udev->dev,"gone after usb resume? status %d\n" , status); - }else if (udev->actconfig) { +/* +* There are a few quirky devices which violate the standard +* by claiming to have remote wakeup enabled after a reset, +* which crash if the feature is cleared, hence check for +* udev->reset_resume +*/ + }else if (udev->actconfig && !udev->reset_resume) {le16_to_cpus (&devstatus);if (devstatus & (1 <<USB_DEVICE_REMOTE_WAKEUP )) { status = usb_control_msg(udev,
drivers/usb/gadget/dummy_hcd.c +5 -4
@@ -122,10 +122,7 @@ static const char ep0name [] = "ep0";static const char *const ep_name [] = { ep0name,/* everyone has ep0 */ -/* act like a net2280: high speed, six configurable endpoints */ -"ep-a" ,"ep-b" ,"ep-c" ,"ep-d" ,"ep-e" ,"ep-f" , - -/* or like pxa250: fifteen fixed function endpoints */ +/* act like a pxa250: fifteen fixed function endpoints */ "ep1in-bulk" ,"ep2out-bulk" ,"ep3in-iso" ,"ep4out-iso" ,"ep5in-int" ,"ep6in-bulk" ,"ep7out-bulk" ,"ep8in-iso" ,"ep9out-iso" ,"ep10in-int" ,"ep11in-bulk" ,"ep12out-bulk" ,"ep13in-iso" ,"ep14out-iso" ,
@@ -133,6 +130,10 @@ static const char *const ep_name [] = {/* or like sa1100: two fixed function endpoints */ "ep1out-bulk" ,"ep2in-bulk" , + +/* and now some generic EPs so we have enough in multi config */ +"ep3out" ,"ep4in" ,"ep5out" ,"ep6out" ,"ep7in" ,"ep8out" ,"ep9in" , + "ep10out", "ep11out", "ep12in", "ep13out", "ep14in", "ep15out", };#define DUMMY_ENDPOINTS ARRAY_SIZE(ep_name)
drivers/usb/host/xhci-mem.c +2 -0
@@ -1026,6 +1026,8 @@ static unsigned int xhci_microframes_to_exponent(struct usb_device *udev,static unsigned int xhci_parse_microframe_interval (struct usb_device *udev,struct usb_host_endpoint *ep) { +if (ep->desc.bInterval ==0 ) +return 0 ;return xhci_microframes_to_exponent (udev, ep, ep->desc.bInterval,0 ,15 ); }
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -879,6 +879,8 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) }, +/* Crucible Devices */ + { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -1259,3 +1259,9 @@* ATI command output: Cinterion MC55i */ #define FTDI_CINTERION_MC55I_PID 0xA951 + +/* +* Product: Comet Caller ID decoder +* Manufacturer: Crucible Technologies +*/ +#define FTDI_CT_COMET_PID 0x8e08
drivers/usb/serial/option.c +17 -1
@@ -288,6 +288,7 @@ static void option_instat_callback(struct urb *urb);#define ALCATEL_VENDOR_ID 0x1bbb#define ALCATEL_PRODUCT_X060S_X200 0x0000#define ALCATEL_PRODUCT_X220_X500D 0x0017 +#define ALCATEL_PRODUCT_L100V 0x011e#define PIRELLI_VENDOR_ID 0x1266#define PIRELLI_PRODUCT_C100_1 0x1002
@@ -429,9 +430,12 @@ static void option_instat_callback(struct urb *urb);#define MEDIATEK_VENDOR_ID 0x0e8d#define MEDIATEK_PRODUCT_DC_1COM 0x00a0#define MEDIATEK_PRODUCT_DC_4COM 0x00a5 +#define MEDIATEK_PRODUCT_DC_4COM2 0x00a7#define MEDIATEK_PRODUCT_DC_5COM 0x00a4#define MEDIATEK_PRODUCT_7208_1COM 0x7101#define MEDIATEK_PRODUCT_7208_2COM 0x7102 +#define MEDIATEK_PRODUCT_7103_2COM 0x7103 +#define MEDIATEK_PRODUCT_7106_2COM 0x7106#define MEDIATEK_PRODUCT_FP_1COM 0x0003#define MEDIATEK_PRODUCT_FP_2COM 0x0023#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043
@@ -441,6 +445,10 @@ static void option_instat_callback(struct urb *urb);#define CELLIENT_VENDOR_ID 0x2692#define CELLIENT_PRODUCT_MEN200 0x9005 +/* Hyundai Petatel Inc. products */ +#define PETATEL_VENDOR_ID 0x1ff4 +#define PETATEL_PRODUCT_NP10T 0x600e +/* some devices interfaces need special handling due to a number of reasons */ enum option_blacklist_reason {OPTION_BLACKLIST_NONE =0 ,
@@ -923,7 +931,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */ .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */ + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
@@ -1190,6 +1199,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
@@ -1294,7 +1305,12 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) }, { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7103_2COM, 0xff, 0x00, 0x00) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/video/mxsfb.c +2 -1
@@ -365,7 +365,8 @@ static void mxsfb_disable_controller(struct fb_info *fb_info) loop--; } -writel (VDCTRL4_SYNC_SIGNALS_ON , host->base +LCDC_VDCTRL4 +REG_CLR ); + reg =readl (host->base +LCDC_VDCTRL4 ); +writel (reg & ~VDCTRL4_SYNC_SIGNALS_ON , host->base +LCDC_VDCTRL4 );clk_disable (host->clk);
fs/eventpoll.c +21 -1
@@ -1197,10 +1197,30 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even* otherwise we might miss an event that happens between the * f_op->poll() call and the new event set registering. */ - epi->event.events = event->events; + epi->event.events = event->events;/* need barrier below */ epi->event.data = event->data;/* protected by mtx */ /* +* The following barrier has two effects: +* +* 1) Flush epi changes above to other CPUs. This ensures +* we do not miss events from ep_poll_callback if an +* event occurs immediately after we call f_op->poll(). +* We need this because we did not take ep->lock while +* changing epi above (but ep_poll_callback does take +* ep->lock). +* +* 2) We also need to ensure we do not miss _past_ events +* when calling f_op->poll(). This barrier also +* pairs with the barrier in wq_has_sleeper (see +* comments for wq_has_sleeper). +* +* This barrier will now guarantee ep_poll_callback or f_op->poll +* (or both) will notice the readiness of an item. +*/ +smp_mb (); + +/* * Get current event bits. We can safely use the file* here because * its usage count has been increased by the caller of this function. */
fs/ext4/acl.c +4 -2
@@ -450,8 +450,10 @@ ext4_xattr_set_acl(struct dentry *dentry, const char *name, const void *value, retry: handle =ext4_journal_start (inode,EXT4_DATA_TRANS_BLOCKS (inode->i_sb)); -if (IS_ERR (handle)) -return PTR_ERR (handle); +if (IS_ERR (handle)) { + error =PTR_ERR (handle); + goto release_and_out; + } error =ext4_set_acl (handle, inode, type, acl);ext4_journal_stop (handle);if (error == -ENOSPC &&ext4_should_retry_alloc (inode->i_sb, &retries))
fs/ext4/extents.c +18 -4
@@ -2140,13 +2140,14 @@ ext4_ext_in_cache(struct inode *inode, ext4_lblk_t block,* last index in the block only. */ static int ext4_ext_rm_idx (handle_t *handle,struct inode *inode, -struct ext4_ext_path *path) +struct ext4_ext_path *path,int depth) {int err;ext4_fsblk_t leaf;/* free index block */ - path--; + depth--; + path = path + depth; leaf =ext4_idx_pblock (path->p_idx);if (unlikely (path->p_hdr->eh_entries ==0 )) {EXT4_ERROR_INODE (inode,"path->p_hdr->eh_entries == 0" );
@@ -2162,6 +2163,19 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,ext_debug ("index is empty, remove it, free block %llu\n" , leaf);ext4_free_blocks (handle, inode,NULL , leaf,1 ,EXT4_FREE_BLOCKS_METADATA |EXT4_FREE_BLOCKS_FORGET ); + +while (--depth >=0 ) { +if (path->p_idx !=EXT_FIRST_INDEX (path->p_hdr)) +break ; + path--; + err =ext4_ext_get_access (handle, inode, path); +if (err) +break ; + path->p_idx->ei_block = (path+1 )->p_idx->ei_block; + err =ext4_ext_dirty (handle, inode, path); +if (err) +break ; + }return err; }
@@ -2509,7 +2523,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,/* if this leaf is free, then we should * remove it from index block above */ if (err ==0 && eh->eh_entries ==0 && path[depth].p_bh !=NULL ) - err =ext4_ext_rm_idx (handle, inode, path + depth); + err =ext4_ext_rm_idx (handle, inode, path, depth); out:return err;
@@ -2639,7 +2653,7 @@ again:/* index is empty, remove it; * handle must be already prepared by the * truncatei_leaf() */ - err =ext4_ext_rm_idx (handle, inode, path + i); + err =ext4_ext_rm_idx (handle, inode, path, i); }/* root level has p_bh == NULL, brelse() eats this */ brelse (path[i].p_bh);
fs/ext4/super.c +3 -1
@@ -2204,7 +2204,9 @@ static void ext4_orphan_cleanup(struct super_block *sb, __func__, inode->i_ino, inode->i_size);jbd_debug (2 ,"truncating inode %lu to %lld bytes\n" , inode->i_ino, inode->i_size); +mutex_lock (&inode->i_mutex);ext4_truncate (inode); +mutex_unlock (&inode->i_mutex); nr_truncates++; }else { ext4_msg(sb, KERN_DEBUG,
@@ -4438,7 +4440,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) }ext4_setup_system_zone (sb); -if (sbi->s_journal ==NULL ) +if (sbi->s_journal ==NULL && !(old_sb_flags &MS_RDONLY ))ext4_commit_super (sb,1 );#ifdef CONFIG_QUOTA
fs/gfs2/lops.c +4 -14
@@ -139,16 +139,14 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)struct gfs2_meta_header *mh;struct gfs2_trans *tr; -lock_buffer (bd->bd_bh); -gfs2_log_lock (sdp);if (!list_empty (&bd->bd_list_tr)) - goto out; +return ; tr = current->journal_info; tr->tr_touched =1 ; tr->tr_num_buf++;list_add (&bd->bd_list_tr, &tr->tr_list_buf);if (!list_empty (&le->le_list)) - goto out; +return ;set_bit (GLF_LFLUSH , &bd->bd_gl->gl_flags);set_bit (GLF_DIRTY , &bd->bd_gl->gl_flags);gfs2_meta_check (sdp, bd->bd_bh);
@@ -159,9 +157,6 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) sdp->sd_log_num_buf++;list_add (&le->le_list, &sdp->sd_log_le_buf); tr->tr_num_buf_new++; -out: -gfs2_log_unlock (sdp); -unlock_buffer (bd->bd_bh); }static void buf_lo_before_commit (struct gfs2_sbd *sdp)
@@ -528,11 +523,9 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)struct address_space *mapping = bd->bd_bh->b_page->mapping;struct gfs2_inode *ip =GFS2_I (mapping->host); -lock_buffer (bd->bd_bh); -gfs2_log_lock (sdp);if (tr) {if (!list_empty (&bd->bd_list_tr)) - goto out; +return ; tr->tr_touched =1 ;if (gfs2_is_jdata (ip)) { tr->tr_num_buf++;
@@ -540,7 +533,7 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) } }if (!list_empty (&le->le_list)) - goto out; +return ;set_bit (GLF_LFLUSH , &bd->bd_gl->gl_flags);set_bit (GLF_DIRTY , &bd->bd_gl->gl_flags);
@@ -552,9 +545,6 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) }else {list_add_tail (&le->le_list, &sdp->sd_log_le_ordered); } -out: -gfs2_log_unlock (sdp); -unlock_buffer (bd->bd_bh); }static void gfs2_check_magic (struct buffer_head *bh)
fs/gfs2/trans.c +8 -0
@@ -145,14 +145,22 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)struct gfs2_sbd *sdp = gl->gl_sbd;struct gfs2_bufdata *bd; +lock_buffer (bh); +gfs2_log_lock (sdp); bd = bh->b_private;if (bd)gfs2_assert (sdp, bd->bd_gl == gl);else { +gfs2_log_unlock (sdp); +unlock_buffer (bh);gfs2_attach_bufdata (gl, bh, meta); bd = bh->b_private; +lock_buffer (bh); +gfs2_log_lock (sdp); }lops_add (sdp, &bd->bd_le); +gfs2_log_unlock (sdp); +unlock_buffer (bh); }void gfs2_trans_add_revoke (struct gfs2_sbd *sdp,struct gfs2_bufdata *bd)
fs/jbd2/transaction.c +2 -1
@@ -178,7 +178,8 @@ repeat:if (!new_transaction) goto alloc_transaction;write_lock (&journal->j_state_lock); -if (!journal->j_running_transaction) { +if (!journal->j_running_transaction && + !journal->j_barrier_count) {jbd2_get_transaction (journal, new_transaction); new_transaction =NULL ; }
fs/jffs2/nodemgmt.c +4 -2
@@ -355,14 +355,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,spin_unlock (&c->erase_completion_lock); ret =jffs2_prealloc_raw_node_refs (c, jeb,1 ); -if (ret) -return ret; +/* Just lock it again and continue. Nothing much can change because we hold c->alloc_sem anyway. In fact, it's not entirely clear why we hold c->erase_completion_lock in the majority of this function... but that's a question for another (more caffeine-rich) day. */ spin_lock (&c->erase_completion_lock); +if (ret) +return ret; + waste = jeb->free_size; jffs2_link_node_ref(c, jeb, (jeb->offset + c->sector_size - waste) | REF_OBSOLETE,
fs/udf/inode.c +9 -2
@@ -575,6 +575,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,struct udf_inode_info *iinfo =UDF_I (inode);int goal =0 , pgoal = iinfo->i_location.logicalBlockNum;int lastblock =0 ; +bool isBeyondEOF; prev_epos.offset =udf_file_entry_alloc_offset (inode); prev_epos.block = iinfo->i_location;
@@ -653,7 +654,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,/* Are we beyond EOF? */ if (etype ==-1 ) {int ret; - + isBeyondEOF =1 ;if (count) {if (c) laarr[0 ] = laarr[1 ];
@@ -696,6 +697,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block, endnum = c +1 ; lastblock =1 ; }else { + isBeyondEOF =0 ; endnum = startnum = ((count >2 ) ?2 : count);/* if the current extent is in position 0,
@@ -738,10 +740,13 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block, goal, err);if (!newblocknum) {brelse (prev_epos.bh); +brelse (cur_epos.bh); +brelse (next_epos.bh); *err = -ENOSPC ;return NULL ; } - iinfo->i_lenExtents += inode->i_sb->s_blocksize; +if (isBeyondEOF) + iinfo->i_lenExtents += inode->i_sb->s_blocksize; }/* if the extent the requsted block is located in contains multiple
@@ -768,6 +773,8 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,udf_update_extents (inode, laarr, startnum, endnum, &prev_epos);brelse (prev_epos.bh); +brelse (cur_epos.bh); +brelse (next_epos.bh); newblock =udf_get_pblock (inode->i_sb, newblocknum, iinfo->i_location.partitionReferenceNum,0 );
include/linux/if_link.h +1 -0
@@ -137,6 +137,7 @@ enum {IFLA_AF_SPEC ,IFLA_GROUP ,/* Group the device belongs to */ IFLA_NET_NS_FD , +IFLA_EXT_MASK ,/* Extended info mask, VFs, etc */ __IFLA_MAX };
include/linux/netlink.h +4 -2
@@ -221,7 +221,8 @@ struct netlink_callback {int (*dump)(struct sk_buff * skb,struct netlink_callback *cb);int (*done)(struct netlink_callback *cb); -int family; +u16 family; +u16 min_dump_alloc;long args[6 ]; };
@@ -259,7 +260,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)extern int netlink_dump_start (struct sock *ssk,struct sk_buff *skb,const struct nlmsghdr *nlh,int (*dump)(struct sk_buff *skb,struct netlink_callback *), -int (*done)(struct netlink_callback *)); +int (*done)(struct netlink_callback *), +u16 min_dump_alloc);#define NL_NONROOT_RECV 0x1
include/linux/rtnetlink.h +3 -0
@@ -600,6 +600,9 @@ struct tcamsg {#define TCA_ACT_TAB 1/* attr type must be >=1 */ #define TCAA_MAX 1 +/* New extended info filters for IFLA_EXT_MASK */ +#define RTEXT_FILTER_VF (1 << 0) +/* End of information exported to user level */ #ifdef __KERNEL__
include/net/rtnetlink.h +5 -2
@@ -6,11 +6,14 @@typedef int (*rtnl_doit_func )(struct sk_buff *,struct nlmsghdr *,void *);typedef int (*rtnl_dumpit_func )(struct sk_buff *,struct netlink_callback *); +typedef u16 (*rtnl_calcit_func )(struct sk_buff *,struct nlmsghdr *);extern int __rtnl_register (int protocol,int msgtype, -rtnl_doit_func ,rtnl_dumpit_func ); +rtnl_doit_func ,rtnl_dumpit_func , +rtnl_calcit_func );extern void rtnl_register (int protocol,int msgtype, -rtnl_doit_func ,rtnl_dumpit_func ); +rtnl_doit_func ,rtnl_dumpit_func , +rtnl_calcit_func );extern int rtnl_unregister (int protocol,int msgtype);extern void rtnl_unregister_all (int protocol);
kernel/trace/ring_buffer.c +2 -0
@@ -2926,6 +2926,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)* Splice the empty reader page into the list around the head. */ reader =rb_set_head_page (cpu_buffer); +if (!reader) + goto out; cpu_buffer->reader_page->list.next =rb_list_head (reader->list.next); cpu_buffer->reader_page->list.prev = reader->list.prev;
mm/compaction.c +2 -4
@@ -714,14 +714,12 @@ static int compact_node(int nid) }/* Compact all nodes in the system */ -static int compact_nodes (void ) +static void compact_nodes (void ) {int nid;for_each_online_node (nid)compact_node (nid); - -return COMPACT_COMPLETE ; }/* The written value is actually unused, all memory is compacted */
@@ -732,7 +730,7 @@ int sysctl_compaction_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos) { if (write) - return compact_nodes(); + compact_nodes();return 0 ; }
mm/huge_memory.c +3 -0
@@ -920,6 +920,8 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,count_vm_event (THP_FAULT_FALLBACK ); ret =do_huge_pmd_wp_page_fallback (mm, vma, address, pmd, orig_pmd, page, haddr); +if (ret &VM_FAULT_OOM ) +split_huge_page (page);put_page (page); goto out; }
@@ -927,6 +929,7 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,if (unlikely (mem_cgroup_newpage_charge (new_page, mm,GFP_KERNEL ))) {put_page (new_page); +split_huge_page (page);put_page (page); ret |=VM_FAULT_OOM ; goto out;
mm/memory.c +15 -3
@@ -3470,6 +3470,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,if (unlikely (is_vm_hugetlb_page (vma)))return hugetlb_fault (mm, vma, address, flags); +retry: pgd =pgd_offset (mm, address); pud =pud_alloc (mm, pgd, address);if (!pud)
@@ -3483,13 +3484,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, pmd, flags); }else {pmd_t orig_pmd = *pmd; +int ret; +barrier ();if (pmd_trans_huge (orig_pmd)) {if (flags &FAULT_FLAG_WRITE && !pmd_write (orig_pmd) && - !pmd_trans_splitting (orig_pmd)) -return do_huge_pmd_wp_page (mm, vma, address, - pmd, orig_pmd); + !pmd_trans_splitting (orig_pmd)) { + ret =do_huge_pmd_wp_page (mm, vma, address, pmd, + orig_pmd); +/* +* If COW results in an oom, the huge pmd will +* have been split, so retry the fault on the +* pte for a smaller charge. +*/ +if (unlikely (ret &VM_FAULT_OOM )) + goto retry; +return ret; + }return 0 ; } }
mm/page_alloc.c +1 -1
@@ -5492,7 +5492,7 @@ static inline int pfn_to_bitidx(struct zone *zone, unsigned long pfn) pfn &= (PAGES_PER_SECTION -1 );return (pfn >> pageblock_order) *NR_PAGEBLOCK_BITS ;#else - pfn = pfn - zone->zone_start_pfn; + pfn = pfn -round_down (zone->zone_start_pfn, pageblock_nr_pages);return (pfn >> pageblock_order) *NR_PAGEBLOCK_BITS ;#endif /* CONFIG_SPARSEMEM */ }
net/bridge/br_netlink.c +10 -5
@@ -219,19 +219,24 @@ int __init br_netlink_init(void)if (err <0 ) goto err1; - err =__rtnl_register (PF_BRIDGE ,RTM_GETLINK ,NULL , br_dump_ifinfo); + err =__rtnl_register (PF_BRIDGE ,RTM_GETLINK ,NULL , + br_dump_ifinfo,NULL );if (err) goto err2; - err =__rtnl_register (PF_BRIDGE ,RTM_SETLINK , br_rtm_setlink,NULL ); + err =__rtnl_register (PF_BRIDGE ,RTM_SETLINK , + br_rtm_setlink,NULL ,NULL );if (err) goto err3; - err =__rtnl_register (PF_BRIDGE ,RTM_NEWNEIGH , br_fdb_add,NULL ); + err =__rtnl_register (PF_BRIDGE ,RTM_NEWNEIGH , + br_fdb_add,NULL ,NULL );if (err) goto err3; - err =__rtnl_register (PF_BRIDGE ,RTM_DELNEIGH , br_fdb_delete,NULL ); + err =__rtnl_register (PF_BRIDGE ,RTM_DELNEIGH , + br_fdb_delete,NULL ,NULL );if (err) goto err3; - err =__rtnl_register (PF_BRIDGE ,RTM_GETNEIGH ,NULL , br_fdb_dump); + err =__rtnl_register (PF_BRIDGE ,RTM_GETNEIGH , +NULL , br_fdb_dump,NULL );if (err) goto err3;
net/core/fib_rules.c +3 -3
@@ -740,9 +740,9 @@ static struct pernet_operations fib_rules_net_ops = {static int __init fib_rules_init (void ) {int err; -rtnl_register (PF_UNSPEC ,RTM_NEWRULE , fib_nl_newrule,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELRULE , fib_nl_delrule,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETRULE ,NULL , fib_nl_dumprule); +rtnl_register (PF_UNSPEC ,RTM_NEWRULE , fib_nl_newrule,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELRULE , fib_nl_delrule,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETRULE ,NULL , fib_nl_dumprule,NULL ); err =register_pernet_subsys (&fib_rules_net_ops);if (err <0 )
net/core/neighbour.c +6 -5
@@ -2918,12 +2918,13 @@ EXPORT_SYMBOL(neigh_sysctl_unregister);static int __init neigh_init (void ) { -rtnl_register (PF_UNSPEC ,RTM_NEWNEIGH , neigh_add,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELNEIGH , neigh_delete,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETNEIGH ,NULL , neigh_dump_info); +rtnl_register (PF_UNSPEC ,RTM_NEWNEIGH , neigh_add,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELNEIGH , neigh_delete,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETNEIGH ,NULL , neigh_dump_info,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETNEIGHTBL ,NULL , neightbl_dump_info); -rtnl_register (PF_UNSPEC ,RTM_SETNEIGHTBL , neightbl_set,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETNEIGHTBL ,NULL , neightbl_dump_info, +NULL ); +rtnl_register (PF_UNSPEC ,RTM_SETNEIGHTBL , neightbl_set,NULL ,NULL );return 0 ; }
net/core/rtnetlink.c +103 -24
277 lines not on this page · raw message
net/dcb/dcbnl.c +2 -2
@@ -1819,8 +1819,8 @@ static int __init dcbnl_init(void) {INIT_LIST_HEAD (&dcb_app_list); -rtnl_register (PF_UNSPEC ,RTM_GETDCB , dcb_doit,NULL ); -rtnl_register (PF_UNSPEC ,RTM_SETDCB , dcb_doit,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETDCB , dcb_doit,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_SETDCB , dcb_doit,NULL ,NULL );return 0 ; }
net/decnet/dn_dev.c +3 -3
@@ -1414,9 +1414,9 @@ void __init dn_dev_init(void)dn_dev_devices_on (); -rtnl_register (PF_DECnet,RTM_NEWADDR , dn_nl_newaddr,NULL ); -rtnl_register (PF_DECnet,RTM_DELADDR , dn_nl_deladdr,NULL ); -rtnl_register (PF_DECnet,RTM_GETADDR ,NULL , dn_nl_dump_ifaddr); +rtnl_register (PF_DECnet,RTM_NEWADDR , dn_nl_newaddr,NULL ,NULL ); +rtnl_register (PF_DECnet,RTM_DELADDR , dn_nl_deladdr,NULL ,NULL ); +rtnl_register (PF_DECnet,RTM_GETADDR ,NULL , dn_nl_dump_ifaddr,NULL );proc_net_fops_create (&init_net,"decnet_dev" ,S_IRUGO , &dn_dev_seq_fops);
net/decnet/dn_fib.c +2 -2
@@ -763,8 +763,8 @@ void __init dn_fib_init(void)register_dnaddr_notifier (&dn_fib_dnaddr_notifier); -rtnl_register (PF_DECnet,RTM_NEWROUTE , dn_fib_rtm_newroute,NULL ); -rtnl_register (PF_DECnet,RTM_DELROUTE , dn_fib_rtm_delroute,NULL ); +rtnl_register (PF_DECnet,RTM_NEWROUTE , dn_fib_rtm_newroute,NULL ,NULL ); +rtnl_register (PF_DECnet,RTM_DELROUTE , dn_fib_rtm_delroute,NULL ,NULL ); }
net/decnet/dn_route.c +3 -2
@@ -1843,10 +1843,11 @@ void __init dn_route_init(void)proc_net_fops_create (&init_net,"decnet_cache" ,S_IRUGO , &dn_rt_cache_seq_fops);#ifdef CONFIG_DECNET_ROUTER -rtnl_register (PF_DECnet,RTM_GETROUTE , dn_cache_getroute, dn_fib_dump); +rtnl_register (PF_DECnet,RTM_GETROUTE , dn_cache_getroute, + dn_fib_dump,NULL );#else rtnl_register (PF_DECnet,RTM_GETROUTE , dn_cache_getroute, - dn_cache_dump); + dn_cache_dump,NULL );#endif }
net/ipv4/devinet.c +3 -3
@@ -1838,8 +1838,8 @@ void __init devinet_init(void)rtnl_af_register (&inet_af_ops); -rtnl_register (PF_INET ,RTM_NEWADDR , inet_rtm_newaddr,NULL ); -rtnl_register (PF_INET ,RTM_DELADDR , inet_rtm_deladdr,NULL ); -rtnl_register (PF_INET ,RTM_GETADDR ,NULL , inet_dump_ifaddr); +rtnl_register (PF_INET ,RTM_NEWADDR , inet_rtm_newaddr,NULL ,NULL ); +rtnl_register (PF_INET ,RTM_DELADDR , inet_rtm_deladdr,NULL ,NULL ); +rtnl_register (PF_INET ,RTM_GETADDR ,NULL , inet_dump_ifaddr,NULL ); }
net/ipv4/fib_frontend.c +3 -3
@@ -1124,9 +1124,9 @@ static struct pernet_operations fib_net_ops = {void __init ip_fib_init (void ) { -rtnl_register (PF_INET ,RTM_NEWROUTE , inet_rtm_newroute,NULL ); -rtnl_register (PF_INET ,RTM_DELROUTE , inet_rtm_delroute,NULL ); -rtnl_register (PF_INET ,RTM_GETROUTE ,NULL , inet_dump_fib); +rtnl_register (PF_INET ,RTM_NEWROUTE , inet_rtm_newroute,NULL ,NULL ); +rtnl_register (PF_INET ,RTM_DELROUTE , inet_rtm_delroute,NULL ,NULL ); +rtnl_register (PF_INET ,RTM_GETROUTE ,NULL , inet_dump_fib,NULL );register_pernet_subsys (&fib_net_ops);register_netdevice_notifier (&fib_netdev_notifier);
net/ipv4/inet_diag.c +1 -1
@@ -869,7 +869,7 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) }return netlink_dump_start (idiagnl, skb, nlh, - inet_diag_dump,NULL ); + inet_diag_dump,NULL ,0 ); }return inet_diag_get_exact (skb, nlh);
net/ipv4/ipmr.c +2 -1
@@ -2554,7 +2554,8 @@ int __init ip_mr_init(void) goto add_proto_fail; }#endif -rtnl_register (RTNL_FAMILY_IPMR ,RTM_GETROUTE ,NULL , ipmr_rtm_dumproute); +rtnl_register (RTNL_FAMILY_IPMR ,RTM_GETROUTE , +NULL , ipmr_rtm_dumproute,NULL );return 0 ;#ifdef CONFIG_IP_PIMSM_V2
net/ipv4/route.c +1 -1
@@ -3454,7 +3454,7 @@ int __init ip_rt_init(void)xfrm_init ();xfrm4_init (ip_rt_max_size);#endif -rtnl_register (PF_INET ,RTM_GETROUTE , inet_rtm_getroute,NULL ); +rtnl_register (PF_INET ,RTM_GETROUTE , inet_rtm_getroute,NULL ,NULL );#ifdef CONFIG_SYSCTL register_pernet_subsys (&sysctl_route_ops);
net/ipv6/addrconf.c +10 -6
@@ -4694,16 +4694,20 @@ int __init addrconf_init(void)if (err <0 ) goto errout_af; - err =__rtnl_register (PF_INET6 ,RTM_GETLINK ,NULL , inet6_dump_ifinfo); + err =__rtnl_register (PF_INET6 ,RTM_GETLINK ,NULL , inet6_dump_ifinfo, +NULL );if (err <0 ) goto errout;/* Only the first call to __rtnl_register can fail */ -__rtnl_register (PF_INET6 ,RTM_NEWADDR , inet6_rtm_newaddr,NULL ); -__rtnl_register (PF_INET6 ,RTM_DELADDR , inet6_rtm_deladdr,NULL ); -__rtnl_register (PF_INET6 ,RTM_GETADDR , inet6_rtm_getaddr, inet6_dump_ifaddr); -__rtnl_register (PF_INET6 ,RTM_GETMULTICAST ,NULL , inet6_dump_ifmcaddr); -__rtnl_register (PF_INET6 ,RTM_GETANYCAST ,NULL , inet6_dump_ifacaddr); +__rtnl_register (PF_INET6 ,RTM_NEWADDR , inet6_rtm_newaddr,NULL ,NULL ); +__rtnl_register (PF_INET6 ,RTM_DELADDR , inet6_rtm_deladdr,NULL ,NULL ); +__rtnl_register (PF_INET6 ,RTM_GETADDR , inet6_rtm_getaddr, + inet6_dump_ifaddr,NULL ); +__rtnl_register (PF_INET6 ,RTM_GETMULTICAST ,NULL , + inet6_dump_ifmcaddr,NULL ); +__rtnl_register (PF_INET6 ,RTM_GETANYCAST ,NULL , + inet6_dump_ifacaddr,NULL );ipv6_addr_label_rtnl_register ();
net/ipv6/addrlabel.c +6 -3
@@ -592,8 +592,11 @@ out:void __init ipv6_addr_label_rtnl_register (void ) { -__rtnl_register (PF_INET6 ,RTM_NEWADDRLABEL , ip6addrlbl_newdel,NULL ); -__rtnl_register (PF_INET6 ,RTM_DELADDRLABEL , ip6addrlbl_newdel,NULL ); -__rtnl_register (PF_INET6 ,RTM_GETADDRLABEL , ip6addrlbl_get, ip6addrlbl_dump); +__rtnl_register (PF_INET6 ,RTM_NEWADDRLABEL , ip6addrlbl_newdel, +NULL ,NULL ); +__rtnl_register (PF_INET6 ,RTM_DELADDRLABEL , ip6addrlbl_newdel, +NULL ,NULL ); +__rtnl_register (PF_INET6 ,RTM_GETADDRLABEL , ip6addrlbl_get, + ip6addrlbl_dump,NULL ); }
net/ipv6/ip6_fib.c +2 -1
@@ -1586,7 +1586,8 @@ int __init fib6_init(void)if (ret) goto out_kmem_cache_create; - ret =__rtnl_register (PF_INET6 ,RTM_GETROUTE ,NULL , inet6_dump_fib); + ret =__rtnl_register (PF_INET6 ,RTM_GETROUTE ,NULL , inet6_dump_fib, +NULL );if (ret) goto out_unregister_subsys; out:
net/ipv6/ip6mr.c +2 -1
@@ -1356,7 +1356,8 @@ int __init ip6_mr_init(void) goto add_proto_fail; }#endif -rtnl_register (RTNL_FAMILY_IP6MR ,RTM_GETROUTE ,NULL , ip6mr_rtm_dumproute); +rtnl_register (RTNL_FAMILY_IP6MR ,RTM_GETROUTE ,NULL , + ip6mr_rtm_dumproute,NULL );return 0 ;#ifdef CONFIG_IPV6_PIMSM_V2 add_proto_fail:
net/ipv6/route.c +3 -3
@@ -2956,9 +2956,9 @@ int __init ip6_route_init(void) goto fib6_rules_init; ret = -ENOBUFS ; -if (__rtnl_register (PF_INET6 ,RTM_NEWROUTE , inet6_rtm_newroute,NULL ) || -__rtnl_register (PF_INET6 ,RTM_DELROUTE , inet6_rtm_delroute,NULL ) || -__rtnl_register (PF_INET6 ,RTM_GETROUTE , inet6_rtm_getroute,NULL )) +if (__rtnl_register (PF_INET6 ,RTM_NEWROUTE , inet6_rtm_newroute,NULL ,NULL ) || +__rtnl_register (PF_INET6 ,RTM_DELROUTE , inet6_rtm_delroute,NULL ,NULL ) || +__rtnl_register (PF_INET6 ,RTM_GETROUTE , inet6_rtm_getroute,NULL ,NULL )) goto out_register_late_subsys; ret =register_netdevice_notifier (&ip6_route_dev_notifier);
net/mac80211/sta_info.c +1 -1
@@ -793,7 +793,7 @@ void sta_info_init(struct ieee80211_local *local)void sta_info_stop (struct ieee80211_local *local) { -del_timer (&local->sta_cleanup); +del_timer_sync (&local->sta_cleanup);sta_info_flush (local,NULL ); }
net/netfilter/ipset/ip_set_core.c +1 -1
@@ -1120,7 +1120,7 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,return netlink_dump_start (ctnl, skb, nlh, ip_set_dump_start, - ip_set_dump_done); + ip_set_dump_done,0 ); }/* Add, del and test */
net/netfilter/nf_conntrack_netlink.c +2 -2
@@ -970,7 +970,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,if (nlh->nlmsg_flags &NLM_F_DUMP )return netlink_dump_start (ctnl, skb, nlh, ctnetlink_dump_table, - ctnetlink_done); + ctnetlink_done,0 ); err =ctnetlink_parse_zone (cda[CTA_ZONE ], &zone);if (err <0 )
@@ -1840,7 +1840,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,if (nlh->nlmsg_flags &NLM_F_DUMP ) {return netlink_dump_start (ctnl, skb, nlh, ctnetlink_exp_dump_table, - ctnetlink_exp_done); + ctnetlink_exp_done,0 ); } err =ctnetlink_parse_zone (cda[CTA_EXPECT_ZONE ], &zone);
net/netlink/af_netlink.c +11 -6
@@ -1677,13 +1677,10 @@ static int netlink_dump(struct sock *sk) {struct netlink_sock *nlk =nlk_sk (sk);struct netlink_callback *cb; -struct sk_buff *skb; +struct sk_buff *skb =NULL ;struct nlmsghdr *nlh;int len, err = -ENOBUFS ; - - skb =sock_rmalloc (sk,NLMSG_GOODSIZE ,0 ,GFP_KERNEL ); -if (!skb) - goto errout; +int alloc_size;mutex_lock (nlk->cb_mutex);
@@ -1693,6 +1690,12 @@ static int netlink_dump(struct sock *sk) goto errout_skb; } + alloc_size =max_t (int, cb->min_dump_alloc,NLMSG_GOODSIZE ); + + skb =sock_rmalloc (sk, alloc_size,0 ,GFP_KERNEL ); +if (!skb) + goto errout; + len = cb->dump (skb, cb);if (len >0 ) {
@@ -1735,7 +1738,8 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,const struct nlmsghdr *nlh, int (*dump)(struct sk_buff *skb,struct netlink_callback *), - int (*done)(struct netlink_callback *)) + int (*done)(struct netlink_callback *), + u16 min_dump_alloc) { struct netlink_callback *cb;struct sock *sk;
@@ -1749,6 +1753,7 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, cb->dump = dump; cb->done = done; cb->nlh = nlh; + cb->min_dump_alloc = min_dump_alloc;atomic_inc (&skb->users); cb->skb = skb;
net/netlink/genetlink.c +1 -1
@@ -525,7 +525,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)genl_unlock (); err =netlink_dump_start (net->genl_sock, skb, nlh, - ops->dumpit, ops->done); + ops->dumpit, ops->done,0 );genl_lock ();return err; }
net/phonet/pn_netlink.c +7 -6
@@ -289,15 +289,16 @@ out:int __init phonet_netlink_register (void ) { -int err =__rtnl_register (PF_PHONET ,RTM_NEWADDR , addr_doit,NULL ); +int err =__rtnl_register (PF_PHONET ,RTM_NEWADDR , addr_doit, +NULL ,NULL );if (err)return err;/* Further __rtnl_register() cannot fail */ -__rtnl_register (PF_PHONET ,RTM_DELADDR , addr_doit,NULL ); -__rtnl_register (PF_PHONET ,RTM_GETADDR ,NULL , getaddr_dumpit); -__rtnl_register (PF_PHONET ,RTM_NEWROUTE , route_doit,NULL ); -__rtnl_register (PF_PHONET ,RTM_DELROUTE , route_doit,NULL ); -__rtnl_register (PF_PHONET ,RTM_GETROUTE ,NULL , route_dumpit); +__rtnl_register (PF_PHONET ,RTM_DELADDR , addr_doit,NULL ,NULL ); +__rtnl_register (PF_PHONET ,RTM_GETADDR ,NULL , getaddr_dumpit,NULL ); +__rtnl_register (PF_PHONET ,RTM_NEWROUTE , route_doit,NULL ,NULL ); +__rtnl_register (PF_PHONET ,RTM_DELROUTE , route_doit,NULL ,NULL ); +__rtnl_register (PF_PHONET ,RTM_GETROUTE ,NULL , route_dumpit,NULL );return 0 ; }
net/sched/act_api.c +4 -3
@@ -1115,9 +1115,10 @@ nlmsg_failure:static int __init tc_action_init (void ) { -rtnl_register (PF_UNSPEC ,RTM_NEWACTION , tc_ctl_action,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELACTION , tc_ctl_action,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETACTION , tc_ctl_action, tc_dump_action); +rtnl_register (PF_UNSPEC ,RTM_NEWACTION , tc_ctl_action,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELACTION , tc_ctl_action,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETACTION , tc_ctl_action, tc_dump_action, +NULL );return 0 ; }
net/sched/cls_api.c +3 -3
@@ -610,10 +610,10 @@ EXPORT_SYMBOL(tcf_exts_dump_stats);static int __init tc_filter_init (void ) { -rtnl_register (PF_UNSPEC ,RTM_NEWTFILTER , tc_ctl_tfilter,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELTFILTER , tc_ctl_tfilter,NULL ); +rtnl_register (PF_UNSPEC ,RTM_NEWTFILTER , tc_ctl_tfilter,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELTFILTER , tc_ctl_tfilter,NULL ,NULL );rtnl_register (PF_UNSPEC ,RTM_GETTFILTER , tc_ctl_tfilter, - tc_dump_tfilter); + tc_dump_tfilter,NULL );return 0 ; }
net/sched/sch_api.c +6 -6
@@ -1792,12 +1792,12 @@ static int __init pktsched_init(void)register_qdisc (&pfifo_head_drop_qdisc_ops);register_qdisc (&mq_qdisc_ops); -rtnl_register (PF_UNSPEC ,RTM_NEWQDISC , tc_modify_qdisc,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELQDISC , tc_get_qdisc,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETQDISC , tc_get_qdisc, tc_dump_qdisc); -rtnl_register (PF_UNSPEC ,RTM_NEWTCLASS , tc_ctl_tclass,NULL ); -rtnl_register (PF_UNSPEC ,RTM_DELTCLASS , tc_ctl_tclass,NULL ); -rtnl_register (PF_UNSPEC ,RTM_GETTCLASS , tc_ctl_tclass, tc_dump_tclass); +rtnl_register (PF_UNSPEC ,RTM_NEWQDISC , tc_modify_qdisc,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELQDISC , tc_get_qdisc,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETQDISC , tc_get_qdisc, tc_dump_qdisc,NULL ); +rtnl_register (PF_UNSPEC ,RTM_NEWTCLASS , tc_ctl_tclass,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_DELTCLASS , tc_ctl_tclass,NULL ,NULL ); +rtnl_register (PF_UNSPEC ,RTM_GETTCLASS , tc_ctl_tclass, tc_dump_tclass,NULL );return 0 ; }
net/sunrpc/sched.c +23 -4
@@ -844,16 +844,35 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)return task; } +/* +* rpc_free_task - release rpc task and perform cleanups +* +* Note that we free up the rpc_task _after_ rpc_release_calldata() +* in order to work around a workqueue dependency issue. +* +* Tejun Heo states: +* "Workqueue currently considers two work items to be the same if they're +* on the same address and won't execute them concurrently - ie. it +* makes a work item which is queued again while being executed wait +* for the previous execution to complete. +* +* If a work function frees the work item, and then waits for an event +* which should be performed by another work item and *that* work item +* recycles the freed work item, it can create a false dependency loop. +* There really is no reliable way to detect this short of verifying +* every memory free." +* +*/ static void rpc_free_task (struct rpc_task *task) { -const struct rpc_call_ops *tk_ops = task->tk_ops; -void *calldata = task->tk_calldata; +unsigned short tk_flags = task->tk_flags; + +rpc_release_calldata (task->tk_ops, task->tk_calldata); -if (task->tk_flags &RPC_TASK_DYNAMIC ) { +if (tk_flags &RPC_TASK_DYNAMIC ) {dprintk ("RPC: %5u freeing task\n" , task->tk_pid);mempool_free (task, rpc_task_mempool); } -rpc_release_calldata (tk_ops, calldata); }static void rpc_async_release (struct work_struct *work)
net/xfrm/xfrm_user.c +2 -1
@@ -2326,7 +2326,8 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)if (link->dump ==NULL )return -EINVAL ; -return netlink_dump_start (net->xfrm.nlsk, skb, nlh, link->dump, link->done); +return netlink_dump_start (net->xfrm.nlsk, skb, nlh, + link->dump, link->done,0 ); } err = nlmsg_parse(nlh, xfrm_msg_min[type], attrs, XFRMA_MAX,
sound/arm/pxa2xx-ac97-lib.c +6 -2
@@ -146,6 +146,8 @@ static inline void pxa_ac97_warm_pxa27x(void)static inline void pxa_ac97_cold_pxa27x (void ) { +unsigned int timeout; +GCR &=GCR_COLD_RST ;/* clear everything but nCRST */ GCR &= ~GCR_COLD_RST ;/* then assert nCRST */
@@ -155,8 +157,10 @@ static inline void pxa_ac97_cold_pxa27x(void)clk_enable (ac97conf_clk);udelay (5 );clk_disable (ac97conf_clk); -GCR =GCR_COLD_RST ; - udelay(50); +GCR =GCR_COLD_RST |GCR_WARM_RST ; + timeout =100 ;/* wait for the codec-ready bit to be set */ +while (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )) && timeout--) + mdelay(1); }#endif
sound/soc/codecs/wm2000.c +2 -2
@@ -224,9 +224,9 @@ static int wm2000_power_up(struct i2c_client *i2c, int analogue) ret =wm2000_read (i2c,WM2000_REG_SPEECH_CLARITY );if (wm2000->speech_clarity) - ret &= ~WM2000_SPEECH_CLARITY ; -else ret |=WM2000_SPEECH_CLARITY ; +else + ret &= ~WM2000_SPEECH_CLARITY ;wm2000_write (i2c,WM2000_REG_SPEECH_CLARITY , ret);wm2000_write (i2c,WM2000_REG_SYS_START0 ,0x33 );