Linux 2.6.25.12
Subsystems (31)
We (the -stable team) are announcing the release of the 2.6.25.12 kernel.
It contains loads of bugfixes, all over the map. Any users of the 2.6.25 kernel series should upgrade to this version. For details on the fixes, see the changelog entries and the diffstat below.
I'll also be replying to this message with a copy of the patch between 2.6.25.11 and 2.6.25.12
The updated 2.6.25.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.25.y.git;a=summarythanks,
greg k-h
-------------
Makefile | 2 arch/powerpc/kernel/of_platform.c | 2 block/as-iosched.c | 2 crypto/chainiv.c | 10 +++- drivers/base/node.c | 4 - drivers/block/cciss.c | 66 +++++++++++++++------------- drivers/char/pcmcia/ipwireless/hardware.c | 4 + drivers/char/rtc.c | 3 - drivers/char/tpm/tpm_tis.c | 1 drivers/hwmon/hdaps.c | 8 +++ drivers/isdn/i4l/isdn_common.c | 4 + drivers/md/md.c | 6 +- drivers/md/raid10.c | 2 drivers/md/raid5.c | 14 ++--- drivers/media/dvb/dvb-usb/dib0700_devices.c | 7 ++ drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 3 - drivers/media/video/ov7670.c | 4 + drivers/message/fusion/mptspi.c | 9 ++- drivers/mmc/host/pxamci.c | 13 +++++ drivers/mmc/host/sdhci.c | 6 +- drivers/net/3c59x.c | 5 +- drivers/net/wireless/b43/leds.c | 3 + drivers/net/wireless/b43/main.c | 9 ++- drivers/net/wireless/b43legacy/dma.c | 2 drivers/net/wireless/b43legacy/main.c | 6 +- drivers/net/wireless/zd1211rw/zd_usb.c | 1 drivers/rapidio/rio-driver.c | 2 drivers/scsi/esp_scsi.c | 22 ++++++++- drivers/scsi/ses.c | 2 drivers/serial/8250.c | 3 + drivers/serial/serial_core.c | 4 + drivers/usb/core/hcd.c | 38 +++++++++++----- drivers/usb/host/ehci.h | 19 ++++---- drivers/usb/host/ohci-hcd.c | 15 +++++- drivers/usb/host/ohci-q.c | 12 +++++ drivers/usb/misc/sisusbvga/sisusb.c | 2 drivers/video/fb_defio.c | 20 ++++++++ fs/buffer.c | 13 +++-- fs/cifs/cifsacl.c | 10 ++-- fs/exec.c | 2 fs/reiserfs/inode.c | 2 include/linux/fs.h | 1 kernel/hrtimer.c | 8 +++ lib/ts_bm.c | 2 mm/slub.c | 4 + net/can/af_can.c | 10 ++++ net/can/bcm.c | 23 ++++++++- net/can/raw.c | 3 + net/mac80211/tx.c | 9 +++ net/netfilter/nf_conntrack_proto_tcp.c | 13 ++--- 50 files changed, 323 insertions(+), 112 deletions(-)
Alexander Simon (1):
V4L/DVB (7475): Added support for Terratec Cinergy T USB XXS
Andres Salomon (1):
ov7670: clean up ov7670_read semantics
Ben Dooks (1):
OHCI: Fix problem if SM501 and another platform driver is selected
Dan Williams (1):
md: ensure all blocks are uptodate or locked when syncing
Darren Jenkins (2):
drivers/isdn/i4l/isdn_common.c fix small resource leak drivers/char/pcmcia/ipwireless/hardware.c fix resource leak
David Brownell (2):
USB: ehci - fix timer regression
USB: ohci - record data toggle after unlink
David S. Miller (1):
SCSI: esp: Fix OOPS in esp_reset_cleanup().
Divyesh Shah (1):
block: Fix the starving writes bug in the anticipatory IO scheduler
Dmitry Adamushko (1):
slub: Fix use-after-preempt of per-CPU data structure
Eric W. Biederman (1):
serial8250: sanity check nr_uarts on all paths.
Eugene Surovegin (1):
rapidio: fix device reference counting
Firat Birlik (1):
zd1211rw: add ID for AirTies WUS-201
Greg Kroah-Hartman (1):
Linux 2.6.25.12
Guennadi Liakhovetski (1):
serial: fix serial_match_port() for dynamic major tty-device numbers
Herbert Xu (1):
crypto: chainiv - Invoke completion function
Hugh Dickins (1):
exec: fix stack excutability without PT_GNU_STACK
Ingo Molnar (1):
netdrvr: 3c59x: remove irqs_disabled warning from local_bh_enable
James Bottomley (2):
SCSI: esp: tidy up target reference counting
SCSI: mptspi: fix oops in mptspi_dv_renegotiate_work()
Jaya Kumar (1):
fbdev: bugfix for multiprocess defio
Jeff Layton (1):
cifs: fix wksidarr declaration to be big-endian friendly
Jeff Mahoney (1):
reiserfs: discard prealloc in reiserfs_delete_inode
Jens Axboe (1):
block: Properly notify block layer of sync writes
Johannes Berg (1):
mac80211: detect driver tx bugs
John Blackwood (1):
mm: switch node meminfo Active & Inactive pages to Kbytes
Joonwoo Park (1):
textsearch: fix Boyer-Moore text search bug
Jozsef Kadlecsik (1):
netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK
Karl Beldan (1):
pxamci: trivial fix of DMA alignment register bit clearing
Marcin Obara (1):
tpm: add Intel TPM TIS device HID
Matthew Wilcox (1):
SCSI: ses: Fix timeout
Michael Buesch (4):
b43legacy: Do not return TX_BUSY from op_tx
b43: Do not return TX_BUSY from op_tx
b43: Fix possible MMIO access while device is down
b43legacy: Fix possible NULL pointer dereference in DMA code
Mike Miller (1):
cciss: read config to obtain max outstanding commands per controller
Neil Brown (3):
md: Fix error paths if md_probe fails.
md: Don't acknowlege that stripe-expand is complete until it really is.
md: Ensure interrupted recovery completed properly (v1 metadata plus bitmap)
Oliver Hartkopp (1):
can: add sanity checks
Paul Gortmaker (1):
rtc: fix reported IRQ rate for when HPET is enabled
Philipp Zabel (1):
pxamci: fix byte aligned DMA transfers
Pierre Ossman (1):
mmc: don't use DMA on newer ENE controllers
Stefan Becker (1):
USB: fix interrupt disabling for HCDs with shared interrupt handlers
Steven Rostedt (1):
hrtimer: prevent migration for raising softirq
Vitaly Bordug (1):
powerpc: Add missing reference to coherent_dma_mask
Will Newton (1):
sisusbvga: Fix oops on disconnect.
maximilian attems (1):
hdaps: add support for various newer Lenovo thinkpads
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 25 -EXTRAVERSION = .11 +EXTRAVERSION = .12 NAME = Funky Weasel is Jiggy wit it # *DOCUMENTATION*
arch/powerpc/kernel/of_platform.c +2 -0
@@ -76,6 +76,8 @@ struct of_device* of_platform_device_create(struct device_node *np,return NULL ; dev->dma_mask =0xffffffffUL ; + dev->dev.coherent_dma_mask =DMA_32BIT_MASK ; + dev->dev.bus = &of_platform_bus_type;/* We do not fill the DMA ops for platform devices by default.
block/as-iosched.c +2 -0
@@ -831,6 +831,8 @@ static void as_completed_request(struct request_queue *q, struct request *rq) }if (ad->changed_batch && ad->nr_dispatched ==1 ) { + ad->current_batch_expires = jiffies + + ad->batch_expire[ad->batch_data_dir];kblockd_schedule_work (&ad->antic_work); ad->changed_batch =0 ;
crypto/chainiv.c +8 -2
@@ -117,6 +117,7 @@ static int chainiv_init(struct crypto_tfm *tfm)static int async_chainiv_schedule_work (struct async_chainiv_ctx *ctx) {int queued; +int err = ctx->err;if (!ctx->queue.qlen) {smp_mb__before_clear_bit ();
@@ -131,7 +132,7 @@ static int async_chainiv_schedule_work(struct async_chainiv_ctx *ctx)BUG_ON (!queued); out: -return ctx->err; +return err; }static int async_chainiv_postpone_request (struct skcipher_givcrypt_request *req)
@@ -227,6 +228,7 @@ static void async_chainiv_do_postponed(struct work_struct *work) postponed);struct skcipher_givcrypt_request *req;struct ablkcipher_request *subreq; +int err;/* Only handle one request at a time to avoid hogging keventd. */ spin_lock_bh (&ctx->lock);
@@ -241,7 +243,11 @@ static void async_chainiv_do_postponed(struct work_struct *work) subreq =skcipher_givcrypt_reqctx (req); subreq->base.flags |=CRYPTO_TFM_REQ_MAY_SLEEP ; -async_chainiv_givencrypt_tail (req); + err =async_chainiv_givencrypt_tail (req); + +local_bh_disable (); +skcipher_givcrypt_complete (req, err); +local_bh_enable (); }static int async_chainiv_init (struct crypto_tfm *tfm)
drivers/base/node.c +2 -2
@@ -70,8 +70,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) nid,K (i.totalram), nid,K (i.freeram), nid,K (i.totalram - i.freeram), - nid,node_page_state (nid,NR_ACTIVE ), - nid,node_page_state (nid,NR_INACTIVE ), + nid,K (node_page_state (nid,NR_ACTIVE )), + nid,K (node_page_state (nid,NR_INACTIVE )), #ifdef CONFIG_HIGHMEM nid,K (i.totalhigh), nid, K(i.freehigh),
drivers/block/cciss.c +37 -29
90 lines not on this page · raw message
drivers/char/pcmcia/ipwireless/hardware.c +3 -1
@@ -616,8 +616,10 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw, packet =kmalloc (sizeof (struct ipw_rx_packet ) + old_packet->length + minimum_free_space,GFP_ATOMIC ); -if (!packet) +if (!packet) { +kfree (old_packet);return NULL ; + }memcpy (packet, old_packet,sizeof (struct ipw_rx_packet ) + old_packet->length);
drivers/char/rtc.c +2 -1
@@ -677,12 +677,13 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)if (arg != (1 <<tmp))return -EINVAL ; + rtc_freq = arg; +spin_lock_irqsave (&rtc_lock, flags);if (hpet_set_periodic_freq (arg)) {spin_unlock_irqrestore (&rtc_lock, flags);return 0 ; } - rtc_freq = arg; val =CMOS_READ (RTC_FREQ_SELECT ) &0xf0 ; val |= (16 - tmp);
drivers/char/tpm/tpm_tis.c +1 -0
@@ -623,6 +623,7 @@ static struct pnp_device_id tpm_pnp_tbl[] __devinitdata = { {"IFX0102", 0}, /* Infineon */ {"BCM0101", 0}, /* Broadcom */ {"NSC1200", 0}, /* National */ + {"ICO0102", 0}, /* Intel *//* Add new here */ {"", 0}, /* User Specified */ {"", 0} /* Terminator */
drivers/hwmon/hdaps.c +8 -0
@@ -515,16 +515,24 @@ static struct dmi_system_id __initdata hdaps_whitelist[] = {HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad R50" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad R51" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad R52" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad R61i" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad R61" ),HDAPS_DMI_MATCH_INVERT ("IBM" ,"ThinkPad T41p" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad T41" ),HDAPS_DMI_MATCH_INVERT ("IBM" ,"ThinkPad T42p" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad T42" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad T43" ),HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad T60" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad T61p" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad T61" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad X40" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad X41" ),HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad X60" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad X61s" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad X61" ),HDAPS_DMI_MATCH_NORMAL ("IBM" ,"ThinkPad Z60m" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad Z61m" ), +HDAPS_DMI_MATCH_INVERT ("LENOVO" ,"ThinkPad Z61p" ), { .ident = NULL } };
drivers/isdn/i4l/isdn_common.c +3 -1
@@ -1977,8 +1977,10 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len)if (!skb)return -ENOMEM ;skb_reserve (skb, hl); -if (copy_from_user (skb_put (skb, len), buf, len)) +if (copy_from_user (skb_put (skb, len), buf, len)) { +dev_kfree_skb (skb);return -EFAULT ; + } ret = dev->drv[drvidx]->interface->writebuf_skb (drvidx, chan,1 , skb);if (ret <=0 )dev_kfree_skb (skb);
drivers/md/md.c +4 -2
@@ -3804,8 +3804,10 @@ static void autorun_devices(int part)md_probe (dev,NULL ,NULL ); mddev =mddev_find (dev); -if (!mddev) { -printk (KERN_ERR +if (!mddev || !mddev->gendisk) { +if (mddev) +mddev_put (mddev); +printk (KERN_ERR "md: cannot allocate memory for md drive.\n" );break ; }
drivers/md/raid10.c +2 -0
@@ -2102,6 +2102,8 @@ static int run(mddev_t *mddev) !test_bit(In_sync, &disk->rdev->flags)) { disk->head_position =0 ; mddev->degraded++; +if (disk->rdev) + conf->fullsync =1 ; } }
drivers/md/raid5.c +7 -7
@@ -1999,12 +1999,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh,*/ s->uptodate++;return 0 ;/* uptodate + compute == disks */ - }else if ((s->uptodate < disks -1 ) && -test_bit (R5_Insync, &dev->flags)) { -/* Note: we hold off compute operations while checks are -* in flight, but we still prefer 'compute' over 'read' -* hence we only read if (uptodate < * disks-1) -*/ + }else if (test_bit (R5_Insync, &dev->flags)) {set_bit (R5_LOCKED , &dev->flags);set_bit (R5_Wantread, &dev->flags);if (!test_and_set_bit (STRIPE_OP_IO , &sh->ops.pending))
@@ -2861,6 +2856,8 @@ static void handle_stripe5(struct stripe_head *sh)for (i = conf->raid_disks; i--; ) {set_bit (R5_Wantwrite, &sh->dev[i].flags); +set_bit (R5_LOCKED , &dev->flags); + s.locked++;if (!test_and_set_bit (STRIPE_OP_IO , &sh->ops.pending)) sh->ops.count++; }
@@ -2874,6 +2871,7 @@ static void handle_stripe5(struct stripe_head *sh) conf->raid_disks); s.locked +=handle_write_operations5 (sh,1 ,1 ); }else if (s.expanded && + s.locked ==0 && !test_bit (STRIPE_OP_POSTXOR , &sh->ops.pending)) {clear_bit (STRIPE_EXPAND_READY , &sh->state);atomic_dec (&conf->reshape_stripes);
@@ -4163,7 +4161,9 @@ static int run(mddev_t *mddev)" disk %d\n" ,bdevname (rdev->bdev,b), raid_disk); working_disks++; - } + }else +/* Cannot rely on bitmap to complete recovery */ + conf->fullsync =1 ; }/*
drivers/media/dvb/dvb-usb/dib0700_devices.c +6 -1
@@ -1062,6 +1062,7 @@ struct usb_device_id dib0700_usb_id_table[] = { /* 30 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73E) }, { USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_EC372S) }, { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_HT_EXPRESS) }, + { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS) }, { 0 } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, dib0700_usb_id_table);
@@ -1251,7 +1252,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { }, }, - .num_device_descs = 8, + .num_device_descs = 9, .devices = { {"DiBcom STK7070P reference design" , { &dib0700_usb_id_table[15], NULL },
@@ -1285,6 +1286,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { { &dib0700_usb_id_table[30], NULL }, { NULL }, }, + { "Terratec Cinergy T USB XXS", + { &dib0700_usb_id_table[33], NULL }, + { NULL }, + }, }, .rc_interval = DEFAULT_RC_INTERVAL,
drivers/media/dvb/dvb-usb/dvb-usb-ids.h +2 -1
@@ -137,6 +137,7 @@#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a#define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058#define USB_PID_TERRATEC_CINERGY_HT_EXPRESS 0x0060 +#define USB_PID_TERRATEC_CINERGY_T_XXS 0x0078#define USB_PID_PINNACLE_EXPRESSCARD_320CX 0x022e#define USB_PID_PINNACLE_PCTV2000E 0x022c#define USB_PID_PINNACLE_PCTV_DVB_T_FLASH 0x0228
@@ -191,6 +192,6 @@#define USB_PID_GIGABYTE_U7000 0x7001#define USB_PID_ASUS_U3000 0x171f#define USB_PID_ASUS_U3100 0x173f -#define USB_PID_YUAN_EC372S 0x1edc +#define USB_PID_YUAN_EC372S 0x1edc#endif
drivers/media/video/ov7670.c +3 -1
@@ -406,8 +406,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg,int ret; ret =i2c_smbus_read_byte_data (c, reg); -if (ret >=0 ) +if (ret >=0 ) { *value = (unsigned char ) ret; + ret =0 ; + }return ret; }
drivers/message/fusion/mptspi.c +7 -2
@@ -1266,13 +1266,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd)static int mptspi_ioc_reset (MPT_ADAPTER *ioc,int reset_phase) { -struct _MPT_SCSI_HOST *hd =shost_priv (ioc->sh);int rc; rc =mptscsih_ioc_reset (ioc, reset_phase); -if (reset_phase ==MPT_IOC_POST_RESET ) +/* only try to do a renegotiation if we're properly set up +* if we get an ioc fault on bringup, ioc->sh will be NULL */ +if (reset_phase ==MPT_IOC_POST_RESET && + ioc->sh) { +struct _MPT_SCSI_HOST *hd =shost_priv (ioc->sh); +mptspi_dv_renegotiate (hd); + }return rc; }
drivers/mmc/host/pxamci.c +13 -0
@@ -114,6 +114,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)unsigned int nob = data->blocks;unsigned long long clks;unsigned int timeout; +bool dalgn =0 ;u32 dcmd;int i;
@@ -152,6 +153,9 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) host->sg_cpu[i].dcmd = dcmd | length;if (length &31 && !(data->flags &MMC_DATA_READ )) host->sg_cpu[i].dcmd |=DCMD_ENDIRQEN ; +/* Not aligned to 8-byte boundary? */ +if (sg_dma_address (&data->sg[i]) &0x7 ) + dalgn =1 ;if (data->flags &MMC_DATA_READ ) { host->sg_cpu[i].dsadr = host->res->start +MMC_RXFIFO ; host->sg_cpu[i].dtadr =sg_dma_address (&data->sg[i]);
@@ -165,6 +169,15 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) host->sg_cpu[host->dma_len -1 ].ddadr =DDADR_STOP ;wmb (); +/* +* The PXA27x DMA controller encounters overhead when working with +* unaligned (to 8-byte boundaries) data, so switch on byte alignment +* mode only if we have unaligned data. +*/ +if (dalgn) +DALGN |= (1 << host->dma); +else +DALGN &= ~(1 << host->dma);DDADR (host->dma) = host->sg_dma;DCSR (host->dma) =DCSR_RUN ; }
drivers/mmc/host/sdhci.c +4 -2
@@ -109,7 +109,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = { .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | - SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS, + SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS | + SDHCI_QUIRK_BROKEN_DMA, }, {
@@ -118,7 +119,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = { .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | - SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS, + SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS | + SDHCI_QUIRK_BROKEN_DMA, }, {
drivers/net/3c59x.c +3 -2
@@ -1769,9 +1769,10 @@ vortex_timer(unsigned long data)case XCVR_MII :case XCVR_NWAY : { ok =1 ; -spin_lock_bh (&vp->lock); +/* Interrupts are already disabled */ +spin_lock (&vp->lock);vortex_check_media (dev,0 ); -spin_unlock_bh (&vp->lock); +spin_unlock (&vp->lock); }break ;default :/* Other media types handled by Tx timeouts. */
drivers/net/wireless/b43/leds.c +3 -0
@@ -72,6 +72,9 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,struct b43_wldev *dev = led->dev;bool radio_enabled; +if (unlikely (b43_status (dev) <B43_STAT_INITIALIZED )) +return ; +/* Checking the radio-enabled status here is slightly racy, * but we want to avoid the locking overhead and we don't care * whether the LED has the wrong state for a second. */
drivers/net/wireless/b43/main.c +7 -2
@@ -2607,7 +2607,7 @@ static int b43_op_tx(struct ieee80211_hw *hw,int err;if (unlikely (!dev)) -return NETDEV_TX_BUSY ; + goto drop_packet;/* Transmissions on seperate queues can run concurrently. */ read_lock_irqsave (&wl->tx_lock, flags);
@@ -2619,7 +2619,12 @@ static int b43_op_tx(struct ieee80211_hw *hw,read_unlock_irqrestore (&wl->tx_lock, flags);if (unlikely (err)) -return NETDEV_TX_BUSY ; + goto drop_packet; +return NETDEV_TX_OK ; + +drop_packet: +/* We can not transmit this packet. Drop it. */ +dev_kfree_skb_any (skb);return NETDEV_TX_OK ; }
drivers/net/wireless/b43legacy/dma.c +1 -1
@@ -876,6 +876,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,if (!ring) goto out; ring->type = type; + ring->dev = dev; nr_slots = B43legacy_RXRING_SLOTS;if (for_tx)
@@ -922,7 +923,6 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, DMA_TO_DEVICE); } - ring->dev = dev; ring->nr_slots = nr_slots; ring->mmio_base =b43legacy_dmacontroller_base (type, controller_index); ring->index = controller_index;
drivers/net/wireless/b43legacy/main.c +4 -2
@@ -2350,8 +2350,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw, }else err =b43legacy_dma_tx (dev, skb, ctl); out: -if (unlikely (err)) -return NETDEV_TX_BUSY ; +if (unlikely (err)) { +/* Drop the packet. */ +dev_kfree_skb_any (skb); + }return NETDEV_TX_OK ; }
drivers/net/wireless/zd1211rw/zd_usb.c +1 -0
@@ -64,6 +64,7 @@ static struct usb_device_id usb_ids[] = { { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x050d, 0x705c), .driver_info = DEVICE_ZD1211B }, + { USB_DEVICE(0x083a, 0xe506), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x083a, 0x4505), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x13b1, 0x0024), .driver_info = DEVICE_ZD1211B },
drivers/rapidio/rio-driver.c +1 -1
@@ -101,8 +101,8 @@ static int rio_device_probe(struct device *dev)if (error >=0 ) { rdev->driver = rdrv; error =0 ; + }else rio_dev_put (rdev); - } }return error; }
drivers/scsi/esp_scsi.c +20 -2
@@ -2352,6 +2352,24 @@ void scsi_esp_unregister(struct esp *esp) }EXPORT_SYMBOL (scsi_esp_unregister); +static int esp_target_alloc (struct scsi_target *starget) +{ +struct esp *esp =shost_priv (dev_to_shost (&starget->dev)); +struct esp_target_data *tp = &esp->target[starget->id]; + + tp->starget = starget; + +return 0 ; +} + +static void esp_target_destroy (struct scsi_target *starget) +{ +struct esp *esp =shost_priv (dev_to_shost (&starget->dev)); +struct esp_target_data *tp = &esp->target[starget->id]; + + tp->starget =NULL ; +} +static int esp_slave_alloc (struct scsi_device *dev) {struct esp *esp =shost_priv (dev->host);
@@ -2363,8 +2381,6 @@ static int esp_slave_alloc(struct scsi_device *dev)return -ENOMEM ; dev->hostdata = lp; - tp->starget = dev->sdev_target; -spi_min_period (tp->starget) = esp->min_period;spi_max_offset (tp->starget) =15 ;
@@ -2595,6 +2611,8 @@ struct scsi_host_template scsi_esp_template = { .name = "esp", .info = esp_info, .queuecommand = esp_queuecommand, + .target_alloc = esp_target_alloc, + .target_destroy = esp_target_destroy, .slave_alloc = esp_slave_alloc, .slave_configure = esp_slave_configure, .slave_destroy = esp_slave_destroy,
drivers/scsi/ses.c +1 -1
@@ -61,7 +61,7 @@ static int ses_probe(struct device *dev)return err; } -#define SES_TIMEOUT 30 +#define SES_TIMEOUT (30 * HZ)#define SES_RETRIES 3 static int ses_recv_diag(struct scsi_device *sdev, int page_code,
drivers/serial/8250.c +3 -0
@@ -2564,6 +2564,9 @@ static struct console serial8250_console = {static int __init serial8250_console_init (void ) { +if (nr_uarts >UART_NR ) + nr_uarts =UART_NR ; +serial8250_isa_init_ports ();register_console (&serial8250_console);return 0 ;
drivers/serial/serial_core.c +3 -1
@@ -1950,7 +1950,9 @@ struct uart_match {static int serial_match_port (struct device *dev,void *data) {struct uart_match *match = data; -dev_t devt =MKDEV (match->driver->major, match->driver->minor) + match->port->line; +struct tty_driver *tty_drv = match->driver->tty_driver; +dev_t devt =MKDEV (tty_drv->major, tty_drv->minor_start) + + match->port->line;return dev->devt == devt;/* Actually, only one tty per port */ }
drivers/usb/core/hcd.c +28 -10
@@ -1685,19 +1685,30 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);irqreturn_t usb_hcd_irq (int irq,void *__hcd) {struct usb_hcd *hcd = __hcd; -int start = hcd->state; +unsigned long flags; +irqreturn_t rc; -if (unlikely (start ==HC_STATE_HALT || - !test_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags))) -return IRQ_NONE ; -if (hcd->driver->irq (hcd) ==IRQ_NONE ) -return IRQ_NONE ; +/* IRQF_DISABLED doesn't work correctly with shared IRQs +* when the first handler doesn't use it. So let's just +* assume it's never used. +*/ +local_irq_save (flags); -set_bit (HCD_FLAG_SAW_IRQ , &hcd->flags); +if (unlikely (hcd->state ==HC_STATE_HALT || + !test_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags))) { + rc =IRQ_NONE ; + }else if (hcd->driver->irq (hcd) ==IRQ_NONE ) { + rc =IRQ_NONE ; + }else { +set_bit (HCD_FLAG_SAW_IRQ , &hcd->flags); -if (unlikely (hcd->state ==HC_STATE_HALT )) -usb_hc_died (hcd); -return IRQ_HANDLED ; +if (unlikely (hcd->state ==HC_STATE_HALT )) +usb_hc_died (hcd); + rc =IRQ_HANDLED ; + } + +local_irq_restore (flags); +return rc; }/*-------------------------------------------------------------------------*/
@@ -1861,6 +1872,13 @@ int usb_add_hcd(struct usb_hcd *hcd,/* enable irqs just before we start the controller */ if (hcd->driver->irq) { + + /* IRQF_DISABLED doesn't work as advertised when used together + * with IRQF_SHARED. As usb_hcd_irq() will always disable + * interrupts we can remove it here. + */ + irqflags &= ~IRQF_DISABLED; + snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", hcd->driver->description, hcd->self.busnum); if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
drivers/usb/host/ehci.h +10 -9
@@ -176,6 +176,15 @@ timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)static inline void timer_action (struct ehci_hcd *ehci,enum ehci_timer_action action) { +/* Don't override timeouts which shrink or (later) disable +* the async ring; just the I/O watchdog. Note that if a +* SHRINK were pending, OFF would never be requested. +*/ +if (timer_pending (&ehci->watchdog) + && ((BIT (TIMER_ASYNC_SHRINK ) |BIT (TIMER_ASYNC_OFF )) + & ehci->actions)) +return ; +if (!test_and_set_bit (action, &ehci->actions)) {unsigned long t;
@@ -191,15 +200,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) t =EHCI_SHRINK_JIFFIES ;break ; } - t += jiffies; -// all timings except IAA watchdog can be overridden. -// async queue SHRINK often precedes IAA. while it's ready -// to go OFF neither can matter, and afterwards the IO -// watchdog stops unless there's still periodic traffic. -if (time_before_eq (t, ehci->watchdog.expires) - &&timer_pending (&ehci->watchdog)) -return ; -mod_timer (&ehci->watchdog, t); +mod_timer (&ehci->watchdog, t + jiffies); } }
drivers/usb/host/ohci-hcd.c +14 -1
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");#ifdef CONFIG_MFD_SM501 #include "ohci-sm501.c" -#define PLATFORM_DRIVER ohci_hcd_sm501_driver +#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver#endif #if !defined(PCI_DRIVER) && \
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL"); !defined (OF_PLATFORM_DRIVER ) && \ !defined (SA1111_DRIVER ) && \ !defined (PS3_SYSTEM_BUS_DRIVER ) && \ + !defined (SM501_OHCI_DRIVER ) && \ !defined(SSB_OHCI_DRIVER)#error "missing bus glue for ohci-hcd"#endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void) goto error_ssb;#endif +#ifdef SM501_OHCI_DRIVER + retval =platform_driver_register (&SM501_OHCI_DRIVER ); +if (retval <0 ) + goto error_sm501; +#endif +return retval;/* Error path */ +#ifdef SM501_OHCI_DRIVER + error_sm501: +#endif #ifdef SSB_OHCI_DRIVER error_ssb:#endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init); static void __exit ohci_hcd_mod_exit(void) { +#ifdef SM501_OHCI_DRIVER +platform_driver_unregister (&SM501_OHCI_DRIVER ); +#endif #ifdef SSB_OHCI_DRIVER ssb_driver_unregister (&SSB_OHCI_DRIVER );#endif
drivers/usb/host/ohci-q.c +12 -0
@@ -952,6 +952,7 @@ rescan_this:struct urb *urb;urb_priv_t *urb_priv;__hc32 savebits; +u32 tdINFO; td = list_entry (entry, struct td, td_list); urb = td->urb;
@@ -966,6 +967,17 @@ rescan_this: savebits = *prev & ~cpu_to_hc32 (ohci,TD_MASK ); *prev = td->hwNextTD | savebits; +/* If this was unlinked, the TD may not have been +* retired ... so manually save the data toggle. +* The controller ignores the value we save for +* control and ISO endpoints. +*/ + tdINFO =hc32_to_cpup (ohci, &td->hwINFO); +if ((tdINFO &TD_T ) ==TD_T_DATA0 ) + ed->hwHeadP &= ~cpu_to_hc32 (ohci,ED_C ); +else if ((tdINFO &TD_T ) ==TD_T_DATA1 ) + ed->hwHeadP |=cpu_to_hc32 (ohci,ED_C ); +/* HC may have partly processed this TD */ td_done (ohci, urb, td); urb_priv->td_cnt++;
drivers/usb/misc/sisusbvga/sisusb.c +0 -2
@@ -3264,8 +3264,6 @@ static void sisusb_disconnect(struct usb_interface *intf)/* decrement our usage count */ kref_put (&sisusb->kref, sisusb_delete); - -dev_info (&sisusb->sisusb_dev->dev,"Disconnected\n" ); }static struct usb_device_id sisusb_table [] = {
drivers/video/fb_defio.c +19 -1
@@ -74,6 +74,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, {struct fb_info *info = vma->vm_private_data;struct fb_deferred_io *fbdefio = info->fbdefio; +struct page *cur;/* this is a callback we get when userspace first tries to write to the page. we schedule a workqueue. that workqueue
@@ -83,7 +84,24 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,/* protect against the workqueue changing the page list */ mutex_lock (&fbdefio->lock); -list_add (&page->lru, &fbdefio->pagelist); + +/* we loop through the pagelist before adding in order +to keep the pagelist sorted */ +list_for_each_entry (cur, &fbdefio->pagelist, lru) { +/* this check is to catch the case where a new +process could start writing to the same page +through a new pte. this new access can cause the +mkwrite even when the original ps's pte is marked +writable */ +if (unlikely (cur == page)) + goto page_already_added; +else if (cur->index > page->index) +break ; + } + +list_add_tail (&page->lru, &cur->lru); + +page_already_added:mutex_unlock (&fbdefio->lock);/* come back after delay to process the deferred IO */
fs/buffer.c +8 -5
@@ -818,7 +818,7 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)* contents - it is a noop if I/O is still in * flight on potentially older contents. */ -ll_rw_block (SWRITE ,1 , &bh); +ll_rw_block (SWRITE_SYNC ,1 , &bh);brelse (bh);spin_lock (lock); }
@@ -2952,16 +2952,19 @@ void ll_rw_block(int rw, int nr, struct buffer_head *bhs[])for (i =0 ; i < nr; i++) {struct buffer_head *bh = bhs[i]; -if (rw ==SWRITE ) +if (rw ==SWRITE || rw ==SWRITE_SYNC )lock_buffer (bh);else if (test_set_buffer_locked (bh))continue ; -if (rw ==WRITE || rw ==SWRITE ) { +if (rw ==WRITE || rw ==SWRITE || rw ==SWRITE_SYNC ) {if (test_clear_buffer_dirty (bh)) { bh->b_end_io = end_buffer_write_sync;get_bh (bh); -submit_bh (WRITE , bh); +if (rw ==SWRITE_SYNC ) +submit_bh (WRITE_SYNC , bh); +else +submit_bh (WRITE , bh);continue ; } }else {
@@ -2990,7 +2993,7 @@ int sync_dirty_buffer(struct buffer_head *bh)if (test_clear_buffer_dirty (bh)) {get_bh (bh); bh->b_end_io = end_buffer_write_sync; - ret =submit_bh (WRITE , bh); + ret =submit_bh (WRITE_SYNC , bh);wait_on_buffer (bh);if (buffer_eopnotsupp (bh)) {clear_buffer_eopnotsupp (bh);
fs/cifs/cifsacl.c +5 -5
@@ -34,11 +34,11 @@static struct cifs_wksid wksidarr[NUM_WK_SIDS ] = { {{1 ,0 , {0 ,0 ,0 ,0 ,0 ,0 }, {0 ,0 ,0 ,0 ,0 } },"null user" }, {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,1 }, {0 ,0 ,0 ,0 ,0 } },"nobody" }, - {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (11 ),0 ,0 ,0 ,0 } },"net-users" }, - {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (18 ),0 ,0 ,0 ,0 } },"sys" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (544 ),0 ,0 ,0 } },"root" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (545 ),0 ,0 ,0 } },"users" }, - {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {cpu_to_le32 (32 ),cpu_to_le32 (546 ),0 ,0 ,0 } },"guest" } } + {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (11 ),0 ,0 ,0 ,0 } },"net-users" }, + {{1 ,1 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (18 ),0 ,0 ,0 ,0 } },"sys" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (544 ),0 ,0 ,0 } },"root" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (545 ),0 ,0 ,0 } },"users" }, + {{1 ,2 , {0 ,0 ,0 ,0 ,0 ,5 }, {__constant_cpu_to_le32 (32 ),__constant_cpu_to_le32 (546 ),0 ,0 ,0 } },"guest" } } ;
fs/exec.c +1 -1
@@ -605,7 +605,7 @@ int setup_arg_pages(struct linux_binprm *bprm, bprm->exec -= stack_shift;down_write (&mm->mmap_sem); - vm_flags = vma->vm_flags; + vm_flags =VM_STACK_FLAGS ;/* * Adjust stack execute permissions; explicitly enable for
fs/reiserfs/inode.c +2 -0
@@ -45,6 +45,8 @@ void reiserfs_delete_inode(struct inode *inode) goto out;reiserfs_update_inode_transaction (inode); +reiserfs_discard_prealloc (&th, inode); + err =reiserfs_delete_object (&th, inode);/* Do quota update inside a transaction for journaled quotas. We must do that
include/linux/fs.h +1 -0
@@ -83,6 +83,7 @@ extern int dir_notify_enable;#define READ_SYNC (READ | (1 << BIO_RW_SYNC))#define READ_META (READ | (1 << BIO_RW_META))#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) +#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC))#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))#define SEL_IN 1
kernel/hrtimer.c +8 -0
@@ -896,10 +896,18 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)*/ raise = timer->state ==HRTIMER_STATE_PENDING ; +/* +* We use preempt_disable to prevent this task from migrating after +* setting up the softirq and raising it. Otherwise, if me migrate +* we will raise the softirq on the wrong CPU. +*/ +preempt_disable (); +unlock_hrtimer_base (timer, &flags);if (raise)hrtimer_raise_softirq (); +preempt_enable ();return ret; }
lib/ts_bm.c +1 -1
@@ -63,7 +63,7 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)struct ts_bm *bm =ts_config_priv (conf);unsigned int i, text_len, consumed = state->offset;const u8 *text; -int shift = bm->patlen, bs; +int shift = bm->patlen -1 , bs;for (;;) { text_len = conf->get_next_block (consumed, &text, conf, state);
mm/slub.c +3 -1
@@ -1575,9 +1575,11 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,void **object;struct kmem_cache_cpu *c;unsigned long flags; +unsigned int objsize;local_irq_save (flags); c =get_cpu_slab (s,smp_processor_id ()); + objsize = c->objsize;if (unlikely (!c->freelist || !node_match (c, node))) object =__slab_alloc (s, gfpflags, node, addr, c);
@@ -1590,7 +1592,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,local_irq_restore (flags);if (unlikely ((gfpflags & __GFP_ZERO) && object)) -memset (object,0 , c->objsize); +memset (object,0 , objsize);return object; }
net/can/af_can.c +10 -0
@@ -205,12 +205,19 @@ static int can_create(struct net *net, struct socket *sock, int protocol)* -ENOBUFS on full driver queue (see net_xmit_errno()) * -ENOMEM when local loopback failed at calling skb_clone() * -EPERM when trying to send on a non-CAN interface +* -EINVAL when the skb->data does not contain a valid CAN frame */ int can_send (struct sk_buff *skb,int loop) {struct sk_buff *newskb =NULL ; +struct can_frame *cf = (struct can_frame *)skb->data;int err; +if (skb->len !=sizeof (struct can_frame ) || cf->can_dlc >8 ) { +kfree_skb (skb); +return -EINVAL ; + } +if (skb->dev->type !=ARPHRD_CAN ) {kfree_skb (skb);return -EPERM ;
@@ -605,6 +612,7 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { struct dev_rcv_lists *d; +struct can_frame *cf = (struct can_frame *)skb->data;int matches;if (dev->type !=ARPHRD_CAN || dev->nd_net != &init_net) {
@@ -612,6 +620,8 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,return 0 ; } +BUG_ON (skb->len !=sizeof (struct can_frame ) || cf->can_dlc >8 ); +/* update statistics */ can_stats.rx_frames++; can_stats.rx_frames_delta++;
net/can/bcm.c +19 -4
@@ -326,7 +326,7 @@ static void bcm_send_to_user(struct bcm_op *op, struct bcm_msg_head *head,if (head->nframes) {/* can_frames starting here */ - firstframe = (struct can_frame *)skb_tail_pointer (skb); + firstframe = (struct can_frame *)skb_tail_pointer (skb);memcpy (skb_put (skb, datalen), frames, datalen);
@@ -818,6 +818,10 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,for (i =0 ; i < msg_head->nframes; i++) { err =memcpy_fromiovec ((u8 *)&op->frames[i], msg->msg_iov,CFSIZ ); + +if (op->frames[i].can_dlc >8 ) + err = -EINVAL ; +if (err <0 )return err;
@@ -850,6 +854,10 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,for (i =0 ; i < msg_head->nframes; i++) { err =memcpy_fromiovec ((u8 *)&op->frames[i], msg->msg_iov,CFSIZ ); + +if (op->frames[i].can_dlc >8 ) + err = -EINVAL ; +if (err <0 ) {if (op->frames != &op->sframe)kfree (op->frames);
@@ -1161,9 +1169,12 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk) skb->dev = dev; skb->sk = sk; -can_send (skb,1 );/* send with loopback */ + err =can_send (skb,1 );/* send with loopback */ dev_put (dev); +if (err) +return err; +return CFSIZ +MHSIZ ; }
@@ -1182,6 +1193,10 @@ static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock,if (!bo->bound)return -ENOTCONN ; +/* check for valid message length from userspace */ +if (size <MHSIZ || (size -MHSIZ ) %CFSIZ ) +return -EINVAL ; +/* check for alternative ifindex for this bcm_op */ if (!ifindex && msg->msg_name) {
@@ -1256,8 +1271,8 @@ static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock,break ;case TX_SEND : -/* we need at least one can_frame */ -if (msg_head.nframes <1 ) +/* we need exactly one can_frame behind the msg head */ +if ((msg_head.nframes !=1 ) || (size !=CFSIZ +MHSIZ )) ret = -EINVAL ;else ret =bcm_tx_send (msg, ifindex, sk);
net/can/raw.c +3 -0
@@ -632,6 +632,9 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, }else ifindex = ro->ifindex; +if (size !=sizeof (struct can_frame )) +return -EINVAL ; + dev =dev_get_by_index (&init_net, ifindex);if (!dev)return -ENXIO ;
net/mac80211/tx.c +8 -1
@@ -1090,7 +1090,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,ieee80211_tx_handler *handler;struct ieee80211_txrx_data tx;ieee80211_txrx_result res =TXRX_DROP , res_prepare; -int ret, i; +int ret, i, retries =0 ;WARN_ON (__ieee80211_queue_pending (local, control->queue));
@@ -1181,6 +1181,13 @@ retry:if (!__ieee80211_queue_stopped (local, control->queue)) {clear_bit (IEEE80211_LINK_STATE_PENDING , &local->state[control->queue]); + retries++; +/* +* Driver bug, it's rejecting packets but +* not stopping queues. +*/ +if (WARN_ON_ONCE (retries >5 )) + goto drop; goto retry; } memcpy(&store->control, control,
net/netfilter/nf_conntrack_proto_tcp.c +7 -6
@@ -332,12 +332,13 @@ static unsigned int get_conntrack_index(const struct tcphdr *tcph)I. Upper bound for valid data: seq <= sender.td_maxend II. Lower bound for valid data: seq + len >= sender.td_end - receiver.td_maxwin -III. Upper bound for valid ack: sack <= receiver.td_end -IV. Lower bound for valid ack: ack >= receiver.td_end - MAXACKWINDOW +III. Upper bound for valid (s)ack: sack <= receiver.td_end +IV. Lower bound for valid (s)ack: sack >= receiver.td_end - MAXACKWINDOW -where sack is the highest right edge of sack block found in the packet. +where sack is the highest right edge of sack block found in the packet +or ack in the case of packet without SACK option. -The upper bound limit for a valid ack is not ignored - +The upper bound limit for a valid (s)ack is not ignored - we doesn't have to deal with fragments. */
@@ -607,12 +608,12 @@ static int tcp_in_window(const struct nf_conn *ct,before (seq, sender->td_maxend +1 ),after (end, sender->td_end - receiver->td_maxwin -1 ),before (sack, receiver->td_end +1 ), - after(ack, receiver->td_end - MAXACKWINDOW(sender))); + after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1));if (before (seq, sender->td_maxend +1 ) &&after (end, sender->td_end - receiver->td_maxwin -1 ) &&before (sack, receiver->td_end +1 ) && -after (ack, receiver->td_end -MAXACKWINDOW (sender))) { +after (sack, receiver->td_end -MAXACKWINDOW (sender) -1 )) {/* * Take into account window scaling (RFC 1323). */