id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
53032dafc6b93ac178ca2340ff8eb4ee2b3d1a92 | Analyze and fix the following issue in the Linux kernel code: regulator core: fix double-free in regulator_register() error path | Problem Details:
During regulator registration, any error after device_register() will
cause a double-free on the struct regulator_dev 'rdev'. The bug is in
drivers/regulator/core.c:regulator_register():
...
scrub:
device_unregister(&rdev->dev);
clean:
kfree(rdev); <---
rdev = ERR_PTR(ret... | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index cb62be63caed..2f14c16f58c3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2080,6 +2080,10 @@ out:
scrub:
device_unregister(&rdev->dev);
+ /* device core frees rdev */
+ rdev = ERR_PTR(ret);
+ goto out;
+
clean... |
cd78dfc6c6e321a310a73ef7b0df3d262704dd55 | Analyze and fix the following issue in the Linux kernel code: drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT | Problem Details:
When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
the if should probably return ERR_PTR(-EINVAL)
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
@@ expression E; constant C; @@
(
- !E == C
+ E != C
)
Signed-of... | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 47fc6e6fe9bc..cb62be63caed 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2001,8 +2001,8 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
if (regulator_desc->name == NULL || regul... |
9f6532519feab921856f41b30a2397ee25f4de49 | Analyze and fix the following issue in the Linux kernel code: regulator: fix header file missing kernel-doc | Problem Details:
Add regulator header file missing kernel-doc:
Warning(include/linux/regulator/driver.h:117): No description found for parameter 'set_mode'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Liam Girdwood <lrg@slimlogic.co.uk>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: ... | ```diff
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4848d8dacd90..225f733e7533 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -50,6 +50,7 @@ enum regulator_status {
* @set_current_limit: Configure a limit for a current-limited regulat... |
261758b5c3dfeac73ca364c47ed538f5ce4250ee | Analyze and fix the following issue in the Linux kernel code: NFSD: Stricter buffer size checking in write_versions() | Problem Details:
While it's not likely today that there are enough NFS versions to
overflow the output buffer in write_versions(), we should be more
careful about detecting the end of the buffer.
The number of NFS versions will only increase as NFSv4 minor versions
are added.
Note that this API doesn't behave the sam... | ```diff
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index c4843467cfd4..a152694e016e 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -793,7 +793,7 @@ static ssize_t __write_versions(struct file *file, char *buf, size_t size)
{
char *mesg = buf;
char *vers, *minorp, sign;
- int len, num;
+ int len, num... |
e7942b9f2586fb15e1b898acc7c198ffd60aee4e | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Switch one_sock_name() to use snprintf() | Problem Details:
Use snprintf() in one_sock_name() to prevent overflowing the output
buffer. If the name doesn't fit in the buffer, the buffer is filled
in with an empty string, and -ENAMETOOLONG is returned.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> | ```diff
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 032b52ea9541..61d4a3281f94 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -240,22 +240,27 @@ out:
/*
* Report socket names for nfsdfs
*/
-static int one_sock_name(char *buf, struct svc_sock *svsk)
+static int svc_one_sock_name(... |
335c54bdc4d3bacdbd619ec95cd0b352435bd37f | Analyze and fix the following issue in the Linux kernel code: NFSD: Prevent a buffer overflow in svc_xprt_names() | Problem Details:
The svc_xprt_names() function can overflow its buffer if it's so near
the end of the passed in buffer that the "name too long" string still
doesn't fit. Of course, it could never tell if it was near the end
of the passed in buffer, since its only caller passes in zero as the
buffer length.
Let's make... | ```diff
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index e051847b93fb..6a1cd908e6bc 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -918,7 +918,7 @@ static ssize_t __write_ports_names(char *buf)
{
if (nfsd_serv == NULL)
return 0;
- return svc_xprt_names(nfsd_serv, buf, 0);
+ return svc_xprt_names(nf... |
abc5c44d6284fab8fb21bcfc52c0f16f980637df | Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix error return value of svc_addr_len() | Problem Details:
The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't
recognize the address family of the passed-in socket address. However,
the return type of this function is size_t, which means -EAFNOSUPPORT
is turned into a very large positive value in this case.
The check in svc_udp_recvfrom() ... | ```diff
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
index 0d9cb6ef28b0..d790c52525cc 100644
--- a/include/linux/sunrpc/svc_xprt.h
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -118,7 +118,7 @@ static inline unsigned short svc_addr_port(const struct sockaddr *sa)
return 0;
}
-static in... |
999fb23ef868719b8bd55ee3f6b1f7a8fd8016af | Analyze and fix the following issue in the Linux kernel code: CRISv32: Fix typo compile error in ARTPEC-3 gpio driver. | Problem Details:
arch/cris/arch-v32/drivers/mach-a3/gpio.c:
+spin_lock_irqrestore(&gpio_lock, flags);
arch/cris/arch-v32/drivers/mach-a3/gpio.c:
+spin_lock_irqrestore(&gpio_lock, flags);
should that not be "spin_unlock_irqrestore()"?
The code in question was inside an (most often) undefined ifdef.
Reported-by: "Ro... | ```diff
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
index 7a87bc0ae2e8..97357cfd17bb 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
@@ -681,7 +681,7 @@ static int virtual_gpio_ioctl(struct file *file, unsigned... |
dcf1a3573eae69937fb14462369c4d3e6f4a37f1 | Analyze and fix the following issue in the Linux kernel code: net/sunrpc/svc_xprt.c: fix sparse warnings | Problem Details:
Fix the following sparse warnings in net/sunrpc/svc_xprt.c.
warning: symbol 'svc_recv' was not declared. Should it be static?
warning: symbol 'svc_drop' was not declared. Should it be static?
warning: symbol 'svc_send' was not declared. Should it be static?
warning: symbol 'svc_close_all' was ... | ```diff
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index c200d92e57e4..f200393ac877 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -11,6 +11,7 @@
#include <net/sock.h>
#include <linux/sunrpc/stats.h>
#include <linux/sunrpc/svc_xprt.h>
+#include <linux/sunrpc/svcsock.h>
#define R... |
5340219317a3370a4b76a2b6f31b1e5a3dbc648b | Analyze and fix the following issue in the Linux kernel code: Input: bcm5974 - augment debug information | Problem Details:
Add more button and finger data to the debug output.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index f2b38261eacb..2d8fc0bf6923 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -299,6 +299,11 @@ static int report_bt_state(struct bcm5974 *dev, int size)
if (size != sizeof(struct bt_data))
retur... |
0385c5ee3ca96bfe244610bf459abf66682ff202 | Analyze and fix the following issue in the Linux kernel code: Input: appletouch - fix DMA to/from stack buffer | Problem Details:
CONFIG_DMA_API_DEBUG spotted an instance of appletouch using
an array on the stack as a DMA buffer for certain hardware.
Change it to use a kmalloc()ed buffer instead.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Dmitry Torokhov... | ```diff
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 454b96112f03..e0140fdc02a5 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -255,15 +255,22 @@ MODULE_PARM_DESC(debug, "Activate debugging output");
*/
static int atp_geyser_init(stru... |
384318ecd2eb4fdbcbe7c4df6e8bb55986bf52d4 | Analyze and fix the following issue in the Linux kernel code: Input: wacom - fix TabletPC touch bug | Problem Details:
This patch fixed a bug that was introduced in kernel 2.6.28 for
TabletPC touch data. The wacom_parse_hid routine in wacom_sys.c
should always return 0 even when usb_control_msg got an error.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index 677680e9f54f..9710bfd49cf9 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -11,7 +11,7 @@
* Copyright (c) 2000 Daniel Egger <egger@suse.de>
* Copyright (c) 2001 Frederic Lepied <flepied@mandrak... |
3fdca1e1370ffe89980927cdef0583bebcd8caaf | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix connection establishment with low security requirement | Problem Details:
The Bluetooth 2.1 specification introduced four different security modes
that can be mapped using Legacy Pairing and Simple Pairing. With the
usage of Simple Pairing it is required that all connections (except
the ones for SDP) are encrypted. So even the low security requirement
mandates an encrypted c... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 75ebbe2221a3..375f4b4f7f79 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -425,12 +425,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
if (sec_level == BT_SECURITY_SDP)
return 1... |
f3784d834c71689336fa272df420b45345cb6b84 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: Ensure that HCI sysfs add/del is preempt safe | Problem Details:
Use a different work_struct variables for add_conn() and del_conn() and
use single work queue instead of two for adding and deleting connections.
It eliminates the following error on a preemptible kernel:
[ 204.358032] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[ 2... | ```diff
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 01f9316b4c23..1224bba24bdd 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -180,7 +180,8 @@ struct hci_conn {
struct timer_list disc_timer;
struct timer_list idle_timer;
- struct ... |
edc953fa4ebc0265ef3b1754fe116a9fd4264e15 | Analyze and fix the following issue in the Linux kernel code: x86: clean up alternative.h | Problem Details:
Alternative header duplicates assembly that could be merged in
one single macro. Merging this into this macro also allows to
directly declare ALTERNATIVE() statements within assembly code.
Uses a __stringify() of the feature bits rather than passing a
"i" operand. Leave the old %0 operand as-is (set... | ```diff
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index f6aa18eadf71..1a37bcdc8606 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <linux/stddef.h>
+#include <linux/stringify.h>
#in... |
18cc8d8d9b74c446832336d8f6e1afb145f9431b | Analyze and fix the following issue in the Linux kernel code: ASoC: TWL4030: Fix gain control for earpiece amplifier | Problem Details:
The gain control for earpiece amplifier uses 0dB ~ 12dB according to the
TRM, but the present code is implemented to -6dB ~ 6dB.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 921b205de28a..df7c8c281d2f 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -835,6 +835,12 @@ static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0);
*/
static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1)... |
1130b0296184bc21806225fd06d533515a99d2db | Analyze and fix the following issue in the Linux kernel code: perf_counter tools: fix Documentation/perf_counter build error | Problem Details:
Mike Galbraith reported:
> marge:..Documentation/perf_counter # make
> CC builtin-stat.o
> In file included from builtin-stat.c:71:
> /usr/include/ctype.h:102: error: expected expression before ‘]’ token
Remove the ctype.h include.
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index d7ace631fc4f..112b94ed3298 100644
--- a/Documentation/perf_counter/builtin-stat.c
+++ b/Documentation/perf_counter/builtin-stat.c
@@ -68,7 +68,6 @@
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>... |
cb6605c1e4d2a2eaffdde433fbfe1567ca688458 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix a typo in patch_realtek.c again | Problem Details:
The commmit dfed0ef9b3ff9e37903920b6938ed33344ad0b3d was reverted
accidentally by the merge of auto-detection fix patch.
Fixed again now.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 96475dc95fbb..3e7207b927c8 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1151,7 +1151,7 @@ static int alc_subsystem_id(struct hda_codec *codec,
ass = snd_hda_codec_get_pincfg(codec, nid);
sn... |
2a2ed0dfc9ec44a899c7d4672f73f2c045099118 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c | Problem Details:
Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.
Also, add a debug print to show the auto-mute feature.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3a6306302c70..96475dc95fbb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1099,13 +1099,16 @@ static void alc_init_auto_hp(struct hda_codec *codec)
return;
if (!spec->autocfg.speaker_pins[... |
57b150cce8e004ddd36330490a68bfb59b7271e9 | Analyze and fix the following issue in the Linux kernel code: irq: only update affinity if ->set_affinity() is sucessfull | Problem Details:
irq_set_affinity() and move_masked_irq() try to assign affinity
before calling chip set_affinity(). Some archs are assigning it
in ->set_affinity() again.
We do something like:
cpumask_cpy(desc->affinity, mask);
desc->chip->set_affinity(mask);
But in the failure path, affinity should not be touche... | ```diff
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 01ce20eab38f..de5f412f6a92 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -42,6 +42,9 @@ static inline void unregister_handler_proc(unsigned int irq,
extern int irq_select_affinity_usr(unsigned int irq);
+extern void
+i... |
d5dedd4507d307eb3f35f21b6e16f336fdc0d82a | Analyze and fix the following issue in the Linux kernel code: irq: change ->set_affinity() to return status | Problem Details:
according to Ingo, change set_affinity() in irq_chip should return int,
because that way we can handle failure cases in a much cleaner way, in
the genirq layer.
v2: fix two typos
[ Impact: extend API ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: S... | ```diff
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index 9c9d1fd4155f..5bd5259324b7 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -176,22 +176,26 @@ cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
}
}
-static void
+static int
dp264_set... |
9ec4fa271faf2db3b8e1419c998da1ca6b094eb6 | Analyze and fix the following issue in the Linux kernel code: irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout | Problem Details:
CPUMASKS_OFFSTACK is not defined anywhere (it is CPUMASK_OFFSTACK).
It is a typo and init_allocate_desc_masks() is called before it set
affinity to all cpus...
Split init_alloc_desc_masks() into all_desc_masks() and init_desc_masks().
Also use CPUMASK_OFFSTACK in alloc_desc_masks().
[ Impact: fix sm... | ```diff
diff --git a/include/linux/irq.h b/include/linux/irq.h
index b7cbeed972e4..c4953cf27e5e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -424,27 +424,25 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
#ifdef CONFIG_SMP
/**
- * init_alloc_desc_masks - allocate cpumasks for i... |
8555a5948467e941acc34e8b1c30df4c1f2f5862 | Analyze and fix the following issue in the Linux kernel code: net: Fix ucc_geth.c handling of fixed-link w/o phy-connection-type property. | Problem Details:
Previous rework to ucc_geth.c to add of_mdio support (net: Rework
ucc_geth driver to use of_mdio infrastructure) added a block of
code which broke older openfirmware device trees which this case.
This patch removes the offending blurb.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-of... | ```diff
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index a53628466637..f18017dc0255 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3631,9 +3631,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
prop = of_get_property(np, "phy-connection-type"... |
8e0b842948156e3463879caed12b4ce51bed772e | Analyze and fix the following issue in the Linux kernel code: sh: setup timers in late_time_init() | Problem Details:
This patch moves the SuperH timer setup code from time_init()
to late_time_init(). Good things about this change:
- interrupts: they are enabled at late_time_init()
- mm: regular kmalloc() can be used at late_time_init()
Together with moving to late_time_init() this patch changes
the sh_cmt driver t... | ```diff
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c
index 109409f5ca53..a2458bfdda26 100644
--- a/arch/sh/kernel/time_32.c
+++ b/arch/sh/kernel/time_32.c
@@ -237,21 +237,8 @@ unsigned long long sched_clock(void)
}
#endif
-void __init time_init(void)
+static void __init sh_late_time_init(void)
... |
5b644c7a218702668d7b610994e7dcbc3d4705d3 | Analyze and fix the following issue in the Linux kernel code: clocksource: improve sh_cmt clocksource overflow handling | Problem Details:
This patch improves the sh_cmt clocksource handling.
Currently the counter value is ignored in the case of
overflow. With this patch the overflow flag is read
before and after reading the counter, removing any
counter value and overflow flag mismatch issues.
Signed-off-by: Magnus Damm <damm@igel.co.j... | ```diff
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index c24756489612..d607ac2d516b 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -111,16 +111,21 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_priv *p,
int *has_wrapped)
{
unsigned long v... |
8a11a789c39cd6f61de4243234cf44a46c23ffd0 | Analyze and fix the following issue in the Linux kernel code: mg_disk: fix dependency on libata | Problem Details:
Add local copies of ata_id_string() and ata_id_c_string() to mg_disk
so there is no need for the driver to depend on ATA and SCSI.
[ Impact: break dependency on libata by copying ata id string functions ]
Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>... | ```diff
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index ddea8e485cc9..f42fa50d3550 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -412,7 +412,7 @@ config ATA_OVER_ETH
config MG_DISK
tristate "mGine mflash, gflash support"
- depends on ARM && ATA && GPIOLIB
+ depends on ARM && GP... |
9fd8d0e1bcb848257968d9a7d73ca4d890ea8bd1 | Analyze and fix the following issue in the Linux kernel code: block: make blk_end_request_cur() return bool | Problem Details:
In the process of mindlessly copying [__]blk_end_request_all(),
[__]blk_end_request_cur() ended up returning void even though they're
partial completion functions. Fix it.
[ Impact: fix braindead API ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com> | ```diff
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 12c545e2737c..3a5b1bd6582c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -903,10 +903,14 @@ static inline void blk_end_request_all(struct request *rq, int error)
*
* Description:
* Complete the current consecutive... |
7b13354eeaabaf6283b8c669a7d67d104ce7c638 | Analyze and fix the following issue in the Linux kernel code: ide-tape: use single continuous buffer | Problem Details:
Impact: simpler buffer allocation and handling, kills OOM, fix DMA transfers
ide-tape has its own multiple buffer mechanism using struct
idetape_bh. It allocates buffer with decreasing order-of-two
allocations so that it results in minimum number of segments.
However, the implementation is quite comp... | ```diff
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 8226d52504d0..b2afbc7bcb6b 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -134,7 +134,6 @@ enum {
struct idetape_bh {
u32 b_size;
atomic_t b_count;
- struct idetape_bh *b_reqnext;
char *b_data;
};
@@ -228,10 +227,6... |
08f370f0a2fb223bf48d0bfa2a173be0393c19dc | Analyze and fix the following issue in the Linux kernel code: ide-tape,floppy: fix failed command completion after request sense | Problem Details:
Impact: fix infinite retry loop
After a command failed, ide-tape and floppy inserts REQUEST_SENSE in
front of the failed command and according to the result, sets
pc->retries, flags and errors. After REQUEST_SENSE is complete, the
failed command is again at the front of the queue and if the verdict
w... | ```diff
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index d3302cc891e4..d20704ac3183 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -141,6 +141,7 @@ static ide_startstop_t ide_floppy_issue_pc(ide_drive_t *drive,
drive->failed_pc = NULL;
drive->pc_callback(drive, 0);... |
c457ce874a0f3dfa3d5e9f2309789f6f34e24325 | Analyze and fix the following issue in the Linux kernel code: ide-cd: convert to using generic sense request | Problem Details:
Preallocate a sense request in the ->do_request method and reinitialize
it only on demand, in case it's been consumed in the IRQ handler path.
The reason for this is that we don't want to be mapping rq to bio in
the IRQ path and introduce all kinds of unnecessary hacks to the block
layer.
tj: * Both u... | ```diff
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index bb77c79c1018..061d7bbcd34a 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -206,44 +206,6 @@ static void cdrom_analyze_sense_data(ide_drive_t *drive,
ide_cd_log_error(drive->name, failed_command, sense);
}
-static void cdrom_que... |
e69d800f7e8797a8e3423380ee9d8ca1cb90c388 | Analyze and fix the following issue in the Linux kernel code: ide: add helpers for preparing sense requests | Problem Details:
This is in preparation of removing the queueing of a sense request out
of the IRQ handler path.
Use struct request_sense as a general sense buffer for all ATAPI
devices ide-{floppy,tape,cd}.
tj: * blk_get_request(__GFP_WAIT) can't be called from do_request() as
it can cause deadlock. Converted... | ```diff
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 2894577237ba..c6e03485a63a 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -191,6 +191,67 @@ void ide_create_request_sense_cmd(ide_drive_t *drive, struct ide_atapi_pc *pc)
}
EXPORT_SYMBOL_GPL(ide_create_request_sense_cm... |
0de57fb93b1daaeaecb658a98b3299ae460c02e9 | Analyze and fix the following issue in the Linux kernel code: ide-tape: remove back-to-back REQUEST_SENSE detection | Problem Details:
Impact: fix an oops which always triggers
ide_tape_issue_pc() assumed drive->pc isn't NULL on invocation when
checking for back-to-back request sense issues but drive->pc can be
NULL and even when it's not NULL, it's not safe to dereference it once
the previous command is complete because pc could hav... | ```diff
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index cb942a9b580f..3a53e0834cf7 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -614,12 +614,6 @@ static ide_startstop_t ide_tape_issue_pc(ide_drive_t *drive,
{
idetape_tape_t *tape = drive->driver_data;
- if (drive->pc->c[0]... |
e93b9fb7d85da4fd9d5171649e5ddcac1dd572bf | Analyze and fix the following issue in the Linux kernel code: hd: fix locking | Problem Details:
hd dance around local irq and HD_IRQ enable without achieving much.
It ends up transferring data from irq handler with both local irq and
HD_IRQ disabled. The only place it actually does something is while
transferring the first block of a request which it does with HD_IRQ
disabled but local irq enabl... | ```diff
diff --git a/drivers/block/hd.c b/drivers/block/hd.c
index 3c11f062a18c..baaa9e486e50 100644
--- a/drivers/block/hd.c
+++ b/drivers/block/hd.c
@@ -509,7 +509,6 @@ ok_to_write:
if (i > 0) {
SET_HANDLER(&write_intr);
outsw(HD_DATA, req->buffer, 256);
- local_irq_enable();
} else {
#if (HD_DELAY > 0)
... |
7090a0a97f55cbf47547a140fcc5a349f32c598c | Analyze and fix the following issue in the Linux kernel code: mg_disk: fix CONFIG_LBD=y warning | Problem Details:
drivers/block/mg_disk.c: In function ‘mg_dump_status’:
drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
argument 2 has type ‘sector_t’
[ Impact: kill build warning ]
Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-... | ```diff
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index d3e72ad08dbe..f3898353d0a8 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -79,7 +79,7 @@ static void mg_dump_status(const char *msg, unsigned int stat,
if (host->breq) {
req = elv_next_request(host->breq);
... |
ac2ff946a53e7bd0ae98f4e5d1d6c1b1dced82e5 | Analyze and fix the following issue in the Linux kernel code: mg_disk: fix locking | Problem Details:
IRQ and timeout handlers call functions which expect locked queue lock
without locking it. Fix it.
While at it, convert 0s used as null pointer constant to NULLs.
[ Impact: fix locking, cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: unsik Kim <donari75@gmail.com> | ```diff
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index fb39d9aa3cdc..d3e72ad08dbe 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -160,11 +160,16 @@ static irqreturn_t mg_irq(int irq, void *dev_id)
struct mg_host *host = dev_id;
void (*handler)(struct mg_host *) = host->m... |
d8f48457d5af6601abdecaad7a95c45bfeef90d5 | Analyze and fix the following issue in the Linux kernel code: powerpc/ps3: Fix build error on UP | Problem Details:
A non-SMP version of smp_send_stop() is now included in smp.h.
Remove the unneeded definition in the PS3 smp.c.
Fixes build errors like these when CONFIG_SMP=n:
arch/powerpc/platforms/ps3/setup.c:49: error: redefinition of 'smp_send_stop'
include/linux/smp.h:125: error: previous definition of 'sm... | ```diff
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 66181821322a..1a7b5ae0c83e 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -45,10 +45,6 @@
DEFINE_MUTEX(ps3_gpu_mutex);
EXPORT_SYMBOL_GPL(ps3_gpu_mutex);
-#if !defined(CONFI... |
ff61e5ccc35b7159a50741fc4b992817785acd5c | Analyze and fix the following issue in the Linux kernel code: powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB | Problem Details:
Currently PPC_CELL_NATIVE selects PPC_OF_PLATFORM_PCI, but does not
select PCI. This can lead to a config with the former and the latter
disabled, which does not build.
To fix this PPC_CELL_NATIVE should select PCI. However, that would
force PCI on for QPACE, which also selects PPC_CELL_NATIVE. So
ins... | ```diff
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 40e24c39ad06..50f17bdd3c16 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -13,7 +13,6 @@ config PPC_CELL_COMMON
config PPC_CELL_NATIVE
bool
select PPC_CELL_COMMON
- se... |
2e8aead1b57ede7979bd4e24797c77e181775d9c | Analyze and fix the following issue in the Linux kernel code: powerpc: ppc32 needs elf_read_implies_exec() | Problem Details:
On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
because old toolchains had bugs where they didn't mark program
segments executable that needed to be. For some reason we didn't do
this on ppc32 builds. This hadn't been an issue until commit 8d30c14c
("powerpc/mm: Rework I$/D$ coher... | ```diff
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 087c22f1d368..d6b4a12cdeff 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -260,6 +260,7 @@ do { \
#else
# define SET_PERSONALITY(ex) \
set_personality(PER_LINUX | (current->person... |
a0871e8cb8c3f5ee2ecc560ae73a35cd420440f9 | Analyze and fix the following issue in the Linux kernel code: sparc: cleanup references to deprecated .text.init* sections. | Problem Details:
The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead. This patch cleans up a few
uses of .text.init.refok in the sparc architecture.
Also fix a reference to .text.init in a comment that wasn't updated to
.init.text.
Signed-off-by: Tim Abbott <tabb... | ```diff
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
index e91f01a57598..6b4d8acc4c83 100644
--- a/arch/sparc/kernel/head_32.S
+++ b/arch/sparc/kernel/head_32.S
@@ -735,7 +735,7 @@ go_to_highmem:
nop
/* The code above should be at beginning and we have to take care about
- * short jumps... |
96159f25112595386c56e09eca90284e85e7ecbf | Analyze and fix the following issue in the Linux kernel code: ext3: avoid unnecessary spinlock in critical POSIX ACL path | Problem Details:
If a filesystem supports POSIX ACL's, the VFS layer expects the filesystem
to do POSIX ACL checks on any files not owned by the caller, and it does
this for every single pathname component that it looks up.
That obviously can be pretty expensive if the filesystem isn't careful
about it, especially ... | ```diff
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c
index d81ef2fdb08e..e0c745451715 100644
--- a/fs/ext3/acl.c
+++ b/fs/ext3/acl.c
@@ -129,12 +129,15 @@ fail:
static inline struct posix_acl *
ext3_iget_acl(struct inode *inode, struct posix_acl **i_acl)
{
- struct posix_acl *acl = EXT3_ACL_NOT_CACHED;
+ struct posix_... |
9256b2513074164b4555617c4a3b82d36abf03e5 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix error path in nes_accept() | Problem Details:
If reg_phys_mem() fails, we need to free memory allocated for MPA
frame with private data before returning the error. Also move
nes_add_ref() after the reg_phys_mem() is successful.
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 2c90b38daef1..11c7d6642014 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -2705,7 +2705,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
/* as... |
109d67e4f12b828113ca8ccf4a735972dd984f40 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix hang issues for large cluster dynamic connections | Problem Details:
Running large cluster setup, we are hanging after many hours of
testing. Fixing this required going over the code and making sure the
rexmit entry was properly removed based on the cm_node's state and
packet received. Also when receiving a FIN packet, check seq# and
make sure there were no errors bef... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 4969c386785e..2c90b38daef1 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1326,18 +1326,20 @@ static void handle_fin_pkt(struct nes_cm_node *cm_node)
nes_debug(NES_DBG_CM, "... |
c11470f9f4d4490cd7e9563f604c4c7868caf6de | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Check for sequence number wrap-around | Problem Details:
check_seq() was not checking if the seq#s have wrapped. Fix it.
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 1efe0beca063..1f7a659e6e9a 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -56,6 +56,7 @@
#include <net/neighbour.h>
#include <net/route.h>
#include <net/ip_fib.h>
+#include ... |
1f0dba1e51cfc93bf4545811839a84c879086fd4 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n | Problem Details:
Remove the NES_DEBUG that is causing the compile warning about an
unused variable when INFINIBAND_NES_DEBUG is not enabled.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index dbd9a75474e3..7da5437d9859 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -854,7 +854,6 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core,
{
unsign... |
0e4562da9e533188108d00022cf3650cb9e29aae | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix fw_ver in /sys | Problem Details:
/sys/class/infiniband/nes?/fw_ver is not displaying firmware version
properly (it shows 0.0.0 with the current code). Fill in the correct
firmware version number.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com> | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 8b460c2ce892..64d5cfd8f380 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -2808,10 +2808,9 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute... |
366835e24977f4590ef353bdc70f0dda278c2a84 | Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Correct CDR loop filter setting for port 1 | Problem Details:
In commit 1b949324 ("RDMA/nes: Fix SFP+ PHY initialization") there is
a mistake in the clean up code that removed port 1 CDR loop filter
settings for 10G cards other than CX4. Put the correct setting back
for appropriate PHY types.
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: R... | ```diff
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 7e20a7fd3c3c..b5d9c4bae452 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -761,6 +761,9 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
r... |
5e42336a461a2354b640001323cd07cebd9ade6e | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix logic in WM8350 master clocking check | Problem Details:
We need to check only if the WM8350 is master and only when starting
the stream so if either is not true then we can skip the check.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 3b1d0993bed9..0275321ff8ab 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -968,7 +968,7 @@ static int wm8350_pcm_trigger(struct snd_pcm_substream *substream,
* required for LRC in master mode. The DACs or ADCs... |
9c935386512a3faa1be1c3d81cba38b7259a43f5 | Analyze and fix the following issue in the Linux kernel code: ASoC: cs4270: fix Master Capture Switch polarity | Problem Details:
The control modifies the MUTE register, hence the polarity must be
inverted.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-By: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 7fa09a387622..3c34fe67c3d7 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -486,7 +486,7 @@ static const struct snd_kcontrol_new cs4270_snd_controls[] = {
SOC_SINGLE("Zero Cross Switch", CS4270_TRANS, 5, 1, 0),
... |
ac20100df7a7a042423dcb8847f42d9f6ddb8d00 | Analyze and fix the following issue in the Linux kernel code: eCryptfs: Fix min function comparison warning | Problem Details:
This warning shows up on 64 bit builds:
fs/ecryptfs/inode.c:693: warning: comparison of distinct pointer types
lacks a cast
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> | ```diff
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 1940edd08307..2f0945d63297 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -690,7 +690,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
}
/* Check for bufsiz <= 0 done in sys_readlinkat() */
rc = copy_... |
802b352f2934f799ec2e159f61db6506094a936e | Analyze and fix the following issue in the Linux kernel code: ecryptfs: fix printk format warning | Problem Details:
fs/ecryptfs/inode.c:670: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundat... | ```diff
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 93bc0f8174a7..1940edd08307 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -667,7 +667,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
lower_buf = kmalloc(lower_bufsiz, GFP_KERNEL);
if (lower_buf == NULL) ... |
7b1a14bbb0e547aaa4d30cc376e6c8c12539ab0f | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix acl caching | Problem Details:
Linus noticed the btrfs code to cache acls wasn't properly caching
a NULL acl when the inode didn't have any acls. This meant the common
case of no acls resulted in expensive btree searches every time the
kernel checked permissions (which is quite often).
This is a modified version of Linus' original... | ```diff
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 7fdd184a528d..cbba000dccbe 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -60,15 +60,20 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
return ERR_PTR(-EINVAL);
}
+ /* Handle the cached NULL acl case without locking */
+ acl... |
474dad54baee8f8abe63ac334357a37021147701 | Analyze and fix the following issue in the Linux kernel code: davinci: gpio bugfixes | Problem Details:
Update the DaVinci GPIO code to work better on non-dm6446 parts,
notably the dm355:
- Only handle the number of GPIOs the chip actually has. So
for example on dm6467, GPIO-42 is the last GPIO, and trying
to use GPIO-43 now fails cleanly; or GPIO-72 on dm6446.
- Enable GPIO interrupts on each... | ```diff
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
index b49e9d092aab..1aba41c6351e 100644
--- a/arch/arm/mach-davinci/gpio.c
+++ b/arch/arm/mach-davinci/gpio.c
@@ -20,6 +20,7 @@
#include <linux/irq.h>
#include <linux/bitops.h>
+#include <mach/cputype.h>
#include <mach/irqs.h>
#inclu... |
bf5e84f69618f416e89a5a53434a8c865e70252e | Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: fix potential ERR_PTR dereference in osd_initiator.c | Problem Details:
bio_map_kern() returns an ERR_PTR() not NULL.
Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
index 2a5f0777148d..76de88962237 100644
--- a/drivers/scsi/osd/osd_initiator.c
+++ b/drivers/scsi/osd/osd_initiator.c
@@ -612,9 +612,9 @@ static int _osd_req_list_objects(struct osd_request *or,
WARN_ON(or->in.bio);
bio = bio... |
6f92a7a0aff413cdf42955a187647e3736ebd8f3 | Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: fix hotplug event processing | Problem Details:
Here's a fix for hotplug events. The useage of queue_delayed_work seems
to broke the fifo for processing of firmware events. After several iterations
of adding and removing cabling connected to jbods, the devices are not
getting added becuase kernel thread is activited out of order.
Signed-off-by: E... | ```diff
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 4dffbec79355..e3a7967259e7 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -119,7 +119,7 @@ struct sense_info {
*/
struct fw_event_work {
struct list_head list;
- ... |
99bb214b1b652c475bb3d79cede47ecb76b758fa | Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : release diagnotic buffers prior host reset | Problem Details:
Diagnostic buffer support is already there in the driver. This support allows
applications to pull ring buffers from controller firmware for debugging
firmware related issues.
What this patch does is sends reqeust to firmware to release the buffers prior
to host reset. This will allow what ever deb... | ```diff
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c
index 2dc38598c207..ba6ab170bdf0 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c
@@ -64,6 +64,9 @@
static struct fasync_struct *async_queue;
static DECLARE_WAIT_QUEUE_HEAD(ctl_poll_wai... |
8901cbb45e2a6657adf0e6eea4276ef452dee011 | Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : Broadcast Primative AEN bug fix | Problem Details:
Bug fix in the broadcast primative async event code where the driver would
stop sending tm queries after the first queury was completed. This was due
driver not reseting the tm_cmds.status field back to MPT2_CMD_NOT_USED after
completing a task management request.
An addtional fix adding sanity check ... | ```diff
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index f2d967c5415e..4dffbec79355 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -516,12 +516,8 @@ _scsih_sas_device_add(struct MPT2SAS_ADAPTER *ioc,
handle = sas_device->ha... |
0d04df9b4a83c50ebe2143f20c2d5469c83ba314 | Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : fix oops when firmware sends large sense buffer size | Problem Details:
There is a bug in firmware where the reply message frame says there is a
16kb sense buffer, when in reality its only 20 bytes. This fix insures
the memcpy action doesn't corrupte the memory beyond the 90 bytes allocated in
the scsi command for sense buffer.
Signed-off-by: Eric Moore <eric.moore@lsi.c... | ```diff
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index 0c463c483c02..f2d967c5415e 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2863,8 +2863,9 @@ scsih_io_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply)
... |
fd01825c70006638dee16f48c810c20c54f6cd15 | Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas : unique ioctl magic number | Problem Details:
The current magic number is shared with mptsas driver. This to be unique to
fix issues with register_ioctls32_conversion in older kernels. We are making
this change across all versions of the sas2.0 drivers.
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomle... | ```diff
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.h b/drivers/scsi/mpt2sas/mpt2sas_ctl.h
index dbb6c0cf8889..5bd7d4cfa819 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_ctl.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.h
@@ -50,7 +50,7 @@
#endif
#define MPT2SAS_DEV_NAME "mpt2ctl"
-#define MPT2_MAGIC_NUMBER 'm'
+#define M... |
8f76d151b010980d137bfdc736d1d8f64b489165 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix sign extension with 1.5TB usb-storage LBD=y | Problem Details:
Shifting an unsigned char implicitly casts it to a signed int. This
caused 'lba' to sign-extend and Linux would then try READ CAPACITY 16
which was not supported by at least one drive. Using the
get_unaligned_be*() helpers keeps us from having to worry about how the
extension might occur.
Signed-off... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3fcb64b91c43..84044233b637 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -50,6 +50,7 @@
#include <linux/string_helpers.h>
#include <linux/async.h>
#include <asm/uaccess.h>
+#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scs... |
dd406ef8950e76b17d74c5764a1e3d3a87d4a855 | Analyze and fix the following issue in the Linux kernel code: [SCSI] ipr: Fix sleeping function called with interrupts disabled | Problem Details:
The ata_sas_slave_configure was changed such that it now allocates
some memory for a drain buffer for ATAPI devices. Fixup the ipr
driver such that we no longer make this call with interrupts disabled.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomle... | ```diff
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index c09d77591f92..dd689ded8609 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3654,6 +3654,7 @@ static int ipr_slave_configure(struct scsi_device *sdev)
{
struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
struct i... |
a29e7646f42a325a7f6cce34adbeb52e8db15566 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Fix compilation warnings with allmodconfig | Problem Details:
When building with a .config generated from 'make allmodconfig'
some build warnings are generated. This patch corrects the warnings,
adds a FC_FID_NONE (= 0) enumeration for FC-IDs and cleans up one
variable naming to meet our variable naming conventions. For example,
fc_lport's should be named "lport,... | ```diff
diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c
index dd47fe619d1e..5878b34bff18 100644
--- a/drivers/scsi/libfc/fc_elsct.c
+++ b/drivers/scsi/libfc/fc_elsct.c
@@ -41,7 +41,7 @@ static struct fc_seq *fc_elsct_send(struct fc_lport *lport,
void *arg, u32 timer_msec)
{
enum f... |
dd3fd72e692c8af007f70df4433c0cffe8582d8b | Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: fix spelling typos and bad comments | Problem Details:
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 7bd0e822459d..8ad126556249 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -57,7 +57,7 @@ DEFINE_RWLOCK(fcoe_hostlist_lock);
DEFINE_TIMER(fcoe_timer, NULL, 0, 0);
DEFINE_PER_CPU(struct fcoe_percpu_s, fcoe_percpu);
... |
a53922ddcf69f4bd8aa321b1fb30418df7a86c61 | Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb3i: fix ddp map overrun | Problem Details:
(version 2)
Fixed a bug in calculating ddp map range when search for free entries:
it was going beyond the end by one, thus corrupting gl_skb[0].
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartn... | ```diff
diff --git a/drivers/scsi/cxgb3i/cxgb3i_ddp.c b/drivers/scsi/cxgb3i/cxgb3i_ddp.c
index d06a661c209f..99c912547902 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_ddp.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_ddp.c
@@ -120,20 +120,26 @@ static void clear_ddp_map(struct cxgb3i_ddp_info *ddp, unsigned int tag,
}
static inlin... |
1393109f23f8ad753a60a3e461c6caa96d8524f3 | Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb3i: fix cpu use abuse during writes | Problem Details:
When doing a lot (128) of large writes (256K) we can hit the cxgb3_snd_win
check pretty easily. The driver's xmit thread then takes 100% of the cpu.
The driver should not be returning -EAGAIN for this problem. It should
be returing -ENOBUFS, then when the window is opened again it should
queue the xmi... | ```diff
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c
index 4d8654cdbdae..e11c9c180f39 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_offload.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c
@@ -1737,7 +1737,7 @@ int cxgb3i_c3cn_send_pdus(struct s3_conn *c3cn, struct sk_buff *skb)
c3c... |
dd0af9f94e54efb13ee050ebac11909215ef02c2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb3i: fix can_queue and cmd_per_lun initialization | Problem Details:
cxgb3i was setting can_queue to only 128 commands, and was
setting the can_queue and cmd_per_lun to the same value.
This sets the can_queue to 1024 commands, and sets the cmd_per_lun
to a safer default of 32.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bo... | ```diff
diff --git a/drivers/scsi/cxgb3i/cxgb3i.h b/drivers/scsi/cxgb3i/cxgb3i.h
index d362860e7504..59b0958d2d11 100644
--- a/drivers/scsi/cxgb3i/cxgb3i.h
+++ b/drivers/scsi/cxgb3i/cxgb3i.h
@@ -34,7 +34,7 @@
#include "cxgb3i_offload.h"
#include "cxgb3i_ddp.h"
-#define CXGB3I_SCSI_QDEPTH_DFLT 128
+#define CXGB3I_SC... |
6b5d6c443a9b4fd71b633cef66b5db4de8a85787 | Analyze and fix the following issue in the Linux kernel code: [SCSI] cxgb3i, iser, iscsi_tcp: set target can queue | Problem Details:
Set target can queue limit to the number of preallocated
session tasks we have.
This along with the cxgb3i can_queue patch will fix a throughput
problem where it could only queue one LU worth of data at a time.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.... | ```diff
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 13d7674b293d..75223f50de58 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -599,6 +599,7 @@ static struct scsi_host_template iscsi_iser_sht = {
.eh_abo... |
9a6510eb3f030cedba32664498a610dc6d084d46 | Analyze and fix the following issue in the Linux kernel code: [SCSI] iscsi_tcp: don't fire conn error if pdu init fails | Problem Details:
If a command's scsi cmd pdu setup fails then we can just fail
the IO to the scsi layer. If a DATA_OUT for a R2T fails then
we will want to drop the session, because it means we got a
bad request from the target (iscsi protocol error).
This patch has us propogate the error upwards so libiscsi_tcp
or li... | ```diff
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index b3e5e08e44ab..f97fc7e9de79 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -463,7 +463,7 @@ static int iscsi_sw_tcp_pdu_init(struct iscsi_task *task,
}
if (err) {
- iscsi_conn_failure(conn, err);
+ /* got inva... |
70932935b61ee3dcc5a419ec4c367feb2ff808e4 | Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix oops when port disappears | Problem Details:
The zfcp_port might have been removed, while the FC fast_io_fail timer
is still running and could trigger the terminate_rport_io callback.
Set the pointer to the zfcp_port to NULL and check accordingly
before using it.
Reviewed-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: Christof S... | ```diff
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index a00d2bb9559c..3ac27ee47396 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -671,8 +671,7 @@ void zfcp_port_dequeue(struct zfcp_port *port)
list_del(&port->list);
write_unlock_irq(&zfcp_data.config_... |
6ab35c0713daf8cd68f272a4be8dfc02c86bbd3b | Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix port reference counting | Problem Details:
If this problem appears zfcp ports cannot be de-queued since it is
checked for a zero refcount. The port reference counting is wrong for
existing zfcp ports when e.g. an adapter gets on-line again. During
port scanning the reference counting for existing ports should not be
changed.
Signed-off-by: Mar... | ```diff
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index db409684e06f..19ae0842047c 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -539,6 +539,9 @@ static void zfcp_validate_port(struct zfcp_port *port)
{
struct zfcp_adapter *adapter = port->adapter;
+ if ... |
7001f0c4863230dd1560425fa0f5aad9e21716b8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: revert previous patch for sbal counting | Problem Details:
The current sbal counting can be wrong if a fsf request is
waiting for free sbals and at the same time qdio request queue
is shutdown and re-opened. Revering a previous patch fixes this
issue.
Signed-off-by: Martin Petermann <martin.petermann@de.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmi... | ```diff
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index bd2b23766894..3f365ace7711 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -645,30 +645,30 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
}
}
-static int zfcp_fsf_req... |
c6936e7f34383db2f5038dfa2f0c168ebc2920e5 | Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Fix abort handler for completions in progress | Problem Details:
When the abort handler cannot find a pending FSF request, the request
completion could just be running. This means we cannot return SUCCESS,
since this would lead to call to scsi_done after exiting the SCSI
error handler which is not allowed.
Reviewed-by: Martin Petermann <martin@linux.vnet.ibm.com>
S... | ```diff
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 5b11386d70bb..e7d065209065 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -171,7 +171,7 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
write_unlock_irqrestore(&adapter->abort... |
ada81b748b768eb5b75567fd1db5e87ba5c98bf0 | Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: Dont call zfcp_fsf_req_free on NULL pointer | Problem Details:
Fix problem that zfcp_fsf_exchange_config_data_sync and
zfcp_fsf_exchange_config_data_sync could try to call zfcp_fsf_req_free
with a NULL pointer.
Reviewed-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <Ja... | ```diff
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index fa896dc600bf..a8e84065d006 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1254,13 +1254,13 @@ int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter,
spin_lock_bh(&adapter->req_q_loc... |
9a523d427dc5908a79ce3ff742e9606e852802d6 | Analyze and fix the following issue in the Linux kernel code: FRV: Stop gcc from generating uninitialised variable warnings after BUG() | Problem Details:
Stop gcc from generating uninitialised variable warnings after BUG().
The problem is that FRV's call into its gdbstub appears to return (if
the function is marked noreturn, then the compiler is under no
obligation to pass it a return address, and so GDB won't know where the
bug happened).
To get aroun... | ```diff
diff --git a/arch/frv/include/asm/bug.h b/arch/frv/include/asm/bug.h
index 6b1b44d71028..2e054508a2f6 100644
--- a/arch/frv/include/asm/bug.h
+++ b/arch/frv/include/asm/bug.h
@@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line);
do { \
__debug_bug_trap(signr); \
asm volat... |
b4efdd586bc08cdf5977cad0a90091f44546a930 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix q->lock not held warning when target is busy | Problem Details:
We cannot call blk_plug_device from scsi_target_queue_ready
because the q lock is not held. And we do not need to call
it from there because when we return 0, the scsi_request_fn
not_ready handling will plug the queue for us if needed.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by:... | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index d1cb64ad1a3f..bb218c8b6e98 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1291,10 +1291,8 @@ static inline int scsi_target_queue_ready(struct Scsi_Host *shost,
if (--starget->target_blocked == 0) {
SCSI_LOG_MLQUE... |
37b607c5ac3b7c92a6a3624bb29f1cdcdcf7044a | Analyze and fix the following issue in the Linux kernel code: net: Fix typo in net_device_ops description. | Problem Details:
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 453be9a674c0..5a96a1a406e9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -500,7 +500,7 @@ struct netdev_queue {
*
* int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
* This function is calle... |
36e7b1b8dac1a785abca3a121b6b0b79f1a8d7df | Analyze and fix the following issue in the Linux kernel code: gro: Fix COMPLETE checksum handling | Problem Details:
On a brand new GRO skb, we cannot call ip_hdr since the header
may lie in the non-linear area. This patch adds the helper
skb_gro_network_header to handle this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c9ef41916071..fe20d171acf1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1142,6 +1142,13 @@ static inline void *skb_gro_mac_header(struct sk_buff *skb)
skb_shinfo(skb)->frags[0].page_offset;
}
+stat... |
edbd9e30306067c3a45c035eb95a6f49daaa2337 | Analyze and fix the following issue in the Linux kernel code: gro: Fix handling of headers that extend over the tail | Problem Details:
The skb_gro_* code fails to handle the case where a header starts
in the linear area but ends in the frags area. Since the goal
of skb_gro_* is to optimise the case of completely non-linear
packets, we can simply bail out if we have anything in the linear
area.
Signed-off-by: Herbert Xu <herbert@gond... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 31167451d08d..c9ef41916071 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1137,7 +1137,7 @@ static inline void skb_gro_reset_offset(struct sk_buff *skb)
static inline void *skb_gro_mac_header(struct sk_buff *... |
21380931eb4da4e29ac663d0221581282cbba208 | Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix a bunch of printk() warnings. | Problem Details:
Just happened to notice a bunch of %llu vs u64 warnings. Here's a patch
to cast them all.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com> | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index aa0c259b9c28..0ff16d3331da 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1671,7 +1671,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
if (features) {
printk(KERN_ERR "BTRFS: couldn't mount because of "
"unsupport... |
e63b6a6c0ffa2ebd8617cc1a10969000296831aa | Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix a trivial warning using max() of u64 vs ULL. | Problem Details:
A small warning popped up on ia64 because inode-map.c was comparing a
u64 object id with the ULL FIRST_FREE_OBJECTID. My first thought was
that all the OBJECTID constants should contain the u64 cast because
btrfs code deals entirely in u64s. But then I saw how large that was,
and figured I'd just fix... | ```diff
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index cc7334d833c9..9abbced1123d 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -79,7 +79,7 @@ int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
}
path = btrfs_alloc_path();
BUG_ON(!path);
- search_start = max(search_st... |
395a434e39cb6dc6e1ff53bb43722b534a3c68d6 | Analyze and fix the following issue in the Linux kernel code: ALSA: Fix Trivial Warnining in sound/pci/cmipci.c | Problem Details:
Fixed the compile warning below by initializatin iomidi variable properly.
sound/pci/cmipci.c: In function ‘snd_cmipci_probe’:
sound/pci/cmipci.c:3017: warning: ‘iomidi’ may be used uninitialized in this function
Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: linux-pci <linux-pci@at... | ```diff
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index c7899c32aba1..449fe02f666e 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -3014,7 +3014,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
.dev_free = snd_cmipci_dev_free,
};
unsigned int val;
- lon... |
a9b487fa1e00b42f9667abfeca4a5295a71333db | Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb-caiaq: fix reported elapsed periods | Problem Details:
Reset the internal period position counter upon stream startup. This
fixes initial aplay underruns and problems related to latency picky
applications such as pulseaudio.
Bumped the version number to 1.3.14.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 3f45c0fe61ab..b13ce767ac72 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -195,11 +195,14 @@ static int snd_usb_caiaq_pcm_prepare(struct snd_pcm_substream *substream)
debug("%s(%p)\n", __func__, substream);
- if (... |
cad81bc2529ab8c62b6fdc83a1c0c7f4a87209eb | Analyze and fix the following issue in the Linux kernel code: ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex | Problem Details:
ptrace_attach() needs task->cred_exec_mutex, not current->cred_exec_mutex.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org> | ```diff
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index dfcd83ceee3b..0692ab5a0d67 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -188,7 +188,7 @@ int ptrace_attach(struct task_struct *task)
/* Protect exec's credential calculations against our interference;
* SUID, SGID and LSM creds get determined di... |
f85ba78068ac137fe9c1f50d25405d2783d75c77 | Analyze and fix the following issue in the Linux kernel code: tun: add IFF_TUN_EXCL flag to avoid opening a persistent device. | Problem Details:
When creating a certain types of VPN, NetworkManager will first attempt
to find an available tun device by iterating through 'vpn%d' until it
finds one that isn't already busy. Then it'll set that to be persistent
and owned by the otherwise unprivileged user that the VPN dæmon itself
runs as.
There's ... | ```diff
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 589f0ca668d6..94622e5fb936 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -874,6 +874,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
dev = __dev_get_by_name(net, ifr->ifr_name);
if (dev) {
+ if (ifr->i... |
0456b4f8b742006c2b79fcbe6b0736aa1ad39180 | Analyze and fix the following issue in the Linux kernel code: cxacru: Fix negative dB output | Problem Details:
Values of dB between -0.99 and -0.01 will be output with the wrong
sign. This converts the negative value to positive and outputs it
with a "-" prefix.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 6789089e2461..56802d2e994b 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -227,8 +227,14 @@ static ssize_t cxacru_sysfs_showattr_s8(s8 value, char *buf)
static ssize_t cxacru_sysfs_showattr_dB(s16 value, char *buf... |
495dce123ceabbae035552437fcaa0f69247ff08 | Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix WoL functionality for 82599 KX4 devices | Problem Details:
The current code writes the PME enabled bit in PCI config space which is
wrong. This was needed for pre-release hardware, and was not removed from
the driver. Also, we need to clear the WUS (wake up status) after we
resume. Otherwise we can't wake for the same event again since it's still
asserted i... | ```diff
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 5567519676d5..186a65069b33 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -50,7 +50,6 @@ static u16 ixgbe_calc_eeprom_checksum(struct ixgbe_hw *hw);
static void ixgbe_enable_rar(struc... |
4e204c1000561ddb1a62a9df857cb0457dd868a7 | Analyze and fix the following issue in the Linux kernel code: vxge: fix possible NULL dereference in vxge-traffic.c | Problem Details:
If vpath is NULL then hldev is NULL also.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ram Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
index 7be0ae10d69b..506625b180ac 100644
--- a/drivers/net/vxge/vxge-traffic.c
+++ b/drivers/net/vxge/vxge-traffic.c
@@ -1923,7 +1923,7 @@ enum vxge_hw_status __vxge_hw_vpath_alarm_process(
if (vpath == NULL) {
alarm_event = VXGE... |
6a783c9067e3f71aac61a9262fe42c1f68efd4fc | Analyze and fix the following issue in the Linux kernel code: xfrm: wrong hash value for temporary SA | Problem Details:
When kernel inserts a temporary SA for IKE, it uses the wrong hash
value for dst list. Two hash values were calcultated before: one with
source address and one with a wildcard source address.
Bug hinted by Junwei Zhang <junwei.zhang@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>... | ```diff
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 82271720d970..5f1f86565f16 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -794,7 +794,7 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
{
static xfrm_address_t saddr_wildcard = { };
struct net *net = xp_net... |
434e7b0d12f4e2de6686841a42bd344325b4d756 | Analyze and fix the following issue in the Linux kernel code: net: fix fsl_pq_mdio driver to use module_init() | Problem Details:
Modules are not supposed to use any of the *_initcall*() hooks as
the entry point. fsl_pq_mdio.c was using subsys_initcall_sync()
instead of module_init() to guarantee that the MDIO bus was initialized
before the Ethernet driver goes looking for the phy. However, the recent
OF helpers rework happens ... | ```diff
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index b01daa1e3adf..d12e0e0336f4 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -415,10 +415,10 @@ int __init fsl_pq_mdio_init(void)
{
return of_register_platform_driver(&fsl_pq_mdio_driver);
}
+module_init(fsl_pq_... |
8f955d7f042e4ac44891a400d5000928f8db9f58 | Analyze and fix the following issue in the Linux kernel code: forcedeth: tx timeout fix | Problem Details:
This patch fixes the tx_timeout() to properly handle the clean up of the
tx ring. It also sets the tx put pointer back to the correct position to
be in sync with HW.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 11d5db16ed9c..f9a846b1b92f 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -1880,6 +1880,7 @@ static void nv_init_tx(struct net_device *dev)
np->tx_pkts_in_progress = 0;
np->tx_change_owner = NULL;
np->tx_end_flip =... |
c759a6b4e1cae6aff71f58c9c85404ebcd81b6e0 | Analyze and fix the following issue in the Linux kernel code: net: Fix LL_MAX_HEADER for CONFIG_TR_MODULE | Problem Details:
Unless I miss anything this should fix a bug.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2e7783f4a755..453be9a674c0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -104,7 +104,7 @@ struct wireless_dev;
# else
# define LL_MAX_HEADER 96
# endif
-#elif defined(CONFIG_TR)
+#elif defined(CONFIG_TR) || ... |
a4233304bb43f87f97fc2ac9143b513814dcf094 | Analyze and fix the following issue in the Linux kernel code: mlx4_en: Fix cleanup flow on cq activation | Problem Details:
In case of mlx4_en_activate_cq() failure, the cleanup
code would go to rx_err and try to disable unactivated rings.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 438678ab2a10..7bcc49de1637 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -583,7 +583,7 @@ int mlx4_en_start_port(struct net_device *dev)
err = mlx4_en_activate_cq(priv, cq);
if (err) {
mlx4... |
ecd4ca52bfdb4108f47aa480781b97f037051a72 | Analyze and fix the following issue in the Linux kernel code: sh: Fix up unsigned syscall_nr in SH-5 pt_regs. | Problem Details:
syscall_nr is presently defined as unsigned in the SH-5 pt_regs,
while the syscall restarting code wants it to be signed. Fix this
up, and bring it in line with the other SH parts.
Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index d3f6caa936b0..68e20ff9aa9b 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -9,7 +9,7 @@
struct pt_regs {
unsigned long long pc;
unsigned long long sr;
- unsigned long long syscall_nr;
+ long long ... |
15fbc938576175eeb53798221f045d4ace52e5dc | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/zylonite: fix the issue of unused SDATA_IN_1 pin get AC97 not working | Problem Details:
GPIO17_SDATA_IN_1 and GPIO36_SDATA_IN_1 are originally designed for the 2nd
codec but unused on the board, yet they are initialized incorrectly by the
bootloader as the SDATA_IN_1 alternate function, thus causing AC97 fail to
work. Fix this issue by configuring these pins as normal GPIO to avoid the
no... | ```diff
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index c1f73205d078..e99555b76a08 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -72,6 +72,7 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
GPIO25_AC97_SDATA_IN_0,
GPIO27... |
a8f6faebaf5b3f0f56b7c12a4f99d97c56938b37 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix issue of muxed GPIO irq_chip functions touching non-muxed GPIOs | Problem Details:
pxa_gpio_irq_type() and pxa_unmask_muxed_gpio() will touch non-muxed GPIOs
(0 and 1 on PXA2xx/PXA3xx) bits in GRERx and GFERx, which is incorrect.
Actually, only those bits should get updated if the corresponding bits are
set in c->irq_mask as well. Fix this by updating only those relevant bits.
Repor... | ```diff
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
index af819bf21b63..abc79d44acaa 100644
--- a/arch/arm/plat-pxa/gpio.c
+++ b/arch/arm/plat-pxa/gpio.c
@@ -121,6 +121,8 @@ static int __init pxa_init_gpio_chip(int gpio_end)
return -ENOMEM;
}
+ memset(chips, 0, nbanks * sizeof(struct pxa_gpi... |
6b3480855aad6e22ca90981a4c7893a7f41ffb47 | Analyze and fix the following issue in the Linux kernel code: maple: input: fix up maple mouse driver | Problem Details:
The maple mouse driver currently in mainline is broken:
bash-3.1# modprobe maplemouse
[ 56.886378] input: Dreamcast Mouse as /devices/virtual/input/input3
[ 56.918379] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 56.930543] pc = c003304e
[ 56.934973] *pde = 00... | ```diff
diff --git a/drivers/input/mouse/maplemouse.c b/drivers/input/mouse/maplemouse.c
index d196abfb68bc..5f278176eb9b 100644
--- a/drivers/input/mouse/maplemouse.c
+++ b/drivers/input/mouse/maplemouse.c
@@ -2,8 +2,8 @@
* SEGA Dreamcast mouse driver
* Based on drivers/usb/usbmouse.c
*
- * Copyright Yaegashi Ta... |
40f4a6d522e68a0203ebefb57f3cbdac4a622169 | Analyze and fix the following issue in the Linux kernel code: sh: sh7785lcr: fix defconfig for 29-bit mode | Problem Details:
Fix the problem that cannot work 29-bit mode when use sh7785lcr_defconfig.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
index 8a42bbef1f50..e4fac2efc055 100644
--- a/arch/sh/configs/sh7785lcr_defconfig
+++ b/arch/sh/configs/sh7785lcr_defconfig
@@ -1,10 +1,11 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.... |
314eeac9e35d8b934dd7a09ed3a8e00d41977b84 | Analyze and fix the following issue in the Linux kernel code: dma-debug: remove broken dma memory leak detection for 2.6.30 | Problem Details:
The feature needs some more work because the notfier which is used to
check for pending allocations is called before the device drivers
->remove() function. Therefore this feature reports false positives.
A real fix for this issue is to introduce a new notifier event which sent
_after_ the driver has ... | ```diff
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index d3da7edc034f..69da09a085a1 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -400,60 +400,9 @@ out_err:
return -ENOMEM;
}
-static int device_dma_allocations(struct device *dev)
-{
- struct dma_debug_entry *entry;
- unsigned long flags;
- int count = ... |
992d7ced75322307035a0e94074eb7188612a680 | Analyze and fix the following issue in the Linux kernel code: locking: Documentation: lockdep-design.txt, fix note of state bits | Problem Details:
From source code of get_usage_char(), the previous note is not correct,
so fix it.
static char get_usage_char(struct lock_class *class, enum lock_usage_bit bit)
{
char c = '.';
if (class->usage_mask & lock_flag(bit + 2))/*LOCK_ENABLED_##STATE*/
c = '+';
if (class->usage_mask & lock_flag(bit)) {/... | ```diff
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt
index 938ea22f2cc0..e20d913d5914 100644
--- a/Documentation/lockdep-design.txt
+++ b/Documentation/lockdep-design.txt
@@ -54,9 +54,9 @@ locking error messages, inside curlies. A contrived example:
The bit position indicates STATE,... |
5876ee950f28612814cc4e01c5549718f8b79dce | Analyze and fix the following issue in the Linux kernel code: [ARM] lart: fix build error | Problem Details:
arch/arm/mach-sa1100/lart.c:36: error: 'PAGE_SHIFT' undeclared here (not in a function)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index 0cd52692d2f7..1f940df0e5af 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -9,6 +9,7 @@
#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
+#include <asm/page.h>
#include <... |
701970b3a83cc639c1ec8fc6f40a7871cb99426f | Analyze and fix the following issue in the Linux kernel code: tracing/events: make modules have their own file_operations structure | Problem Details:
For proper module reference counting, the file_operations that modules use
must have the "owner" field set to the module. Unfortunately, the trace events
use share file_operations. The same file_operations are used by all both
kernel core and all modules.
This patch makes the modules allocate their ow... | ```diff
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index b92081588088..be4d3a437c17 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -770,7 +770,11 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
}
static int
-event_create_dir(struct ftrace_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.