id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0f45d7f36b766cb668cebfb5d4d2f67b4a8676ba
Analyze and fix the following issue in the Linux kernel code: [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores.
Problem Details: There is no FSR/FAR register on no-CP15 or MPU cores. This patch adds a dummy abort handler which returns zero for the base restored Data Abort model !CPU_CP15_MMU cores. The abort-lv4t.S is still used with the fix-up for the base updated Data Abort model cores. Signed-off-by: Hyok S. Choi <hyok.choi@...
```diff diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index ae427de27ce0..6c1bd424ea61 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -97,7 +97,7 @@ config CPU_ARM9TDMI bool "Support ARM9TDMI processor" depends on !MMU select CPU_32v4T - select CPU_ABRT_EV4T + select CPU_ABRT_NOMMU selec...
3d27b00457167103fb9f7e23fc2454c801a6b8f0
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix lockdep error upon "ifconfig ibN down"
Problem Details: Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 56c01938f714..42eaed88c281 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -1202,6 +1202,7 @@ static struct ib_ah *ipath_create_ah(struct ib_pd *pd, ...
7a26c47412b201e1977ad42b760885f825158915
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix races with ib_resize_cq()
Problem Details: The resize CQ function changes the memory used to store the queue. Other routines need to honor the lock before accessing the pointer to the queue and verify that the head and tail are in range. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.co...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 00440d5c91e0..87462e0cb4d2 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c @@ -46,7 +46,7 @@ */ void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int...
1a4e74a08788db913486cb9a3dc30984c55e9897
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix EEPROM read when driver is compiled with -Os
Problem Details: The EEPROM is read via programmable I/O pins. When the driver is compiled -Os, the CPU can speculatively read the I/O value before it is valid. This patch fixes the problem. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index c8cfda89cb36..a4019a6b7560 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c @@ -187,6 +187,7 @@ bail: static void i2c_wait_for_writes(struct ipath_d...
89d1e09b6a6d844ef327937f41658a426be42501
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix and recover TXE piobuf and PBC parity errors
Problem Details: We can sometimes trigger parity errors due to processor speculative reads to our write-combined memory (mostly seen on Woodcrest). Add a stats counter for these. Factored out the sendbuffererror buffer cancellation code so it can be used in the new handling; suppress likely subsequent error messages...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index 382956d2ea4b..a9b109a353bc 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h @@ -141,8 +141,9 @@ struct infinipath_stats { * packets if ipath not c...
5659416207a9bcf35a646c7b798b290953e4891c
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix mismatch in shifts and masks for printing debug info
Problem Details: Fixed mismatch in linkstate/trainingstate shifts and masks in the IPATH_IBSTATE_MASK macro. It kept some linktrainingstates from being printed correctly in debug; no functionality issue unless I misread the code. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreie...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 37612a83deeb..25c901e4a352 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h @@ -223,9 +223,9 @@ /* combination link status states that...
0624b072f230af4f24c112019b04f898ef7b4e2c
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix compiler warnings and errors on non-x86_64 systems
Problem Details: Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index caf8cb891da4..d4fc4118ddd5 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -206,11 +206,10 @@ static int ipath_get_base_info(struct file ...
221e31985b490309eb9ae33ac815deae3b5aa021
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix memory leak if allocation fails
Problem Details: If the second allocation failed, the first structure allocated in this routine was not freed. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 2108466c7e33..a01301d0753c 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -1326,6 +1326,9 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, ...
fd6a79a786b84510d00ee6aa6449a468e6d75dee
Analyze and fix the following issue in the Linux kernel code: IB/iser: Fix the description of iSER in Kconfig
Problem Details: Fix the description of iSER in Kconfig. It is not accurate. Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/iser/Kconfig b/drivers/infiniband/ulp/iser/Kconfig index 365a1b5f19e0..aecbb9083f0c 100644 --- a/drivers/infiniband/ulp/iser/Kconfig +++ b/drivers/infiniband/ulp/iser/Kconfig @@ -1,11 +1,12 @@ config INFINIBAND_ISER - tristate "ISCSI RDMA Protocol" + tristate "iSCSI Extensio...
ee30cb5b0b65392843cc3beaba48160ee4a3764e
Analyze and fix the following issue in the Linux kernel code: RDMA/amso1100: Fix memory leak in c2_reg_phys_mr()
Problem Details: If the allocation of mr fails, then c2_reg_phys_mr() leaks the page_list array it allocated earlier. This was Coverity CID #1413. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c index 622d6f1f920d..da98d9f71429 100644 --- a/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/drivers/infiniband/hw/amso1100/c2_provider.c @@ -390,8 +390,10 @@ static struct ib_mr *c2_reg_phys_mr(struct i...
44334bd97e76662c5f40c629357e6acc4dee3e8a
Analyze and fix the following issue in the Linux kernel code: RDMA/amso1100: Fix error path in c2_llp_accept()
Problem Details: Another NULL dereference spotted by the Coverity checker (cid #1395): In case we can't alloc the vq_req, we goto bail1, where we call vq_req_free(c2dev, vq_req); which then dereferences vq_req. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Acked-by: Tom...
```diff diff --git a/drivers/infiniband/hw/amso1100/c2_cm.c b/drivers/infiniband/hw/amso1100/c2_cm.c index 485254efdd1e..75b93e9b8810 100644 --- a/drivers/infiniband/hw/amso1100/c2_cm.c +++ b/drivers/infiniband/hw/amso1100/c2_cm.c @@ -302,7 +302,7 @@ int c2_llp_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *iw...
23c100d99c1dfd0bba49a63fb02a8f8fddad607b
Analyze and fix the following issue in the Linux kernel code: [S390] hypfs sparse warnings.
Problem Details: sparse complains, if we use bitwise operations on enums. Cast enum to long in order to fix that problem! Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 75144efbb92b..684384f2b364 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c @@ -403,7 +403,8 @@ static void *diag204_get_buffer(enum diag204_format fmt, int *pages) *pages = 1; return diag204_alloc_r...
d639ca94188fedbd8cfde1ab4ed9e9878ab2f01e
Analyze and fix the following issue in the Linux kernel code: [libata] init probe_ent->private_data in a common location
Problem Details: Don't write the same code twice, in two different functions, when they both call the same initialization function, with the same private_data pointer info. Also, note a bug found with a FIXME. Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 396493cc98ce..72644bdecbb0 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5785,6 +5785,7 @@ ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) probe_ent->mwdma_mask = port->mwdma_mask; ...
c791c30670ea61f19eec390124128bf278e854fe
Analyze and fix the following issue in the Linux kernel code: [libata] minor PCI IDE probe fixes and cleanups
Problem Details: * Replace needless 'n_ports > 2' check with a simple BUG_ON(). No existing driver ever wants more than 2 ports. * Delete ATA_FLAG_NO_LEGACY check. No current driver uses ata_pci_init_one(), that sets this flag. * Move PCI_CLASS_PROG register read below pci_enable_device() * Handle ata_device_ad...
```diff diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 08b3a407473e..a620e235ccc2 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -946,35 +946,21 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, { struct ata_probe_ent *probe_ent = NULL; ...
6216ff18839bf302805f67c93e8bc344387c513b
Analyze and fix the following issue in the Linux kernel code: [XFS] pv 956240, author: nathans, rv: vapo - Minor fixes in
Problem Details: kmem_zalloc_greedy() SGI-PV: 956240 SGI-Modid: xfs-linux-melb:xfs-kern:26983a Signed-off-by: Vlad Apostolov <vapo@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 80b9340488e5..d59737589815 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c @@ -72,15 +72,20 @@ void * kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize, unsigned int __nocast flags) { - void *ptr; + voi...
f273ab848b7cbc0088b0ac7457b3769e6566074e
Analyze and fix the following issue in the Linux kernel code: [XFS] Really fix use after free in xfs_iunpin.
Problem Details: The previous attempts to fix the linux inode use-after-free in xfs_iunpin simply made the problem harder to hit. We actually need complete exclusion between xfs_reclaim and xfs_iunpin, as well as ensuring that the i_flags are consistent during both of these functions. Introduce a new spinlock for exclu...
```diff diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 9df9ed37d219..38c4d128a8c0 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -227,7 +227,9 @@ xfs_initialize_vnode( xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); xfs_set_inodeops(inode); + spin...
edcd4bce5e58987c8c039bdf7705a22cd229fe96
Analyze and fix the following issue in the Linux kernel code: [XFS] Minor cleanup from dio locking fix, remove an extra conditional.
Problem Details: SGI-PV: 955696 SGI-Modid: xfs-linux-melb:xfs-kern:26908a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index ee788b1cb364..55992b40353c 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -270,12 +270,12 @@ xfs_read( } } - if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp))) - bhv_vop_flushinval_pages(vp, ctoo...
215101c36012399cf2eaee849de54eeefc9f618c
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms.
Problem Details: SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26907a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 8b2c6cf2c849..7c6a3a50379e 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -112,7 +112,8 @@ xfs_Gqm_init(void) { xfs_dqhash_t *udqhash, *gdqhash; xfs_qm_t *xqm; - uint i, hsize; + size_t hsize; + uint i; /* * Initi...
955e47ad28b5b255ddcd7eb9cb814a269dc6e991
Analyze and fix the following issue in the Linux kernel code: [XFS] Fixes the leak in reservation space because we weren't ungranting
Problem Details: space for the unmount record - which becomes a problem in the freeze/thaw scenario. SGI-PV: 942533 SGI-Modid: xfs-linux-melb:xfs-kern:26815a Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index ac999789a44d..c48bf61f17bd 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -617,7 +617,8 @@ xfs_log_unmount_write(xfs_mount_t *mp) reg[0].i_len = sizeof(magic); XLOG_VEC_SET_TYPE(&reg[0], XLOG_REG_TYPE_UNMOUNT); - error = xfs_log_reserve(m...
68c3271515f11f6665dc8732e53aaab3d3fdd7d3
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix a porting botch on the realtime subvol growfs code path.
Problem Details: SGI-PV: 955515 SGI-Modid: xfs-linux-melb:xfs-kern:26806a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 14d840208e81..2b0e0018738a 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -332,4 +332,11 @@ static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y) return(x * y); } +static inline __uint6...
b627259c602f3f1b995d09aad2b57bed889430b9
Analyze and fix the following issue in the Linux kernel code: [XFS] Remove a no-longer-correct debug assert from dio completion
Problem Details: handling. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26804a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 7cde30d29393..09360cf1e1f2 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -1356,7 +1356,6 @@ xfs_end_io_direct( ioend->io_size = size; xfs_finish_ioend(ioend); } else { - ASSERT(size >= 0); xf...
efb8ad7e9431a430a75d44288614cf6047ff4baa
Analyze and fix the following issue in the Linux kernel code: [XFS] Add a debug flag for allocations which are known to be larger than
Problem Details: one page. SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26800a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index aba7fcf881a2..f77fe5c8fcc1 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c @@ -34,6 +34,14 @@ kmem_alloc(size_t size, unsigned int __nocast flags) gfp_t lflags = kmem_flags_convert(flags); void *ptr; +#ifdef DEBUG + if...
745b1f47fc0c68dbb1ff440eec8889f61e57194b
Analyze and fix the following issue in the Linux kernel code: [XFS] Remove last bulkstat false-positives with debug kernels.
Problem Details: SGI-PV: 953819 SGI-Modid: xfs-linux-melb:xfs-kern:26628a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 76813d608dea..a446e5a115c6 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -1195,6 +1195,7 @@ xfs_dilocate( "(0x%llx)", ino, XFS_AGINO_TO_INO(mp, agno, agino)); } + xfs_stack_trace(); #endif /* DEBUG */ return XFS_ERR...
ed9d88f7b7e6feba457b87ff30249e6c1e139005
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix sparse warning found when page tracing enabled, due to
Problem Details: overloaded gfp_t param. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26552a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 34dcb43a7837..7cde30d29393 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -71,7 +71,7 @@ xfs_page_trace( int tag, struct inode *inode, struct page *page, - int mask) + unsigned long pgoff) { xf...
673cdf5c72ff9551df08a71f2ac1a8fe02888e8d
Analyze and fix the following issue in the Linux kernel code: [XFS] Fix rounding bug in xfs_free_file_space found by sparse checking.
Problem Details: SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26551a Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
```diff diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 23cfa5837728..4fbc3e1cac00 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -4272,7 +4272,7 @@ xfs_free_file_space( xfs_mount_t *mp; int nimap; uint resblks; - int rounding; + uint rounding; int rt; xfs_fileof...
c38778c3a9aeadcd1ee319cfc8ea5a9cbf8cdafa
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix reference of uninitialised memory in ata_device_add()
Problem Details: ata_device_add fails, calls ata_host_remove with pointers to unitialized memory. Signed-off-by: Dave Jones <davej@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b4abd6850367..396493cc98ce 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5478,11 +5478,10 @@ int ata_device_add(const struct ata_probe_ent *ent) int irq_line = ent->irq; ap = ata_port_add(ent, host, i);...
6edf602341cd8f6e79479ff7f5bca72562c1f608
Analyze and fix the following issue in the Linux kernel code: RDMA/amso1100: Fix compile warnings
Problem Details: Make sure all 64-bit quantities are cast to unsigned long long when printed with "%ll" printk formats. Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/amso1100/c2_ae.c b/drivers/infiniband/hw/amso1100/c2_ae.c index 08f46c83a3a4..3aae4978e1cb 100644 --- a/drivers/infiniband/hw/amso1100/c2_ae.c +++ b/drivers/infiniband/hw/amso1100/c2_ae.c @@ -197,7 +197,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) "resource=%x...
fab2062ee4a3969a9c6cb7155534d0d15ddeff54
Analyze and fix the following issue in the Linux kernel code: [PATCH] git-netdev-all: pc300_tty build fix
Problem Details: In file included from drivers/net/wan/pc300_tty.c:59: drivers/net/wan/pc300.h:335: error: field 'pppdev' has incomplete type Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/wan/pc300.h b/drivers/net/wan/pc300.h index 2024b26b99e6..63e9fcf31fb8 100644 --- a/drivers/net/wan/pc300.h +++ b/drivers/net/wan/pc300.h @@ -100,6 +100,7 @@ #define _PC300_H #include <linux/hdlc.h> +#include <net/syncppp.h> #include "hd64572.h" #include "pc300-falc-lh.h" ```
793fab727324adc90a0a2889f2b1d88bae4790eb
Analyze and fix the following issue in the Linux kernel code: e1000: possible memory leak in e1000_set_ringparam
Problem Details: Memory allocated for new tx_ring and rx_ring leaks if e1000_setup_XX_resources() fails.c Also this patch reduces stack usage (removed tx_new and rx_new) and uses kzalloc instead kmalloc+memset(0) Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Auke ...
```diff diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 2cc949a34451..778ede3c0216 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -646,8 +646,8 @@ e1000_set_ringparam(struct net_device *netdev, { struct e1000_adapter *adapter = netde...
2a88c17371c3c263c28330093a4cd21bbeceb677
Analyze and fix the following issue in the Linux kernel code: e1000: rework polarity, NVM, eeprom code and fixes.
Problem Details: Several minor issues exist in the low-level device handling code of e1000. The NVM and EEPROM writing/reading code was updated which fixes unneeded delays, adds proper eeprom aqcuiring steps and handle shadow ram and flash access. Minor cosmetic adjustments to the polarity code adding symbols. PHY rese...
```diff diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 48aff8d054f9..65077f39da69 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c @@ -662,19 +662,12 @@ e1000_reset_hw(struct e1000_hw *hw) E1000_WRITE_FLUSH(hw); } /* ...
1314bbf3a3d911218fc153e14873e2e384d08084
Analyze and fix the following issue in the Linux kernel code: e1000: driver state fixes (race fix)
Problem Details: We were plagued by our interrupt handler posting a watchdog event which could occur when our adapter was going down in case a late packet arrived just before e1000_down() finished. This caused the watchdog timer to start after the NIC was down and keep rescheduling it every N seconds. Once the driver u...
```diff diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index a9501e7b8ef9..7ecce438d258 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -345,8 +345,9 @@ struct e1000_adapter { }; enum e1000_state_t { - __E1000_DRIVER_TESTING, + __E1000_TESTING, __E1000_RESETTING, + __...
249d71d694ee3a6c02067235995d6d4258d364f3
Analyze and fix the following issue in the Linux kernel code: e1000: Jumbo frames fixes for 82573
Problem Details: Disable jumbo frames for 82573L alltogether and when ASPM is enabled since the hardware has problems with it. For the NICs that do support this in the 82573 series we set ERT_2048 to attempt to receive as much traffic as early as we can. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index e55fb9cc41c3..a1f5b0605363 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3138,11 +3138,13 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu) } break; case e1000_82573: - /*...
5f01607a5b5c8781ed5d5deae213b4f01283dba2
Analyze and fix the following issue in the Linux kernel code: e1000: Fix MANC detection for PCIE adapters
Problem Details: Several manageability capability detection parts hinted towards our code being incomplete for PCI-E. According to spec, we do not want to poke any MANC bits at all. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 5296a82c22b8..e55fb9cc41c3 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -662,9 +662,7 @@ e1000_reset(struct e1000_adapter *adapter) phy_data); } - if (adapter->hw....
dc45010e28bc4a1bfa6043eee31d1c59e93e1546
Analyze and fix the following issue in the Linux kernel code: e100: Add debugging code for cb cleaning.
Problem Details: Refine cb cleaning debug printout and print out all cleaned cbs' status. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
```diff diff --git a/drivers/net/e100.c b/drivers/net/e100.c index ab0868cb120c..3909829d5199 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -1657,13 +1657,14 @@ static int e100_tx_clean(struct nic *nic) spin_lock(&nic->cb_lock); - DPRINTK(TX_DONE, DEBUG, "cb->status = 0x%04X\n", - nic->cb_to_clean-...
0eb5a34cdf34ad07b6db2df1e523aaf6574601b4
Analyze and fix the following issue in the Linux kernel code: e100, e1000, ixgb: Fix an impossible memory overwrite bug
Problem Details: We keep getting requests from people that think that this might be an exploitable hole where we would overwrite 4 bytes in the netdev struct if the pci name would exceed 15 characters. In reality this will never happen but we fix it anyway. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
```diff diff --git a/drivers/net/e100.c b/drivers/net/e100.c index d9750e269a56..ab0868cb120c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2572,7 +2572,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e100_netpoll; #endif - strcpy...
7f38aa0f04259d37f26e1e906607f1ebb39c0c5c
Analyze and fix the following issue in the Linux kernel code: [PATCH] USB Storage: fix Rio Karma eject support build error
Problem Details: In file included from drivers/usb/storage/usb.c:180: drivers/usb/storage/unusual_devs.h:221: error: 'US_PR_KARMA' undeclared here (not in a function) drivers/usb/storage/unusual_devs.h:221: error: 'rio_karma_init' undeclared here (not in a function) Cc: Keith Bennett <keith@mcs.st-and.ac.uk> Acked-by:...
```diff diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 1f11c9d44eaa..40bf159f7d54 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -218,10 +218,12 @@ UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, US_SC_DEVICE, US_PR_...
5dda171202f94127e49c12daf780cdae1b4e668b
Analyze and fix the following issue in the Linux kernel code: USB: Airprime driver improvements to allow full speed EvDO transfers
Problem Details: Adapted from an earlier patch by Greg KH <gregkh@suse.de>. That patch added multiple read urbs and larger transfer buffers to allow data transfers at full EvDO speed. This version includes additional device IDs and fixes a memory leak in the transfer buffer allocation. Some (maybe all?) of the suppor...
```diff diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 62082532a8b3..6e1a84a858d4 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -1,7 +1,7 @@ /* * AirPrime CDMA Wireless Serial USB driver * - * Copyright (C) 2005 Greg Kroah-Hartman <gregkh@suse.d...
8ac283ad415358f022498887811c35ac656b5222
Analyze and fix the following issue in the Linux kernel code: aircable: fix printk format warnings
Problem Details: Fix printk format warnings: drivers/usb/serial/aircable.c:221: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ drivers/usb/serial/aircable.c:283: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ Signed-off-by: Randy Dunlap <rdunlap@xen...
```diff diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 8aaf7db93992..2ccd9ded52a5 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c @@ -218,7 +218,7 @@ static void aircable_send(struct usb_serial_port *port) buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_...
48298e50e0f7dfc7273ebfaa37ffd225428e83ed
Analyze and fix the following issue in the Linux kernel code: cypress_m8: improve control endpoint error handling
Problem Details: Fix usb core function error return checks to look for negative errno values, not positive errno values. This bug had rendered those checks useless. Also remove attempted error recovery on control endpoints for EPIPE - with control endpoints EPIPE does not indicate a halted endpoint so trying to recov...
```diff diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 741dcec36d41..12a265c4a13b 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -367,9 +367,7 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m if (tries++...
0257fa9ffe4f0287a9d90476bb733cfc2272396e
Analyze and fix the following issue in the Linux kernel code: cypress_m8: use appropriate URB polling interval
Problem Details: The polling interval for the device can't always be 1msec. If it is too quick, the device can fail causing a fatal (to the driver) EILSEQ error from the USB core. The actual correct value is reported by the device as part of its configuration data, so use that value as the default. On a DeLorme Eart...
```diff diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index ee70fddcab60..40cfbe1d3517 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -129,6 +129,8 @@ struct cypress_private { int cmd_ctrl; /* always set this to 1 before issuing a command */...
13f4db9e1bf0a6efcdbbb3a1e4da8a1a8c620fff
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/serial/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c6115aa1b445..1f7b72553f37 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1101,25 +1101,29 @@ static ssize_t store_event_char(struct device *dev, struct device_attribute *att static DEVICE_ATTR(...
1ee95216c0db6305c047a90b0822e2f1d2d5acdc
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/host/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 9cd6270d06bc..34b7a31cd85b 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -785,10 +785,11 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); static inline void create_debug_files (st...
657b6717e7e7dc5620525a34f1561b563fd472fa
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/input/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 7b45fd3de911..7291e7a2717b 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c @@ -971,7 +971,7 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) DRIVER_VERSION, sizeof(DRIVE...
96cede531c632ac019003bf40128b1821761a164
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/class/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 9b05a359b9f7..9cac11ca1bb7 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -927,7 +927,9 @@ static int usblp_probe(struct usb_interface *intf, /* Retrieve and store the device ID string. */ usblp_cache_devic...
e7ccdfec087f02930c5cdc81143d4a045ae8d361
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/atm/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index b38990adf1cd..465961a26e4a 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -1621,26 +1621,32 @@ static int claim_interface(struct usb_device *usb_dev, return ret; } -static void create_fs_entries(...
4d42e1bb9e8ec7eb5e39d82aaf3ff2f3c994af84
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/misc/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 9c46746d5d00..b63b5f34b2aa 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c @@ -209,7 +209,7 @@ static int cypress_probe(struct usb_interface *interface, dev = kzalloc(sizeof(*dev), G...
1b21d5e166e104f8914441ef52e2cd50ce65b479
Analyze and fix the following issue in the Linux kernel code: USB: fix __must_check warnings in drivers/usb/core/
Problem Details: Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index fd345ad810f8..71bbd25a4ed0 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1359,7 +1359,7 @@ static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl) /* let kernel drivers try to (re)bind to the inte...
592fbbe4bc339399d363dd55f0391e0623400706
Analyze and fix the following issue in the Linux kernel code: USB: fix root-hub resume when CONFIG_USB_SUSPEND is not set
Problem Details: This patch (as786) removes a redundant test and fixes a problem involving repeated system sleeps when CONFIG_USB_SUSPEND is not set. During the first wakeup, the root hub's dev.power.power_state.event field doesn't get updated, causing it not to be suspended during the second sleep transition. This ta...
```diff diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 2b2000ac05ab..0d063c8ca4b4 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1071,10 +1071,15 @@ int usb_resume_both(struct usb_device *udev) PM_EVENT_ON) status = -EHOSTUNREACH; } - if (status == 0 ...
901b3d75e71535f29b64f352e94ff474d95df475
Analyze and fix the following issue in the Linux kernel code: USB: net2280: update dma buffer allocation
Problem Details: This updates the code handling dma-coherent buffer allocations, basically reusing code from the musb_hdrc driver. Instead of trying to work around two significant limitations of the dma framework (memory wastage for buffers smaller than a page, and inconsistency between calling context requirements fo...
```diff diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 09243239d948..3bda37f9a35f 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c @@ -2,7 +2,7 @@ * Driver for the PLX NET2280 USB device controller. * Specs and errata are available from <http://www.plxtech...
80f8af0c59385b41564a3ae670f94a1b4caa43b2
Analyze and fix the following issue in the Linux kernel code: USB: usb serial gadget smp related bug
Problem Details: Adjust dev->dev_lock spinlock lock/unlock calls to be safe for SMP case. Otherwise the following sequence may lead to a deadlock in SMP case: gs_send()->usb_ep_queue() ->(in case a request is satisfied immediatly) gs_write_complete() for ex for pxa2xx_udc.c: usb_ep_queue()->pxa2xx_ep_queue()->write...
```diff diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index e762aa19ab0a..b893e3118e1b 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -1120,12 +1120,15 @@ static int gs_send(struct gs_dev *dev) gs_debug_level(3, "gs_send: len=%d, 0x%2.2x 0x%2.2x 0x%2.2x ...\n", l...
53bd6a601a87bb6d0df844872bc15fd4e8d127ce
Analyze and fix the following issue in the Linux kernel code: USB: EHCI whitespace fixes (cosmetic)
Problem Details: [ ... when you have an editor set to remind you of whitespace bugs ... ] Cosmetic EHCI changes: remove end-of-line whitespace, spaces before tabs. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 215ce6d06394..9cd6270d06bc 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2001-2002 by David Brownell - * + * * This program is free software; you can redistribute it...
4d6cd48380c4d361cc8ec34359df22377d85d202
Analyze and fix the following issue in the Linux kernel code: usbmon: don't call mon_dmapeek if DMA isn't being used
Problem Details: This patch (as755b) fixes a bug in usbmon. Rather than assuming all USB host controllers use DMA, the code will check the usb_bus data structure. If DMA isn't used, we don't want to try peeking into a non-existent DMA buffer! Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg ...
```diff diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c index e0ed36cdfd8b..394bbf2f68d4 100644 --- a/drivers/usb/mon/mon_main.c +++ b/drivers/usb/mon/mon_main.c @@ -301,6 +301,7 @@ static void mon_bus_init(struct dentry *mondir, struct usb_bus *ubus) */ mbus->u_bus = ubus; ubus->mon_bus = m...
511366da534bad226e89d294c3b3e910a2aaba6b
Analyze and fix the following issue in the Linux kernel code: USB: usb-hub-driver-improve-use-of-ifdef fix
Problem Details: Fix CONFIG_PM=n build. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 65720f2bffc8..f5adce049b35 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1895,6 +1895,8 @@ static inline int remote_wakeup(struct usb_device *udev) return 0; } +#define hub_suspend NULL +#define hub_resume NULL #endi...
3a3416b12f1fbd607bc137a57c924a628aa5485c
Analyze and fix the following issue in the Linux kernel code: usb-storage: fix for UFI LUN detection
Problem Details: The UFI specification doesn't permit devices to indicate non-existent LUNs in the manner prescribed by the SCSI spec. This patch (as773) sets a special flag so that the SCSI scanner will recognize these devices and treat them specially. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off...
```diff diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index a4b7df9ff8c1..e1072d52d641 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -72,12 +72,27 @@ static const char* host_info(struct Scsi_Host *host) static int slave_alloc (struct scsi_device *s...
e113f29c902f0f4bbfa5370c380e5927e6e78f8e
Analyze and fix the following issue in the Linux kernel code: USB: fix typo in drivers/usb/gadget/Kconfig
Problem Details: This tiny patch fixes a typo in drivers/usb/gadget/Kconfig. The typo is present in 2.6.18-rc4 and in the corresponding -mm tree (and AFAIK, FYI and FWIW was present in previous kernel versions as well). From: Jules Villard <jvillard@ens-lyon.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 4301e96c417b..8e5dd6f29d0b 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -26,7 +26,7 @@ config USB_GADGET you need a low level bus controller driver, and some software talking to it. Peripheral co...
55359021b9a75a6d61a49ca8b9a1209793cd55f7
Analyze and fix the following issue in the Linux kernel code: USB: fix signedness issue in drivers/usb/gadget/ether.c
Problem Details: another gcc 4.1 signdness warning: drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false length is assigned the value of usb_ep_queue() which returns an int. Directly after this it is checked for < 0, which can never be true. Making length an int makes the e...
```diff diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index fed484da593c..1cc3c0227d10 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2014,7 +2014,7 @@ rndis_control_ack_complete (struct usb_ep *ep, struct usb_request *req) static int rndis_control_ack (struct net_d...
c07045412f21c5bb344244e8ec45671529e411bd
Analyze and fix the following issue in the Linux kernel code: usb-skeleton: small update
Problem Details: o CodingStyle fixes o Removes trailing spaces o Do not make not needed initialiation of automatic variables o Use usb_endpoint_* functions o If we get an error in the write URB callback print an error message instead of a debug one (Pretty unrelated changes, but spliting this up doesn't pay off as o...
```diff diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index 3339373239ad..9b542a6ba978 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -1,5 +1,5 @@ /* - * USB Skeleton driver - 2.1 + * USB Skeleton driver - 2.2 * * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@...
d5cbad4b8b37acfde3e63d31b92561b87288ad0f
Analyze and fix the following issue in the Linux kernel code: usbcore: khubd and busy-port handling
Problem Details: We don't want khubd to start interfering in the device-resume process merely because the PORT_STATUS_C_SUSPEND feature happens to be set. Ports need to be marked as busy while a resume is taking place. In addition, so long as ports are marked as busy, khubd won't be able to clear their various status-...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 3924dd080bea..bdf5be099650 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1658,6 +1658,8 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev) // dev_dbg(hub->intfdev, "resume port %d\n", port1); ...
3d5b2510f6e361e2203e163c03b93d0026de5629
Analyze and fix the following issue in the Linux kernel code: USB: making the kernel -Wshadow clean - USB & completion
Problem Details: include/linux/usb.h causes a lot of -Wshadow warnings - fix them. include/linux/usb.h:901: warning: declaration of 'complete' shadows a global declaration include/linux/completion.h:52: warning: shadowed declaration is here include/linux/usb.h:932: warning: declaration of 'complete' shadows a gl...
```diff diff --git a/include/linux/usb.h b/include/linux/usb.h index e22f4b386605..3d5cfa731680 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -932,7 +932,7 @@ struct urb * @setup_packet: pointer to the setup_packet buffer * @transfer_buffer: pointer to the transfer buffer * @buffer_length: length ...
066202dd48cf3296b6cc22b5fcf89aef33fa0efc
Analyze and fix the following issue in the Linux kernel code: USB: Make file operations structs in drivers/usb const.
Problem Details: Making structs const prevents accidental bugs and with the proper debug options they're protected against corruption. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 48dee4b8d8e5..292919d260a0 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -813,7 +813,7 @@ static unsigned int usblp_quirks (__u16 vendor, __u16 product) return 0; } -static struct file_operations usblp_fops...
8a7471aba19dc526978a03bfe2e3c122712b5900
Analyze and fix the following issue in the Linux kernel code: USB: fix ep_config to return correct value
Problem Details: This patch fixes ep_config to return correct value. Without patch ep_config returns submitted lenght minus 4 on succes. With this patch applied, whole submitted lenght is returned. ep_config parses submitted data and if buffer starts with (int) 1 it is parsed, otherwise error is reported. Problem is t...
```diff diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index da85732fa993..72c88aa94d5d 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -741,7 +741,7 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr) struct ep_data *data = fd->private_da...
bd35078f47f795569fae29b2ff187e6f921460ad
Analyze and fix the following issue in the Linux kernel code: USB: build fixes: ohci-omap
Problem Details: The ohci-omap code has diverged from the working version in the linux-omap tree; this syncs up the versions: - Another clock is needed in various cases - The omap-1510 iommu code needs to be #ifdeffed out on newer parts - Saner use of the HCD framework - Various other changes, e.g. a Nokia 770...
```diff diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 47f1c9bbef87..160cd4c58a03 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -4,7 +4,7 @@ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 2000-2005 David Brownell * (C) C...
ecdc0a590268f1926ed8534a040a390c77d20948
Analyze and fix the following issue in the Linux kernel code: USB: usbcore get rid of the timer in usb_start_wait_urb()
Problem Details: This patch uses completion timeout instead of a timer to implement a timeout when submitting an URB in usb_start_wait_urb(). It also fixes a small issue. With the previous code, if no timeout happened and the URB's status was set to ECONNRESET value, the code assumed wrongly that a timeout had occured...
```diff diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 4cc8d3e67db7..49cfd7928a1c 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -23,59 +23,44 @@ static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs) } -static void timeout_kill(unsig...
014aa2a3c32ebe33f97e9d219d91d3c5c7231bf7
Analyze and fix the following issue in the Linux kernel code: USB: ipaq: minor ipaq_open() cleanup.
Problem Details: Commit b512504e5671f83638be0ddr085c4b1832f623d3 made ipaq_open() a bit messy by moving the read urb submission far from its usb_fill_bulk_urb() call and the comment explaining what it does. This patch put they together again. Although only compiled tested, should not break the fix introduced by b5125...
```diff diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 9840bade79f9..bfc6998cd16f 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c @@ -652,11 +652,6 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) port->bulk_out_size = port->write_urb->transfer_...
25d94e682ccb8938177bffafa67a7d21c7282a4a
Analyze and fix the following issue in the Linux kernel code: usbnet: printk format warning
Problem Details: Fix printk format warning(s): drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3) The fact that rx_urb_size happens to be a size_t has propagated all the way back to this printk. It's fragile to be using %z in this case - let's just typecast the args instead. Signed-off-by:...
```diff diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 17fc6ae5c075..8e8e74d40530 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c @@ -653,7 +653,7 @@ static int usbnet_open (struct net_device *net) devinfo (dev, "open: enable queueing " "(rx %d, tx %d) mtu %d %s fr...
372db8a780f63368c6960a167b7a19aad776d704
Analyze and fix the following issue in the Linux kernel code: USB: pl2303: remove 80-columns limit violations in pl2303 driver
Problem Details: Fixes several lines that overrun 80 columns in Prolific pl2303 driver and cleans up some space usages in the function calls. Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 54c32ccce626..90d0e7935665 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -84,7 +84,7 @@ static struct usb_device_id id_table [] = { { } /* Terminating entry */ }; -MODULE_DEVICE_TABLE (usb, id_t...
5d8926658ce41b254fdfba7d057e6c9438c25cca
Analyze and fix the following issue in the Linux kernel code: usbtouchscreen: version 0.4
Problem Details: changes over 0.3: - some more eGalax device IDs (from eGalax driver/spec) - return the error code in probe() - 3M/MTouch init fixes, tested by Don Alexander - eGalax fixes for bugs in multi-packet handling, spottet by Pieter Grimmerink - support for some eTurboTouch devices, mostly by Pieter Grimmerink...
```diff diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig index 650103bc9618..8a708520547b 100644 --- a/drivers/usb/input/Kconfig +++ b/drivers/usb/input/Kconfig @@ -205,10 +205,12 @@ config USB_TOUCHSCREEN depends on USB && INPUT ---help--- USB Touchscreen driver for: - - eGalax Touchkit USB...
114b368c07964caa3f4e1fa575b16e87fa11936c
Analyze and fix the following issue in the Linux kernel code: usbcore: fix up device and power state tests
Problem Details: This patch (as734) rationalizes the various tests of device state and power states. There are duplications and mistaken tests in several places. Perhaps the most interesting challenge is where the hub driver tests to see that all the child devices are suspended before allowing itself to be suspended....
```diff diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 92ecc4eb1e88..affbfb53eb5e 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -757,11 +757,13 @@ static int suspend_device(struct usb_device *udev, pm_message_t msg) struct usb_device_driver *udriver; int stat...
2bf4086d7a7722b470aa24e1be725cc58619c6fe
Analyze and fix the following issue in the Linux kernel code: usbcore: set device and power states properly
Problem Details: This patch (as733) fixes up the places where device states and power states are set in usbcore. Right now things are duplicated or missing; this should straighten things out. The idea is that udev->state is USB_STATE_SUSPENDED exactly when the device's upstream port has been suspended, whereas udev->...
```diff diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index eefc98584eac..92ecc4eb1e88 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -755,48 +755,57 @@ EXPORT_SYMBOL_GPL_FUTURE(usb_deregister); static int suspend_device(struct usb_device *udev, pm_message_t msg) { st...
121e287cb554f3d3402c85a1950d852691b08f5c
Analyze and fix the following issue in the Linux kernel code: usb-skeleton: don't submit URBs after disconnection
Problem Details: This patch (as712b) is a slight revision of one submitted earlier. It fixes the usb-skeleton example driver so that it won't try to submit URBs after skel_disconnect() has returned. This could cause errors, if the driver was unbound and then a different driver was bound to the device. It also fixes ...
```diff diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index b362039792b3..33f0e81c58d3 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -1,5 +1,5 @@ /* - * USB Skeleton driver - 2.0 + * USB Skeleton driver - 2.1 * * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@...
d5176b413dcce85334e270021fc0d723d1714c84
Analyze and fix the following issue in the Linux kernel code: USB: Add driver for PhidgetMotorControl
Problem Details: This driver add support for the Phidgets Inc., MotorControl via sysfs. Also some minor fixes for the InterfaceKit. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 3305fb6079eb..8f8d4af3f6ef 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -1535,13 +1535,17 @@ void hid_init_reports(struct hid_device *hid) #define USB_VENDOR_ID_GLAB 0x06c2 #define USB_DEVICE_ID_...
b6eb2d84d2bb01e9fcc46a032a3429b4747b1c47
Analyze and fix the following issue in the Linux kernel code: usbcore: add configuration_string to attribute group
Problem Details: This patch (as737b) does a very small cleanup of core/sysfs.c by adding the configuration_string attribute file to the existing attribute group instead of treating it separately. It doesn't need this separate treatment because unlike the other device string attributes, it changes along with the active...
```diff diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index dec973affb0f..cd2286246f6a 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -60,7 +60,7 @@ static ssize_t set_bConfigurationValue (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) ...
2f430b4bbae7faa167730f954252eb7db4ac58dd
Analyze and fix the following issue in the Linux kernel code: USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.
Problem Details: Add (dummy?) support for TIOCGSERIAL and TIOCSSERIAL ioctl calls to the USB serial driver file `ark3116.c'. This is sufficient for me to run wvdial successfully, receive my email, and do webbrowsing with firefox. On the other hand, running the cvs program to update archives seems not to work, and the...
```diff diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 970d9ef0a7a5..d37300e1811a 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -1,4 +1,7 @@ /* + * Copyright (C) 2006 + * Simon Schulz (ark3116_driver <at> auctionant.de) + * * ark3116 * - implement...
bfb2c965d669045b7629fd577b7834c87c2dfd54
Analyze and fix the following issue in the Linux kernel code: USB: Allow compile in g_ether, fix typo
Problem Details: Allows compiling g_ether in and fixes a typo with MUSB_HDRC Signed-off-by: Tony Lindgren <tony@atomide.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 30299c620d97..fed484da593c 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -262,7 +262,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); #define DEV_CONFIG_CDC #endif -#ifdef CONFIG_USB_GADGET_MUS...
b97b196c9d351a501ed89fc836e4e2fe71ff93c9
Analyze and fix the following issue in the Linux kernel code: USB: unusual_devs entry for Lacie DVD+-RW
Problem Details: This patch (as781) adds an entry to unusual_devs.h for the Lacie DVD+-RW drive. Apparently its USB interface has requirements similar to the Genesys Logic interface; it doesn't like data to be sent too soon after a command. This fixes Bugzilla #6817. Signed-off-by: Alan Stern <stern@rowland.harvard...
```diff diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index b130e170b4a8..4b06ac34430f 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -631,6 +631,13 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Digital Camera EX-20 DSC", US_S...
3f1a9aaeffd8d1cbc5ab9776c45cbd66af1c9699
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix typo in last patch
Problem Details: Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 91a741ddd49d..3195806d78e0 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1181,7 +1181,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, *ppos = pos + retval; } if (likely(retval != 0)) { - file_accessed(flip); + file_access...
0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix direct i/o logic in filemap.c
Problem Details: We shouldn't mark the file accessed in the case that it wasn't accessed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/mm/filemap.c b/mm/filemap.c index d9bbea1e87d2..91a741ddd49d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1180,9 +1180,10 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, if (retval > 0) *ppos = pos + retval; } - file_accessed(filp); - if (retval != 0) + if...
7e18c02be7c83a8cfd1319f0117f63509c20aa8e
Analyze and fix the following issue in the Linux kernel code: [GFS2] Fix bug in Makefiles for lock modules
Problem Details: The Makefile had the wrong CONFIG_ variable in it so that in case GFS2 was y and the lock modules were m, they were not getting built properly. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
```diff diff --git a/fs/gfs2/locking/dlm/Makefile b/fs/gfs2/locking/dlm/Makefile index a9733ff80371..89b93b6b45cf 100644 --- a/fs/gfs2/locking/dlm/Makefile +++ b/fs/gfs2/locking/dlm/Makefile @@ -1,3 +1,3 @@ -obj-$(CONFIG_GFS2_FS) += lock_dlm.o +obj-$(CONFIG_GFS2_FS_LOCKING_DLM) += lock_dlm.o lock_dlm-y := lock.o main....
1e2af92e089d4c845248844a3e7ee06ce889af46
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86: use probe_kernel_address in handle_BUG()
Problem Details: Avoid possible deadlock on a BUG() inside down_write(mmap_sem). The deadlock can only occur if something has gone horridly wrong, because a fault here shouldn't happen. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 21aa1cd57773..a13037fe0ee3 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -28,6 +28,7 @@ #include <linux/kprobes.h> #include <linux/kexec.h> #include <linux/unwind.h> +#include <linux/uaccess.h> #ifdef CONFIG_E...
65800ac77e080cf159d6c1207b6886e18f22bc08
Analyze and fix the following issue in the Linux kernel code: [PATCH] pid: remove temporary debug code in attach_pid
Problem Details: With the patches flying between Oleg and myself somehow this temporary debug code got left in pid.c. It was never intended to make it to the stable kernel. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-...
```diff diff --git a/kernel/pid.c b/kernel/pid.c index 6db82b68e2f8..8387e8c68193 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -223,9 +223,6 @@ int fastcall attach_pid(struct task_struct *task, enum pid_type type, int nr) struct pid_link *link; struct pid *pid; - WARN_ON(!task->pid); /* to be removed soon */ -...
07563c711fbc25389e58ab9c9f0b9de2fce56760
Analyze and fix the following issue in the Linux kernel code: [PATCH] EISA bus MODALIAS attributes support
Problem Details: Add modalias attribute support for the almost forgotten now EISA bus and (at least some) EISA-aware modules. The modalias entry looks like (for an 3c509 NIC): eisa:sTCM5093 and the in-module alias like: eisa:sTCM5093* The patch moves struct eisa_device_id declaration from include/linux/eisa.h to...
```diff diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 6078e2f58817..3a365e159d89 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -128,9 +128,23 @@ static int eisa_bus_match (struct device *dev, struct device_driver *drv) return 0; } +static int eisa_bus_uevent(struct de...
ebba5f9fcb882306bef7175dee987342ec6fcf2f
Analyze and fix the following issue in the Linux kernel code: [PATCH] consistently use MAX_ERRNO in __syscall_return
Problem Details: Consistently use MAX_ERRNO when checking for errors in __syscall_return(). [ralf@linux-mips.org: build fix] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org...
```diff diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 1e891f860ef3..2ab4078334bf 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h @@ -377,6 +377,7 @@ #endif #ifdef __KERNEL__ +#include <linux/err.h> #include <linux/linkage.h> #define __sys2(x) #x @@ -396,7 +397,7 @@ ...
9a4b9efa1d39d7d31bed08fbe5a9b2a03b2759d4
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86 microcode: add sysfs and hotplug support
Problem Details: Add sysfs support. Currently each CPU has three microcode related attributes. One is 'version' which shows current ucode version of CPU. Tools can use the attribute do validation or show CPU ucode status. one is 'reload' which allows manually reloading ucode. Another is 'processor_flags', which exp...
```diff diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 0cbeb26ac3fb..3fd2f256f2be 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -401,6 +401,7 @@ config X86_REBOOTFIXUPS config MICROCODE tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support" + select FW_LOADER ---help--- If you...
8e18e2941c53416aa219708e7dcad21fb4bd6794
Analyze and fix the following issue in the Linux kernel code: [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private
Problem Details: The following patches reduce the size of the VFS inode structure by 28 bytes on a UP x86. (It would be more on an x86_64 system). This is a 10% reduction in the inode size on a UP kernel that is configured in a production mode (i.e., with no spinlock or other debugging functions enabled; if you want ...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 7b4572805db9..b837f12a84ae 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -120,7 +120,7 @@ spufs_new_file(struct super_block *sb, struct dentry *den...
1183dc943cae8b0fddca0b310c26052b2355e04b
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix allocation size
Problem Details: Fix an instance of ptr=alloc(sizeof(ptr)). Grepping showed no more instances of this pattern. Also fixed the formatting in the area. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 657dfacd5ba8..664c2e2fb820 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -561,12 +561,13 @@ static int eth_setup(char *str) int n, err; err = eth_parse(str, &n, &str); - if(err) return(1); + if(err) + ...
c1b4098d4852f823ecf1abb2d369cb1beb902653
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix sleep length bug
Problem Details: um_timer shouldn't add local_offset to the host time since get_time already did it. This threw off sleep when a settimeofday or equivalent had happened. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 2454bbd9555d..820affbf3e16 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -95,7 +95,7 @@ irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) do_timer(regs); - nsecs = get_time() + local_offset; + nsecs = get_tim...
09b185a3169c5a8f9b7baf97f16d32add7e10ca4
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix gcov support
Problem Details: Make __bb_init_func weak in order to avoid a link failure with some libcs and/or gccs. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c index 2c86e7fdb014..13aa115cd1b4 100644 --- a/arch/um/kernel/gmon_syms.c +++ b/arch/um/kernel/gmon_syms.c @@ -5,7 +5,7 @@ #include "linux/module.h" -extern void __bb_init_func(void *); +extern void __bb_init_func(void *) __attribute__((w...
a8b4fc4d7c3ccf80d4fa1805cee85c06c2aa653e
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix missing x86_64 register definitions
Problem Details: The UML/x86_64 headers were missing ptrace support for some segment registers. The underlying problem was that the x86_64 kernel uses user_regs_struct rather than the ptrace register definitions in ptrace. This patch switches UML/x86_64 to using user_regs_struct for its definitions of the host's regi...
```diff diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h index 8d353f0feec1..617bb9efc934 100644 --- a/arch/um/include/sysdep-x86_64/ptrace.h +++ b/arch/um/include/sysdep-x86_64/ptrace.h @@ -50,6 +50,21 @@ #define HOST_FS 25 #define HOST_GS 26 +/* Also defined in asm/ptra...
48af05ed54ddf8dc6eceea4f009e063d7e784b37
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: fix proc-vs-interrupt context spinlock deadlock
Problem Details: This spinlock can be taken on interrupt too, so spin_lock_irq[save] must be used. However, Documentation/networking/netdevices.txt explains we are called with rtnl_lock() held - so we don't need to care about other concurrent opens. Verified also in LDD3 and by direct checking. Also verified that the...
```diff diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 4a7966b21931..657dfacd5ba8 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -114,8 +114,6 @@ static int uml_net_open(struct net_device *dev) struct uml_net_private *lp = dev->priv; int err; - spin_lock(&l...
06837504de7b4883e92af207dbbab4310d0db0ed
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: use -mcmodel=kernel for x86_64
Problem Details: We have never used this flag and recently one user experienced a complaining warning about this (there was a symbol in the positive half of the address space IIRC). So fix it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew ...
```diff diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 9558a7cf34d5..11154b6773ec 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -4,10 +4,13 @@ core-y += arch/um/sys-x86_64/ START := 0x60000000 +_extra_flags_ = -fno-builtin -m64 -mcmodel=kernel + #We #undef __x86_64__ f...
a27f3113322edff36743014cc9e752a21ffc0324
Analyze and fix the following issue in the Linux kernel code: [PATCH] m32r: Fix "value computed not used" warnings
Problem Details: Fix to remove annoying gcc-4.1 warnings "value computed not used" for m32r; Modify set_mb to cast to void for SMP. Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
```diff diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 9e618afec6ed..4ce0619f6989 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -328,15 +328,15 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #define smp_rmb() rmb() #define smp_wmb...
f269fdd1829acc5e53bf57b145003e5733133f2b
Analyze and fix the following issue in the Linux kernel code: [PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place
Problem Details: Move the fallback arch_vma_name() to a sensible place (kernel/signal.c). Currently it's in fs/proc/task_mmu.c, a file that is dependent on both CONFIG_PROC_FS and CONFIG_MMU being enabled, but it's used from kernel/signal.c from where it is called unconditionally. [akpm@osdl.org: build fix] Signed-of...
```diff diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 0a163a4f7764..6b769afac55a 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -122,11 +122,6 @@ struct mem_size_stats unsigned long private_dirty; }; -__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma) -{ - return ...
ead04089b138ed669658f80fafbe11fc7d97740b
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix kerneldoc comments in mm/vmalloc.c
Problem Details: The empty line between the short description and the first argument description causes a section to appear twice in the generated manpage. Also the short description should really be short: the script can't handle multiple lines. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Acked-by: Randy Du...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 9aad8b0cc6ee..659ec634856a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -241,7 +241,6 @@ struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, /** * get_vm_area - reserve a contingous kernel virtual area - * * @size: size of the area...
765c4507af71c39aba21006bbd3ec809fe9714ff
Analyze and fix the following issue in the Linux kernel code: [PATCH] GFP_THISNODE for the slab allocator
Problem Details: This patch insures that the slab node lists in the NUMA case only contain slabs that belong to that specific node. All slab allocations use GFP_THISNODE when calling into the page allocator. If an allocation fails then we fall back in the slab allocator according to the zonelists appropriate for a ce...
```diff diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 38f89650bc84..cf18f0942553 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1136,7 +1136,9 @@ static unsigned interleave_nodes(struct mempolicy *policy) */ unsigned slab_node(struct mempolicy *policy) { - switch (policy->policy) { + int pol = policy ? p...
de3083ec3e6bfb1ab60bc8a410f37702529f953c
Analyze and fix the following issue in the Linux kernel code: [PATCH] slab: fix kmalloc_node applying memory policies if nodeid == numa_node_id()
Problem Details: kmalloc_node() falls back to ___cache_alloc() under certain conditions and at that point memory policies may be applied redirecting the allocation away from the current node. Therefore kmalloc_node(...,numa_node_id()) or kmalloc_node(...,-1) may not return memory from the local node. Fix this by doin...
```diff diff --git a/mm/slab.c b/mm/slab.c index c52ebf9c4462..69e11c45002f 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3028,14 +3028,6 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags) void *objp; struct array_cache *ac; -#ifdef CONFIG_NUMA - if (unlikely(current->flags & (PF_SPREAD_S...
5b99cd0effaf846240a15441aec459a592577eaf
Analyze and fix the following issue in the Linux kernel code: [PATCH] own header file for struct page
Problem Details: This moves the definition of struct page from mm.h to its own header file page-struct.h. This is a prereq to fix SetPageUptodate which is broken on s390: #define SetPageUptodate(_page) do { struct page *__page = (_page); if (!test_and_set_bit(PG_uptodate, &__page-...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 9d046db31e76..7477fb59c4f2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -16,6 +16,7 @@ #include <linux/mutex.h> #include <linux/debug_locks.h> #include <linux/backing-dev.h> +#include <linux/mm_types.h> struct mempolicy; struct ano...
05e0caad3b7bd0d0fbeff980bca22f186241a501
Analyze and fix the following issue in the Linux kernel code: [PATCH] Have ia64 use add_active_range() and free_area_init_nodes
Problem Details: Size zones and holes in an architecture independent manner for ia64. [bob.picco@hp.com: fix ia64 FLATMEM+VIRTUAL_MEM_MAP] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Bob Picco <bob.picco@hp.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <ak...
```diff diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index f521f2f60a78..d5ee4fc8fe66 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -356,6 +356,9 @@ config NODES_SHIFT MAX_NUMNODES will be 2^(This value). If in doubt, use the default. +config ARCH_POPULATES_NODE_MAP + def_bool y + # VIRTUAL...
4cfee88ad30acc47f02b8b7ba3db8556262dce1e
Analyze and fix the following issue in the Linux kernel code: [PATCH] Have x86 use add_active_range() and free_area_init_nodes
Problem Details: Size zones and holes in an architecture independent manner for x86. [akpm@osdl.org: build fix] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <ak@muc.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul...
```diff diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 758044f5e718..3fd9f1e8b093 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -598,12 +598,10 @@ config ARCH_SELECT_MEMORY_MODEL def_bool y depends on ARCH_SPARSEMEM_ENABLE -source "mm/Kconfig" +config ARCH_POPULATES_NODE_MAP + def_bool y -...
c67c3cb4c99fb2ee63c8733943c353d745f45b84
Analyze and fix the following issue in the Linux kernel code: [PATCH] Have Power use add_active_range() and free_area_init_nodes()
Problem Details: Size zones and holes in an architecture independent manner for Power. [judith@osdl.org: build fix] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <ak@muc.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: ...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index de1ef2fa1a20..a0dd1b0ee483 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -731,11 +731,10 @@ config ARCH_SPARSEMEM_DEFAULT def_bool y depends on SMP && PPC_PSERIES -source "mm/Kconfig" - -config HAVE_ARCH_EARLY_PFN_TO_NID +con...
c713216deebd95d2b0ab38fef8bb2361c0180c2d
Analyze and fix the following issue in the Linux kernel code: [PATCH] Introduce mechanism for registering active regions of memory
Problem Details: At a basic level, architectures define structures to record where active ranges of page frames are located. Once located, the code to calculate zone sizes and holes in each architecture is very similar. Some of this zone and hole sizing code is difficult to read for no good reason. This set of patch...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 856f0ee7e84a..c0402da7cce0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -937,6 +937,53 @@ extern void free_area_init(unsigned long * zones_size); extern void free_area_init_node(int nid, pg_data_t *pgdat, unsigned long * zones_size, un...