Index: linux-2.6/drivers/usb/core/devio.c =================================================================== --- linux-2.6.orig/drivers/usb/core/devio.c 2007-06-12 10:58:57.000000000 -0700 +++ linux-2.6/drivers/usb/core/devio.c 2007-06-12 11:02:19.000000000 -0700 @@ -629,8 +629,14 @@ static int proc_control(struct dev_state return -EFAULT; if ((ret = check_ctrlrecip(ps, ctrl.bRequestType, ctrl.wIndex))) return ret; +#if PAGE_SIZE < 65536 + /* + * ctrl.wLength is a 16 bit value that cannot be greater + * than page size if PAGE_SIZE >= 64k. + */ if (ctrl.wLength > PAGE_SIZE) return -EINVAL; +#endif if (!(tbuf = (unsigned char *)__get_free_page(GFP_KERNEL))) return -ENOMEM; tmo = ctrl.timeout; Index: linux-2.6/fs/fat/inode.c =================================================================== --- linux-2.6.orig/fs/fat/inode.c 2007-06-12 10:59:53.000000000 -0700 +++ linux-2.6/fs/fat/inode.c 2007-06-12 11:01:17.000000000 -0700 @@ -1223,8 +1223,15 @@ int fat_fill_super(struct super_block *s logical_sector_size = le16_to_cpu(get_unaligned((__le16 *)&b->sector_size)); if (!is_power_of_2(logical_sector_size) - || (logical_sector_size < 512) - || (PAGE_CACHE_SIZE < logical_sector_size)) { +#if PAGE_SIZE < 65536 + /* + * Logical sector size is a 16 bit value. + * If the page size is 64k or higher then the comparison + * is always true. + */ + || (PAGE_CACHE_SIZE < logical_sector_size) +#endif + || (logical_sector_size < 512)) { if (!silent) printk(KERN_ERR "FAT: bogus logical sector size %u\n", logical_sector_size);