id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
0f5cd45960173ba5b36727decbb4a241cbd35ef9 | Analyze and fix the following issue in the Linux kernel code: ath9k: Fix ath9k prevents CPU to enter C3 states | Problem Details:
The DMA latency issue is observed only in Intel pinetrail platforms
but in the driver we had a default PM-QOS value of 55. This caused
unnecessary power consumption and battery drain in other platforms.
Remove the pm-qos thing in the driver code and address the throughput
issue in Intel pinetrail plat... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 23838e37d45f..1a7fa6ea4cf5 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -21,7 +21,6 @@
#include <linux/device.h>
#include <linux/leds.h>
#include <linux/co... |
261cd298a8c363d7985e3482946edb4bfedacf98 | Analyze and fix the following issue in the Linux kernel code: s390: remove task_show_regs | Problem Details:
task_show_regs used to be a debugging aid in the early bringup days
of Linux on s390. /proc/<pid>/status is a world readable file, it
is not a good idea to show the registers of a process. The only
correct fix is to remove task_show_regs.
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: M... | ```diff
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index bf3de04170a7..2c79b6416271 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -148,11 +148,6 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
*/
exte... |
7bb2e269aefe4539313922ab4a89367cd52a51d1 | Analyze and fix the following issue in the Linux kernel code: oprofile, s390: Fix section mismatch of function hws_cpu_callback() | Problem Details:
Fixes the following section mismatch:
Section mismatch in reference from the variable hws_cpu_notifier to the function .cpuinit.text:hws_cpu_callback()
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com> | ```diff
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c
index ab3f770e35ba..3d48f4db246d 100644
--- a/arch/s390/oprofile/hwsampler.c
+++ b/arch/s390/oprofile/hwsampler.c
@@ -578,7 +578,7 @@ static struct notifier_block hws_oom_notifier = {
.notifier_call = hws_oom_callback
};
-static i... |
54ebbe7ba51d97a28a9a406203d171d61858e4b9 | Analyze and fix the following issue in the Linux kernel code: oprofile: Introduce new oprofile sample add function (oprofile_add_ext_hw_sample) | Problem Details:
This patch introduces a new oprofile sample add function
(oprofile_add_ext_hw_sample) that can also take task_struct as an
argument, which is used by the hwsampler kernel module when copying
hardware samples to OProfile buffers.
Applied with following changes:
* removed #include <linux/module.h>
* whi... | ```diff
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index 59f55441e075..b8ef8ddcc292 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -258,8 +258,10 @@ op_add_sample(struct oprofile_cpu_buffer *cpu_buf,
*/
static int
log_sample(struct oprofile_cpu_buff... |
fd018fe8234e84e05ab05d4176525817c8779cd6 | Analyze and fix the following issue in the Linux kernel code: ext4: fix comment typo uninitized | Problem Details:
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 686240e89df1..7516fb9c0bd5 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2844,7 +2844,7 @@ fix_extent_len:
* ext4_get_blocks_dio_write() when DIO to write
* to an uninitialized extent.
*
- * Writing to an uninitized extent may result in... |
68ba69740ba910caeff35452f991d25372dd0f96 | Analyze and fix the following issue in the Linux kernel code: doc: Fix numbering of KVM API description sections | Problem Details:
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index ad85797c1cf0..9bef4e4cec50 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -166,7 +166,7 @@ Returns: 0 on success, -1 on error
This ioctl is obsolete and has been removed.
-4.6 KVM_CREATE_VCPU
+4.7 KVM_CREATE... |
8272f4c9c5a46049a66dad5924850de5d1ef2269 | Analyze and fix the following issue in the Linux kernel code: fuse/cuse: fix comment typo initilaization | Problem Details:
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c
index 3e87cce5837d..7c39b885f969 100644
--- a/fs/fuse/cuse.c
+++ b/fs/fuse/cuse.c
@@ -458,7 +458,7 @@ static void cuse_fc_release(struct fuse_conn *fc)
* @file: file struct being opened
*
* Userland CUSE server can create a CUSE device by opening /dev/cuse
- * ... |
1752a373c4c567445057f1f51d8558ec8cf5d641 | Analyze and fix the following issue in the Linux kernel code: mISDN: fix printk typo fushing | Problem Details:
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c
index 199f374cf9da..f6e108d0125f 100644
--- a/drivers/isdn/mISDN/hwchannel.c
+++ b/drivers/isdn/mISDN/hwchannel.c
@@ -206,7 +206,7 @@ recv_Bchannel(struct bchannel *bch, unsigned int id)
hh->id = id;
if (bch->rcount >= 64) {
pri... |
46a1ca7068c4dc278ebefd573f571f5e503ce6fc | Analyze and fix the following issue in the Linux kernel code: hvcs: fix typo in comment | Problem Details:
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index bedc6c1b6fa5..af4e6505780f 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -292,7 +292,7 @@ struct hvcs_struct {
/*
* Any variable below the kref is valid before a tty is connected and
* stays valid after the tty is d... |
d1ab1f54a1b0fb0ae6479fad6e26983f09fd263a | Analyze and fix the following issue in the Linux kernel code: net/fec: provide device for dma functions and matching sizes for map and unmap | Problem Details:
This fixes warnings when CONFIG_DMA_API_DEBUG=y:
NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000004781a020] [size=64 bytes]
net eth0: DMA-API: device driver frees DMA memory with different size [device address=0x000000004781a020] [map size=204... | ```diff
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 3f5dfe2e41ac..0c984d6b25f6 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -297,7 +297,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
/* Push the data cache so the CPM does not get stale memory
* data.
*/
- bdp->c... |
84e383b322e5348db03be54ff64cc6da87003717 | Analyze and fix the following issue in the Linux kernel code: x86, dmi, debug: Log board name (when present) in dmesg/oops output | Problem Details:
The "Type 2" SMBIOS record that contains Board Name is not
strictly required and may be absent in the SMBIOS on some
platforms.
( Please note that Type 2 is not listed in Table 3 in Sec 6.2
("Required Structures and Data") of the SMBIOS v2.7
Specification. )
Use the Manufacturer Name (aka System ... | ```diff
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 3c189e9accd3..ff4554198981 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -92,21 +92,31 @@ void show_regs(struct pt_regs *regs)
void show_regs_common(void)
{
- const char *board, *product;
+ const char *vendo... |
9e81509efc4fefcdd75cc6a4121672fa71ae8745 | Analyze and fix the following issue in the Linux kernel code: x86, amd: Initialize variable properly | Problem Details:
Commit d518573de63f ("x86, amd: Normalize compute unit IDs on
multi-node processors") introduced compute unit normalization
but causes a compiler warning:
arch/x86/kernel/cpu/amd.c: In function 'amd_detect_cmp':
arch/x86/kernel/cpu/amd.c:268: warning: 'cores_per_cu' may be used uninitialized in this... | ```diff
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 990cc4861586..589bdd7a4cff 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -261,7 +261,7 @@ static int __cpuinit nearby_node(int apicid)
#ifdef CONFIG_X86_HT
static void __cpuinit amd_get_topology(struct cpuinfo... |
7e9c26295b2ae1be1285c7c9e593c19ce7ea7eba | Analyze and fix the following issue in the Linux kernel code: cxgb4vf: Quiesce Virtual Interfaces on shutdown ... | Problem Details:
When a Virtual Machine is rebooted, KVM currently fails to issue a Function
Level Reset against any "Attached PCI Devices" (AKA "PCI Passthrough"). In
addition to leaving the attached device in a random state in the next booted
kernel (which sort of violates the entire idea of a reboot reseting hardwa... | ```diff
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index 2be1088ff601..6aad64df4dcb 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -2861,6 +2861,46 @@ static void __devexit cxgb4vf_pci_remove(struct pci_dev *pdev)
pci_release_regio... |
3e16f92536334ccb464ed88cf4d8cc0dd43da106 | Analyze and fix the following issue in the Linux kernel code: omap2+: Fix omap_serial_early_init to work with init_early hook | Problem Details:
The new init_early hook happens at the end of setup_arch,
which is too early for kzalloc. However, there's no need
to call omap_serial_early_init that early, so fix this
by setting it up as a core_initcall.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tested-by: Kevin Hilman <khilman@ti.com> | ```diff
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index f89173ab4abe..26a61cf27291 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -398,8 +398,6 @@ void __init omap2_init_common_infrastructure(void)
void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
... |
5b40ddf888398ce4cccbf3b9d0a18d90149ed7ff | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: hopefully fix pll issues for real (v3) | Problem Details:
The problematic boards have a recommended reference divider
to be used when spread spectrum is enabled on the laptop panel.
Enable the use of the recommended reference divider along with
the new pll algo.
v2: testing options
v3: When using the fixed reference divider with LVDS, prefer
min m to max p ... | ```diff
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 0b10b0e14945..095bc507fb16 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -538,7 +538,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
pll->flags ... |
a4b40d5d97f5c9ad0b7f4bf2818291ca184bb433 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: add bounds checking to avivo pll algo | Problem Details:
Prevent divider overflow.
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=28932
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 2eff98cfd728..0e657095de7c 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -793,6 +793,11 @@ static void avivo_get_fb_div(struct radeon_pll *pll,
tmp *= ta... |
bd91572e77013aad242e2d2d565bd730c043f8b8 | Analyze and fix the following issue in the Linux kernel code: drm: fix wrong usages of drm_device in DRM Developer's Guide | Problem Details:
A few wrong usages of drm_device, which should be drm_driver.
Signed-off-by: Xiao Jiang <jgq516@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 2861055afd7a..c27915893974 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -73,8 +73,8 @@
services.
</para>
<para>
- The core of every DRM driver is struct drm_device. Dr... |
265aa6c8d8822c9074a2174e8c9f31a37fa02e50 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix a few more atombios endian issues | Problem Details:
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 1bf61220a450..0b10b0e14945 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -728,7 +728,7 @@ static void atombios_crtc_set_dcpll(struct drm_crtc *crtc,
/* if ... |
b540afc2b3d6e4cd1d1f137ef6d9e9c78d67fecd | Analyze and fix the following issue in the Linux kernel code: ALSA: HDA: Add position_fix quirk for an Asus device | Problem Details:
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).
Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-o... | ```diff
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 0baffcdee8f9..fcedad9a5fef 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2308,6 +2308,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX... |
eaae55dac6b64c0616046436b294e69fc5311581 | Analyze and fix the following issue in the Linux kernel code: ALSA: caiaq - Fix possible string-buffer overflow | Problem Details:
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.
Reported-by: Rafa <rafa@mwrinfosecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 68b97477577b..66eabafb1c24 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -785,7 +785,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev)
}
dev->pcm->private_data = dev;
- strcpy(dev->pcm->name, dev->pr... |
98200ec28a66c8db5839ac26e9a895984206b50f | Analyze and fix the following issue in the Linux kernel code: pch_gbe: Fix the MAC Address load issue. | Problem Details:
With the specification of hardware,
the processing at the time of driver starting was modified.
This device write automatically the MAC address read from serial ROM
into a MAC Adress1A/1B register at the time of power on reset.
However, when stable clock is not supplied,
the writing of MAC Adress1A/1B... | ```diff
diff --git a/drivers/net/pch_gbe/pch_gbe.h b/drivers/net/pch_gbe/pch_gbe.h
index a0c26a99520f..e1e33c80fb25 100644
--- a/drivers/net/pch_gbe/pch_gbe.h
+++ b/drivers/net/pch_gbe/pch_gbe.h
@@ -73,7 +73,7 @@ struct pch_gbe_regs {
struct pch_gbe_regs_mac_adr mac_adr[16];
u32 ADDR_MASK;
u32 MIIM;
- u32 reserve... |
5d17920bd4df6802fb48ccf8283721657c5a8257 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: Delete iwl3945_good_plcp_health. | Problem Details:
Fixes this build warning:
drivers/net/wireless/iwlwifi/iwl-3945.c:411:13: warning: 'iwl3945_good_plcp_health' defined but not used
As per Johannes Berg.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 3eb14fd2204b..39b6f16c87fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -402,72 +402,6 @@ static void iwl3945_accumulative_statistics(struct iwl_priv *pri... |
67100f255dba284bcbb5ce795355dad1cff35658 | Analyze and fix the following issue in the Linux kernel code: Btrfs - Fix memory leak in btrfs_init_new_device() | Problem Details:
Memory allocated by calling kstrdup() should be freed.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com> | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 7cad59353b09..dadaaa8005c8 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1603,12 +1603,14 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
ret = find_next_devid(root, &device->devid);
if (ret) {
+ kfree(devi... |
c03773206bf2249a890c4d420ed32ef500630095 | Analyze and fix the following issue in the Linux kernel code: OMAP2+: mailbox: fix lookups for multiple mailboxes | Problem Details:
The pointer math in omap_mbox_get() is not quite right, and leads to
passing NULL to strcmp() when searching for an mbox that is not first
in the list.
Convert to using array indexing as is done in all the other functions
which walk the mbox list.
Tested on OMAP2420/n810, OMAP3630/zoom3, OMAP4430/Bla... | ```diff
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 459b319a9fad..49d3208793e5 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
struct omap_mbox *omap_mbox_get(const char *name, str... |
eca83258f1d81575576ca553075c641849150f23 | Analyze and fix the following issue in the Linux kernel code: OMAP2420: mailbox: fix IVA vs DSP IRQ numbering | Problem Details:
The IRQ numbering for the IVA and DSP mailboxes was switched due
to the wrong ordering in the OMAP2 mbox list. Switch the ordering
so DSP is first and matches all the other SoCs.
Tested on OMAP2420/n810.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com> | ```diff
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 394413dc7deb..0a585dfa9874 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -334,7 +334,7 @@ static struct omap_mbox mbox_iva_info = {
.priv = &omap2_mbox_iva_priv,
};
-struct omap_mbox *omap2_... |
51788b1bdd0d68345bab0af4301e7fa429277228 | Analyze and fix the following issue in the Linux kernel code: btrfs: prevent heap corruption in btrfs_ioctl_space_info() | Problem Details:
Commit bf5fc093c5b625e4259203f1cee7ca73488a5620 refactored
btrfs_ioctl_space_info() and introduced several security issues.
space_args.space_slots is an unsigned 64-bit type controlled by a
possibly unprivileged caller. The comparison as a signed int type
allows providing values that are treated as n... | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 02d224e8c83f..be2d4f6aaa5e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2208,7 +2208,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
int num_types = 4;
int alloc_size;
int ret = 0;
- int slot_count = 0;
+ u64 sl... |
6848ad6461e551849ba3c32d945d4f45e96453a6 | Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix balance panic | Problem Details:
Mark the cloned backref_node as checked in clone_backref_node()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com> | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 1f5556acb530..0825e4ed9447 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -1157,6 +1157,7 @@ static int clone_backref_node(struct btrfs_trans_handle *trans,
new_node->bytenr = dest->node->start;
new_node->level = node->level... |
7a047f4f2f3a812f09f42aa784499a54dc4afcf2 | Analyze and fix the following issue in the Linux kernel code: p54: enhance rssi->dBm database import | Problem Details:
This patch fixes several shortcomings of the
previous implementation. Features of the
rewrite include:
* handles undocumented "0x0000" word at the
start of the frequency table.
(Affected some early? DELL 1450 USB devices
and my Symbol 5GHz miniPCI card.)
* supports more than just one refe... | ```diff
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index 360bc7810f93..f54e15fcd623 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -55,6 +55,17 @@ static struct ieee80211_rate p54_arates[] = {
{ .bitrate = 540, .hw_value = 11, },
};
... |
410f14837a92177242a403c20d0a0906fe357019 | Analyze and fix the following issue in the Linux kernel code: ARM: 6667/1: Fix early_pte_alloc() assumption about the Linux PTE | Problem Details:
With LPAE we no longer have software bits in a separate Linux PTE and
the early_pte_alloc() function should pass PTE_HWTABLE_OFF +
PTE_HWTABLE_SIZE to early_alloc() to avoid allocating extra memory.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.li... | ```diff
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 546e44734db0..7515d4718645 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -532,7 +532,7 @@ static void __init *early_alloc(unsigned long sz)
static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot)
{
if (pmd... |
31d409373cca3517a30540b51f55dcb1f5af0d49 | Analyze and fix the following issue in the Linux kernel code: ipv4: fix rcu lock imbalance in fib_select_default() | Problem Details:
Commit 0c838ff1ade7 (ipv4: Consolidate all default route selection
implementations.) forgot to remove one rcu_read_unlock() from
fib_select_default().
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 146bd82ef60d..562f34cd9303 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1189,7 +1189,7 @@ void fib_select_default(struct fib_result *res)
fib_result_assign(res, last_resort);
tb->tb_default = last_idx;
out:
... |
0ea22f072fb1b3da4307573c280ce904f0bf1589 | Analyze and fix the following issue in the Linux kernel code: xen-gntdev: Fix unmap notify on PV domains | Problem Details:
In paravirtualized guests, the struct page* for mappings is only a
placeholder, and cannot be used to access the granted memory. Use the
userspace mapping that we have set up in order to implement
UNMAP_NOTIFY_CLEAR_BYTE.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rze... | ```diff
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 2aa83166da32..75f8037c9833 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -289,7 +289,12 @@ static int unmap_grant_pages(struct grant_map *map, int offset, int pages)
if (map->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
int pgn... |
90b6f30548a52f3a59cda5c7db0b9c2a99ebb156 | Analyze and fix the following issue in the Linux kernel code: xen-gntdev: Fix memory leak when mmap fails | Problem Details:
The error path did not decrement the reference count of the grant structure.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ```diff
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 9694a1a8b2e2..2aa83166da32 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -650,15 +650,13 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
find_grant_ptes, map);
if (err) {
printk(KERN_WARNING ... |
68b025c813c2eb41ff25628e3d4952d5185eb1a4 | Analyze and fix the following issue in the Linux kernel code: xen-gntdev: Add reference counting to maps | Problem Details:
This allows userspace to perform mmap() on the gntdev device and then
immediately close the filehandle or remove the mapping using the
remove ioctl, with the mapped area remaining valid until unmapped.
This also fixes an infinite loop when a gntdev device is closed
without first unmapping all areas.
S... | ```diff
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index ce8c37c2b673..256162b56691 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -62,12 +62,12 @@ struct gntdev_priv {
struct grant_map {
struct list_head next;
- struct gntdev_priv *priv;
struct vm_area_struct *vma;
int index;
... |
e3f24cc521cb7ba60ac137abd1939e4e03435e80 | Analyze and fix the following issue in the Linux kernel code: Btrfs: don't release pages when we can't clear the uptodate bits | Problem Details:
Btrfs tracks uptodate state in an rbtree as well as in the
page bits. This is supposed to enable us to use block sizes other than
the page size, but there are a few parts still missing before that
completely works.
But, our readpage routine trusts this additional range based tracking
of uptodateness,... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0418bf2c9757..e7aeba242701 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2822,9 +2822,17 @@ int try_release_extent_state(struct extent_map_tree *map,
* at this point we can safely clear everything except the
* locked bit a... |
eb14ab8ed24a0405fd056068b28c33a1cd846024 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix page->private races | Problem Details:
There is a race where btrfs_releasepage can drop the
page->private contents just as alloc_extent_buffer is setting
up pages for metadata. Because of how the Btrfs page flags work,
this results in us skipping the crc on the page during IO.
This patch sovles the race by waiting until after the extent b... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b36eeef19194..3e1ea3e0477e 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -359,10 +359,14 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
tree = &BTRFS_I(page->mapping->host)->io_tree;
- if (page->private =... |
de9963f0f2dfad128b26ae7bf6005f5948416a6d | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_iterate: fix incorrect RCU usage | Problem Details:
As noticed by Eric, nf_iterate doesn't use RCU correctly by
accessing the prev pointer of a RCU protected list element when
a verdict of NF_REPEAT is issued.
Fix by jumping backwards to the hook invocation directly instead
of loading the previous list element before continuing the list
iteration.
Rep... | ```diff
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 32fcbe290c04..4aa614b8a96a 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -133,6 +133,7 @@ unsigned int nf_iterate(struct list_head *head,
/* Optimization: we don't need to hold module
reference here, since function can't... |
d846f71195d57b0bbb143382647c2c6638b04c5a | Analyze and fix the following issue in the Linux kernel code: bridge: netfilter: fix information leak | Problem Details:
Struct tmp is copied from userspace. It is not checked whether the "name"
field is NULL terminated. This may lead to buffer overflow and passing
contents of kernel stack as a module name to try_then_request_module() and,
consequently, to modprobe commandline. It would be seen by all userspace
proces... | ```diff
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 5f1825df9dca..893669caa8de 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1107,6 +1107,8 @@ static int do_replace(struct net *net, const void __user *user,
if (tmp.num_counters >= INT_M... |
3ff84a7f36554b257cd57325b1a7c1fa4b49fbe3 | Analyze and fix the following issue in the Linux kernel code: Revert "slab: Fix missing DEBUG_SLAB last user" | Problem Details:
This reverts commit 5c5e3b33b7cb959a401f823707bee006caadd76e.
The commit breaks ARM thusly:
| Mount-cache hash table entries: 512
| slab error in verify_redzone_free(): cache `idr_layer_cache': memory outside object was overwritten
| Backtrace:
| [<c0227088>] (dump_backtrace+0x0/0x110) from [<c0431af... | ```diff
diff --git a/mm/slab.c b/mm/slab.c
index 37961d1f584f..4c6e2e31ced0 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2288,8 +2288,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
if (ralign < align) {
ralign = align;
}
- /* disable debug if not aligning with REDZONE_ALIGN */
- if (ralign & ... |
acfdf5c383b38f7f4dddae41b97c97f1ae058f49 | Analyze and fix the following issue in the Linux kernel code: nfsd4: acquire only one lease per file | Problem Details:
Instead of acquiring one lease each time another client opens a file,
nfsd can acquire just one lease to represent all of them, and reference
count it to determine when to release it.
This fixes a regression introduced by
c45821d263a8a5109d69a9e8942b8d65bcd5f31a "locks: eliminate fl_mylease
callback":... | ```diff
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 8b6cd3cf4835..54b60bfceb8d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -230,9 +230,6 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f
dp->dl_client = clp;
get_nfs4_file(fp);
dp->dl_file = fp;
... |
dd239cc05f0ad9f582dd83d88a4fb5edcc57a026 | Analyze and fix the following issue in the Linux kernel code: nfsd4: fix leak on allocation error | Problem Details:
Also share some common exit code.
Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ```diff
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 65978a9aa877..099d6fa64f7f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2699,14 +2699,12 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open, struct nfs4_sta
}
dp = alloc_init_deleg(sop->so_client, stp, fh, flag)... |
3aa6e0aa8ab3e64bbfba092c64d42fd1d006b124 | Analyze and fix the following issue in the Linux kernel code: NFSD: memory corruption due to writing beyond the stat array | Problem Details:
If nfsd fails to find an exported via NFS file in the readahead cache, it
should increment corresponding nfsdstats counter (ra_depth[10]), but due to a
bug it may instead write to ra_depth[11], corrupting the following field.
In a kernel with NFSDv4 compiled in the corruption takes the form of an
incr... | ```diff
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index fda3be237773..30c73f8a5791 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -808,7 +808,7 @@ nfsd_get_raparms(dev_t dev, ino_t ino)
if (ra->p_count == 0)
frap = rap;
}
- depth = nfsdstats.ra_size*11/10;
+ depth = nfsdstats.ra_size;
if (!frap) {
sp... |
c4c896e1471aec3b004a693c689f60be3b17ac86 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: sco: fix information leak to userspace | Problem Details:
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> | ```diff
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 960c6d1637da..926ed39912ea 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -703,6 +703,7 @@ static int sco_sock_getsockopt_old(struct socket *sock, int optname, char __user
break;
}
+ memset(&cinfo, 0, sizeof(cinfo));
cinfo.... |
43629f8f5ea32a998d06d1bb41eefa0e821ff573 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: bnep: fix buffer overflow | Problem Details:
Struct ca is copied from userspace. It is not checked whether the "device"
field is NULL terminated. This potentially leads to BUG() inside of
alloc_netdev_mqs() and/or information leak by creating a device with a name
made of contents of kernel stack.
Signed-off-by: Vasiliy Kulikov <segoon@openwall... | ```diff
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index 2862f53b66b1..d935da71ab3b 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -88,6 +88,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
sockfd_put(nsock);
return -EBADFD;
... |
14392fd329eca9b59d51c0aa5d0acfb4965424d1 | Analyze and fix the following issue in the Linux kernel code: x86, numa: Add error handling for bad cpu-to-node mappings | Problem Details:
CONFIG_DEBUG_PER_CPU_MAPS may return NUMA_NO_NODE when an
early_cpu_to_node() mapping hasn't been initialized. In such a
case, it emits a warning and continues without an issue but
callers may try to use the return value to index into an array.
We can catch those errors and fail silently since a warn... | ```diff
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index bf60715bd1b7..9559d360fde7 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -219,6 +219,10 @@ struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable)
struct cpumask *mask;
char buf[64];
+ if (node == NUMA_NO_NODE) {
+ /* e... |
e5fea868e6c04343e501176a373d568c1c0094aa | Analyze and fix the following issue in the Linux kernel code: x86: Fix and clean up generic_processor_info() | Problem Details:
One of the error printouts in generic_processor_info() prints out
the APIC version instead of the cpu index the warning text describes.
Move version validation down, after we get the right cpu index.
-v2: add comments about reason why we can have cpu=0 there.
Signed-off-by: Yinghai Lu <yinghai@kerne... | ```diff
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 06c196d7e59c..628dcdb7afd5 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1925,17 +1925,6 @@ void __cpuinit generic_processor_info(int apicid, int version)
{
int cpu;
- /*
- * Validate version
- *... |
77eed821accf5dd962b1f13bed0680e217e49112 | Analyze and fix the following issue in the Linux kernel code: x86: Fix panic when handling "mem={invalid}" param | Problem Details:
Avoid removing all of memory and panicing when "mem={invalid}"
is specified, e.g. mem=blahblah, mem=0, or mem=nopentium (on
platforms other than x86_32).
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/553464
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown ... | ```diff
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 294f26da0c0c..55a59d889dbd 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -856,6 +856,9 @@ static int __init parse_memopt(char *p)
userdef = 1;
mem_size = memparse(p, &p);
+ /* don't remove all of memory when handling ... |
0de4b34d466bae571b50f41c7296b85248205e35 | Analyze and fix the following issue in the Linux kernel code: tracing/kprobe: Fix NULL pointer deref check | Problem Details:
Add NULL check for avoiding NULL pointer deref.
This bug has been introduced by:
1ff511e35ed8: tracing/kprobes: Add bitfield type
which causes a null pointer dereference bug when kprobe-tracer
parses an argument without type.
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: M... | ```diff
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index ccdc542022c3..8435b43b1782 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -935,7 +935,7 @@ static int parse_probe_arg(char *arg, struct trace_probe *tp,
parg->offset = tp->size;
tp->size += parg->type... |
1c9d16e35911090dee3f9313e6af13af623d66ee | Analyze and fix the following issue in the Linux kernel code: x86: Fix mwait_usable section mismatch | Problem Details:
We use it in non __cpuinit code now too so drop marker.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20110211171754.GA21047@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 6e6e7558e702..4564c8e28a33 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -32,6 +32,6 @@ extern void arch_unregister_cpu(int);
DECLARE_PER_CPU(int, cpu_state);
-int __cpuinit mwait_usable(const struct cp... |
ac09664248e300342e92b937c9894a8149ddf189 | Analyze and fix the following issue in the Linux kernel code: pch_gbe: Fix the issue that the receiving data is not normal. | Problem Details:
This PCH_GBE driver had an issue that the receiving data is not normal.
This driver had not removed correctly the padding data
which the DMA include in receiving data.
This patch fixed this issue.
Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@d... | ```diff
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 4c9a7d4f3fca..f52d852569fb 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -29,6 +29,7 @@ const char pch_driver_version[] = DRV_VERSION;
#define PCH_GBE_SHORT_PKT 64
#define ... |
3903c023570446303a10f152cfc120dcbf9a4ccf | Analyze and fix the following issue in the Linux kernel code: jme: Fix hardware action of full-duplex | Problem Details:
Clear Transmit Timer/Retry setting while full-duplex.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 490bc0feff3d..6996d04e1de4 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -439,16 +439,14 @@ jme_check_link(struct net_device *netdev, int testonly)
if (phylink & PHY_LINK_DUPLEX) {
jwrite32(jme, JME_TXMCS, TXMCS_DEFAULT);
+ jwrite32... |
3c2368d96fd9a5828b260dfec59ae9a5352cd598 | Analyze and fix the following issue in the Linux kernel code: jme: Fix bit typo of JMC250A2 workaround | Problem Details:
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/jme.h b/drivers/net/jme.h
index c3764fc151c9..dc4af5753a9e 100644
--- a/drivers/net/jme.h
+++ b/drivers/net/jme.h
@@ -1000,8 +1000,8 @@ enum jme_gpreg1_masks {
};
enum jme_gpreg1_vals {
- GPREG1_RSSPATCH = 0x00000040,
- GPREG1_HALFMODEPATCH = 0x00000020,
+ GPREG1_HALFMODEPATCH = 0x... |
da1ab3e233eb1ff4116b178006a89ddca7dcd928 | Analyze and fix the following issue in the Linux kernel code: ATM, Solos PCI ADSL2+: Don't deref NULL pointer if net_ratelimit() and alloc_skb() interact badly. | Problem Details:
If alloc_skb() fails to allocate memory and returns NULL then we want to
return -ENOMEM from drivers/atm/solos-pci.c::popen() regardless of the
value of net_ratelimit(). The way the code is today, we may not return if
net_ratelimit() returns 0, then we'll proceed to pass a NULL pointer to
skb_put() whi... | ```diff
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 73fb1c4f4cd4..25ef1a4556e6 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -866,8 +866,9 @@ static int popen(struct atm_vcc *vcc)
}
skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
- if (!skb && net_ratelimit()) {
- d... |
5b89db0e84bef81f6aa324f8f22a9258ff873de3 | Analyze and fix the following issue in the Linux kernel code: Net, USB, Option, hso: Do not dereference NULL pointer | Problem Details:
In drivers/net/usb/hso.c::hso_create_bulk_serial_device() we have this
code:
...
serial = kzalloc(sizeof(*serial), GFP_KERNEL);
if (!serial)
goto exit;
...
exit:
hso_free_tiomget(serial);
...
hso_free_tiomget() directly dereferences its argument, which in the
example above is a NULL pointer, ouch.... | ```diff
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index bed8fcedff49..6d83812603b6 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2628,15 +2628,15 @@ exit:
static void hso_free_tiomget(struct hso_serial *serial)
{
- struct hso_tiocmget *tiocmget = serial->tiocmget;
+ struct hso_... |
795abaf1e4e188c4171e3cd3dbb11a9fcacaf505 | Analyze and fix the following issue in the Linux kernel code: klist: Fix object alignment on 64-bit. | Problem Details:
Commit c0e69a5bbc6f ("klist.c: bit 0 in pointer can't be used as flag")
intended to make sure that all klist objects were at least pointer size
aligned, but used the constant "4" which only works on 32-bit.
Use "sizeof(void *)" which is correct in all cases.
Signed-off-by: David S. Miller <davem@dave... | ```diff
diff --git a/include/linux/klist.h b/include/linux/klist.h
index e91a4e59b771..a370ce57cf1d 100644
--- a/include/linux/klist.h
+++ b/include/linux/klist.h
@@ -22,7 +22,7 @@ struct klist {
struct list_head k_list;
void (*get)(struct klist_node *);
void (*put)(struct klist_node *);
-} __attribute__ ((al... |
c978e7bb77dfd2cd3d1f547fa4e395cfe47f02b2 | Analyze and fix the following issue in the Linux kernel code: hisax: Fix unchecked alloc_skb() return. | Problem Details:
Jesper Juhl noticed that l2_pull_iqueue() does not
check to see if alloc_skb() fails.
Fix this by first trying to reallocate the headroom
if necessary, rather than later after we've made hard
to undo state changes.
Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@dave... | ```diff
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
index 0858791978d8..98ac835281fe 100644
--- a/drivers/isdn/hisax/isdnl2.c
+++ b/drivers/isdn/hisax/isdnl2.c
@@ -1243,14 +1243,21 @@ l2_st7_tout_203(struct FsmInst *fi, int event, void *arg)
st->l2.rc = 0;
}
+static int l2_hdr_space_need... |
fff1ce4dc6113b6fdc4e3a815ca5fd229408f8ef | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: check AA resolve registers on r300 | Problem Details:
This is an important security fix because we allowed arbitrary values
to be passed to AARESOLVE_OFFSET. This also puts the right buffer address
in the register.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index fdf4bc67ae58..56deae5bf02e 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3381,6 +3381,26 @@ int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track)
}
track->zb_dirty... |
501834349e872ed4115eea3beef65ca9eeb5528e | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix tracking of BLENDCNTL, COLOR_CHANNEL_MASK, and GB_Z on r300 | Problem Details:
Also move ZB_DEPTHCLEARVALUE to the list of safe regs.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 15f94648f274..862b61742b82 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -873,6 +873,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
track->zb_dirty = true;
break;
case 0x4... |
8fd1b84cc9d32e7e5c44e990a9c9e27504b232ed | Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix race between GPU reset and TTM delayed delete thread. | Problem Details:
My evergreen has been in a remote PC for week and reset has never once
saved me from certain doom, I finally relocated to the box with a
serial cable and noticed an oops when the GPU resets, and the TTM
delayed delete thread tries to remove something from the GTT.
This stops the delayed delete thread ... | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 0d478932b1a9..4954e2d6ffa2 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -936,8 +936,11 @@ int radeon_resume_kms(struct drm_device *dev)
int radeon_gpu_reset(... |
0f234f5fdca1e31c7a6333c3633edc653cf3e598 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: evergreen/ni big endian fixes (v2) | Problem Details:
Based on 6xx/7xx endian fixes from Cédric Cano.
v2: fix typo in shader
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index ffdc8332b76e..d270b3ff896b 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1192,7 +1192,11 @@ void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
... |
4eace7fdfa1f8ac2f0a833e12bd07eeb453ec9ef | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: 6xx/7xx big endian fixes | Problem Details:
agd5f: minor cleanups
Signed-off-by: Cédric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 650672a0f5ad..de88624d5f87 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2105,7 +2105,11 @@ static int r600_cp_load_microcode(struct radeon_device *rdev)
r600_cp_stop(rdev);
- WREG32(CP_RB... |
4589433c57bd34b7e49068549e07a43c8d41e39d | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: atombios big endian fixes | Problem Details:
agd5f: additional cleanups/fixes
Signed-off-by: Cédric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index dd4e3acf79c0..1bf61220a450 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -48,29 +48,29 @@ static void atombios_overscan_setup(struct drm_crtc *crtc,
switch... |
dee54c40a1a9898bcd156436a1d3524f530b5a90 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: 6xx/7xx non-kms endian fixes | Problem Details:
agd5f: minor cleanups
Signed-off-by: Cédric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/r600_blit.c b/drivers/gpu/drm/radeon/r600_blit.c
index ca5c29f70779..7f1043448d25 100644
--- a/drivers/gpu/drm/radeon/r600_blit.c
+++ b/drivers/gpu/drm/radeon/r600_blit.c
@@ -137,9 +137,9 @@ set_shaders(struct drm_device *dev)
ps = (u32 *) ((char *)dev->agp_buffer_map->hand... |
c9417bdd4c6b1b92a21608c07e83afa419c7bb62 | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix interlaced modes on dce4+ | Problem Details:
- set scaler table clears the interleave bit, need to
reset it in encoder quirks, this was already done for
pre-dce4.
- remove the interleave settings from set_base() functions
this is now handled in the encoder quirks functions, and
isn't technically part of the display base setup.
- rename evergreen_... | ```diff
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index b1537000a104..dd4e3acf79c0 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -995,9 +995,9 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_d... |
16f9fdcbcce74102bed9a4b7ccc1fb05b5dd6ca3 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46 | Problem Details:
The old code dereferenced a value, the new code just needs to pass
the ptr.
fixes an oops looking at files in debugfs.
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 1272e4b6a1d4..e5b2cf10cbf4 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -787,9 +787,9 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
radeon_mem_type... |
f7bee80945155ad0326916486dabc38428c6cdef | Analyze and fix the following issue in the Linux kernel code: md: Fix raid1->raid0 takeover | Problem Details:
Takeover raid1->raid0 not succeded. Kernel message is shown:
"md/raid0:md126: too few disks (1 of 2) - aborting!"
Problem was that we weren't updating ->raid_disks for that
takeover, unlike all the others.
Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@su... | ```diff
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 637a96855edb..75671dfee551 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev)
mddev->new_layout = 0;
mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */
... |
3088e3b4963d26d6f6f54987f595b974ed6d48d8 | Analyze and fix the following issue in the Linux kernel code: ASoC: WM8903: Fix mic detection enable logic | Problem Details:
The mic detection HW should be enabled when either mic or short detection
is required, not when only both are required.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org | ```diff
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 987476a5895f..017d99ceb42e 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1482,7 +1482,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
WM8903_MICDET_EINT | WM8903_MICSH... |
28d639f7bd2559e3d6dc10c0316d19154b28a2a4 | Analyze and fix the following issue in the Linux kernel code: ASoC: WM8903: Fix mic detection register definitions | Problem Details:
* There is no hysteresis enable field in the current datasheet.
* Mic detection threshold field is only 2 bits wide.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h
index b4a0db2307ef..1eeebd534f7e 100644
--- a/include/sound/wm8903.h
+++ b/include/sound/wm8903.h
@@ -17,13 +17,9 @@
/*
* R6 (0x06) - Mic Bias Control 0
*/
-#define WM8903_MICDET_HYST_ENA 0x0080 /* MICDET_HYST_ENA */
-#define WM... |
ab60707ffe9920b66b4fff5181b44b14cd091472 | Analyze and fix the following issue in the Linux kernel code: USB Network driver infrastructure: Fix leak when usb_autopm_get_interface() returns less than zero in kevent(). | Problem Details:
We'll leak the memory allocated to 'urb' in
drivers/net/usb/usbnet.c:kevent() when we 'goto fail_lowmem' and the 'urb'
variable goes out of scope while still completely unused.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index ed9a41643ff4..95c41d56631c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -931,8 +931,10 @@ fail_halt:
if (urb != NULL) {
clear_bit (EVENT_RX_MEMORY, &dev->flags);
status = usb_autopm_get_interface(dev->in... |
4451ef63e1a881eb275eb16dd1980491eea709de | Analyze and fix the following issue in the Linux kernel code: [SCSI] libata: fix eh locking | Problem Details:
The SCSI host eh_cmd_q should be protected by the host lock (not the
port lock). This probably doesn't matter that much at the moment,
since we try to serialise the add and eh pieces, but it might matter
in future for more convenient error handling. Plus this switches
libata to the standard eh patter... | ```diff
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 17a637877d03..fc3f339a8d3c 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -589,9 +589,14 @@ void ata_scsi_error(struct Scsi_Host *host)
struct ata_port *ap = ata_shost_to_port(host);
int i;
unsigned long flags;
+ L... |
b8784f77455124ceb4746e798f7aaf5b3b8a5406 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libata: fix locking for sas paths | Problem Details:
For historical reasons, libsas uses the scsi host lock as the ata port
lock, and libata always uses the ata host. For the old eh, this was
largely irrelevant since the two locks were never mixed inside the
code. However, the new eh has a case where it nests acquisition of
the host lock inside the por... | ```diff
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 897066761359..b935f3a2b010 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3747,7 +3747,7 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
return NULL;
ap->port_no = 0;
- ap->lock = shost->hos... |
f45437efff460aa033978180da88229c5fc68455 | Analyze and fix the following issue in the Linux kernel code: tlan: Fix bugs introduced by the last tlan cleanup patch | Problem Details:
Fix two bugs introduced by the commit
c659c38b2796578638548b77ef626d93609ec8ac ("tlan: Code cleanup:
checkpatch.pl is relatively happy now.") In that change,
TLAN_CSTAT_READY was considered as a bit mask containing a single bit
set while it was actually had two set instead.
Many thanks to Dan Carpente... | ```diff
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 0678e7e71f19..e48a80885343 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -1522,7 +1522,8 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int)
head_list = priv->tx_list + priv->tx_head;
head_list_phys = priv->tx_list... |
8ef395310852710bb4237d918bbac53b22622ef0 | Analyze and fix the following issue in the Linux kernel code: HID: hid-lcpower: fix key mapping | Problem Details:
I already got some feedback for this module, telling me red and blue keys are
exchanged. I checked it, and they are right. Due to my incorrect userspace
settings I missed this during my testing.
Signed-off-by: Chris Schlund <chrisschlund@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/hid/hid-lcpower.c b/drivers/hid/hid-lcpower.c
index 4bdbcf878544..c4fe9bd095b7 100644
--- a/drivers/hid/hid-lcpower.c
+++ b/drivers/hid/hid-lcpower.c
@@ -30,8 +30,8 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi,
switch (usage->hid & HID_USAGE) {
cas... |
04b6e153b64471ff43dde82b0122e67cf491f2f5 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_rdac: fix for lun_table update for rdac device handler | Problem Details:
During one of our testing, we noticed that mode select command sent
from the host did not have the lun_table updated.
Problem is root caused to the way lun table is updated. Lun table
update was done after the call to blk_rq_map_kern is made. This was
causing problem because kernel uses bounce buffer(... | ```diff
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 5be3ae15cb71..7d83a84442a7 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -281,11 +281,13 @@ static struct request *get_rdac_req(struct scsi_dev... |
bcfe42e98047f1935c5571c8ea77beb2d43ec19d | Analyze and fix the following issue in the Linux kernel code: [SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset | Problem Details:
There's a branch at the end of this function that
is supposed to normalize the return value with what
the mid-layer expects. In this one case, we get it wrong.
Also increase the verbosity of the INFO level printk
at the end of mptscsih_abort to include the actual return value
and the scmd->serial_numb... | ```diff
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 59b8f53d1ece..0d9b82a44540 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1873,8 +1873,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
}
out:
- printk(MYIOC_s_INFO_FMT "task a... |
1f6fe7cba1c0a817a8712d7fdd0ec1b4ddd4ea2f | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: fix use after free detected by SLUB poison | Problem Details:
This patch moves a large number of memory release paths inside of the
configfs callback target_core_hba_item_ops->release() called from
within fs/configfs/item.c: config_item_cleanup() context. This patch
resolves the SLUB 'Poison overwritten' warnings.
Signed-off-by: Nicholas A. Bellinger <nab@linux... | ```diff
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index e77001b16063..caf8dc18ee0a 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -1970,13 +1970,35 @@ static void target_core_dev_release(struct config_item *item)
{
st... |
e63af95888894af6ca4112dc90083d1dff0fec29 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage | Problem Details:
This patch fixes a bug introduced during the v4 control CDB emulation
refactoring that broke SCF_SCSI_CONTROL_SG_IO_CDB operation within
transport_map_control_cmd_to_task(). It moves the BUG_ON() into
transport_do_se_mem_map() after the TRANSPORT(dev)->do_se_mem_map()
RAMDISK_DR special case, and adds... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 28b6292ff298..32dc5163b5a0 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4827,6 +4827,8 @@ static int transport_do_se_mem_map(
return ret;
}
+
+ BUG_ON... |
7c2bf6e925c38b8e3358f5046971b0d6086ddcf8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage | Problem Details:
This patch fixes two bugs uncovered during testing with
slub_debug=FPUZ during module_exit() -> target_core_exit_configfs()
with release of configfs subsystem consumer default groups, namely how
this should be working with
fs/configfs/dir.c:configfs_unregister_subsystem() release logic for
struct confi... | ```diff
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 2764510798b0..1cb74d57ed5f 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -3178,8 +3178,7 @@ static void target_core_exit_configfs(void)
config_item_put(item);
... |
29fe609d124d6d7478d1241bb82dc2e00509f516 | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage | Problem Details:
This patch fixes a bug in core_update_device_list_for_node() where
individual demo-mode generated MappedLUN's UA + Persistent
Reservations metadata where being leaked, instead of falling through
and calling existing core_scsi3_ua_release_all() and
core_scsi3_free_pr_reg_from_nacl() at the end of
core_u... | ```diff
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 317ce58d426d..969d72785288 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -373,11 +373,11 @@ int core_update_device_list_for_node(
/*
* deve->se_lun_acl will be NULL... |
bc66552476d3faf706ea72f5a082df717ed6c30d | Analyze and fix the following issue in the Linux kernel code: [SCSI] target/iblock: Fix failed bd claim NULL pointer dereference | Problem Details:
This patch adds an explict check for struct iblock_dev->ibd_bd in
iblock_free_device() before calling blkdev_put(), which will otherwise hit
the following NULL pointer dereference @ ib_dev->ibd_bd when iblock_create_virtdevice()
fails to claim an already in-use struct block_device via blkdev_get_by_pat... | ```diff
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 34561350d5e8..67f0c09983c8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -220,8 +220,10 @@ static void iblock_free_device(void *p)
{
struct iblock_dev *ib_dev = p;
- ... |
3ae279d25954de47c704ca713a2711ac10fcd1ee | Analyze and fix the following issue in the Linux kernel code: [SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR | Problem Details:
blkdev_get_by_path() returns an ERR_PTR() or error and it doesn't return
a NULL. It looks like this bug would be easy to trigger by mistake.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <James.Bottomley@suse... | ```diff
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index c6e0d757e76e..34561350d5e8 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -154,7 +154,7 @@ static struct se_device *iblock_create_virtdevice(
bd = blkdev_get_by_path(ib... |
a361cc0025614fdd07f5f69aeeaa8075530870bc | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption | Problem Details:
If I create a scsi_debug device that is larger than 4GB, the multiplication of
(block * scsi_debug_sector_size) can produce a 64-bit value. Unfortunately,
the compiler sees two 32-bit quantities and performs a 32-bit multiplication,
thus truncating the bits above 2^32. This causes the wrong memory lo... | ```diff
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 7b310934efed..a6b2d72022fc 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1671,7 +1671,7 @@ static int do_device_access(struct scsi_cmnd *scmd,
unsigned long long lba, unsigned int num, int write)
{
i... |
acc1a921659561c4ea97eca6e3c2633adecbcd81 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Extending lport's roles for target if there is a registered target. | Problem Details:
Problem:
From initaitor machine, when queried role of target (other end of connection),
it is "initiator", hence SCSI-ml doesn't send any LUN Inquiry commands.
Fix:
If there is a registered target for FC_TYPE_FCP, extend lport's params
(capability) to be target as well, By default lport params are
I... | ```diff
diff --git a/drivers/scsi/libfc/fc_libfc.c b/drivers/scsi/libfc/fc_libfc.c
index 5e40dab8f919..b7735129f1f3 100644
--- a/drivers/scsi/libfc/fc_libfc.c
+++ b/drivers/scsi/libfc/fc_libfc.c
@@ -232,6 +232,25 @@ void fc_fill_reply_hdr(struct fc_frame *fp, const struct fc_frame *in_fp,
}
EXPORT_SYMBOL(fc_fill_repl... |
21b7b2f557f4b105a4b7d739671d1ce6b867d3e6 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: move logging macros into the local libfcoe.h header file | Problem Details:
libfcoe kernel module debug macros will used by the fcoe transport code
as well when later it gets added.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 625c6be25396..a4757ca2a4ed 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -44,6 +44,8 @@
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
+#include "libfcoe.h"
+
MODULE_AUTHOR("Open-FCoE.org");
MOD... |
6c8cc1c003cee1c4290f5d8c684912d60354056a | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: Enhanced exchange ID selection mechanism and fix related EMA selection logic. | Problem Details:
Problem:
In case of exchange responder case, EMA selection was defaulted to the
last EMA from EMA list (lport.ema_list). If exchange ID is selected
from offload pool and not setup DDP, resulting into incorrect
selection of EMA, and eventually dropping the packet because unable to
find exchange.
Fix:... | ```diff
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index a3d640289dcc..08bf5fa6afd4 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -2280,17 +2280,46 @@ void fc_exch_mgr_free(struct fc_lport *lport)
}
EXPORT_SYMBOL(fc_exch_mgr_free);
+/**
+ * fc_find_ema... |
55204909bb687c997d5601e9f24a25cf9e915d78 | Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: fix sparse static and non-ANSI warnings | Problem Details:
Fix sparse warning for non-ANSI function declaration.
Declare workqueue structs as static.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Robert Love <robert.w.love@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index d21367d3305f..e0b5b15c355b 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -38,7 +38,7 @@ u16 fc_cpu_mask; /* cpu mask for possible cpus */
EXPORT_SYMBOL(fc_cpu_mask);
static u16 fc_cpu_order; /* 2'... |
7287fb9114096503eddfffb7b2ed691c809a6106 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fcoe: Fix module reference count for vports | Problem Details:
vports are not grabbing module references but are
releasing them. This causes the module reference count
to decrement too many times and it wraps around past 0.
The solution is to do a module_put() in
fcoe_interface_release() so that the reference is only
released when the fcoe_interface is released. ... | ```diff
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 9f9600b67001..452b42169c48 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -356,10 +356,18 @@ static struct fcoe_interface *fcoe_interface_create(struct net_device *netdev,
struct fcoe_interface *fcoe;
int err;
... |
c954f8aed44686569347087a57c75c590ce2782d | Analyze and fix the following issue in the Linux kernel code: [SCSI] fnic: fix memory leak | Problem Details:
Fix memory leak arising due to incorrect freeing of allocated memory
for vnic stats when unregistering a vnic.
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Venkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-b... | ```diff
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c
index db710148d156..b576be734e2e 100644
--- a/drivers/scsi/fnic/vnic_dev.c
+++ b/drivers/scsi/fnic/vnic_dev.c
@@ -654,7 +654,7 @@ void vnic_dev_unregister(struct vnic_dev *vdev)
vdev->linkstatus_pa);
if (vdev->stats)
pci_free_c... |
7a1e9d829f8bd821466c5ea834ad6f378740d2be | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_hp_sw: fix deadlock in start_stop_endio | Problem Details:
The use of blk_execute_rq_nowait() implies __blk_put_request() is needed
in start_stop_endio() rather than blk_put_request() --
blk_finish_request() is called with queue lock already held.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de> | ```diff
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index e3916641e627..d0363c8fa348 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -225,7 +225,8 @@ static void start_stop_endio(struct request *req,... |
98cb7e4413d189cd2b54daf993a4667d9788c0bb | Analyze and fix the following issue in the Linux kernel code: [SCSI] megaraid_sas: Sanity check user supplied length before passing it to dma_alloc_coherent() | Problem Details:
The ioc->sgl[i].iov_len value is supplied by the ioctl caller, and can be
zero in some cases. Assume that's valid and continue without error.
Fixes (multiple individual reports of the same problem for quite a while):
http://marc.info/?l=linux-ide&m=128941801715301
http://bugs.debian.org/604627
http:... | ```diff
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e7c9b41def7b..b71caa3f44ea 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4609,6 +4609,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance... |
429305e4650c5d3395c21ca183455a3f3e3568af | Analyze and fix the following issue in the Linux kernel code: [SCSI] pm8001: simplify workqueue usage | Problem Details:
pm8001 manages its own list of pending works and cancel them on device
free. It is unnecessarily complex and has a race condition - the
works are canceled but not synced, so the work could still be running
during and after the data structures are freed.
This patch simplifies workqueue usage.
* A dri... | ```diff
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index d8db0137c0c7..18b6c55cd08c 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -1382,53 +1382,50 @@ static u32 mpi_msg_consume(struct pm8001_hba_info *pm8001_ha,
return MPI_IO_STATUS_BUSY... |
563585ec4bf1319f193c2f51682985bcae400cb4 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix race that could hang kthread_stop() | Problem Details:
There is a small race window in qla2x00_do_dpc() between
checking for kthread_should_stop() and going to sleep after
setting TASK_INTERRUPTIBLE. If qla2x00_free_device() is called
in this window, kthread_stop will wait forever because there
will be no one to wake up the process.
Fix by making sure we ... | ```diff
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index c194c23ca1fb..15ce69eaaf4d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3282,10 +3282,10 @@ qla2x00_do_dpc(void *data)
set_user_nice(current, -20);
+ set_current_state(TASK_INTERRUPTIBLE)... |
e44718318004a5618d1dfe2d080e2862532d8e5f | Analyze and fix the following issue in the Linux kernel code: jbd2: call __jbd2_log_start_commit with j_state_lock write locked | Problem Details:
On an SMP ARM system running ext4, I've received a report that the
first J_ASSERT in jbd2_journal_commit_transaction has been triggering:
J_ASSERT(journal->j_running_transaction != NULL);
While investigating possible causes for this problem, I noticed that
__jbd2_log_start_commit() is getting called... | ```diff
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 9e4686900f18..97e73469b2c4 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -473,7 +473,8 @@ int __jbd2_log_space_left(journal_t *journal)
}
/*
- * Called under j_state_lock. Returns true if a transaction commit was started.
+ * Called with ... |
e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d | Analyze and fix the following issue in the Linux kernel code: ext4: serialize unaligned asynchronous DIO | Problem Details:
ext4 has a data corruption case when doing non-block-aligned
asynchronous direct IO into a sparse file, as demonstrated
by xfstest 240.
The root cause is that while ext4 preallocates space in the
hole, mappings of that space still look "new" and
dio_zero_block() will zero out the unwritten portions. ... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 0c8d97b56f34..3aa0b72b3b94 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -848,6 +848,7 @@ struct ext4_inode_info {
atomic_t i_ioend_count; /* Number of outstanding io_end structs */
/* current io_end structure for async DIO write*/
ext4_io_end_t *cu... |
2892c15ddda6a76dc10b7499e56c0f3b892e5a69 | Analyze and fix the following issue in the Linux kernel code: ext4: make grpinfo slab cache names static | Problem Details:
In 2.6.37 I was running into oopses with repeated module
loads & unloads. I tracked this down to:
fb1813f4 ext4: use dedicated slab caches for group_info structures
(this was in addition to the features advert unload problem)
The kstrdup & subsequent kfree of the cache name was causing
a double fre... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 851f49b2f9d2..d1fe09aea73d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -342,10 +342,15 @@ static struct kmem_cache *ext4_free_ext_cachep;
/* We create slab caches for groupinfo data structures based on the
* superblock block size. There ... |
f590308536db432e4747f562b29e5858123938e9 | Analyze and fix the following issue in the Linux kernel code: timer debug: Hide kernel addresses via %pK in /proc/timer_list | Problem Details:
In the continuing effort to avoid kernel addresses leaking to
unprivileged users, this patch switches to %pK for
/proc/timer_list reporting.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Eugene Teo <eugeneteo@k... | ```diff
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 32a19f9397fc..3258455549f4 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -41,7 +41,7 @@ static void print_name_offset(struct seq_file *m, void *sym)
char symname[KSYM_NAME_LEN];
if (lookup_symbol_name((unsigne... |
24f9cdcbd743fd6adb8fb83688d8d86dcccde662 | Analyze and fix the following issue in the Linux kernel code: bridge: Fix timer typo that may render snooping less effective | Problem Details:
In a couple of spots where we are supposed to modify the port
group timer (p->timer) we instead modify the bridge interface
group timer (mp->timer).
The effect of this is mostly harmless. However, it can cause
port subscriptions to be longer than they should be, thus making
snooping less effective.
... | ```diff
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index fdbd41c76ec4..c558274051eb 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1178,7 +1178,7 @@ static int br_ip4_multicast_query(struct net_bridge *br,
if (timer_pending(&p->timer) ?
time_after(p->timer.e... |
6b0d6a9b4296fa16a28d10d416db7a770fc03287 | Analyze and fix the following issue in the Linux kernel code: bridge: Fix mglist corruption that leads to memory corruption | Problem Details:
The list mp->mglist is used to indicate whether a multicast group
is active on the bridge interface itself as opposed to one of the
constituent interfaces in the bridge.
Unfortunately the operation that adds the mp->mglist node to the
list neglected to check whether it has already been added. This
le... | ```diff
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index f701a21acb34..fdbd41c76ec4 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -719,7 +719,8 @@ static int br_multicast_add_group(struct net_bridge *br,
goto err;
if (!port) {
- hlist_add_head(&mp->mglist, &br... |
a4ca055fc3124e1b6aee6b491a157cd242ee5226 | Analyze and fix the following issue in the Linux kernel code: be2net: fix be_suspend/resume/shutdown | Problem Details:
> call pci msix disable in be_suspend
> call pci msix enable in be_resume
> stop worker thread in be_suspend
> start worker thread in be_resume
> stop worker thread in be_shutdown
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 824d42002787..7e83c06f913f 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -3023,6 +3023,7 @@ static int be_suspend(struct pci_dev *pdev, pm_message_t state)
struct be_adapter *adapter = pci_get_drvdata(... |
60964dd7087fa252c16022a7590e385294c5472a | Analyze and fix the following issue in the Linux kernel code: be2net: Fix broken priority setting when vlan tagging is enabled. | Problem Details:
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 277982babc11..8fa9a709d9fe 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -102,6 +102,7 @@ static void be_async_grp5_cos_priority_process(struct be_adapter *adapter,
{
if (evt->valid) {
adapter->vla... |
6bff57a7a6b97f2bf98cb96e56db1ec02a29d135 | Analyze and fix the following issue in the Linux kernel code: be2net: endianness fix in be_cmd_set_qos(). | Problem Details:
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index a179cc6d79f2..d3b671d9e027 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1868,8 +1868,8 @@ int be_cmd_set_qos(struct be_adapter *adapter, u32 bps, u32 domain)
OPCODE_COMMON_SET_QOS, sizeof(*req));
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.