id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
5391dd0a9d084633e20e6583cfed233581c452f9 | Analyze and fix the following issue in the Linux kernel code: leds-lp5523: BUG() in error handling in probe() | Problem Details:
Inside the error handling in lp5523_init_led(), there is a place that
calls to led_classdev_unregister(). When we unregister the LED drivers,
it tries to set the brightness to OFF. In this driver setting the
brightness is done through a work queue and the work queue hasn't been
initialized yet.
The ... | ```diff
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 857a3e15f2dd..e8a271232cd0 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -943,6 +943,9 @@ static int __devinit lp5523_probe(struct i2c_client *client,
if (pdata->led_config[i].led_current == 0)
contin... |
20c0e6b8787c5289202f688b6be78dff4568c1df | Analyze and fix the following issue in the Linux kernel code: leds: fix sparse warnings due to missing static | Problem Details:
drivers/leds/led-core.c:56:6: sparse: symbol 'led_blink_setup' was not declared. Should it be static?
drivers/leds/led-triggers.c:233:6: sparse: symbol 'led_trigger_blink_setup' was not declared. Should it be static?
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Bryan Wu <bryan.wu@can... | ```diff
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 8a09c5fc2a6d..2ab05af3de31 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -53,7 +53,7 @@ static void led_set_software_blink(struct led_classdev *led_cdev,
}
-void led_blink_setup(struct led_classdev *led_cdev,
+stat... |
a0193cbee0809d65362a0767b2d50306b145b2f5 | Analyze and fix the following issue in the Linux kernel code: leds: use led_set_brightness in led_trigger_event | Problem Details:
Fix led_trigger_event() to use led_set_brightness() instead of
__led_set_brightness(), so that any pending blink timer is stopped before
setting the new brightness value. Without this fix LED status may be
overridden by a pending timer.
This allows a trigger to use a mix of led_trigger_event(),
led_t... | ```diff
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 57721f25d7cd..de1c59d641a8 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -224,7 +224,7 @@ void led_trigger_event(struct led_trigger *trig,
struct led_classdev *led_cdev;
led_cdev = list_entry(ent... |
437864828d82b9dee50b5741106fbf5fa12b139a | Analyze and fix the following issue in the Linux kernel code: leds: fix led_brightness_set when soft-blinking | Problem Details:
Move led_stop_software_blink() code into led_brightness_set() to ensure
software blink timer is stopped and cleared when changing trigger.
Also use led_set_brightness() instead of calling
led_cdev->brightness_set() directly to keep led_cdev->brightness
consistent with current LED status.
This ensure ... | ```diff
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index a6f4d910ca08..31f1f78ef40b 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -24,13 +24,6 @@ EXPORT_SYMBOL_GPL(leds_list_lock);
LIST_HEAD(leds_list);
EXPORT_SYMBOL_GPL(leds_list);
-static void led_stop_software_blink(st... |
594831c4b232b094d645503ecedec2e35dcebdf3 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix potential race in extent buffer freeing | Problem Details:
This sounds sort of impossible but it is the only thing I can think of and
at the very least it is theoretically possible so here it goes.
If we are in try_release_extent_buffer we will check that the ref count on
the extent buffer is 1 and not under IO, and then go down and clear the tree
ref. If be... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index e6243f787434..e1939a6c7478 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4123,11 +4123,10 @@ static void check_buffer_tree_ref(struct extent_buffer *eb)
* So bump the ref count first, then set the bit. If someone
* beat us ... |
e6466e354a5c23717325adecf387f93be4b9c830 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix buffer leak in btrfs_next_old_leaf | Problem Details:
When calling btrfs_next_old_leaf, we were leaking an extent buffer in the
rare case of using the deadlock avoidance code needed for the tree mod log.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Josef Bacik <jbacik@fusionio.com> | ```diff
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 8206b3900587..67fe46fdee6f 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -5127,6 +5127,7 @@ again:
* locked. To solve this situation, we give up
* on our lock and cycle.
*/
+ free_extent_buffer(next);
btrfs_release_path(p... |
cf7c1ef6e1fe05864369f59dd516e816b11de7d0 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix a bug of writting free space cache during balance | Problem Details:
Here is the whole story:
1)
A free space cache consists of two parts:
o free space cache inode, which is special becase it's stored in root tree.
o free space info, which is stored as the above inode's file data.
But we only build up another new inode and does not flush its free space info
onto disk... | ```diff
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 67bd12a52369..3ca26d84cce5 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2903,8 +2903,13 @@ again:
}
spin_lock(&block_group->lock);
- if (block_group->cached != BTRFS_CACHE_FINISHED) {
- /* We're not cached, don't b... |
51a8cf9d2d97017d334f33f1b39067bd2f03bc49 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix btrfs_is_free_space_inode to recognize btree inode | Problem Details:
For btree inode, its root is also 'tree root', so btree inode can be
misunderstood as a free space inode.
We should add one more check for btree inode.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com> | ```diff
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 12394a90d60f..b168238bcb13 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -194,8 +194,10 @@ static inline void btrfs_i_size_write(struct inode *inode, u64 size)
static inline bool btrfs_is_free_space_inode(struct btrfs_root... |
c0901581ad077004145c9ee80e843fba71c100b8 | Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid I/O repair BUG() from btree_read_extent_buffer_pages() | Problem Details:
From btree_read_extent_buffer_pages(), currently repair_io_failure()
can be called with mirror_num being zero when submit_one_bio() returned
an error before. This used to cause a BUG_ON(!mirror_num) in
repair_io_failure() and indeed this is not a case that needs the I/O
repair code to rewrite disk bloc... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index dd6676b446f6..1a4a2a975926 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -407,7 +407,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root,
break;
}
- if (failed && !ret)
+ if (failed && !ret && failed_mirror)
r... |
287082b0bd10060e9c6b32ed9605174ddf2f672a | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix typo in cow_file_range_async and async_cow_submit | Problem Details:
It should be 10 * 1024 * 1024.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f93a98e65d6c..18f1b44d1610 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1010,7 +1010,7 @@ static noinline void async_cow_submit(struct btrfs_work *work)
atomic_sub(nr_pages, &root->fs_info->async_delalloc_pages);
if (atomic_read(&root->fs_... |
23291a044c31f9dfdeaf633b631059fb75e5c2c4 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix error handling in __add_reloc_root() | Problem Details:
We dereferenced "node" in the error message after freeing it. Also
btrfs_panic() can return so we should return an error code instead of
continuing.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 646ee21bb035..c5dbd9149679 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1239,10 +1239,11 @@ static int __must_check __add_reloc_root(struct btrfs_root *root)
node->bytenr, &node->rb_node);
spin_unlock(&rc->reloc_r... |
e7d4b18cbebc635fafd634688bbf66c59912879f | Analyze and fix the following issue in the Linux kernel code: net/ipv4/ip_vti.c: Fix __rcu warnings detected by sparse. | Problem Details:
With CONFIG_SPARSE_RCU_POINTER=y sparse identified references which did not
specificy __rcu in ip_vti.c
Signed-off-by: Saurabh Mohan <saurabh.mohan@vyatta.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index c41b5c359936..3511ffba7bd4 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -55,7 +55,7 @@ struct vti_net {
struct ip_tunnel __rcu *tunnels_r[HASH_SIZE];
struct ip_tunnel __rcu *tunnels_l[HASH_SIZE];
struct ip_tunnel __rcu *tunnels_wc[1];
-... |
0ec4f431eb56d633da3a55da67d5c4b88886ccc7 | Analyze and fix the following issue in the Linux kernel code: locks: fix checking of fcntl_setlease argument | Problem Details:
The only checks of the long argument passed to fcntl(fd,F_SETLEASE,.)
are done after converting the long to an int. Thus some illegal values
may be let through and cause problems in later code.
[ They actually *don't* cause problems in mainline, as of Dave Jones's
commit 8d657eb3b438 "Remove easily... | ```diff
diff --git a/fs/locks.c b/fs/locks.c
index fce6238d52c1..82c353304f9e 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -308,7 +308,7 @@ static int flock_make_lock(struct file *filp, struct file_lock **lock,
return 0;
}
-static int assign_type(struct file_lock *fl, int type)
+static int assign_type(struct file_l... |
f51304d3fe4fee475991ee424a4b7f85eec65a7b | Analyze and fix the following issue in the Linux kernel code: perf symbols: Add machine id to modules debug message | Problem Details:
Current debug message is:
Problems creating module maps, continuing anyway...
When running multiple VMs it would be nice to know which machine the
message is referring to:
$ perf kvm --guest --guestmount=/tmp/guest-mount record -av -- sleep 10
Problems creating module maps for guest 6613, continuing ... | ```diff
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 50958bbeb26a..66c132e52875 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2564,8 +2564,15 @@ int machine__create_kernel_maps(struct machine *machine)
__machine__create_kernel_maps(machine, kernel) < 0)
retu... |
d76ea24ac4c92e7e0700e047fcbf716c4de2b107 | Analyze and fix the following issue in the Linux kernel code: spi/bcm63xx: fix clock configuration selection | Problem Details:
We are currently using an inferior or equal operator for comparing
the transfer frequency with the clock frequency table. Because of
this, we always end up selecting 20Mhz as a frequency, due to the
inequality transfer hz <= 20 Mhz being always true. Fix this by
reversing the inequality, which is how t... | ```diff
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 7491971139a6..6e25ef1bce91 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -129,7 +129,7 @@ static void bcm63xx_spi_setup_transfer(struct spi_device *spi,
/* Find the closest clock configuration */
for (i = ... |
1471d41a5bdfdf83ed1e5c2148a9763e64b1f53b | Analyze and fix the following issue in the Linux kernel code: MTD: NAND: JZ4740: Multi-bank support with autodetection | Problem Details:
The platform data can now specify which external memory banks to probe
for NAND chips, and in which order. Banks that contain a NAND are used
and the other banks are freed.
Squashed version of development done in jz-2.6.38 branch.
Original patch by Lars-Peter Clausen with some bug fixes from me.
Thank... | ```diff
diff --git a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h
index bb5b9a4e29c8..986982db7c38 100644
--- a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h
+++ b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h
@@ -19,6 +19,8 @@
#include <linux/mtd/nand.h>
#incl... |
71a1c776d51a12d064d2b824753d259b0f5050e7 | Analyze and fix the following issue in the Linux kernel code: MIPS: Fixup ordering of micro assembler instructions. | Problem Details:
A number of new instructions have been added to the micro assembler causing
the list to no longer be in alphabetical order. This patch fixes up the name
ordering.
Signed-off-by: Steven J. Hill <sjhill@mips.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3789/
Signe... | ```diff
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
index 440a21dab575..3d9f75f7ffc9 100644
--- a/arch/mips/include/asm/uasm.h
+++ b/arch/mips/include/asm/uasm.h
@@ -6,6 +6,7 @@
* Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer
* Copyright (C) 2005 Maciej W. Rozycki
* Copyright (... |
d9831a41e3409ae60e0cac353272d8ae4996b442 | Analyze and fix the following issue in the Linux kernel code: MIPS: BCM63XX: Be consistent in clock bits enable naming | Problem Details:
Remove the _CLK suffix from the BCM6368 clock bits definitions to be
consistent with what is already present.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3312/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ```diff
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 9d57c71b7b58..8d2ea223f102 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -120,7 +120,7 @@ static void enetsw_set(struct clk *clk, int enable)
{
if (!BCMCPU_IS_6368())
return;
- bcm_hwclock_set(CKCTL_6368_ROBOSW_CL... |
d295b129762bf6b2b7541243f496e363580de4a2 | Analyze and fix the following issue in the Linux kernel code: pwm: fix used-uninitialized warning in pwm_get() | Problem Details:
Some versions of GCC don't seem no notice that the initialization of the
index variable is tied to that of the chip variable and falsely report
it as potentially being used uninitialized. However, to save anybody
else from tripping over this, we now initialize the index variable
unconditionally.
Origi... | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index dbab53005da8..ecb76909e946 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -529,9 +529,9 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id)
struct pwm_device *pwm = ERR_PTR(-EPROBE_DEFER);
const char *dev_id = dev ? de... |
7732c6b96f127bb5d9474715149b4e94e369412c | Analyze and fix the following issue in the Linux kernel code: watchdog: sch311x_wdt: Fix Polarity when starting watchdog | Problem Details:
Some motherboards like the Advantech ARK3400 documentation
use a non-inverted GPIO pin. We fix this by assuming that
the BIOS will set the Polarity bit for the GPIO correctly
at startup and we keep the Bit-setting intact when we start
and stop the watchdog.
Reported-by: Jean-François Deverge <jf.dever... | ```diff
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c
index f8477002b728..9681ada0f252 100644
--- a/drivers/watchdog/sch311x_wdt.c
+++ b/drivers/watchdog/sch311x_wdt.c
@@ -136,6 +136,8 @@ static void sch311x_wdt_set_timeout(int t)
static void sch311x_wdt_start(void)
{
+ unsigned char ... |
41814eed414ab3cef3d2b857ae3690a2b4888291 | Analyze and fix the following issue in the Linux kernel code: Watchdog: OMAP: Fix the runtime pm code to avoid module getting stuck intransition state. | Problem Details:
OMAP watchdog driver is adapted to runtime PM like a general device
driver but it is not appropriate. It is causing couple of functional
issues.
1. On OMAP4 SYSCLK can't be gated, because of issue with WDTIMER2 module,
which constantly stays in "in transition" state. Value of register
CM_WKUP_WDTIMER2... | ```diff
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 8285d65cd207..27ab8db67d14 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -126,8 +126,6 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev)
u32 pre_margin = GET_WLDR_VAL(timer_margin);
void... |
5a135f3c72c5bc738a29629d81a99c981b17a736 | Analyze and fix the following issue in the Linux kernel code: watchdog: bcm63xx_wdt: fix driver section mismatch | Problem Details:
bcm63xx_wdt was used as a platform_driver but was not suffixed with
_driver, thus causing section mismatches, fix that.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be> | ```diff
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c
index 8379dc32fd90..551880bfd629 100644
--- a/drivers/watchdog/bcm63xx_wdt.c
+++ b/drivers/watchdog/bcm63xx_wdt.c
@@ -302,7 +302,7 @@ static void bcm63xx_wdt_shutdown(struct platform_device *pdev)
bcm63xx_wdt_pause();
}
-static st... |
0ff97ebf0804d2e519d578fcb4db03f104d2ca8c | Analyze and fix the following issue in the Linux kernel code: ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements | Problem Details:
Ever since the DAPM performance improvements we've been marking all widgets
as not dirty after each DAPM run. Since _PRE and _POST events aren't part
of the DAPM graph this has rendered them non-functional, they will never be
marked dirty again and thus will never be run again.
Fix this by skipping th... | ```diff
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index f7a13f720529..025060b26fb7 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1598,7 +1598,15 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
}
list_for_each_entry(w, &card->widgets, list) {
- list... |
06b6a1cf6e776426766298d055bb3991957d90a7 | Analyze and fix the following issue in the Linux kernel code: rds: set correct msg_namelen | Problem Details:
Jay Fenlason (fenlason@redhat.com) found a bug,
that recvfrom() on an RDS socket can return the contents of random kernel
memory to userspace if it was called with a address length larger than
sizeof(struct sockaddr_in).
rds_recvmsg() also fails to set the addr_len paramater properly before
returning, ... | ```diff
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 5c6e9f132026..9f0f17cf6bf9 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -410,6 +410,8 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
rdsdebug("size %zu flags 0x%x timeo %ld\n", size, msg_flags, timeo);
+ msg->msg_na... |
5b3e7e6cb5771bedda51cdb6f715d1da8cd9e644 | Analyze and fix the following issue in the Linux kernel code: openvswitch: potential NULL deref in sample() | Problem Details:
If there is no OVS_SAMPLE_ATTR_ACTIONS set then "acts_list" is NULL and
it leads to a NULL dereference when we call nla_len(acts_list). This
is a static checker fix, not something I have seen in testing.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@dav... | ```diff
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index f3f96badf5aa..320fa0e6951a 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -325,6 +325,9 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
}
}
+ if (!acts_list)
+ return 0;
+
return do_execu... |
563d34d05786263893ba4a1042eb9b9374127cf5 | Analyze and fix the following issue in the Linux kernel code: tcp: dont drop MTU reduction indications | Problem Details:
ICMP messages generated in output path if frame length is bigger than
mtu are actually lost because socket is owned by user (doing the xmit)
One example is the ipgre_tunnel_xmit() calling
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
We had a similar case fixed in commit a34a101e1e... | ```diff
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 2761856987b2..eb125a4c30b3 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -493,6 +493,9 @@ struct tcp_sock {
u32 probe_seq_start;
u32 probe_seq_end;
} mtu_probe;
+ u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_... |
ec2deec1f3520c467e3fb64f11a5d1e9c073e376 | Analyze and fix the following issue in the Linux kernel code: niu: Fix to check for dma mapping errors. | Problem Details:
Fix Neptune ethernet driver to check dma mapping error after map_page()
interface returns.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 8c726b7004d3..60d5c035d946 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -3335,6 +3335,10 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp,
addr = np->ops->map_page(... |
9f0bbd8ca7905fcc0602c038013b095322fec939 | Analyze and fix the following issue in the Linux kernel code: logfs: query block device for number of pages to send with bio | Problem Details:
The block device driver puts a limit on maximum number of pages that
can be sent with the bio. Not all block devices can handle
BIO_MAX_PAGES number of pages in bio. Specifically the virtio-blk
diriver limits it to 126. When the LogFS file system was excersized in
KVM, the following bug from do_virtblk... | ```diff
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
index ea29df36893d..e784a217b500 100644
--- a/fs/logfs/dev_bdev.c
+++ b/fs/logfs/dev_bdev.c
@@ -96,12 +96,11 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index,
struct address_space *mapping = super->s_mapping_inode->i_mapping;
... |
41b93bc1ee7e7276db698dd66afa7b740cda517a | Analyze and fix the following issue in the Linux kernel code: logfs: maintain the ordering of meta-inode destruction | Problem Details:
LogFS does not use a specialized area to maintain the inodes. The
inodes information is kept in a specialized file called inode file.
Similarly, the segment information is kept in a segment file. Since
the segment file also has an inode which is kept in the inode file,
the inode for segment file must b... | ```diff
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c
index df093d9e4da1..6984562738d3 100644
--- a/fs/logfs/inode.c
+++ b/fs/logfs/inode.c
@@ -389,8 +389,8 @@ static void logfs_put_super(struct super_block *sb)
{
struct logfs_super *super = logfs_super(sb);
/* kill the meta-inodes */
- iput(super->s_master_ino... |
ddb24bbac3681b87ae0638aacb702d9273e3c025 | Analyze and fix the following issue in the Linux kernel code: logfs: create a pagecache page if it is not present | Problem Details:
While writing the partial journal entries we assumed that the page
associated with the journal would always in locatable. This incorrect
assumption resulted in the following BUG
kernel BUG at /home/benixon/WD_SMR/kernels/linux-3.3.7-logfs/fs/logfs/journal.c:569!
EIP is at logfs_write_area+0xb6/0x109 [... | ```diff
diff --git a/fs/logfs/journal.c b/fs/logfs/journal.c
index 1e1c369df22b..2a09b8d73989 100644
--- a/fs/logfs/journal.c
+++ b/fs/logfs/journal.c
@@ -565,7 +565,7 @@ static void write_wbuf(struct super_block *sb, struct logfs_area *area,
index = ofs >> PAGE_SHIFT;
page_ofs = ofs & (PAGE_SIZE - 1);
- page = f... |
968dee77220768a5f52cf8b21d0bdb73486febef | Analyze and fix the following issue in the Linux kernel code: ext4: fix hole punch failure when depth is greater than 0 | Problem Details:
Whether to continue removing extents or not is decided by the return
value of function ext4_ext_more_to_rm() which checks 2 conditions:
a) if there are no more indexes to process.
b) if the number of entries are decreased in the header of "depth -1".
In case of hole punch, if the last block to be remo... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 46b5c9fdc96a..cd0c7ed06772 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2569,10 +2569,10 @@ static int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start,
{
struct super_block *sb = inode->i_sb;
int depth = ext_depth(inode);
-... |
818810472b129004c16fc51bf0a570b60776bfb7 | Analyze and fix the following issue in the Linux kernel code: net: Fix references to out-of-scope variables in put_cmsg_compat() | Problem Details:
In net/compat.c::put_cmsg_compat() we may assign 'data' the address of
either the 'ctv' or 'cts' local variables inside the 'if
(!COMPAT_USE_64BIT_TIME)' branch.
Those variables go out of scope at the end of the 'if' statement, so
when we use 'data' further down in 'copy_to_user(CMSG_COMPAT_DATA(cm),
... | ```diff
diff --git a/net/compat.c b/net/compat.c
index 1b96281892de..74ed1d7a84a2 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -221,6 +221,8 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
{
struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control;
... |
254706056be7e4e161ae9675ead6cd4e269be966 | Analyze and fix the following issue in the Linux kernel code: ext4: fix ext4 mismerge back in January | Problem Details:
Duplicate caused, AFAICS, by mismerge in
ff9cb1c4eead5e4c292e75cd3170a82d66944101>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org | ```diff
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index e34deac3f366..6ec6f9ee2fec 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -268,7 +268,6 @@ group_extend_out:
err = ext4_move_extents(filp, donor_filp, me.orig_start,
me.donor_start, me.len, &me.moved_len);
mnt_drop_write_file(filp);
- mnt_... |
4bd809dbbf177ad0c450d702466b1da63e1b4b7e | Analyze and fix the following issue in the Linux kernel code: ext4: don't take the i_mutex lock when doing DIO overwrites | Problem Details:
Aligned and overwrite direct I/O can be parallelized. In
ext4_file_dio_write, we first check whether these conditions are
satisfied or not. If so, we take i_data_sem and release i_mutex lock
directly. Meanwhile iocb->private is set to indicate that this is a
dio overwrite, and it will be handled in ... | ```diff
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index a10dc7742aec..1c81509f5bd9 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -93,9 +93,13 @@ static ssize_t
ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
- struct inode *inode = iocb->ki_filp->f... |
a9ca1d5477a89c1833214a01463190f7bd77d8a9 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-dove: Add SDHCI_QUIRK_NO_HISPD_BIT | Problem Details:
The sdio controller on dove doesn't have a bit to indicate
high-speed. With the quirk set it fixes accessing high-speed
sdcards.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 177f697b5835..9c8536881796 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -66,7 +66,8 @@ static struct sdhci_pltfm_data sdhci_dove_pdata = {
.quirks = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
... |
9c17d08ca183b92c9cfab6537069914a5e0e7e81 | Analyze and fix the following issue in the Linux kernel code: mmc: omap_hsmmc: ensure probe returns error upon resource failure | Problem Details:
If platform_get_resource_by_name() fails, driver probe is aborted an
should return an error so the driver is not bound to the device.
However, in the current error path of platform_get_resource_by_name(),
probe returns zero since the return value (ret) is not properly set.
With a zero return value, th... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index a9227a7a9d69..bc28627af66b 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1931,6 +1931,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
res = platform_get_resource_bynam... |
9a0985b78d70209db1e0d870f7be80272a0e7642 | Analyze and fix the following issue in the Linux kernel code: mmc: esdhc: Fix DMA_MASK to not break mx25 DMA access | Problem Details:
Patch to not set reserved bits in i.MX25 PROCTL register. DMA stops
working if those bits get set.
Signed-off-by: Wilson Callan <wilson.callan@savantsystems.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ebbe984e5d00..e23f8134591c 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -299,6 +299,8 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
static void... |
ec7268ce21b379a248705548573393e4f346b20b | Analyze and fix the following issue in the Linux kernel code: ext4: use core vfs llseek code for dir seeks | Problem Details:
Use the new functionality in generic_file_llseek_size() to
accept a custom EOF position, and un-cut-and-paste all the
vfs llseek code from ext4.
Also fix up comments on ext4_llseek() to reflect reality.
Signed-off-by: Eric Sandeen <sandeen@redaht.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index aa39e600d159..8e07d2a5a139 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -324,74 +324,27 @@ static inline loff_t ext4_get_htree_eof(struct file *filp)
/*
- * ext4_dir_llseek() based on generic_file_llseek() to handle both
- * non-htree and htree director... |
e8b96eb5034a0ccebf36760f88e31ea3e3cdf1e4 | Analyze and fix the following issue in the Linux kernel code: vfs: allow custom EOF in generic_file_llseek code | Problem Details:
For ext3/4 htree directories, using the vfs llseek function with
SEEK_END goes to i_size like for any other file, but in reality
we want the maximum possible hash value. Recent changes
in ext4 have cut & pasted generic_file_llseek() back into fs/ext4/dir.c,
but replicating this core code seems like a ... | ```diff
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 92490e9f85ca..901f67e37864 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -303,7 +303,8 @@ loff_t ext3_dir_llseek(struct file *file, loff_t offset, int origin)
if (likely(dx_dir))
return generic_file_llseek_size(file, offset, origin,
- ext3_... |
d47e12d63e745f667a977226c3f59ae14521592d | Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix build with PCI_IOV enabled. | Problem Details:
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 47b2ce740ec1..4fea8716ab64 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -236,7 +236,7 @@ void ixgbe_disable_sriov(struct ixgbe... |
1d69c2b343c7e1dc9584b7aa446f40dbab4c4f80 | Analyze and fix the following issue in the Linux kernel code: rtnl: Add #ifdef CONFIG_RPS around num_rx_queues reference | Problem Details:
Commit 76ff5cc91935c51fcf1a6a99ffa28b97a6e7a884
(rtnl: allow to specify number of rx and tx queues
on device creation) added a reference to the net_device
structure's 'num_rx_queues' member in
net/core/rtnetlink.c:rtnl_fill_ifinfo()
However, the definition for 'num_rx_queues' is surrounded
by an '#i... | ```diff
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 5bb1ebca2eb0..334b930e0de3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -892,7 +892,9 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
nla_put_u32(skb, IFLA_GROUP, dev->group) ||
nla_put_u32(... |
55c4665ea0a42fd6427826bfce96eb4b0389262a | Analyze and fix the following issue in the Linux kernel code: mmc: sd: Fix sd current limit setting | Problem Details:
Host has different current capabilities at different voltages, we need
to record these settings seperately. The defined voltages are 1.8/3.0/3.3.
For other voltages, we do not touch current limit setting.
Before we set the current limit for the sd card, find out the host's
operating voltage first and ... | ```diff
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 8460568e5213..441bdf472c99 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -517,15 +517,54 @@ static int sd_set_bus_speed_mode(struct mmc_card *card, u8 *status)
return 0;
}
+/* Get host's max current setting at its current ... |
41b4e9a194f69b1c945038c559ea407a6b383e81 | Analyze and fix the following issue in the Linux kernel code: mmc: atmel-mci: fix incorrect setting of host->data to NULL | Problem Details:
Setting host->data to NULL is incorrect sequence in STATE_SENDING_STOP
state of FSM: This early setting leads to the skip of dma_unmap_sg()
in atmci_dma_cleanup() which is a bug.
Idea taken from dw_mmc by Seungwon Jeon.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Seungwon Jeon <tgih.ju... | ```diff
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index f2c115e06438..84c4ac4d5192 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1685,7 +1685,6 @@ static void atmci_tasklet_func(unsigned long priv)
dev_dbg(&host->pdev->dev, "FSM: cmd ready\n");
... |
eb6d5ae1c918cefbfe06f6f96e1a75f2179d82ce | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: poll for card even when card is logically unremovable | Problem Details:
The Marvell CaFe is now marked as having bad card detection to fix
a problem during system resume.
Now on the OLPC XO-1 we are facing the issue that the card is marked
as logically unremovable (via MMC_UNSAFE_RESUME), which means that
mmc_card_is_removable considers the card non-removable. The existin... | ```diff
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3ec418212894..bc1de70360c8 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2795,7 +2795,7 @@ int sdhci_add_host(struct sdhci_host *host)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
if ((host->qu... |
a39ca6ae0a08994a59d017a445939e164bc77fd5 | Analyze and fix the following issue in the Linux kernel code: mmc: core: Simplify and fix for SD switch processing | Problem Details:
In mmc_read_switch, just do a one time mode 0 switch command to get the
support bits information, no need to do multiple times as the support
bits do not change with different arguments.
And no need to check current limit support bits, as these bits are
fixed according to the signal voltage. If the si... | ```diff
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 33c6f26c68d0..8460568e5213 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -290,8 +290,12 @@ static int mmc_read_switch(struct mmc_card *card)
return -ENOMEM;
}
- /* Find out the supported Bus Speed Modes. */
- err = mmc_s... |
473b095a72a95ba719905b1f2e82cd18d099a427 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: fix incorrect command used in tuning | Problem Details:
For SD hosts using retuning mode 1, when retuning timer expired, it will
need to do retuning in sdhci_request before processing the actual
request. But the retuning command is fixed: cmd19 for SD card and cmd21
for eMMC card, so we can't use the original request's command to do the
tuning.
And since t... | ```diff
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 101f9d43196f..12015151fab9 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -27,6 +27,7 @@
#include <linux/mmc/mmc.h>
#include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
#include "sdhci.h"
@@ -1245,6 +124... |
2a304bb8fa6a60cf6039f9a686798ec330f198ef | Analyze and fix the following issue in the Linux kernel code: wimax: fix printk format warnings | Problem Details:
Fix printk format warnings in drivers/net/wimax/i2400m:
drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 4 has type 'ssize_t' [-Wformat]
drivers/net/wimax/i2400m/control.c: warning: format '%zu' expects argument of type 'size_t', but argument 5 ... | ```diff
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 2fea02b35b2d..4a01e5c7fe09 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -130,7 +130,7 @@ ssize_t i2400m_tlv_match(const struct i2400m_tlv_hdr *tlv,
&& le16_to_cpu(tlv->... |
e3906486f616da7cc086a3ba06c0df4e5a48b4ab | Analyze and fix the following issue in the Linux kernel code: net: fix race condition in several drivers when reading stats | Problem Details:
Fix race condition in several network drivers when reading stats on 32bit
UP architectures. These drivers update their stats in a BH context and
therefore should use u64_stats_fetch_begin_bh/u64_stats_fetch_retry_bh
instead of u64_stats_fetch_begin/u64_stats_fetch_retry when reading the
stats.
Signed... | ```diff
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 9d6a0677466b..c260af5411d0 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -63,10 +63,10 @@ static struct rtnl_link_stats64 *dummy_get_stats64(struct net_device *dev,
dstats = per_cpu_ptr(dev->dstats, i);
do {
- start = u64_sta... |
24ab32751183d4063d195c943af3cd6f1cad6794 | Analyze and fix the following issue in the Linux kernel code: spi/omap2: mark omap2_mcspi_master_setup as __devinit | Problem Details:
This warning recently appeared with omap2plus_defconfig:
WARNING: drivers/spi/built-in.o(.devinit.text+0x3c4): Section mismatch in reference from the function omap2_mcspi_probe() to the function .init.text:omap2_mcspi_master_setup()
The function __devinit omap2_mcspi_probe() references
a function __in... | ```diff
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 37ccdb796c9b..7d46b15e1520 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1034,7 +1034,7 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,
return 0;
}
-static int __i... |
0980e56e506b1e45022fad00bca8c8a974fda4e6 | Analyze and fix the following issue in the Linux kernel code: ipv4: tcp: set unicast_sock uc_ttl to -1 | Problem Details:
Set unicast_sock uc_ttl to -1 so that we select the right ttl,
instead of sending packets with a 0 ttl.
Bug added in commit be9f4a44e7d4 (ipv4: tcp: remove per net tcp_sock)
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Dav... | ```diff
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c528f841ca4b..665abbb7122a 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1476,7 +1476,8 @@ static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
.sk_allocation = GFP_ATOMIC,
.sk_flags = (1UL << SOCK_USE_WRITE_QUEUE),
}... |
6fec10a1a5866dda3cd6a825a521fc7c2f226ba5 | Analyze and fix the following issue in the Linux kernel code: workqueue: fix spurious CPU locality WARN from process_one_work() | Problem Details:
25511a4776 "workqueue: reimplement CPU online rebinding to handle idle
workers" added CPU locality sanity check in process_one_work(). It
triggers if a worker is executing on a different CPU without UNBOUND
or REBIND set.
This works for all normal workers but rescuers can trigger this
spuriously when... | ```diff
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 471996a81633..692d97628a10 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1949,7 +1949,13 @@ __acquires(&gcwq->lock)
lockdep_copy_map(&lockdep_map, &work->lockdep_map);
#endif
+ /*
+ * Ensure we're on the correct CPU. DISASSOCIATED ... |
0d882a360b9012bc7a7e921c935774c3fba1bfd9 | Analyze and fix the following issue in the Linux kernel code: Prefix IO_XX flags with XFS_IO_XX to avoid namespace colision. | Problem Details:
Add a XFS_ prefix to IO_DIRECT,XFS_IO_DELALLOC, XFS_IO_UNWRITTEN and
XFS_IO_OVERWRITE. This to avoid namespace conflict with other modules.
Signed-off-by: Alain Renaud <arenaud@sgi.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com> | ```diff
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 91d77ac51bba..15052ff916ec 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -179,7 +179,7 @@ xfs_finish_ioend(
if (atomic_dec_and_test(&ioend->io_remaining)) {
struct xfs_mount *mp = XFS_I(ioend->io_inode)->i_mount;
- if (ioend->io_type =... |
96ee34be7a0965a117080a28b2c0cc6d4ee6adb1 | Analyze and fix the following issue in the Linux kernel code: xfs: fix comment typo of struct xfs_da_blkinfo. | Problem Details:
Fix trivial typo error that has written "It" to "Is".
Signed-off-by: Chen Baozi <baozich@gmail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com> | ```diff
diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h
index 9f37aa03eb38..132adafb041e 100644
--- a/fs/xfs/xfs_da_btree.h
+++ b/fs/xfs/xfs_da_btree.h
@@ -32,7 +32,7 @@ struct zone;
/*
* This structure is common to both leaf nodes and non-leaf nodes in the Btree.
*
- * Is is used to manage a doubly lin... |
bbc8a569ae91e0951f4b7f8eb33ef1970bf2129c | Analyze and fix the following issue in the Linux kernel code: hwmon: (w83781d) Fix compile warning | Problem Details:
The following compile warning may be seen if the driver is compiled with
-Wuninitialized:
drivers/hwmon/w83781d.c: warning: 'sc_addr[1]' may be used uninitialized in this
function [-Wuninitialized]
While this is a false positive, it is annoying in nightly builds, and may help
to conceal real problems... | ```diff
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index c11452ebe18f..5a5046d94c3e 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -867,6 +867,7 @@ w83781d_detect_subclients(struct i2c_client *new_client)
struct i2c_adapter *adapter = new_client->adapter;
struct w83781d_da... |
75311bea569d7ea77a5a3c5395bae27bb8a2df96 | Analyze and fix the following issue in the Linux kernel code: hwmon: (acpi_power_meter) Fix unintentional integer overflow | Problem Details:
Expression with two integer variables is calculated as integer before it is
converted to u64. This may result in an integer overflow. Fix by declaring
trip point variables as s64 instead of int.
This patch addresses Coverity #200596: Unintentional integer overflow.
Signed-off-by: Guenter Roeck <linux... | ```diff
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 9a0821f1c914..5363da5f4d85 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -101,7 +101,7 @@ struct acpi_power_meter_resource {
unsigned long sensors_last_updated;
struct sensor_dev... |
27c4db3996ef0d27fb25e6991ebf6e507a920937 | Analyze and fix the following issue in the Linux kernel code: hwmon: (acpi_power_meter) Cleanup and optimizations | Problem Details:
An unsigned value can not be smaller than 0. Remove the check for it.
Use DIV_ROUND_CLOSEST for divide operations converting milli-degrees C into
degrees C. Limit maximum accepted trip point temperature to INT_MAX.
This patch fixes Coverity #115214: Unsigned compared against 0
Signed-off-by: Guenter ... | ```diff
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 34ad5a27a7e9..9a0821f1c914 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -237,7 +237,7 @@ static ssize_t set_cap(struct device *dev, struct device_attribute *devattr,
if (res)
re... |
0ef63e48f0247a9f9b9ffeef0f2641ac880728ab | Analyze and fix the following issue in the Linux kernel code: hwmon: (ntc_thermistor) Ensure that data->name string is terminated | Problem Details:
Fix Coverity warning: Calling strncpy with a maximum size argument of 20 bytes
on destination array "data->name" of size 20 bytes might leave the destination
string unterminated.
Fix by replacing strncpy() with strlcpy() and by using sizeof() to determine
the maximum string length.
Signed-off-by: Gue... | ```diff
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index 6da9696e1827..74a6c58d0218 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -351,7 +351,7 @@ static int __devinit ntc_thermistor_probe(struct platform_device *pdev)
data->dev = &pdev->dev;
... |
62867d491a27affee36194d4856564f2f4e12b3c | Analyze and fix the following issue in the Linux kernel code: hwmon: (fam15h_power) Fix unintentional integer overflow | Problem Details:
Expression with two unsigned integer variables is calculated as unsigned integer
before it is converted to u64. This may result in an integer overflow.
Fix by typecasting the left operand to u64 before performing the left shift.
This patch addresses Coverity #402320: Unintentional integer overflow.
S... | ```diff
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
index 6b13f1a4dc27..2764b78a784b 100644
--- a/drivers/hwmon/fam15h_power.c
+++ b/drivers/hwmon/fam15h_power.c
@@ -67,7 +67,8 @@ static ssize_t show_power(struct device *dev,
REG_TDP_LIMIT3, &val);
tdp_limit = val >> 16;
- curr_p... |
58c3667d83376c2f3016465f59f22c19c8f846e1 | Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627ehf) Add missing break statement | Problem Details:
A case statement in nct6775_write_fan_div() is missing a break. Fix it.
This patch addresses Coverity #141439: Missing break in switch.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 54922ed12978..1821b7423d5b 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -599,6 +599,7 @@ static void nct6775_write_fan_div(struct w83627ehf_data *data, int nr)
reg = (w83627ehf_read_value(data, NCT6775_REG_F... |
95447461fa9ae3d879c84c1d2f2f8da2fdcd8f34 | Analyze and fix the following issue in the Linux kernel code: ixgbe: fix RAR entry counting for generic and fdb_add() | Problem Details:
Do RAR entry accounting correctly so that errors are reported and
promisc mode is set correctly when the number of entries exceeds
the hardware limits.
This can happen with many macvlan devices attached to the PF or
by adding many fdb entries in SR-IOV modes.
Also this includes a small refactor to fd... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index b376926af890..84370e78a0fb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3441,14 +3441,18 @@ static int ixgbe_write_uc_addr_list(s... |
ce422606696f137e610fd0e677ec72ac33c17842 | Analyze and fix the following issue in the Linux kernel code: ixgbevf: Fix namespace issue with ixgbe_write_eitr | Problem Details:
Make the function static to cleanup namespace.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Sibai Li <Sibai.li@intel.com
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 66858b529f13..98cadb0c4dab 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -286,7 +286,6 @@ extern void ixgbevf_free_rx_resources(struct ... |
39cb681b3bb4da17e74d48e553d1bb9a1b759aa5 | Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix handling of FDIR_HASH flag | Problem Details:
This change makes it so that we can use the atr_sample_rate to determine if
we are capable of supporting ATR. The advantage to this approach is that it
allows us to now determine the setting of the IXGBE_FLAG_FDIR_HASH_CAPABLE
based on the queueing scheme, instead of the queueing scheme being based on
... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index 3ff5aa801a6b..29a2a8528073 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -370,6 +370,9 @@ static bool ixgbe_set_dcb_sriov_queues(struct... |
99d744875d01d57d832b8dbfc36d9a1990d503b8 | Analyze and fix the following issue in the Linux kernel code: ixgbe: Drop probe_vf and merge functionality into ixgbe_enable_sriov | Problem Details:
This is meant to fix a bug in which we were not checking for pre-existing
VFs if we were not setting the max_vfs value at driver load. What happens
now is that we always call ixgbe_enable_sriov and this checks for
pre-existing VFs ore requested VFs prior to deciding on no SR-IOV.
Signed-off-by: Alexa... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index 38d1b65777ad..3ff5aa801a6b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -1061,8 +1061,7 @@ static void ixgbe_set_interrupt_capability(... |
8c0383b8f6a8012b107cd62eaa5a556586d8ea56 | Analyze and fix the following issue in the Linux kernel code: ARM: exynos_defconfig: enable more platforms in defconfig | Problem Details:
This enables the new EXYNOS5 platforms in the defconfig, and enables DT
support on EXYNOS4.
Other options enabled: USB host, EXT3/4, regulators and tps65090,
networking and a few of the common usb ethernet adapters as well as the
smsc911x controller used on some boards.
I enabled EFI_PARTITION, since... | ```diff
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
new file mode 100644
index 000000000000..e40b435d204e
--- /dev/null
+++ b/arch/arm/configs/exynos_defconfig
@@ -0,0 +1,92 @@
+CONFIG_EXPERIMENTAL=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_KALLSY... |
641a1cebfe2f05fa1a48503d816fc70cf707d033 | Analyze and fix the following issue in the Linux kernel code: x86, boot: Removed unused debug flag and set code | Problem Details:
As we're no longer using the flag we don't need to extract the value from the
command line and store it. This is a step towards removing command line
parameter code.
Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-6-git-send-email-jmillenbach@gmail... | ```diff
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 8c29f82b15e4..88f7ff6da404 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -108,7 +108,6 @@ static void error(char *m);
* This is set up by the setup-routine at boot-time
*/
struct boo... |
cb454fe10400566214ec690318a0167ff7f5b8ca | Analyze and fix the following issue in the Linux kernel code: x86, boot: Changed error putstr path to match new debug_putstr format | Problem Details:
For consistency we changed the error output path to match the new debug path.
Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-4-git-send-email-jmillenbach@gmail.com
Signed-off-by: Gokul Caushik <caushik1@gmail.com>
Reviewed-by: Josh Triplett <josh@... | ```diff
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 49c6d5632ef7..de1d54d8bddc 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -270,9 +270,9 @@ void *memcpy(void *dest, const void *src, size_t n)
static void error(char *x)
{
- __putstr(1... |
e605a425975b073aafebbb2c09d3ae266be2fd3e | Analyze and fix the following issue in the Linux kernel code: x86, boot: Wrap debug printing in a new debug_putstr function | Problem Details:
Change all instances of if (debug) putstr(...) to a new debug_putstr(...).
This allows a future change to conditionally stub out debug_putstr to save
space.
Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-3-git-send-email-jmillenbach@gmail.com
Sign... | ```diff
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 8f2355d5858a..49c6d5632ef7 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -223,6 +223,12 @@ void __putstr(int error, const char *s)
outb(0xff & (pos >> 1), vidport+1);
}
+static void ... |
9f4e4392cbf72d731a489a3217fe810820b8ba96 | Analyze and fix the following issue in the Linux kernel code: x86, boot: Removed quiet flag and switched quiet output to debug flag | Problem Details:
There are only 3 uses of the quiet flag and they all protect output that
is only useful for debugging the stub, therefore we switched to using the
debug flag for all extra output.
Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Link: http://lkml.kernel.org/r/1342746282-28497-2-git-send-email-jmi... | ```diff
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 7116dcba0c9e..8f2355d5858a 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -108,7 +108,6 @@ static void error(char *m);
* This is set up by the setup-routine at boot-time
*/
struct boo... |
c064da47144b11be4697a4611f640086a663016a | Analyze and fix the following issue in the Linux kernel code: kdb: Switch to nolock variants of kmsg_dump functions | Problem Details:
The locked variants are prone to deadlocks (suppose we got to the
debugger w/ the logbuf lock held), so let's switch to nolock variants.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index df17c935d3c6..1f91413edb87 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2072,8 +2072,8 @@ static int kdb_dmesg(int argc, const char **argv)
kdb_set(2, setargs);
}
- kmsg_dump_rewind(&dumper);
- ... |
533827c921c34310f63e859e1d6d0feec439657d | Analyze and fix the following issue in the Linux kernel code: printk: Implement some unlocked kmsg_dump functions | Problem Details:
If used from KDB, the locked variants are prone to deadlocks (suppose we
got to the debugger w/ the logbuf lock held).
So, we have to implement a few routines that grab no logbuf lock.
Yet we don't need these functions in modules, so we don't export them.
Signed-off-by: Anton Vorontsov <anton.voront... | ```diff
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h
index d6bd50110ec2..2e7a1e032c71 100644
--- a/include/linux/kmsg_dump.h
+++ b/include/linux/kmsg_dump.h
@@ -55,12 +55,17 @@ struct kmsg_dumper {
#ifdef CONFIG_PRINTK
void kmsg_dump(enum kmsg_dump_reason reason);
+bool kmsg_dump_get_line_nolo... |
b63b5e819d5b21ae493c17c356018ffa98d3ee1c | Analyze and fix the following issue in the Linux kernel code: mmc: core: correct invalid error checking | Problem Details:
The effect of the existing code is that we continue blindly when we
should warn about an invalid allocation unit.
Reported-by: dcb314@hotmail.com
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index b0b9e372f5da..33c6f26c68d0 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -244,7 +244,7 @@ static int mmc_read_ssr(struct mmc_card *card)
* bitfield positions accordingly.
*/
au = UNSTUFF_BITS(ssr, 428 - 384, 4);
- if (a... |
b289174ff70a591545a054d52ae081a75a73f085 | Analyze and fix the following issue in the Linux kernel code: mmc: sh_mmcif: fix clock management | Problem Details:
Regardless of whether the MMC bus clock is the same as the PM clock on
this specific interface, it has to be managed separately. Its proper
management should also include enabling and disabling of the clock,
whenever the interface is becoming active or going idle respectively.
Signed-off-by: Guennadi ... | ```diff
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index d6ffb0557537..6a93b0466854 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -942,6 +942,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
}
if (host->power) {
pm_runtime... |
3bfe619dc365e439936ed6dae36506944c44c18c | Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc: Fix null dma_ops access when use_dma is false | Problem Details:
host->dma_ops is not valid if host->usa dma is 0 so protect
host->dma_ops reference in dw_mci_resume
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 5a600b3b3199..72dc3cde646d 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2186,7 +2186,7 @@ int dw_mci_resume(struct dw_mci *host)
return ret;
}
- if (host->dma_ops->init)
+ if (host->use_dma && host->dma... |
6de707f200f73af7a58b58b3a5b956cff7b6e228 | Analyze and fix the following issue in the Linux kernel code: mmc: tmio: Don't access hardware registers after stopping clocks | Problem Details:
The tmio_mmc_set_ios() function configures the MMC power, clock and bus
width. When the mmc core requests the driver to power off the card, we
inform runtime PM, that the controller can be suspended. This can lead
to the MSTP clock being turned off.
Writing to any 16-bit hardware registers with the MS... | ```diff
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 7ffc489bed35..4f26edf07204 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -811,19 +811,21 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (host->set_pwr &&... |
186e868786f97c8026f0a81400b451ace306b3a4 | Analyze and fix the following issue in the Linux kernel code: forcedeth: spin_unlock_irq in interrupt handler fix | Problem Details:
The replacement of spin_lock_irq/spin_unlock_irq pair in interrupt
handler by spin_lock_irqsave/spin_lock_irqrestore pair.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 8b7c5129c7e1..67edc2e15b82 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3775,7 +3775,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data)
np... |
0bb4087cbec0ef74fd416789d6aad67957063057 | Analyze and fix the following issue in the Linux kernel code: ipv4: Fix neigh lookup keying over loopback/point-to-point devices. | Problem Details:
We were using a special key "0" for all loopback and point-to-point
device neigh lookups under ipv4, but we wouldn't use that special
key for the neigh creation.
So basically we'd make a new neigh at each and every lookup :-)
This special case to use only one neigh for these device types
is of dubiou... | ```diff
diff --git a/include/net/arp.h b/include/net/arp.h
index 4617d9841132..7f7df93f37cd 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -21,9 +21,6 @@ static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev
struct neighbour *n;
u32 hash_val;
- if (dev->flags & (IFF_LOOPBACK ... |
7efa1c87963d23cc57ba40c07316d3e28cc75a3a | Analyze and fix the following issue in the Linux kernel code: x86/tlb: Fix build warning and crash when building for !SMP | Problem Details:
The incompatible parameter of flush_tlb_mm_range cause build warning.
Fix it by correct parameter.
Ingo Molnar found that this could also cause a user space crash.
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Alex Shi <alex.... | ```diff
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index b5a27bd77669..74a44333545a 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
__flush_tlb();
}
-static i... |
4bcb20f83441f1ffa5907200444066c580231755 | Analyze and fix the following issue in the Linux kernel code: staging: csr: remove CsrStrLen() | Problem Details:
It's just a wrapper around strlen(), so call that instead.
Also add a few #include <linux/string.h> to fix up the build with this
change.
Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Pelto... | ```diff
diff --git a/drivers/staging/csr/csr_serialize_primitive_types.c b/drivers/staging/csr/csr_serialize_primitive_types.c
index 419528bf1fa5..1d84938bbb4d 100644
--- a/drivers/staging/csr/csr_serialize_primitive_types.c
+++ b/drivers/staging/csr/csr_serialize_primitive_types.c
@@ -50,14 +50,14 @@ EXPORT_SYMBOL_GPL... |
efaac3bf087b1a6cec28f2a041e01c874d65390c | Analyze and fix the following issue in the Linux kernel code: openvswitch: Fix typo in documentation. | Problem Details:
Signed-off-by: Leo Alterman <lalterman@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com> | ```diff
diff --git a/Documentation/networking/openvswitch.txt b/Documentation/networking/openvswitch.txt
index b8a048b8df3a..8fa2dd1e792e 100644
--- a/Documentation/networking/openvswitch.txt
+++ b/Documentation/networking/openvswitch.txt
@@ -118,7 +118,7 @@ essentially like this, ignoring metadata:
Naively, to add VL... |
92e5dfc34cf39c20ae1087bd5e676238b5d0dfac | Analyze and fix the following issue in the Linux kernel code: openvswitch: Check currect return value from skb_gso_segment() | Problem Details:
Fix return check typo.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com> | ```diff
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index b512cb8cdc87..670e63020667 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -269,8 +269,8 @@ static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
int err;
segs = skb_gso_segment(skb, NETIF_F_... |
a9144436271583115a2230db15d0b6ae2c481d3c | Analyze and fix the following issue in the Linux kernel code: cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch | Problem Details:
Running one program that continuously hotplugs and replugs a cpu
concurrently with another program that continuously writes to the
scaling_setspeed node eventually deadlocks with:
=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #37 Tainted: G W
... | ```diff
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 7f2f149ae40f..fb8a5279c5d8 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -138,7 +138,7 @@ void disable_cpufreq(void)
static LIST_HEAD(cpufreq_governor_list);
static DEFINE_MUTEX(cpufreq_governor_mutex);
-str... |
1a577b72475d161b6677c05abe57301362023bb2 | Analyze and fix the following issue in the Linux kernel code: KVM: fix race with level interrupts | Problem Details:
When more than 1 source id is in use for the same GSI, we have the
following race related to handling irq_states race:
CPU 0 clears bit 0. CPU 0 read irq_state as 0. CPU 1 sets level to 1.
CPU 1 calls kvm_ioapic_set_irq(1). CPU 0 calls kvm_ioapic_set_irq(0).
Now ioapic thinks the level is 0 but irq_st... | ```diff
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index a3e9409e90b6..2c75b400e40c 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -816,7 +816,20 @@ int kvm_read_guest_page_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
void kvm_propagate_faul... |
2962846d14769e526b5d266f4af998b5a027b1d7 | Analyze and fix the following issue in the Linux kernel code: target: NULL dereference on error path | Problem Details:
During a failure in transport_add_device_to_core_hba() code, we called
destroy_workqueue(dev->tmr_wq) before ->tmr_wq was allocated which leads
to an oops.
This fixes a regression introduced in with:
commit af8772926f019b7bddd7477b8de5f3b0f12bad21
Author: Christoph Hellwig <hch@infradead.org>
Date: ... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 7647ecafbcc7..0eaae23d12b5 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1098,7 +1098,7 @@ struct se_device *transport_add_device_to_core_hba(
* Setup the ... |
c7a7062fa00db7dc66280a72cd9dad0f3595bc66 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix typos in pmu.c | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
index 2e88438ffd83..db206a46e0dc 100644
--- a/arch/x86/kvm/pmu.c
+++ b/arch/x86/kvm/pmu.c
@@ -1,5 +1,5 @@
/*
- * Kernel-based Virtual Machine -- Performane Monitoring Unit support
+ * Kernel-based Virtual Machine -- Performance Monitoring Unit support
*
... |
d5b0b5b196b474ef26f46f2036c8fbaa8cca2cf5 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix typos in lapic.c | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index ce878788a39f..fff7173f6a71 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -719,7 +719,7 @@ static int apic_reg_read(struct kvm_lapic *apic, u32 offset, int len,
{
unsigned char alignment = offset & 0xf;
u32 result;
- /* this bi... |
bbbda79510b6e5d399fae76bdb9b999286eb1b59 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix typos in cpuid.c | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 0595f1397b7c..b496da684bd6 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -316,7 +316,7 @@ static int do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
}
case 7: {
entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
- ... |
fc0586807dc4e307da6d3ba4ed5c927b6d27276c | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix typos in emulate.c | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 97d9a9914ba8..85b611e13e84 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -642,7 +642,7 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,
if (addr.ea > lim || (u32)(addr.ea + size - 1) > lim)
goto bad;
} e... |
4a9699807c491740c4dfe7b6a06703e1d262e802 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Fix typos in x86.c | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ecc71dde4bb3..3d9d08edbf29 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1093,7 +1093,7 @@ void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data)
* For each generation, we track the original measured
* nanosecond time, offset, and wr... |
fa0afcd10951afad2022dda09777d2bf70cdab3d | Analyze and fix the following issue in the Linux kernel code: atl1c: fix issue of io access mode for AR8152 v2.1 | Problem Details:
When io access mode is enabled by BOOTROM or BIOS for AR8152 v2.1,
the register can't be read/write by memory access mode.
Clearing Bit 8 of Register 0x21c could fixed the issue.
Signed-off-by: Cloud Ren <cjren@qca.qualcomm.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: xiong <xiong@qca.qual... | ```diff
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
index 17d935bdde0a..21d8c4dbdbe1 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.h
@@ -74,6 +74,8 @@ void atl1c_post_phy_linkchg(struct atl1c_hw... |
b09e786bd1dd66418b69348cb110f3a64764626a | Analyze and fix the following issue in the Linux kernel code: tun: fix a crash bug and a memory leak | Problem Details:
This patch fixes a crash
tun_chr_close -> netdev_run_todo -> tun_free_netdev -> sk_release_kernel ->
sock_release -> iput(SOCK_INODE(sock))
introduced by commit 1ab5ecb90cb6a3df1476e052f76a6e8f6511cb3d
The problem is that this socket is embedded in struct tun_struct, it has
no inode, iput is called on... | ```diff
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 961fad1f7053..f3a454c3295a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -358,6 +358,8 @@ static void tun_free_netdev(struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
+ BUG_ON(!test_bit(SOCK_EXTERNALLY_ALLOCATED, &tun-... |
c5ec2e56d0a654797ee43a31001738ccd05eef0b | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix typos | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index baead950d6c8..687d0c30e559 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2063,7 +2063,7 @@ static inline bool nested_svm_intr(struct vcpu_svm *svm)
if (svm->nested.intercept & 1ULL) {
/*
* The #vmexit can't be emulated here direc... |
0fa060714753ef65aef294b3462efb0212520933 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix typos | Problem Details:
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c39b60707e02..2300e5319ed9 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1343,7 +1343,7 @@ static bool update_transition_efer(struct vcpu_vmx *vmx, int efer_offset)
guest_efer = vmx->vcpu.arch.efer;
/*
- * NX is emulated; LMA and L... |
9dc274151a548ffd215caecec5a8872db8799447 | Analyze and fix the following issue in the Linux kernel code: tcp: fix ABC in tcp_slow_start() | Problem Details:
When/if sysctl_tcp_abc > 1, we expect to increase cwnd by 2 if the
received ACK acknowledges more than 2*MSS bytes, in tcp_slow_start()
Problem is this RFC 3465 statement is not correctly coded, as
the while () loop increases snd_cwnd one by one.
Add a new variable to avoid this off-by one error.
Si... | ```diff
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 04dbd7ae7c62..4d4db16e336e 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -307,6 +307,7 @@ EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited);
void tcp_slow_start(struct tcp_sock *tp)
{
int cnt; /* increase in packets */
+ unsigned int delta = ... |
5815d5e7aae3cc9c5e85af83094d4d6498c3f4fc | Analyze and fix the following issue in the Linux kernel code: tcp: use hash_32() in tcp_metrics | Problem Details:
Fix a missing roundup_pow_of_two(), since tcpmhash_entries is not
guaranteed to be a power of two.
Uses hash_32() instead of custom hash.
tcpmhash_entries should be an unsigned int.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index d909c7fc3da1..0ffb8e31f3cd 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -40,7 +40,7 @@ struct netns_ipv4 {
struct sock **icmp_sk;
struct inet_peer_base *peers;
struct tcpm_hash_bucket *tcp_metrics_hash;
- un... |
83702f69272e4591a91a27eb58eade1bcd361dae | Analyze and fix the following issue in the Linux kernel code: can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS | Problem Details:
The Janz VMOD-ICAN3 firmware does not support any sort of TX-done
notification or interrupt. The driver previously used the hardware
loopback to attempt to work around this deficiency, but this caused all
sockets to receive all messages, even if CAN_RAW_RECV_OWN_MSGS is off.
Using the new function ica... | ```diff
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 4a5a8fb53a2f..47f8f6b4fef9 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -220,6 +220,9 @@ struct ican3_dev {
/* old and new style host interface */
unsigned int iftype;
+ /* queue for echo pack... |
88b587039c1ad4e7a981bea3269eeb02a1a2a14b | Analyze and fix the following issue in the Linux kernel code: can: janz-ican3: fix error and byte counters | Problem Details:
The error and byte counter statistics were being incremented
incorrectly. For example, a TX error would be counted both in tx_errors
and rx_errors.
This corrects the problem so that tx_errors and rx_errors are only
incremented for errors caused by packets sent to the bus. Error packets
generated by th... | ```diff
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index b19aca591c7a..4a5a8fb53a2f 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -907,8 +907,8 @@ static void ican3_handle_msglost(struct ican3_dev *mod, struct ican3_msg *msg)
if (skb) {
cf->can_id |= ... |
650d2a06b4fe1cc1d218c20e256650f68bf0ca31 | Analyze and fix the following issue in the Linux kernel code: dm thin: do not send discards to shared blocks | Problem Details:
When process_discard receives a partial discard that doesn't cover a
full block, it sends this discard down to that block. Unfortunately, the
block can be shared and the discard would corrupt the other snapshots
sharing this block.
This patch detects block sharing and ends the discard with success whe... | ```diff
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index ce59824fb414..68694da0d21d 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1245,7 +1245,10 @@ static void process_discard(struct thin_c *tc, struct bio *bio)
cell_release_singleton(cell, bio);
cell_release_singleton(cell2,... |
751f188dd5ab95b3f2b5f2f467c38aae5a2877eb | Analyze and fix the following issue in the Linux kernel code: dm raid1: fix crash with mirror recovery and discard | Problem Details:
This patch fixes a crash when a discard request is sent during mirror
recovery.
Firstly, some background. Generally, the following sequence happens during
mirror synchronization:
- function do_recovery is called
- do_recovery calls dm_rh_recovery_prepare
- dm_rh_recovery_prepare uses a semaphore to l... | ```diff
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index d039de8322f0..ea16984c0f08 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -1214,7 +1214,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
* We need to dec pending if this was a write.
*/
if (rw == WRIT... |
79158103bf20c9ff55204ceb78a5773f422b03be | Analyze and fix the following issue in the Linux kernel code: drm/i915: Make the lock for pageflips interruptible | Problem Details:
As we take the struct_mutex lock to access the command-stream, there is
a possibility that we may need to wait for a GPU hang and so should make
the lock both interruptible and error-checking.
References: https://bugs.freedesktop.org/show_bug.cgi?id=50069
Signed-off-by: Chris Wilson <chris@chris-wilso... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 80fe02d2d733..c9b69e3b2c29 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6486,7 +6486,9 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
intel_fb = to_inte... |
a4f32fc3a37e982fffce8ec583643990ff288419 | Analyze and fix the following issue in the Linux kernel code: drm/i915: don't forget the PCH backlight registers | Problem Details:
When we enable/disable the CPU backlight registers we can't forget to
enable/disable the PCH backlight registers. Since we're using the CPU
registers we should also unset the override bit.
Fixes a regression on the following commit:
drm/i915: properly enable the blc controller on the right pipe
The... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 58c7ee7238b8..10c7d39034e1 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -289,11 +289,17 @@ void intel_panel_disable_backlight(struct drm_device *dev)
intel_panel_actually_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.