id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
007c80a5497a3f9c8393960ec6e6efd30955dcb1
Analyze and fix the following issue in the Linux kernel code: drm: Hold the mode mutex whilst probing for sysfs status
Problem Details: As detect will use hw registers and may modify structures, it needs to be serialised by use of the dev->mode_config.mutex. Make it so. Otherwise, we may cause random crashes as the sysfs file is queried whilst a concurrent hotplug poll is being run. For example: [ 1189.189626] BUG: unable to handle k...
```diff diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 85da4c40694c..2eee8e016b38 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -158,8 +158,15 @@ static ssize_t status_show(struct device *device, { struct drm_connector *connector = to_drm_connector(device...
44cff8a9ee8a974f9e931df910688e7fc1f0b0f9
Analyze and fix the following issue in the Linux kernel code: Squashfs: handle corruption of directory structure
Problem Details: Handle the rare case where a directory metadata block is uncompressed and corrupted, leading to a kernel oops in directory scanning (memcpy). Normally corruption is detected at the decompression stage and dealt with then, however, this will not happen if: - metadata isn't compressed (users can optiona...
```diff diff --git a/fs/squashfs/dir.c b/fs/squashfs/dir.c index 0dc340aa2be9..3f79cd1d0c19 100644 --- a/fs/squashfs/dir.c +++ b/fs/squashfs/dir.c @@ -172,6 +172,11 @@ static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir) length += sizeof(dirh); dir_count = le32_to_cpu(dirh.count) + 1;...
986d4abbddf9e76184f6cabf66654ea8e61bcde5
Analyze and fix the following issue in the Linux kernel code: sunrpc: fix printk format warning
Problem Details: Fix printk format build warning: net/sunrpc/xprtrdma/verbs.c:1463: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'dma_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 570f08dc0b03..d4297dc43dc4 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -1462,7 +1462,8 @@ rpcrdma_map_one(struct rpcrdma_ia *ia, struct rpcrdma_mr_seg *seg, int writing) if (ib_dma_mapping_error(ia->...
c83ce989cb5ff86575821992ea82c4df5c388ebc
Analyze and fix the following issue in the Linux kernel code: VFS: Fix the nfs sillyrename regression in kernel 2.6.38
Problem Details: The new vfs locking scheme introduced in 2.6.38 breaks NFS sillyrename because the latter relies on being able to determine the parent directory of the dentry in the ->iput() callback in order to send the appropriate unlink rpc call. Looking at the code that cares about races with dput(), there doesn'...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index 361882a14ccb..a39fe47c466f 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -296,8 +296,12 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent) __releases(parent->d_lock) __releases(dentry->d_inode->i_lock) { - dentry->d_parent = NULL; li...
7313714775a6411402f63261c05fbb4ee3d5b64a
Analyze and fix the following issue in the Linux kernel code: xfrm: fix __xfrm_route_forward()
Problem Details: This function should return 0 in case of error, 1 if OK commit 452edd598f60522 (xfrm: Return dst directly from xfrm_lookup()) got it wrong. Reported-and-bisected-by: Michael Smith <msmith@cbnco.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.ne...
```diff diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 1ba0258b49c7..027e3c6fb7e4 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2175,7 +2175,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) struct net *net = dev_net(skb->dev); struct flowi fl; st...
9ecb42fda614c4e4f46e95712621510f8d746980
Analyze and fix the following issue in the Linux kernel code: be2net: Fix UDP packet detected status in RX compl
Problem Details: Status of UDP packet detection not getting populated in RX completion structure. This is required in csum_passed() routine. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 3cb5f4e5a06e..5e150066a915 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -1088,6 +1088,7 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter, rxcp->vlanf = AMAP_GET_BITS(struct amap_eth_rx_c...
638be344593b66ccca6802c6076a5b3d9200829d
Analyze and fix the following issue in the Linux kernel code: Phonet: fix aligned-mode pipe socket buffer header reserve
Problem Details: When the pipe uses aligned-mode data packets, we must reserve 4 bytes instead of 3 for the pipe protocol header. Otherwise the Phonet header would not be aligned, resulting in potentially corrupted headers with later unaligned memory writes. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@noki...
```diff diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 68e635f11de8..f17fd841f948 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c @@ -1055,7 +1055,7 @@ static int pep_sendmsg(struct kiocb *iocb, struct sock *sk, if (!skb) return err; - skb_reserve(skb, MAX_PHONET_HEADER + 3); + skb_reserve(skb, MAX_...
84c0c6933cb0303fa006992a6659c2b46de4eb17
Analyze and fix the following issue in the Linux kernel code: smsc911x: Fix build error when SMSC_TRACE() used
Problem Details: This patch fixes build error when SMSC_TRACE() used. Signed-off-by: Jeongtae Park <jtp.park@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index d70bde95460b..1566259c1f27 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -791,8 +791,8 @@ static int smsc911x_mii_probe(struct net_device *dev) return -ENODEV; } - SMSC_TRACE(PROBE, "PHY %d: addr %d, phy_id 0x%08X", ...
44626e4a3bd764283193e14e64f9324e48b4bfd8
Analyze and fix the following issue in the Linux kernel code: xen: events: Fix compile error if CONFIG_SMP is not defined.
Problem Details: drivers/xen/events.c:396: error: 'struct irq_data' has no member named 'affinity' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/xen/events.c b/drivers/xen/events.c index dc8177950d05..4591853f6ebc 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -392,8 +392,10 @@ static void xen_irq_init(unsigned irq) struct irq_info *info; struct irq_desc *desc = irq_to_desc(irq); +#ifdef CONFIG_SMP /* By def...
b0aea14bdc4a9ee5d1e8cb78488263d6ce32095e
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix signedness bug in cache-sram
Problem Details: sram_params.sram_size and sram_params.sram_offset were unsigned. If get_cache_sram_size() or get_cache_sram_offset() returns error code then it is not seen to the caller. Made sram_size and sram_offset signed. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Kumar Gala <galak@kernel....
```diff diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c index cc8d6556d799..23b85ac9fc56 100644 --- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c +++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c @@ -94,14 +94,14 @@ static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev,...
48a10cdfc0262ee7b5ccd4cbb673957e320ec563
Analyze and fix the following issue in the Linux kernel code: drivers/serial/ucc_uart.c: Add of_node_put to avoid memory leak
Problem Details: Add a call to of_node_put in the error handling code following a call to of_find_compatible_node or of_find_node_by_type. This patch also substantially reorganizes the error handling code in the function, to that it is possible first to jump to code that frees qe_port and then to jump to code that als...
```diff diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 3f4848e2174a..38a5ef0ae394 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -1270,13 +1270,12 @@ static int ucc_uart_probe(struct platform_device *ofdev, ret = of_address_to_resource(np, 0, &res);...
afc0a07d4a283599ac3a6a31d7454e9baaeccca0
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix SPE float to integer conversion failure
Problem Details: Conversion from float to integer should based on both the instruction encoding and the sign of the operand. A simple testcase to show the issue: static float fm; static signed int si_min = (-2147483647 - 1); static unsigned int ui; int main() { fm = (float) si_min; ; ui = (unsigned int)...
```diff diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c index 634830bdc0be..62279200d965 100644 --- a/arch/powerpc/math-emu/math_efp.c +++ b/arch/powerpc/math-emu/math_efp.c @@ -322,7 +322,8 @@ int do_spe_mathemu(struct pt_regs *regs) } else { _FP_ROUND_ZERO(1, SB); } - F...
a396d43a35fb91f2d4920a4700d25ecc5ec92404
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Replace global lock in rdma_destroy_id() with id-specific one
Problem Details: rdma_destroy_id currently uses the global rdma cm 'lock' to test if an rdma_cm_id has been bound to a device. This prevents an active address resolution callback handler from assigning a device to the rdma_cm_id after rdma_destroy_id checks for one. Instead, we can replace the use of the global lock ...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e450c5a87727..5ed9d25d021a 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -308,11 +308,13 @@ static inline void release_mc(struct kref *kref) kfree(mc); } -static void cma_detach_from_dev(str...
8d8ac86564b616bc17054cbb6e727588da64c86b
Analyze and fix the following issue in the Linux kernel code: IB/cm: Cancel pending LAP message when exiting IB_CM_ESTABLISH state
Problem Details: This problem was reported by Moni Shoua <monis@mellanox.com> and Amir Vadai <amirv@mellanox.com>: When destroying a cm_id from a context of a work queue and if the lap_state of this cm_id is IB_CM_LAP_SENT, we need to release the reference of this id that was taken upon the send of the LAP message...
```diff diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 1d9616be4192..f804e28e1ebb 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1988,6 +1988,10 @@ int ib_send_cm_dreq(struct ib_cm_id *cm_id, goto out; } + if (cm_id->lap_state == IB_CM_LAP_SENT ||...
b3bd1b5b0054f716e58a65d4e2e449ea0252e9dd
Analyze and fix the following issue in the Linux kernel code: mmc: cb710: Return err value in cb710_wait_while_busy()
Problem Details: Fixes: drivers/mmc/host/cb710-mmc.c: In function ‘cb710_wait_while_busy’: drivers/mmc/host/cb710-mmc.c:182:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Signed-off-by: Chris Ball <cjb@laptop.org> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Wolfram Sang <w.s...
```diff diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 66b4ce587f4b..ce2a47b71dd6 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c @@ -205,7 +205,7 @@ static int cb710_wait_while_busy(struct cb710_slot *slot, uint8_t mask) "WAIT12: waited %d loops, mask %0...
88ce4db313bca1e4e6ef3b448471f85d3e14a854
Analyze and fix the following issue in the Linux kernel code: mmc: atmel-mci: conform to DMA-API
Problem Details: Fixes the following: - It is perfectly legal for the dma_map_sg() to return fewer entries than were passed in. - Supply the returned numer of (possibly coalesced) entries to the device_pre_slave_sg() function. - Use the proper original sg_len when unmapping the sglist in the error path. Signed-o...
```diff diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 045bdbbe3720..df5a13542370 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -687,10 +687,9 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data) sglen = dma_map_sg(chan->device->d...
57f0adc7eaaf4315d568e72069dbe48aa7e20995
Analyze and fix the following issue in the Linux kernel code: mmc: add per device quirk placeholder
Problem Details: Some cards have quirks valid for every platforms using current platform quirk hooks leads to a lot of code and debug duplication. So we inspire a bit from what exists in PCI subsystem and do our own per vendorid/deviceid quirk. We still drop the complexity of the pci quirk system (with special sectio...
```diff diff --git a/drivers/mmc/core/Makefile b/drivers/mmc/core/Makefile index 86b479119332..639501970b41 100644 --- a/drivers/mmc/core/Makefile +++ b/drivers/mmc/core/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_MMC) += mmc_core.o mmc_core-y := core.o bus.o host.o \ mmc.o mmc_ops.o sd.o sd_ops.o \ sdio....
3362177fe1b7c23ee8497ee720ab4d6f6ba0b840
Analyze and fix the following issue in the Linux kernel code: mmc: Fix the block device read only flag
Problem Details: While the MMC handled the card's read only flag correctly on open, it did not setup the flag in the allocated disk structure. The consequence being that probing the /sys/class/block/mmcblkX/ro attribute always reported 0. Signed-off-by: Marc-Andre Hebert <hebert.marcandre@gmail.com> Reviewed-by: Chris...
```diff diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index bfc8a8ae55df..61d233a7c118 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -621,6 +621,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) md->disk->private_data = md; md->disk->queue = md->queue...
25ae21a10112875763c18b385624df713a288a05
Analyze and fix the following issue in the Linux kernel code: RDMA/cma: Fix crash in request handlers
Problem Details: Doug Ledford and Red Hat reported a crash when running the rdma_cm on a real-time OS. The crash has the following call trace: cm_process_work cma_req_handler cma_disable_callback rdma_create_id kzalloc init_completion cma_get_net_info...
```diff diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 6884da24fde1..e450c5a87727 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1210,6 +1210,11 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) cm_id->context = co...
b09734b1f4abd86e046777f0f268215b4ef1b523
Analyze and fix the following issue in the Linux kernel code: libceph: Fix base64-decoding when input ends in newline.
Problem Details: It used to return -EINVAL because it thought the end was not aligned to 4 bytes. Clean up superfluous src < end test in if, the while itself guarantees that. Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com> Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/net/ceph/armor.c b/net/ceph/armor.c index eb2a666b0be7..1fc1ee11dfa2 100644 --- a/net/ceph/armor.c +++ b/net/ceph/armor.c @@ -78,8 +78,10 @@ int ceph_unarmor(char *dst, const char *src, const char *end) while (src < end) { int a, b, c, d; - if (src < end && src[0] == '\n') + if (src[0] == ...
112e75466f63997d0f4c3c13ecf999e36aea692f
Analyze and fix the following issue in the Linux kernel code: watchdog: booke_wdt: clean up status messages
Problem Details: Improve the status messages that are displayed during some operations of the PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is displayed as a number of seconds, instead of an obscure "period". The "period" is the position of a bit in a 64-bit timer register. The higher the ...
```diff diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 7e7ec9c35b6a..337265b47305 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -4,7 +4,7 @@ * Author: Matthew McClintock * Maintainer: Kumar Gala <galak@kernel.crashing.org> * - * Copyright 2005, 200...
57539c1cf9f146ab9988a350dbc2d7e69a8a5c30
Analyze and fix the following issue in the Linux kernel code: watchdog: Intel SCU Watchdog Timer Driver for Moorestown and Medfield platforms.
Problem Details: This submission includes: - Fix to intel_scu_write() to start watchdog timer the on the first write, and refresh on subsequent writes. This enables Open, write, write, ... usage model. - Moves boot parameter checks from intel_scu_open() to intel_scu_watchdog_init(), so driver init will ...
```diff diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 6041692e2107..28a9835f8256 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -533,6 +533,16 @@ config I6300ESB_WDT To compile this driver as a module, choose M here: the module will be called i6300esb. +config...
742e4b630895d751812b0682750db76c8072bf37
Analyze and fix the following issue in the Linux kernel code: watchdog: jz4740_wdt - fix magic character checking
Problem Details: When writing to /dev/watchdog all characters should be checked for the magic character 'V'. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 935562322b38..684ba01fb540 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -130,11 +130,18 @@ static ssize_t jz4740_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos) { ...
ea6649c721e0d8d2f79ae13ad9a21444f69dae70
Analyze and fix the following issue in the Linux kernel code: watchdog: hpwdt: Fix a couple of typos
Problem Details: Fix some typos. Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 31649b7b672f..3dde7f0871a8 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -589,12 +589,12 @@ config IT87_WDT be called it87_wdt. config HP_WATCHDOG - tristate "HP Proliant iLO2+ Hardware Watchdog Timer" + tris...
23b08e97f2c0d68c2a46a11e4fd8a4686d7351ee
Analyze and fix the following issue in the Linux kernel code: fs/9p: Workaround vfs rename rehash bug
Problem Details: This is similar to what ceph, ocfs2 and nfs does http://kerneltrap.org/mailarchive/linux-fsdevel/2008/4/18/1498534 May be we should get vfs fixed Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van...
```diff diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index c072bb97e957..8e9d60345bc8 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -884,6 +884,11 @@ clunk_newdir: clear_nlink(new_inode); else drop_nlink(new_inode); + /* + * Work around vfs rename rehash bug with + * FS_RENAME_DO...
fa6ea16160c72c448e2728dab4b6b0a133fdfc98
Analyze and fix the following issue in the Linux kernel code: fs/9p: Fix inode i_size update in file_write
Problem Details: Only update inode i_size when we write towards end of file. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 98c4307a1f03..3cff25e759ec 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -440,6 +440,7 @@ v9fs_file_write_internal(struct inode *inode, struct p9_fid *fid, loff_t *offset, int invalidate) { int n; + loff_t i_size; size_t total = 0; str...
d344b0fb72e00339625464c5a29711906fa70b8b
Analyze and fix the following issue in the Linux kernel code: [fs/9p] Initialze cached acls both in cached/uncached mode.
Problem Details: With create/mkdir/mknod in non cached mode we initialize the inode using v9fs_get_inode. v9fs_get_inode doesn't initialize the cache inode value to NULL. This is causing to trip on BUG_ON in v9fs_get_cached_acl. Fix is to initialize acls to NULL and not to leave them in ACL_NOT_CACHED state. Signed-o...
```diff diff --git a/fs/9p/acl.c b/fs/9p/acl.c index 291ff7be27f6..0a2e480477a5 100644 --- a/fs/9p/acl.c +++ b/fs/9p/acl.c @@ -132,6 +132,10 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl) struct inode *inode = dentry->d_inode; set_cached_acl(inode, type, acl); + + if (!acl) + ...
decbb280bb8e3bceebcf5defb4f61dfbfdb23e18
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64e
Problem Details: If the spin table is located in the linear mapping (which can happen if we have 4G or more of memory) we need to access the spin table via a cacheable coherent mapping like we do on ppc32 (and do explicit cache flush). See the following commit for the ppc32 version of this issue: commit d1d47ec6e62ab...
```diff diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 5c91a992f02b..0d00ff9d05a0 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -91,10 +91,14 @@ smp_85xx_kick_cpu(int nr) while ((__secondary_hold_acknowledge != nr) && (++n < 1000)) ...
a49fb4c3d035ab516507b31ec3bd49263caee14d
Analyze and fix the following issue in the Linux kernel code: exofs: deprecate the commands pending counter
Problem Details: One leftover from the days of IBM's original code, is an SB counter that counts in-flight asynchronous commands. And a piece of code that waits for the counter to reach zero at unmount. I guess it might have been needed then, cause of some reference missing or something. I'm not removing it yet but am...
```diff diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 5eb0851e5481..06065bd37fc3 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c @@ -409,6 +409,10 @@ static void exofs_put_super(struct super_block *sb) for (num_pend = atomic_read(&sbi->s_curr_pending); num_pend > 0; num_pend = atomic_read(&sbi->s...
1cea312ad49d9cb964179a784fedb1fcfe396283
Analyze and fix the following issue in the Linux kernel code: exofs: Write sbi->s_nextid as part of the Create command
Problem Details: Before when creating a new inode, we'd set the sb->s_dirt flag, and sometime later the system would write out s_nextid as part of the sb_info. Also on inode sync we would force the sb sync as well. Define the s_nextid as a new partition attribute and set it every time we create a new object. At mount ...
```diff diff --git a/fs/exofs/common.h b/fs/exofs/common.h index f0d520312d8b..5e74ad3d4009 100644 --- a/fs/exofs/common.h +++ b/fs/exofs/common.h @@ -53,10 +53,14 @@ #define EXOFS_ROOT_ID 0x10002 /* object ID for root directory */ /* exofs Application specific page/attribute */ +/* Inode attrs */ # define EXOFS_A...
97178b7b6c84bd14660b89474d27931a1ea65c66
Analyze and fix the following issue in the Linux kernel code: exofs: simple fsync race fix
Problem Details: It is incorrect to test inode dirty bits without participating in the inode writeback protocol. Inode writeback sets I_SYNC and clears I_DIRTY_?, then writes out the particular bits, then clears I_SYNC when it is done. BTW. it may not completely write all pages out, so I_DIRTY_PAGES would get set again...
```diff diff --git a/fs/exofs/file.c b/fs/exofs/file.c index b905c79b4f0a..4c0d6bac9143 100644 --- a/fs/exofs/file.c +++ b/fs/exofs/file.c @@ -48,11 +48,6 @@ static int exofs_file_fsync(struct file *filp, int datasync) struct inode *inode = filp->f_mapping->host; struct super_block *sb; - if (!(inode->i_state & I...
0a935519cca83f26dc15e7577fa6c2b39606a4ac
Analyze and fix the following issue in the Linux kernel code: exofs: Trivial: fix some indentation and debug prints
Problem Details: I stumbled on some of these prints in log files so, might just submit the fixes. * All i_ino prints in exofs should be hex * All OSD_ERR prints should end with a "\n" Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
```diff diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c index dcc941d82d67..d0941c6a1f72 100644 --- a/fs/exofs/dir.c +++ b/fs/exofs/dir.c @@ -124,7 +124,7 @@ out: Ebadsize: EXOFS_ERR("ERROR [exofs_check_page]: " - "size of directory #%lu is not a multiple of chunk size", + "size of directory(0x%lx) is not a multipl...
6a8ab060779779de8aea92ce3337ca348f973f54
Analyze and fix the following issue in the Linux kernel code: ipv6: netfilter: ip6_tables: fix infoleak to userspace
Problem Details: Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive information is leaked to userspa...
```diff diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 47b7b8df7fac..c9598a9067d7 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -1275,6 +1275,7 @@ do_replace(struct net *net, const void __user *user, unsigned int len) /* overflow check */ ...
78b79876761b86653df89c48a7010b5cbd41a84a
Analyze and fix the following issue in the Linux kernel code: netfilter: ip_tables: fix infoleak to userspace
Problem Details: Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive information is leaked to userspace...
```diff diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index ef7d7b9680ea..b09ed0d080f9 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -1262,6 +1262,7 @@ do_replace(struct net *net, const void __user *user, unsigned int len) /* overflow check */ if ...
42eab94fff18cb1091d3501cd284d6bd6cc9c143
Analyze and fix the following issue in the Linux kernel code: netfilter: arp_tables: fix infoleak to userspace
Problem Details: Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive information is leaked to userspace...
```diff diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index e95054c690c6..4b5d457c2d76 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -1066,6 +1066,7 @@ static int do_replace(struct net *net, const void __user *user, /* overflow check */ if (tm...
4656c4d61adb8dc3ee04c08f57a5cc7598814420
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_connlimit: remove connlimit_rnd_inited
Problem Details: A potential race condition when generating connlimit_rnd is also fixed. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
```diff diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index da56d6ec13c9..c6d5a83450c9 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c @@ -44,7 +44,6 @@ struct xt_connlimit_data { }; static u_int32_t connlimit_rnd __read_mostly; -static bool connlimit_rnd_init...
8183e3a88aced228ab9770762692be6cc3786e80
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario
Problem Details: We use the reply tuples when limiting the connections by the destination addresses, however, in SNAT scenario, the final reply tuples won't be ready until SNAT is done in POSTROUING or INPUT chain, and the following nf_conntrack_find_get() in count_tem() will get nothing, so connlimit can't work as exp...
```diff diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index e029c4807404..1f4b9f9da496 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c @@ -33,8 +33,9 @@ /* we will save the tuples of all connections we care about */ struct xt_connlimit_conn { - struct list_hea...
6d0de1577eda1fad4be14f70021135ff7df95dcf
Analyze and fix the following issue in the Linux kernel code: ARM: S3C64XX: Fix section mismatch from cpufreq init
Problem Details: The cpufreq init function is referenced from the driver structure and we don't appear to have annotations which allow us to mark that it'll never be called after system init, causing the linker consistency infrastructure to complain. Just remove the __init annotation to avoid noise from the build. Sig...
```diff diff --git a/arch/arm/mach-s3c64xx/cpufreq.c b/arch/arm/mach-s3c64xx/cpufreq.c index 74c0e8347de5..4375b97588b8 100644 --- a/arch/arm/mach-s3c64xx/cpufreq.c +++ b/arch/arm/mach-s3c64xx/cpufreq.c @@ -181,7 +181,7 @@ static void __init s3c64xx_cpufreq_config_regulator(void) } #endif -static int __init s3c64xx...
442ca465c0e775a0808e02d4fcddeddb2fcc882c
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5407 targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5407/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5407/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5407/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/5407/gpio.c b/arch/m68knommu/platform/5407/gpio.c index 8da5880e4066..5850612b4a38 100644 --- a/arch/m68knommu/platform/5407/gpio.c +++ b/arch/m68knommu/platform/5407/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
5d44b09610033d244cc157ac17fc7e6c6793b1d1
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 532x targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/532x/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/532x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/532x/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/532x/gpio.c b/arch/m68knommu/platform/532x/gpio.c index 184b77382c3d..212a85deac90 100644 --- a/arch/m68knommu/platform/532x/gpio.c +++ b/arch/m68knommu/platform/532x/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
2af36dc423fca37be9149329dff1635e4ff72ac4
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5307 targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5307/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5307/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5307/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/5307/gpio.c b/arch/m68knommu/platform/5307/gpio.c index 8da5880e4066..5850612b4a38 100644 --- a/arch/m68knommu/platform/5307/gpio.c +++ b/arch/m68knommu/platform/5307/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
d5dca1e09497c9477a30f1b9eb847c4c22f05a26
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 527x targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/527x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/527x/gpio.c:38:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/527x/gpio.c:39:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/527x/gpio.c b/arch/m68knommu/platform/527x/gpio.c index 0b56e19db0f8..205da0aa0f2d 100644 --- a/arch/m68knommu/platform/527x/gpio.c +++ b/arch/m68knommu/platform/527x/gpio.c @@ -34,9 +34,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .base = 1, .ngpio = 7,...
4d1f692f3002b580b1fd49fba74c1b7c5c123a9c
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5272 targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5272/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5272/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5272/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/5272/gpio.c b/arch/m68knommu/platform/5272/gpio.c index 459db89a89cc..57ac10a5d7f7 100644 --- a/arch/m68knommu/platform/5272/gpio.c +++ b/arch/m68knommu/platform/5272/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
2470758ae500a08d8d0e23b6c4024341ee2be4d7
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5249 targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5249/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5249/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5249/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/5249/gpio.c b/arch/m68knommu/platform/5249/gpio.c index c611eab8b3b6..2b56c6ef65bf 100644 --- a/arch/m68knommu/platform/5249/gpio.c +++ b/arch/m68knommu/platform/5249/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
2836827d7b47d40283424ee90aaa2f7922d4558a
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 523x targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/523x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/523x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/523x/gpio.c:38:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/523x/gpio.c b/arch/m68knommu/platform/523x/gpio.c index a8842dc27839..327ebf142c8e 100644 --- a/arch/m68knommu/platform/523x/gpio.c +++ b/arch/m68knommu/platform/523x/gpio.c @@ -33,9 +33,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .base = 1, .ngpio = 7,...
9516de490ee2131020153df19d0588b65d938ccb
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 520x targets
Problem Details: Fix these compiler warnings: rch/m68knommu/platform/520x/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/520x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/520x/gpio.c:37:3: warning: initial...
```diff diff --git a/arch/m68knommu/platform/520x/gpio.c b/arch/m68knommu/platform/520x/gpio.c index 15b5bb62a698..d757328563d1 100644 --- a/arch/m68knommu/platform/520x/gpio.c +++ b/arch/m68knommu/platform/520x/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
d5365ca5aa65a4988a8c713f0f902f367ae7cdb3
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5206e targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5206e/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast CC kernel/panic.o arch/m68knommu/platform/5206e/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5206e/g...
```diff diff --git a/arch/m68knommu/platform/5206e/gpio.c b/arch/m68knommu/platform/5206e/gpio.c index 60f779ce1651..b9ab4a120f28 100644 --- a/arch/m68knommu/platform/5206e/gpio.c +++ b/arch/m68knommu/platform/5206e/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_valu...
0bb724af29fa56c0be94a4abf2ed33dbd414ddc0
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix gpio warnings for ColdFire 5206 targets
Problem Details: Fix these compiler warnings: arch/m68knommu/platform/5206/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5206/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast arch/m68knommu/platform/5206/gpio.c:37:3: warning: initia...
```diff diff --git a/arch/m68knommu/platform/5206/gpio.c b/arch/m68knommu/platform/5206/gpio.c index 60f779ce1651..b9ab4a120f28 100644 --- a/arch/m68knommu/platform/5206/gpio.c +++ b/arch/m68knommu/platform/5206/gpio.c @@ -32,9 +32,9 @@ static struct mcf_gpio_chip mcf_gpio_chips[] = { .set = mcf_gpio_set_value, ...
7574349cee0b1cddc0aa1104d9b2fc5152d318d9
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix _reset function
Problem Details: If soft reset falls through with no hardware assisted reset, the best we can do is jump to the reset vector and see what the bootloader left for us. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: John Williams <john.williams@petalogix.com>
```diff diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index d68a397e3936..6b4052459d5a 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S @@ -988,7 +988,7 @@ ENTRY(_switch_to) nop ENTRY(_reset) - brai 0x70; /* Jump back to FS-boot */ + brai 0; /* Jump to...
626afa35c1d39be43fc2b225d21973daf1c7e299
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix microblaze init vectors
Problem Details: Microblaze vector table stores several vectors (reset, user exception, interrupt, debug exception and hardware exception). All these functions can be below address 0x10000. If they are, wrong vector table is genarated because jump is not setup from two instructions (imm upper 16bit and brai lower 16bit...
```diff diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S index e3c8d69e248b..d68a397e3936 100644 --- a/arch/microblaze/kernel/entry.S +++ b/arch/microblaze/kernel/entry.S @@ -998,10 +998,13 @@ ENTRY(_reset) /* in current MMU branch you don't care what is here - it is * used from bootloa...
d80d499ed926e70b429d309360f5910d5ad54788
Analyze and fix the following issue in the Linux kernel code: OMAP: DSS2: DSI: fix IRQ debug prints
Problem Details: print_irq_status functions can be called with empty irq status when full irq debugging is enabled. This patch makes print_irq_status functions return immediately when given an empty irq status to lessen the debug spam slightly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
```diff diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 37226628bc0f..0a7f1a47f8e3 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -409,6 +409,9 @@ static void dsi_perf_show(const char *name) static void print_irq_status(u32 status) { + if (status =...
be454366324b31922a2460c63c65d5e3cebe9641
Analyze and fix the following issue in the Linux kernel code: ALSA: firewire-lib: use no-info SYT for packets without SYT sample
Problem Details: In non-blocking mode, the SYT_INTERVAL is larger than the number of audio frames in each packet, so there are packets that do not contain any frame to which the SYT could be applied. For these packets, the SYT must not be the timestamp of the next valid SYT frame, but the special no-info SYT value. T...
```diff diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 09f70ee4d04a..046007ddbcae 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c @@ -228,11 +228,15 @@ static unsigned int calculate_syt(struct amdtp_out_stream *s, syt_offset = s->last_syt_offset - TICKS_PER_CYCLE; s->last_syt_o...
235e7dba0264d4c6e56ee217fc7ef6d80da5eb67
Analyze and fix the following issue in the Linux kernel code: OMAP2PLUS: DSS2: FEATURES: Fix usage of dss_reg_field and dss_clk_source_name
Problem Details: The structures dss_reg_field and dss_clk_source_name have enum members which specify the register field and the clock source respectively. These members are not used to choose the correct result in the corresponding feature functions. Remove these members and change the features array declaration to in...
```diff diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index aed9345e8ada..06ad31290853 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -82,10 +82,10 @@ static struct { u32 ctx[DSS_SZ_REGS / sizeof(u32)]; } dss; -static const struct dss_clk_source_name...
44c4dc521e99c0b2946973090b27c9bd4eb81b63
Analyze and fix the following issue in the Linux kernel code: hwmon/f71882fg: Fix temp1 sensor type reporting
Problem Details: The code for determining a sensort type for temp1 was based on me misreading the datasheet, the tested registers do not determine what kind of sensor is actually reported as temp1. Instead the enable / disable certain additional digital sensor readouts throug PECI / AMDSI, etc. Independent of these set...
```diff diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 6e06019015a5..6c3de065e04b 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2006 by Hans Edgington <hans@ed...
02309ad2b8cbcf45260dd9bb5a527799a612c161
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627ehf) Display correct temperature sensor labels for systems with NCT6775F
Problem Details: Systems with NCT6775F reported temperature sensor labels for systems with NCT6776F. This patch fixes the problem. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index d18031944960..f2b377c56a3a 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1899,9 +1899,10 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) else data->in6_skip = 1; } + data-...
e7e1ca6ef4f331c66392d3548cead7f1205f9278
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627ehf) Fixed most checkpatch warnings and errors
Problem Details: This cleanup fixes most of the checkpatch warnings and errors in the w83627ehf driver. Remaining warnings and errors are left untouched on purpose to avoid making the code less readable. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Ian Dobson <i.dobson@planet-ian.com>
```diff diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 66e6855f9397..1128eac7023b 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1,10 +1,10 @@ /* w83627ehf - Driver for the hardware monitoring functionality of - the Winbond W83627EHF Super-I/O c...
9f6ad1ce6484a92ef864e00611a8ef3daf9c986d
Analyze and fix the following issue in the Linux kernel code: hwmon: (pmbus) Fix LINEAR16 data format
Problem Details: LINEAR16 data format is unsigned, not signed. Impact is that affected attributes report negative values in the upper half of the supported value range. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/pmbus_core.c b/drivers/hwmon/pmbus_core.c index 92540c9cd34e..6474512f49b0 100644 --- a/drivers/hwmon/pmbus_core.c +++ b/drivers/hwmon/pmbus_core.c @@ -359,20 +359,21 @@ static struct pmbus_data *pmbus_update_device(struct device *dev) static int pmbus_reg2data_linear(struct pmbus_da...
673b8b70cfae2cd0428a8ab5647571521348549a
Analyze and fix the following issue in the Linux kernel code: igb: fix hw timestamping
Problem Details: Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or 2.6.37. Comparing it to Intel's igb-2.4.12 I found that the timecounter_init clock/counter initialization was done too early. Signed-off-by: Anders Berggren <andfers@halon.se> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed...
```diff diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index b4f92b06f2ac..5366f2ab65f0 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -106,6 +106,7 @@ static void igb_free_all_rx_resources(struct igb_adapter *); static void igb_setup_mrqc(struct igb_adapter *); stat...
48f26d514ed14f717ebd49439894a9637e0353a9
Analyze and fix the following issue in the Linux kernel code: xen: netfront: fix xennet_get_ethtool_stats()
Problem Details: commit e9a799ea4a5551d2 (xen: netfront: ethtool stats fields should be unsigned long) made rx_gso_checksum_fixup an unsigned long. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 27cf72f26cbb..5b399b54fef7 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1692,7 +1692,7 @@ static void xennet_get_ethtool_stats(struct net_device *dev, int i; for (i = 0; i < ARRAY_SIZE(xennet_stats);...
0a5e5f122c756d1c1a6ca712eda76ea8664e5fd9
Analyze and fix the following issue in the Linux kernel code: nfsd: fix compile error
Problem Details: "fs/built-in.o: In function `supported_enctypes_show': nfsctl.c:(.text+0x7beb0): undefined reference to `gss_mech_get_by_name' nfsctl.c:(.text+0x7bebc): undefined reference to `gss_mech_put' " Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com...
```diff diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 35dcfa8eba21..1f5eae40f34e 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -189,6 +189,7 @@ static struct file_operations export_features_operations = { .release = single_release, }; +#ifdef CONFIG_SUNRPC_GSS static int supported_enctypes_show...
55a3d4e15c7c953ecc55b96b83d2679abf8a7899
Analyze and fix the following issue in the Linux kernel code: ipvs: properly zero stats and rates
Problem Details: Currently, the new percpu counters are not zeroed and the zero commands do not work as expected, we still show the old sum of percpu values. OTOH, we can not reset the percpu counters from user context without causing the incrementing to use old and bogus values. So, as Eric Dumazet suggested fix th...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 9db750d9082d..06f5af4b626d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -374,6 +374,7 @@ struct ip_vs_stats { struct ip_vs_estimator est; /* estimator */ struct ip_vs_cpu_stats *cpustats; /* per cpu counters */ spinlock_t lock...
2a0751af09c3099cf2837c623ca5d0436317d02d
Analyze and fix the following issue in the Linux kernel code: ipvs: reorganize tot_stats
Problem Details: The global tot_stats contains cpustats field just like the stats for dest and svc, so better use it to simplify the usage in estimation_timer. As tot_stats is registered as estimator we can remove the special ip_vs_read_cpu_stats call for tot_stats. Fix ip_vs_read_cpu_stats to be called under stats loc...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 091ca1f76e0e..9db750d9082d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -851,8 +851,7 @@ struct netns_ipvs { atomic_t conn_count; /* connection counter */ /* ip_vs_ctl */ - struct ip_vs_stats *tot_stats; /* Statistics &...
06b69390a652bfe4fa7e18e27c938e75ffe86ba0
Analyze and fix the following issue in the Linux kernel code: IPVS: Fix variable assignment in ip_vs_notrack
Problem Details: There's no sense to 'ct = ct = ' in ip_vs_notrack(). Just assign nf_ct_get()'s return value directly to the pointer variable 'ct' once. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Simon Horman <horms@verge.net.au>
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index e74da41ebd1b..1dcb75da313d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -1190,7 +1190,7 @@ static inline void ip_vs_notrack(struct sk_buff *skb) { #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) enum ip_con...
171f20e93b9d44a846bd5a41a583fdae13d26cd7
Analyze and fix the following issue in the Linux kernel code: net: dcbnl: Fix misspellings
Problem Details: Fix a few spelling errors in dcbnl.h. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 97c90b953c31..eedf79b7ef7e 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h @@ -26,13 +26,13 @@ #define IEEE_8021QAZ_MAX_TCS 8 #define IEEE_8021QAZ_TSA_STRICT 0 -#define IEEE_8021QAZ_TSA_CB_SHABER 1 +#define IEEE_8021QAZ_TSA_CB_...
32f7ef73585a8773914661e1a8e477e7a0bfa8b4
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: add consecutive medium errors
Problem Details: A useful test case for error recovery is multiple, consecutive medium errors. When scsi_debug is started with "opts=2" a MEDIUM ERROR is generated when block 0x1234 (4660) is read. The patch extends that to 10 consecutive blocks from 0x1234 (i.e. blocks 4660 to 4669 inclusive). [0:0:0:0] disk ATA ...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 6ba5dbb91096..1829648982be 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -146,6 +146,7 @@ static const char * scsi_debug_version_date = "20100324"; /* when 1==SCSI_DEBUG_OPT_MEDIUM_ERR, a medium error is simula...
12a2856b604476c27d85a5f9a57ae1661fc46019
Analyze and fix the following issue in the Linux kernel code: macvlan : fix checksums error when we are in bridge mode
Problem Details: When the lower device has offloading capabilities, the packets checksums are not computed. That leads to have any macvlan port in bridge mode to not work because the packets are dropped due to a bad checksum. If the macvlan is in bridge mode, the packet is forwarded to another macvlan port and reach t...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 6ed577b065df..497991bd3b64 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -219,9 +219,11 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev) const struct macvlan_dev *vlan = netdev_priv(dev); const ...
a82058a730c2bd01c43beb8a4847526a2998cc1a
Analyze and fix the following issue in the Linux kernel code: [SCSI] libsas: fix ata list corruption issue
Problem Details: I think this stems from a misunderstanding of how the ata error handler works. ata_scsi_cmd_error_handler() gets called with a passed in list of commands to handle. However, that list may still not be empty when it exits. The command ata_scsi_port_error_handler() must be called (which takes no list)...
```diff diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 16c5094bc86c..3356bf36cd98 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -802,6 +802,19 @@ int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, if (!list_empty(&sata_q)) { ata...
bea3864fb627d110933cfb8babe048b63c4fc76e
Analyze and fix the following issue in the Linux kernel code: PM / Hibernate: Reduce autotuned default image size
Problem Details: The hibernate image size autotuning mechanism sets the default image size to 5/2 of the total system RAM, but it is reported that on some systems device drivers allocate substantial amounts of memory during suspend and the creation of the image fails as a result (too little memory is preallocated). Mo...
```diff diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 64db648ff911..ca0aacc24874 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -42,15 +42,15 @@ static void swsusp_unset_page_forbidden(struct page *); /* * Preferred image size in bytes (tunable via /sys/power/image_siz...
f9b9e806ae0ede772cbb9916d9ac7354a123d044
Analyze and fix the following issue in the Linux kernel code: PM QoS: Make pm_qos settings readable
Problem Details: I have a machine where entering deep C-states broke. pm_qos was a hot candidate, but I couldn't find any way to double check without the need of recompiling. While in this case it was a driver bug (ath9k): https://bugzilla.kernel.org/show_bug.cgi?id=27532 powertop or others may want to read out cpu_d...
```diff diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c index aeaa7f846821..0da058bff8eb 100644 --- a/kernel/pm_qos_params.c +++ b/kernel/pm_qos_params.c @@ -103,11 +103,14 @@ static struct pm_qos_object *pm_qos_array[] = { static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, ...
7ae496187876d264c712d7c102c45edb8eb41363
Analyze and fix the following issue in the Linux kernel code: PM / OPP: opp_find_freq_exact() documentation fix
Problem Details: opp_find_freq_exact() documentation has is_available instead of available. This also fixes warning with the kernel-doc: scripts/kernel-doc drivers/base/power/opp.c >/dev/null Warning(drivers/base/power/opp.c:246): No description found for parameter 'available' Warning(drivers/base/power/opp.c:246): Exc...
```diff diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 2bb9b4cf59d7..56a6899f5e9e 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -222,7 +222,7 @@ int opp_get_opp_count(struct device *dev) * opp_find_freq_exact() - search for an exact frequency * @dev: device for whi...
a8b7228cdce9937ebc302a28db8599035e7b3c86
Analyze and fix the following issue in the Linux kernel code: PM: Documentation/power/states.txt: fix repetition
Problem Details: Remove repetition of "called swsusp". Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt index 34800cc521bf..4416b28630df 100644 --- a/Documentation/power/states.txt +++ b/Documentation/power/states.txt @@ -62,12 +62,12 @@ setup via another operating system for it to use. Despite the inconvenience, this method requires mi...
e8665002477f0278f84f898145b1f141ba26ee26
Analyze and fix the following issue in the Linux kernel code: PM: Allow pm_runtime_suspend() to succeed during system suspend
Problem Details: The dpm_prepare() function increments the runtime PM reference counters of all devices to prevent pm_runtime_suspend() from executing subsystem-level callbacks. However, this was supposed to guard against a specific race condition that cannot happen, because the power management workqueue is freezable...
```diff diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 83404973f97a..f7a755923751 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -669,7 +669,6 @@ static void dpm_complete(pm_message_t state) mutex_unlock(&dpm_list_mtx); device_complete(dev, state); - pm_runt...
88a6f33e4d7143f94f8e787fa4065ac873507984
Analyze and fix the following issue in the Linux kernel code: PM: Clean up PM_TRACE dependencies and drop unnecessary Kconfig option
Problem Details: CONFIG_PM_SLEEP_ADVANCED_DEBUG is not used any more, so drop it and CONFIG_CAN_PM_TRACE need not depend on EXPERIMENTAL, so remove that dependency. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 0710beead05b..298bed04555e 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -140,11 +140,6 @@ config PM_ADVANCED_DEBUG fields of device objects from user space. If you are not a kernel developer interested in debugging/testing Po...
cb8f51bdadb7969139c2e39c2defd4cde98c1ea8
Analyze and fix the following issue in the Linux kernel code: PM: Do not create wakeup sysfs files for devices that cannot wake up
Problem Details: Currently, wakeup sysfs attributes are created for all devices, regardless of whether or not they are wakeup-capable. This is excessive and complicates wakeup device identification from user space (i.e. to identify wakeup-capable devices user space has to read /sys/devices/.../power/wakeup for all dev...
```diff diff --git a/Documentation/ABI/testing/sysfs-devices-power b/Documentation/ABI/testing/sysfs-devices-power index 7628cd1bc36a..8ffbc25376a0 100644 --- a/Documentation/ABI/testing/sysfs-devices-power +++ b/Documentation/ABI/testing/sysfs-devices-power @@ -29,9 +29,8 @@ Description: "disabled" to it. For ...
378eef99ad45700aabfba2bd962516e5608b259a
Analyze and fix the following issue in the Linux kernel code: PM / Wakeup: Make pm_save_wakeup_count() work as documented
Problem Details: According to Documentation/ABI/testing/sysfs-power, the /sys/power/wakeup_count interface should only make the kernel react to wakeup events during suspend if the last write to it has been successful. However, if /sys/power/wakeup_count is written to two times in a row, where the first write is succes...
```diff diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index e5e73b5efc80..07e08c3aece4 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -616,25 +616,25 @@ bool pm_get_wakeup_count(unsigned int *count) * * If @count is equal to the current number of registered wa...
5b94e23292dec213e5bb0240894b597d93744e2a
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)
Problem Details: Update scsi_debug to support the Logical Block Provisioning commands and bits as defined in SBC3r26. The old tp* parameters have been transitioned to the new lbp* scheme found in the draft standard. The old tpu option to enable UNMAP is now called lbpu. tpws to signal support for WRITE SAME(16) with t...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 7b310934efed..6ba5dbb91096 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -89,32 +89,34 @@ static const char * scsi_debug_version_date = "20100324"; /* With these defaults, this driver will make 1 host with 1 ta...
9143a9612277abc6e4ddced2bc54a120734834c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] hpsa: fix incorrect PCI IDs and add two new ones (2nd try)
Problem Details: My first attempt was botched, got the wrong PCI Device ID (used PCI_DEVICE_ID_HP_CISSE, should have been PCI_DEVICE_ID_HP_CISSF) Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c30591f84a06..09a529e34452 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -89,11 +89,13 @@ static const struct pci_device_id hpsa_pci_device_id[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x324a}, {PCI_VENDOR_ID...
904f0bc482201fa86e75c330d79dfd11be494cf8
Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix volume size misreporting for volumes > 2TB
Problem Details: the target infrastructure fails to send the correct conventional size to READ_CAPACITY that force a retry with READ_CAPACITY_16, which reads the capacity for devices > 2TB. Fix by adding the correct return to trigger RC(16). Reported-by: Ben Jarvis <bjarvismn@gmail.com> Signed-off-by: Signed-off-by: ...
```diff diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c index 366080baf474..7f19c8b7b84c 100644 --- a/drivers/target/target_core_cdb.c +++ b/drivers/target/target_core_cdb.c @@ -667,7 +667,13 @@ target_emulate_readcapacity(struct se_cmd *cmd) { struct se_device *dev = SE_DEV(cmd); ...
b5ccd07337489fa9c9d32e0b628a2168b7953adf
Analyze and fix the following issue in the Linux kernel code: tcp_cubic: fix low utilization of CUBIC with HyStart
Problem Details: HyStart sets the initial exit point of slow start. Suppose that HyStart exits at 0.5BDP in a BDP network and no history exists. If the BDP of a network is large, CUBIC's initial cwnd growth may be too conservative to utilize the link. CUBIC increases the cwnd 20% per RTT in this case. Signed-off-by: S...
```diff diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 7172c129ff19..90d92dd4cf13 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -270,6 +270,13 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd) ca->cnt = 100 * cwnd; /* very small increment*/ } + /* + ...
17a6e9f1aa9ba07ca13a1eaf1e631e743af50cca
Analyze and fix the following issue in the Linux kernel code: tcp_cubic: fix clock dependency
Problem Details: The hystart code was written with assumption that HZ=1000. Replace the use of jiffies with bictcp_clock as a millisecond real time clock. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 66d3b00233ec..f4fb2d4b90ad 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -88,7 +88,7 @@ struct bictcp { u32 last_time; /* time when updated last_cwnd */ u32 bic_origin_point;/* origin point of bic function */ u32 bic_K; /* t...
c54b4b7655447c1f24f6d50779c22eba9ee0fd24
Analyze and fix the following issue in the Linux kernel code: tcp_cubic: fix comparison of jiffies
Problem Details: Jiffies wraps around therefore the correct way to compare is to use cast to signed value. Note: cubic is not using full jiffies value on 64 bit arch because using full unsigned long makes struct bictcp grow too large for the available ca_priv area. Includes correction from Sangtae Ha to improve ack t...
```diff diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 71d5f2f29fa6..43bb34c9b8bf 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -342,9 +342,11 @@ static void hystart_update(struct sock *sk, u32 delay) u32 curr_jiffies = jiffies; /* first detection parameter - ack-train detectio...
febf081987ec445f071ed10b73e9707a88cc5cc4
Analyze and fix the following issue in the Linux kernel code: tcp: fix RTT for quick packets in congestion control
Problem Details: In the congestion control interface, the callback for each ACK includes an estimated round trip time in microseconds. Some algorithms need high resolution (Vegas style) but most only need jiffie resolution. If RTT is not accurate (like a retransmission) -1 is used as a flag value. When doing coarse r...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 65f6c0406245..e16b17efcf57 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3350,7 +3350,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, net_invalid_timestamp())) rtt_us = ktime_us_delta(ktime_ge...
e0dca7a05df4e23a8f5b07742e99e2a6f7d67db1
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a warning in fs/nfs/idmap.c
Problem Details: Commit 45a52a02072b2a7e265f024cfdb00127e08dd9f2 (NFS move nfs_client initialization into nfs_get_client) introduces a new warning in fs/nfs/idmap.c: ‘struct rpc_timeout’ declared inside parameter list Fix it by adding a forward declaration for the struct rpc_timeout in include/linux/nfs_xdr.h Signe...
```diff diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 3440f5ab0f54..2c2c67d2eb42 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1051,6 +1051,7 @@ struct nfs_write_data { struct nfs_access_entry; struct nfs_client; +struct rpc_timeout; /* * RPC procedure vector for...
ac90fa63432b3c03c189c39e62211d3b80418c30
Analyze and fix the following issue in the Linux kernel code: NET: cdc-phonet, fix stop-queue handling
Problem Details: Currently there is a warning emitted by the cdc-phonet driver: WARNING: at include/linux/netdevice.h:1557 usbpn_probe+0x3bb/0x3f0 [cdc_phonet]() Modules linked in: ... Pid: 5877, comm: insmod Not tainted 2.6.37.3-16-desktop #1 Call Trace: [<ffffffff810059b9>] dump_trace+0x79/0x340 [<ffffffff81520fdc>...
```diff diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 109751bad3bb..4cf4e361c121 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c @@ -392,7 +392,6 @@ int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *id) pnd = netdev_priv(dev); SET...
52d3c03675fdbe1965b9b1909072b40ad2f80063
Analyze and fix the following issue in the Linux kernel code: Revert "oom: oom_kill_process: fix the child_points logic"
Problem Details: This reverts the parent commit. I hate doing that, but it's generating some discussion ("half of it is right"), and since I am planning on doing the 2.6.38 release later today we can punt it to stable if required. Let's not rock the boat right now. Signed-off-by: Linus Torvalds <torvalds@linux-founda...
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index b19c78eb74c0..7dcca55ede7c 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -458,10 +458,10 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, struct mem_cgroup *mem, nodemask_t *nodemask, const char *message) { - s...
942527634e201883b39fe0c97a1e47db7a026f91
Analyze and fix the following issue in the Linux kernel code: drivers/net: fix build warnings with CONFIG_PM_SLEEP disabled
Problem Details: This fixes a couple of build warnings when CONFIG_PM is enabled but CONFIG_PM_SLEEP is disabled. Applies on top of v2.6.38-rc7 - I know it's late, but it would be great if v2.6.38 could compile without warnings! Signed-off-by: Michel Lespinasse <walken@google.com> Signed-off-by: David S. Miller <davem...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 9c0b1bac6af6..7b92897ca66b 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -5744,7 +5744,7 @@ static void __devexit nv_remove(struct pci_dev *pci_dev) pci_set_drvdata(pci_dev, NULL); } -#ifdef CONFIG_PM +#ifdef CONFI...
05aebe2e5d009314a1d9b47ad9cda59ccb57d76d
Analyze and fix the following issue in the Linux kernel code: pktgen: bug fix in transmission headers with frags=0
Problem Details: (bug introduced by commit 26ad787962ef84677a48c560 (pktgen: speedup fragmented skbs) The headers of pktgen were incorrectly added in a pktgen packet without frags (frags=0). There was an offset in the pktgen headers. The cause was in reusing the pgh variable as a return variable in skb_put when addin...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f0aec6c39ecd..0c55eaa70e39 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2620,8 +2620,7 @@ static void pktgen_finalize_skb(struct pktgen_dev *pkt_dev, struct sk_buff *skb, datalen -= sizeof(*pgh); if (pkt_dev->nfrags <= 0) { - pgh = (s...
423cfa7e1fe68974b3b25fe8233ea57a5c2e5f02
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix swap of rx-ticks and tx-ticks parameters in interrupt coalescing flow
Problem Details: Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index aa032339e321..10bc0a6a32d9 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -4208,7 +4208,7 @@ void bnx2x_update_coalesce(struct bnx2x *bp) for_each_eth_queue(bp, i) bnx2x_update_coalesce...
dc1b83ab08f1954335692cdcd499f78c94f4c42a
Analyze and fix the following issue in the Linux kernel code: oom: oom_kill_process: fix the child_points logic
Problem Details: oom_kill_process() starts with victim_points == 0. This means that (most likely) any child has more points and can be killed erroneously. Also, "children has a different mm" doesn't match the reality, we should check child->mm != t->mm. This check is not exactly correct if t->mm == NULL but this doe...
```diff diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 7dcca55ede7c..b19c78eb74c0 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -458,10 +458,10 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, struct mem_cgroup *mem, nodemask_t *nodemask, const char *message) { - s...
9ced975711d605d7deb27ef027e0f9816a51b479
Analyze and fix the following issue in the Linux kernel code: MIPS: Alchemy: Fix reset for MTX-1 and XXS1500
Problem Details: Since commit 32fd6901 (MIPS: Alchemy: get rid of common/reset.c) Alchemy-based boards use their own reset function. For MTX-1 and XXS1500, the reset function pokes at the BCSR.SYSTEM_RESET register, but this does not work. According to Bruno Randolf, this was not tested when written. Previously, the g...
```diff diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c index 6398fa95905c..40b84b991191 100644 --- a/arch/mips/alchemy/mtx-1/board_setup.c +++ b/arch/mips/alchemy/mtx-1/board_setup.c @@ -54,8 +54,8 @@ int mtx1_pci_idsel(unsigned int devsel, int assert); static void mtx1_re...
6667deb69ee3b8a31ea88e1303cf3ad7d4f221da
Analyze and fix the following issue in the Linux kernel code: MIPS: Move idle task creation to work queue
Problem Details: To avoid forking usermode thread when creating an idle task, move fork_idle to a work queue. If kernel starts with maxcpus= option which does not bring all available cpus online at boot time, idle tasks for offline cpus are not created. If later offline cpus are hotplugged through sysfs, __cpu_up is c...
```diff diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 383aeb95cb49..32a256101082 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -193,6 +193,22 @@ void __devinit smp_prepare_boot_cpu(void) */ static struct task_struct *cpu_idle_thread[NR_CPUS]; +struct create_idle { + struc...
c049b6a5f2d8ca16094a4f2a6d8ad39f888a551a
Analyze and fix the following issue in the Linux kernel code: MIPS, Perf-events: Fix event check in validate_event()
Problem Details: Ignore events that are in off/error state or belong to a different PMU. This patch originates from the following commit for ARM by Will Deacon: - 65b4711ff513767341aa1915c822de6ec0de65cb ARM: 6352/1: perf: fix event validation The validate_event function in the ARM perf events backend has th...
```diff diff --git a/arch/mips/kernel/perf_event.c b/arch/mips/kernel/perf_event.c index 1ee44a3f9718..3d55761146e5 100644 --- a/arch/mips/kernel/perf_event.c +++ b/arch/mips/kernel/perf_event.c @@ -486,8 +486,9 @@ static int validate_event(struct cpu_hw_events *cpuc, { struct hw_perf_event fake_hwc = event->hw; -...
404ff638403e9286691b9b1f86d514c1d7737e8f
Analyze and fix the following issue in the Linux kernel code: MIPS, Perf-events: Work with the new PMU interface
Problem Details: This is the MIPS part of the following commits by Peter Zijlstra: - a4eaf7f14675cb512d69f0c928055e73d0c6d252 perf: Rework the PMU methods Replace pmu::{enable,disable,start,stop,unthrottle} with pmu::{add,del,start,stop}, all of which take a flags argument. The new interface extends ...
```diff diff --git a/arch/mips/kernel/perf_event.c b/arch/mips/kernel/perf_event.c index 2b7f3f703b83..1ee44a3f9718 100644 --- a/arch/mips/kernel/perf_event.c +++ b/arch/mips/kernel/perf_event.c @@ -161,41 +161,6 @@ mipspmu_event_set_period(struct perf_event *event, return ret; } -static int mipspmu_enable(struct ...
efe8dc556cd0f22e04c453188ffbc408b492eb82
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix always CONFIG_LOONGSON_UART_BASE=y
Problem Details: Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Cc: linux-mips <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/2055/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig index 6e1b77fec7ea..aca93eed8779 100644 --- a/arch/mips/loongson/Kconfig +++ b/arch/mips/loongson/Kconfig @@ -1,6 +1,7 @@ +if MACH_LOONGSON + choice prompt "Machine Type" - depends on MACH_LOONGSON config LEMOTE_FULOONG2E bool "Lemote ...
994fed2dd2166f86b62ec53c7424660145f138ee
Analyze and fix the following issue in the Linux kernel code: MIPS: Loongson: Fix potentially wrong string handling
Problem Details: This error was reported by cppcheck: arch/mips/loongson/common/machtype.c:56: error: Dangerous usage of 'str' (strncpy doesn't always 0-terminate it) If strncpy copied MACHTYPE_LEN bytes, the destination string str was not terminated. The patch adds one more byte to str and makes sure that this byte ...
```diff diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c index 81fbe6b73f91..2efd5d9dee27 100644 --- a/arch/mips/loongson/common/machtype.c +++ b/arch/mips/loongson/common/machtype.c @@ -41,7 +41,7 @@ void __weak __init mach_prom_init_machtype(void) void __init prom_init_macht...
d3ce0e98b7fe17bb1dec9f6d7c50213db01e7189
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c
Problem Details: Under some combinations of CONFIG_*, lastpfn in page_is_ram is 'set but not used'. Mark it as __maybe_unused to quiet the warning/error. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2033/ Signed-off-by: Ralf Bae...
```diff diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 2efcbd24c82f..279599e9a779 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -324,7 +324,7 @@ int page_is_ram(unsigned long pagenr) void __init paging_init(void) { unsigned long max_zone_pfns[MAX_NR_ZONES]; - unsigned long lastpfn; + u...
91b51f30084911754aed004bd3792f71f7bf0843
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h
Problem Details: GCC-4.6 can find more unused code than previous versions could. In the case of arch/mips/math-emu/ieee754int.h, the COMPXSP and COMPXDP macros are used in several places, but a couple of them leave xs unused. The easiest thing to do is mark it as __maybe_unused to quiet the warning. Signed-off-by: D...
```diff diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h index 2701d9500959..2a7d43f4f161 100644 --- a/arch/mips/math-emu/ieee754int.h +++ b/arch/mips/math-emu/ieee754int.h @@ -70,7 +70,7 @@ #define COMPXSP \ - unsigned xm; int xe; int xs; int xc + unsigned xm; int xe; int xs __mayb...
c726b822131e7fdb62745a5585449e6a159395e8
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c
Problem Details: GCC-4.6 can find more unused code than previous versions could. In the case of protected_restore_fp_context{,32}, the variable tmp is really used. Its use is tricky in that we really care about the side effects of the __put_user() calls. So we must mark tmp with __maybe_unused to quiet the warning. ...
```diff diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 5922342bca39..dbbe0ce48d89 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -84,7 +84,7 @@ static int protected_save_fp_context(struct sigcontext __user *sc) static int protected_restore_fp_context(struct sigcon...
a18059ace1eee8c4755bcce22163d137425db607
Analyze and fix the following issue in the Linux kernel code: MIPS: MSP: Fix MSP71xx bpci interrupt handler return value
Problem Details: Signed-off-by: Anoop P A <anoop.pa@gmail.com> To: Ben Hutchings <ben@decadent.org.uk> To: linux-mips@linux-mips.org To: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1804/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index b7c03d80c88c..68798f869c0f 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c @@ -308,7 +308,7 @@ static struct resource pci_mem_resource = { * RETURNS: PCIBIOS_SUCCESSFUL - success * *******************...
e56293b129607be089f2c12906d709e3c84b68c4
Analyze and fix the following issue in the Linux kernel code: MIPS: Clear the correct flag in sysmips(MIPS_FIXADE, ...).
Problem Details: The sysmips(MIPS_FIXADE, ...) case contains an obvious copy-and-paste error in the handling of the TIF_LOGADE flag. Fix that Patchwork: https://patchwork.linux-mips.org/patch/1997/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 1dc6edff45e0..cde2a32c1043 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -405,7 +405,7 @@ _sys_sysmips(nabi_no_regargs struct pt_regs regs) if (arg1 & 2) set_thread_flag(TIF_LOGADE); else - clear...