id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
b9fa49a9a908407d9366b0e1e7222aee81a2df5b | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix vio build warnings | Problem Details:
arch/powerpc/kernel/vio.c:1034: warning: function declaration isnât a prototype
arch/powerpc/kernel/vio.c:1035: warning: function declaration isnât a prototype
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index ade8aeaa2e70..6952384cf89c 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1031,8 +1031,8 @@ void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) {}
static int vio_cmo_bus_probe(struct vio_dev *v... |
2325f0a0c3d76bb515f3312ab2b16afdbffcc594 | Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Clean up the hardware watchpoint support | Problem Details:
* CONFIG_BOOKE is selected by CONFIG_44x so we dont need both
* Fixed a few comments
* Go back to only using DBCR0_IDM to determine if we are using
debug resources.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ```diff
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 81c8324a4a3c..da52269aec1e 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -148,7 +148,7 @@ transfer_to_handler:
/* Check to see if the dbcr0 register is set up to debug. Use the
intern... |
784e2d76007f90d69341b95967160c4fb7829299 | Analyze and fix the following issue in the Linux kernel code: stop_machine: fix up ftrace.c | Problem Details:
Simple conversion.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4231a3dc224a..f6e3af31b403 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -587,7 +587,7 @@ static int __ftrace_modify_code(void *data)
static void ftrace_run_update_code(int command)
{
- stop_machine_run(__ftrace_modify_code... |
15bba37d62351749c3915add81f673b256952ee1 | Analyze and fix the following issue in the Linux kernel code: module: fix build warning with !CONFIG_KALLSYMS | Problem Details:
This patch fixed the warning:
CC kernel/module.o
/home/wangcong/Projects/linux-2.6/kernel/module.c:332: warning:
‘lookup_symbol’ defined but not used
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> | ```diff
diff --git a/kernel/module.c b/kernel/module.c
index d8b5605132a0..d861bd5b8c10 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -325,18 +325,6 @@ static unsigned long find_symbol(const char *name,
return -ENOENT;
}
-/* lookup symbol in given range of kernel_symbols */
-static const struct kernel_symb... |
5e745b041f2ccad63077118b40468521306f3962 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix small file fragmentation | Problem Details:
For small file block allocations, mballoc uses per cpu prealloc
space. Use goal block when searching for the right prealloc
space. Also make sure ext4_da_writepages tries to write
all the pages for small files in single attempt
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d1906d9a22de..7e91913e325b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2282,13 +2282,12 @@ static int ext4_da_writepages_trans_blocks(struct inode *inode)
static int ext4_da_writepages(struct address_space *mapping,
struct writeback_cont... |
16eb72956496594d023a7d7cd14a86404ad195ad | Analyze and fix the following issue in the Linux kernel code: ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC | Problem Details:
Fix ext4_has_free_blocks() to return 0 when we don't have enough space.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 1ae5004e93fc..e9fa960ba6da 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -1626,6 +1626,9 @@ ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi,
free_blocks =
percpu_counter_sum_and_set(&sbi->s_freeblocks_counter);
#endif
+ if (free... |
525f4ed8dcb72c71b306a78ecbf06f41d08fe441 | Analyze and fix the following issue in the Linux kernel code: ext4: journal credit fix for the delayed allocation's writepages() function | Problem Details:
Previous delalloc writepages implementation started a new transaction
outside of a loop which called get_block() to do the block allocation.
Since we didn't know exactly how many blocks would need to be allocated,
the estimated journal credits required was very conservative and caused
many issues.
Wit... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 5596b70efa20..b24d3c53f20c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1753,7 +1753,7 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
* When pass the actual path, the caller should calculate credits
* under i_data_s... |
f3bd1f3fa8ca7ec70cfd87aa94dc5e1a260901f2 | Analyze and fix the following issue in the Linux kernel code: ext4: journal credits reservation fixes for DIO, fallocate | Problem Details:
DIO and fallocate credit calculation is different than writepage, as
they do start a new journal right for each call to ext4_get_blocks_wrap().
This patch uses the helper function in DIO and fallocate case, passing
a flag indicating that the modified data are contigous thus could account
less indirect/... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 38e661b0ea88..295003241d3d 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1073,6 +1073,7 @@ extern void ext4_get_inode_flags(struct ext4_inode_info *);
extern void ext4_set_aops(struct inode *inode);
extern int ext4_writepage_trans_blocks(struct inode *... |
ee12b630687d510f6f4b6d4acdc4e267fd4adeda | Analyze and fix the following issue in the Linux kernel code: ext4: journal credits reservation fixes for extent file writepage | Problem Details:
This patch modified the writepage/write_begin credit calculation for
extent files, to use the credits caculation helper function.
The current calculation of how many index/leaf blocks should be
accounted is too conservetive, it always considered the worse case,
where the tree level is 5, and in the ca... | ```diff
diff --git a/fs/ext4/ext4_extents.h b/fs/ext4/ext4_extents.h
index 6c166c0a54b7..d33dc56d6986 100644
--- a/fs/ext4/ext4_extents.h
+++ b/fs/ext4/ext4_extents.h
@@ -216,7 +216,9 @@ extern int ext4_ext_calc_metadata_amount(struct inode *inode, int blocks);
extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *);... |
a02908f19c819aeec5e3dcf238adaa6deddd70b0 | Analyze and fix the following issue in the Linux kernel code: ext4: journal credits calulation cleanup and fix for non-extent writepage | Problem Details:
When considering how many journal credits are needed for modifying a
chunk of data, we need to account for the super block, inode block,
quota blocks and xattr block, indirect/index blocks, also, group bitmap
and group descriptor blocks for new allocation (including data and
indirect/index blocks). The... | ```diff
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 6c7924d9e358..38e661b0ea88 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1072,6 +1072,7 @@ extern void ext4_set_inode_flags(struct inode *);
extern void ext4_get_inode_flags(struct ext4_inode_info *);
extern void ext4_set_aops(struct inode *inode);
ex... |
c001077f4003fa75793bb62979baa6241dd8eb19 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix bug where we return ENOSPC even though we have plenty of inodes | Problem Details:
The find_group_flex() function starts with best_flex as the
parent_fbg_group, which happens to have 0 inodes free. Some of the
flex groups searched have free blocks and free inodes, but the
flex_freeb_ratio is < 10, so they're skipped. Then when a group is
compared to the current "best" flex group, i... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 655e760212b8..f344834bbf58 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -351,7 +351,7 @@ find_close_to_parent:
goto found_flexbg;
}
- if (best_flex < 0 ||
+ if (flex_group[best_flex].free_inodes == 0 ||
(flex_group[i].free_block... |
d015641734cde55d2fce48a6db3983c8a029fe05 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix ext4_dx_readdir hash collision handling | Problem Details:
This fixes a bug where readdir() would return a directory entry twice
if there was a hash collision in an hash tree indexed directory.
Signed-off-by: Eugene Dashevsky <eugene@ibrix.com>
Signed-off-by: Mike Snitzer <msnitzer@ibrix.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index d3d23d73c08b..ec8e33b45219 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -411,7 +411,7 @@ static int call_filldir(struct file * filp, void * dirent,
get_dtype(sb, fname->file_type));
if (error) {
filp->f_pos = curr_pos;
- info->extra_fname = fna... |
cd21322616c3af265d39bf15321d436e667a5dd1 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix delalloc release block reservation for truncate | Problem Details:
Ext4 will release the reserved blocks for delayed allocations when
inode is truncated/unlinked. If there is no reserved block at all, we
shouldn't need to do so. But current code still tries to release the
reserved blocks regardless whether the counters's value is 0.
Continue to do that causes the la... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 2d54c822c4c3..5e17d5f22a7e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1005,6 +1005,9 @@ static int ext4_indirect_calc_metadata_amount(struct inode *inode, int blocks)
*/
static int ext4_calc_metadata_amount(struct inode *inode, int blocks)
{
+... |
b4df2030858bde986cb6ff2e4b45945f84649e32 | Analyze and fix the following issue in the Linux kernel code: ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty | Problem Details:
We need to call ext4_discard_reservation() earlier in ext4_truncate(),
to avoid a BUG() in ext4_mb_return_to_preallocation(), which is called
(ultimately) by ext4_free_blocks(). So we must ditch the blocks on
i_prealloc_list before we start freeing the data blocks.
Signed-off-by: "Theodore Ts'o" <tyt... | ```diff
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a1c7d7623213..2d54c822c4c3 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3494,6 +3494,9 @@ void ext4_truncate(struct inode *inode)
* modify the block allocation tree.
*/
down_write(&ei->i_data_sem);
+
+ ext4_discard_reservation(inode);
+
/*... |
f3409f71a76838b1bc985f753eed787a3f17bc2c | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8549): mxl5007: Fix an error at include file | Problem Details:
mxl5007 was forcing for its compilation:
In file included from drivers/media/common/tuners/mxl5007t.c:25:drivers/media/common/tuners/mxl5007t.h:80:1: warning: "CONFIG_MEDIA_TUNER_MXL5007T" redefined
In file included from <command-line>:0:
./include/linux/autoconf.h:2782:1: warning: this is the locatio... | ```diff
diff --git a/drivers/media/common/tuners/mxl5007t.h b/drivers/media/common/tuners/mxl5007t.h
index a1ee3628b7ff..aa3eea0b5262 100644
--- a/drivers/media/common/tuners/mxl5007t.h
+++ b/drivers/media/common/tuners/mxl5007t.h
@@ -77,7 +77,6 @@ struct mxl5007t_config {
unsigned int clk_out_enable:1;
};
-#defin... |
31c9446993f412ecb7875e30bba4bc7f216ae016 | Analyze and fix the following issue in the Linux kernel code: nfs_remount oops when rebooting + possible fix | Problem Details:
Jeff, Trond,
The commit
48b605f83c920d8daa50e43fc2c7f718e04c7bfa (NFS: implement option checking
when remounting NFS filesystems (resend))
generate an Oops on my platform when rebooting while its root FS on
an NFS share (NFSv3, TCP) :
Unmounting local filesystems...done.
Unable to handle kernel NUL... | ```diff
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 1b94e3650f5c..9abcd2b329f7 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1718,9 +1718,9 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
* ones were explicitly specified. Fall back to legacy behavior and
* just return success.
... |
38413fd2d82b0e75ae0492518f1b80a5cfd81956 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8548): pwc: Fix compilation | Problem Details:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 835db149a3b1..74178754b39b 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -32,6 +32,7 @@
#include <linux/smp_lock.h>
#include <linux/version.h>
#include <linux/mutex.h>
+#include <linux/mm.h>
... |
429e90893c9ad2c266d541c94d6ca69a34a7701d | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8546): saa7146: fix read from uninitialized memory | Problem Details:
The offset field of the scatterlist entry *after* the last valid scatterlist
entry was used instead of the first scatterlist entry (as was the intention
of this code).
This worked fine until the kzalloc of the sglist was replaced with kmalloc
and sg_init_table only zeroed the exact needed length. Appa... | ```diff
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index acaddc15dadc..e8bc7abf2409 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -656,7 +656,7 @@ static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf ... |
ee56a4d3e39c2baafd06aaf26d975a7c9b05e3a2 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8544): gspca: probe/open race. | Problem Details:
The device is flagged present after it is registered. During that window calls
to open() that should work fail with -ENODEV. Reversing the order fixes
the race.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@fre... | ```diff
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index bc301bae0482..3a051c925ff6 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1758,6 +1758,7 @@ int gspca_dev_probe(struct usb_interface *intf,
memcpy(&gspca_dev->fops, &dev_fops, s... |
583323b9d2f624884a8c9563fb5a4d795f39ab07 | Analyze and fix the following issue in the Linux kernel code: x86: fix cpu hotplug on 32bit | Problem Details:
commit 3e9704739daf46a8ba6593d749c67b5f7cd633d2 ("x86: boot secondary
cpus through initial_code") causes the kernel to crash when a CPU is
brought online after the read only sections have been write
protected. The write to initial_code in do_boot_cpu() fails.
Move inital_code to .cpuinit.data section.... | ```diff
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index f67e93441caf..a7010c3a377a 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -456,9 +456,6 @@ is386: movl $2,%ecx # set MP
1:
#endif /* CONFIG_SMP */
jmp *(initial_code)
-.align 4
-ENTRY(initial_code)
- .long i... |
d3603341e2f3c39f017f8df4b1cd734aeb0d453b | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8540): em28xx-cards: Add Compro VideoMate ForYou/Stereo model | Problem Details:
Added Compro VideoMate ForYou/Stereo model (analog only)
Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
[dougsland@gmail.com: Solved conflicts with v4l-dvb devel tree]
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed... | ```diff
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 4126397a3ec8..57dfb2340181 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -57,3 +57,4 @@
56 -> Pinnacle Hybrid Pro (2) (em2882) ... |
59d07f1b705c466ea4eaca9c43d46be6d6a065a4 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8538): em28xx-cards: Add GrabBeeX+ USB2800 model | Problem Details:
Added GrabBeeX+ USB2800 model (analog only)
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Aron Szabo <aron@aron.ws>
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index ef0c3ddacae6..42be129609b7 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -19,3 +19,4 @@
18 -> Hauppauge WinTV HVR 900 (R2) (em2880) ... |
bfbcf034798b2ca45338cee5049b5694b7ddc865 | Analyze and fix the following issue in the Linux kernel code: lost sysctl fix | Problem Details:
try_attach() should walk into the matching subdirectory, not the first one...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Valdis.Kletnieks@vt.edu
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 911d846f0503..fe4713347275 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1680,43 +1680,45 @@ static __init int sysctl_init(void)
core_initcall(sysctl_init);
-static int is_branch_in(struct ctl_table *branch, struct ctl_table *table)
+static stru... |
c5b61d59a685b1227b8a994b52a9b0bd68dc8da8 | Analyze and fix the following issue in the Linux kernel code: Fix namespace issue with Hisax | Problem Details:
you can pull this git://git./linux/kernel/git/kkeil/ISDN-2.6 master
rename release_tei() to TEIrelease() because release_tei() was
already exported bei the old HiSax driver.
Signed-off-by: Karsten Keil <kkeil@suse.de> | ```diff
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index f5ad888ee71e..a7915a156c04 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -2030,7 +2030,7 @@ release_l2(struct layer2 *l2)
skb_queue_purge(&l2->down_queue);
ReleaseWin(l2);
if (test_bit(FLG_LAPD, &l... |
9fa0f6db3a201bef49f28e69f80802559a38586b | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8522): videodev2: Fix merge conflict | Problem Details:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index f7195351a1e7..e466bd54a50e 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -330,8 +330,8 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */
#define V... |
2b142900784c6e38c8d39fa57d5f95ef08e735d8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] extend the last_sector_bug flag to cover more sectors | Problem Details:
The last_sector_bug flag was added to work around a bug in certain usb
cardreaders, where they would crash if a multiple sector read included the
last sector. The original implementation avoids this by e.g. splitting an 8
sector read which includes the last sector into a 7 sector read, and a single
sec... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8e08d51a0f05..e5e7d7856454 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -375,6 +375,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq)
struct gendisk *disk = rq->rq_disk;
struct scsi_disk *sdkp;
sector_t block = rq-... |
f796804f01429b832e1e734c54f0f535b322c665 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8526): saa7146: fix VIDIOC_ENUM_FMT | Problem Details:
VIDIOC_ENUM_FMT should keep the index and type fields. Instead,
type was zeroed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index a5e62750eea3..acaddc15dadc 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -958,21 +958,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned... |
de1e575db21a341b77b296af7dd87f163ebf6020 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8525): fix a few assorted spelling mistakes. | Problem Details:
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
index a868b7ed75ff..be65a2fb3976 100644
--- a/drivers/media/video/videobuf-vmalloc.c
+++ b/drivers/media/video/videobuf-vmalloc.c
@@ -203,7 +203,7 @@ static int __videobuf_iolock (struct videobuf_queue* q,
return 0;... |
c52e4f5836cff0a70a25665f475cf5294c9fe5eb | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8521): gspca: Webcams with Sonix bridge and sensor ov7630 are VGA. | Problem Details:
This fixes a bug introduced in c503a6f8332a (thanks to Hans de Goede).
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 3db49a854fe2..e18748c5a14d 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -1194,7 +1194,7 @@ static __devinitdata struct usb_device_id device_table[] = {
SFCI(OV6650, F_GAI... |
353facd4ab5acc6e9d83985eec9ca17e5d0cb470 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8509): pvrusb2: fix device descriptions for HVR-1900 & HVR-1950 | Problem Details:
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index e3b051197087..88e175168438 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -330,7 +330,7 @@ static const char *pvr2_fw1_names_73xxx[]... |
531d83a3d39280d191e2b1f0b540dbad22731579 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8506): empress: fix control handling oops | Problem Details:
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 2ecfbd1b41fc..cd52d5be404d 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -329,6 +329,22 @@ static int empress_g_ext_ctrls(struct fi... |
1052efe0fc69130d9d6a44bc9ceecd229221d9a1 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (8505): saa7134-empress.c: fix deadlock | Problem Details:
ts_release() locked a mutex that videobuf_stop() also tried to obtain.
But ts_release() shouldn't hold that mutex at all.
Make empress_users atomic as well to prevent possible race condition.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> | ```diff
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 8b3f95167781..2ecfbd1b41fc 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -89,14 +89,14 @@ static int ts_open(struct inode *inode, s... |
2c3abab7c95295f319dc8899b74cbd60140fcdfb | Analyze and fix the following issue in the Linux kernel code: ipcomp: Fix warnings after ipcomp consolidation. | Problem Details:
net/ipv4/ipcomp.c: In function ‘ipcomp4_init_state’:
net/ipv4/ipcomp.c:109: warning: unused variable ‘calg_desc’
net/ipv4/ipcomp.c:108: warning: unused variable ‘ipcd’
net/ipv4/ipcomp.c:107: warning: ‘err’ may be used uninitialized in this function
net/ipv6/ipcomp6.c: In function ‘ipcomp6_init_state’:
... | ```diff
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index a42b64d040c4..38ccb6dfb02e 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -104,9 +104,7 @@ out:
static int ipcomp4_init_state(struct xfrm_state *x)
{
- int err;
- struct ipcomp_data *ipcd;
- struct xfrm_algo_desc *calg_desc;
+ int err = -EI... |
53cdb27a933e4032934cbda0b447cfc9943c0eac | Analyze and fix the following issue in the Linux kernel code: [ARM] Fix shared mmap when more than two maps of the same file exist | Problem Details:
The shared mmap code works fine for the test case, which only checked
for two shared maps of the same file. However, three shared maps
result in one mapping remaining cached, resulting in stale data being
visible via that mapping. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index fbfa26058442..a8ec97b4752e 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -37,7 +37,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte, entry;
- int... |
daf93dd55c48b65ab2f1907e0fc5ef994896c787 | Analyze and fix the following issue in the Linux kernel code: [ARM] fix VIPT/VIVT macro optimisations, add comments | Problem Details:
cacheflush.h was doing:
... VIVT only stuff
... VIPT only stuff
... VIVT or VIPT stuff
which is clearly bogus - we would only ever use the "VIVT or VIPT" case
when both VIVT and VIPT are not selected. Fix this.
Add comments to each case, including noting the impossibility of
correctly detecting the... | ```diff
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index 03cf1ee977b7..e68a1cbcc852 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -459,15 +459,19 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
#define __cacheid_vivt_asi... |
cc04454fa81e93b5f1b5133950331639d2f59f85 | Analyze and fix the following issue in the Linux kernel code: KVM: ppc: fix invalidation of large guest pages | Problem Details:
When guest invalidates a large tlb map, there may be more than one
corresponding shadow tlb maps that need to be invalidated. Use eaddr and eend
to find these shadow tlb maps.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <a... | ```diff
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
index 75dff7cfa814..5a5602da5091 100644
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -177,7 +177,8 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, u64 asid,
... |
5a00a5e7a3e013b2323f87c1b69ff9557eae5ec9 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix possible host kernel bug on lctl(g) handling | Problem Details:
The lctl(g) instructions require a specific alignment for the parameters.
The architecture requires a specification program check if these alignments
are not used. Enforcing this alignment also removes a possible host BUG,
since the get_guest functions check for proper alignment and emits a BUG.
Signe... | ```diff
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index f94da68a5c22..61236102203e 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -38,6 +38,9 @@ static int handle_lctlg(struct kvm_vcpu *vcpu)
if (base2)
useraddr += vcpu->arch.guest_gprs[base2];
+ if (useraddr &... |
f5e10b09a5f8fc40666c95fe0cd6bcc2b8f11437 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix instruction naming for lctlg | Problem Details:
Lets fix the name for the lctlg instruction...
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index 47a0b642174c..f94da68a5c22 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -20,7 +20,7 @@
#include "kvm-s390.h"
#include "gaccess.h"
-static int handle_lctg(struct kvm_vcpu *vcpu)
+static int handle_lctlg(stru... |
3cd612998f17d5b3588be7f4937720411d247ff6 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix program check on interrupt delivery handling | Problem Details:
The current interrupt handling on s390 misbehaves on an error case. On s390
each cpu has the prefix area (lowcore) for interrupt delivery. This memory
must always be available. If we fail to access the prefix area for a guest
on interrupt delivery the configuration is completely unusable. There is no
p... | ```diff
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 11230b0db957..2960702b4824 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -13,6 +13,7 @@
#include <asm/lowcore.h>
#include <asm/uaccess.h>
#include <linux/kvm_host.h>
+#include <linux/signal.h>
#include "kvm-... |
99e65c92f2bbf84f43766a8bf701e36817d62822 | Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix guest kconfig | Problem Details:
Cornelia Huck noticed that a modular virtio without kvm guest support
leads to a build error in the s390 virtio transport:
CONFIG_VIRTIO=m leads to
ERROR: "vmem_add_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined!
ERROR: "max_pfn" [drivers/s390/kvm/kvm_virtio.ko] undefined!
ERROR: "vmem_remove_map... | ```diff
diff --git a/drivers/s390/kvm/Makefile b/drivers/s390/kvm/Makefile
index 4a5ec39f9ca6..0815690ac1e0 100644
--- a/drivers/s390/kvm/Makefile
+++ b/drivers/s390/kvm/Makefile
@@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License (version 2 only)
# as published by the Free Software Foundation.
-... |
cab7a1eeeb007be309cd99cf14407261a72d2418 | Analyze and fix the following issue in the Linux kernel code: KVM: ia64: Fix irq disabling leak in error handling code | Problem Details:
There is a call to local_irq_restore in the normal exit case, so it would
seem that there should be one on an error return as well.
The semantic patch that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression l;
expression E,E1,E2;
@@
local_irq_save(l);
..... | ```diff
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 2672f4d278ac..7a37d06376be 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -125,9 +125,9 @@ void kvm_arch_hardware_enable(void *garbage)
PAGE_KERNEL));
local_irq_save(saved_psr);
slot = ia64_itr_entry(0x3, KV... |
5fdbcb9dd16f1e89ead127d3ee1a38e3a00cf1ea | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix undefined beaviour of EPT after reload kvm-intel.ko | Problem Details:
As well as move set base/mask ptes to vmx_init().
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f71151d999e4..2a69773e3b26 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3118,15 +3118,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
return ERR_PTR(-ENOMEM);
allocate_vpid(vmx);
- if (id == 0 && vm_... |
5ec5726a16245138f5d5305b00a752acb5730076 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix bypass_guest_pf enabling when disable EPT in module parameter | Problem Details:
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b918fc83435c..f71151d999e4 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3305,7 +3305,7 @@ static int __init vmx_init(void)
vmx_disable_intercept_for_msr(vmx_msr_bitmap, MSR_IA32_SYSENTER_ESP);
vmx_disable_intercept_for_msr(vmx_msr_bi... |
577bdc496614ced56d999bbb425e85adf2386490 | Analyze and fix the following issue in the Linux kernel code: KVM: Avoid instruction emulation when event delivery is pending | Problem Details:
When an event (such as an interrupt) is injected, and the stack is
shadowed (and therefore write protected), the guest will exit. The
current code will see that the stack is shadowed and emulate a few
instructions, each time postponing the injection. Eventually the
injection may succeed, but at that ... | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d087d9c4f2d9..2fa231923cf7 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1814,6 +1814,7 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva)
spin_unlock(&vcpu->kvm->mmu_lock);
return r;
}
+EXPORT_SYMBOL_GPL(kvm_mmu_un... |
536319afd1f25383009c0c88f6fb00104f49c178 | Analyze and fix the following issue in the Linux kernel code: ALSA: Allow to force model to intel-mac-v3 in snd_hda_intel (sigmatel). | Problem Details:
Currently, even if you pass model=intel-mac-v3 as a module parameter to
snd_hda_intel, the function patch_stac922x (patch_sigmatel.c) will still
try to auto-detect the model type. This is a problem on my MacBook Pro 1st
generation, which needs intel-mac-v3, but sometimes incorrectly reports
0x00000100 ... | ```diff
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 72aff61e7315..6f6d117ac7e2 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -1024,6 +1024,7 @@ Prior to version 0.9.0rc4 optio... |
b15ebe2616289da258f85b3ff142fca237ef9f59 | Analyze and fix the following issue in the Linux kernel code: ALSA: cs4232: fix crash during chip PNP detection | Problem Details:
The acard->wss pointer is uninitialized in this function
which leads to crash during chip PNP detection.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index dbe63db4bfd6..4d4b8ddc26ba 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -325,6 +325,7 @@ static int __devinit snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev)
static int __devinit snd_card_cs4232_pnp(int... |
d25ae38b7e005af03843833bbd811ffe8c5f8cb4 | Analyze and fix the following issue in the Linux kernel code: x86: add apic probe for genapic 64bit - fix | Problem Details:
intr_remapping_enabled get assigned later, so need to check that
in setup_apic_routing
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index b3ba969c50d2..6c9bfc9e1e95 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -16,6 +16,7 @@
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/hardirq.h>
+#include <linux/dmar.h>
#inc... |
852fef69c0d9510a28a70221cfddd004efa02552 | Analyze and fix the following issue in the Linux kernel code: fix for a memory leak in an error case introduced by fix for double free | Problem Details:
The fix NULLed a pointer without freeing it.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 832a5a4f3cb3..cd9a2e138c8b 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -651,15 +651,17 @@ static int ipaq_open(struct tty_struct *tty,
*/
kfree(port->bulk_in_buffer);
+ kfree(port->bulk_out_buffer);
+ /... |
732730d48dc777f6577a6e0fece42b860324998e | Analyze and fix the following issue in the Linux kernel code: m68k: gs: use tty_port fixes | Problem Details:
commit b5391e29f428d11755ca2c91074c6db6f5c69d7c ("gs: use tty_port")
forgot to update the m68k gs serial drivers.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/ser_a2232.c b/drivers/char/ser_a2232.c
index 4ba3aec9e1cd..7b0c35207d9b 100644
--- a/drivers/char/ser_a2232.c
+++ b/drivers/char/ser_a2232.c
@@ -192,7 +192,7 @@ static inline void a2232_receive_char(struct a2232_port *port, int ch, int err)
Maybe one could implement a more efficient ... |
78681ac08a611313595d13cafabae1183b71ef48 | Analyze and fix the following issue in the Linux kernel code: firmware: fix memmap printk format warnings | Problem Details:
Fix firmware/memmap printk format warnings:
drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'r... | ```diff
diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
index e23399c7f773..001622eb86f9 100644
--- a/drivers/firmware/memmap.c
+++ b/drivers/firmware/memmap.c
@@ -153,12 +153,14 @@ int __init firmware_map_add_early(resource_size_t start, resource_size_t end,
static ssize_t start_show(struct firmw... |
6a9436d0c3cbe8941b1acd5b0736d355295cad98 | Analyze and fix the following issue in the Linux kernel code: gpiolib: fix typo in comment | Problem Details:
This fixes an off-by-one error in a comment.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index a3034d20ebd5..c764a8fcb058 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -13,7 +13,7 @@
*
* While the GPIO programming interface defines valid GPIO numbers
* to be in the range 0..MAX_INT, this library... |
4e1e018ecc6f7bfd10fc75b3ff9715cc8164e0a2 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix RLIM_NOFILE handling | Problem Details:
* dup2() should return -EBADF on exceeded sysctl_nr_open
* dup() should *not* return -EINVAL even if you have rlimit set to 0;
it should get -EMFILE instead.
Check for orig_start exceeding rlimit taken to sys_fcntl().
Failing expand_files() in dup{2,3}() now gets -EMFILE remapped to -EBADF.
Conseque... | ```diff
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 3deec9887089..61d625136813 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -64,11 +64,6 @@ static int locate_fd(unsigned int orig_start, int cloexec)
struct fdtable *fdt;
spin_lock(&files->file_lock);
-
- error = -EINVAL;
- if (orig_start >= current->signal->rlim[RLI... |
3c333937ee3be114b181c4861188cfe8f6a59697 | Analyze and fix the following issue in the Linux kernel code: [PATCH] dup3 fix | Problem Details:
Al Viro notice one cornercase that the new dup3() code. The dup2()
function, as a special case, handles dup-ing to the same file
descriptor. In this case the current dup3() code does nothing at
all. I.e., it ingnores the flags parameter. This shouldn't happen,
the close-on-exec flag should be set i... | ```diff
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 9679fcbdeaa0..ce12a6885115 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -139,8 +139,13 @@ asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
if (!(file = fcheck(oldfd)))
goto out_unlock;
err = newfd;
- if (newfd == oldfd)
+ if (unlikely(n... |
b1da47e29e467f1ec36dc78d009bfb109fd533c7 | Analyze and fix the following issue in the Linux kernel code: [patch 3/4] fat: dont call notify_change | Problem Details:
The FAT_IOCTL_SET_ATTRIBUTES ioctl() calls notify_change() to change
the file mode before changing the inode attributes. Replace with
explicit calls to security_inode_setattr(), fat_setattr() and
fsnotify_change().
This is equivalent to the original. The reason it is needed, is that
later in the ser... | ```diff
diff --git a/fs/fat/file.c b/fs/fat/file.c
index c672df4036e9..8707a8cfa02c 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -15,6 +15,8 @@
#include <linux/writeback.h>
#include <linux/backing-dev.h>
#include <linux/blkdev.h>
+#include <linux/fsnotify.h>
+#include <linux/security.h>
int fat_generic_ioctl... |
9767d74957450da6365c363d69e3d02d605d7375 | Analyze and fix the following issue in the Linux kernel code: [patch 1/4] vfs: utimes: move owner check into inode_change_ok() | Problem Details:
Add a new ia_valid flag: ATTR_TIMES_SET, to handle the
UTIMES_OMIT/UTIMES_NOW and UTIMES_NOW/UTIMES_OMIT cases. In these
cases neither ATTR_MTIME_SET nor ATTR_ATIME_SET is in the flags, yet
the POSIX draft specifies that permission checking is performed the
same way as if one or both of the times was ... | ```diff
diff --git a/fs/attr.c b/fs/attr.c
index 966b73e25f82..765fc75fab3b 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -51,7 +51,7 @@ int inode_change_ok(struct inode *inode, struct iattr *attr)
}
/* Check for setting the inode time. */
- if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) {
+ if (ia_valid & (ATTR_M... |
a110343f0d6d41f68b7cf8c00b57a3172c67f816 | Analyze and fix the following issue in the Linux kernel code: [PATCH] fix MAY_CHDIR/MAY_ACCESS/LOOKUP_ACCESS mess | Problem Details:
* MAY_CHDIR is redundant - it's an equivalent of MAY_ACCESS
* MAY_ACCESS on fuse should affect only the last step of pathname resolution
* fchdir() and chroot() should pass MAY_ACCESS, for the same reason why
chdir() needs that.
* now that we pass MAY_ACCESS explicitly in all cases, LOOKUP_ACCESS can... | ```diff
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 48a7934cb950..fd03330cadeb 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -962,7 +962,7 @@ static int fuse_permission(struct inode *inode, int mask)
exist. So if permissions are revoked this won't be
noticed immediately, only after the attribute
... |
e6305c43eda10ebfd2ad9e35d6e172ccc7bb3695 | Analyze and fix the following issue in the Linux kernel code: [PATCH] sanitize ->permission() prototype | Problem Details:
* kill nameidata * argument; map the 3 bits in ->flags anybody cares
about to new MAY_... ones and pass with the mask.
* kill redundant gfs2_iop_permission()
* sanitize ecryptfs_permission()
* fix remaining places where ->permission() instances might barf on new
MAY_... found in mask.
The obvious ... | ```diff
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 7102824ba847..3cb6920ff30b 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -469,8 +469,6 @@ extern bool afs_cm_incoming_call(struct afs_call *);
extern const struct inode_operations afs_dir_inode_operations;
extern const struct file_operations... |
f7e6ced4061da509f737541ca4dbd44d83a6e82f | Analyze and fix the following issue in the Linux kernel code: [PATCH] allow delayed freeing of ctl_table_header | Problem Details:
Refcount the sucker; instead of freeing it by the end of unregistration
just drop the refcount and free only when it hits zero. Make sure that
we _always_ make ->unregistering non-NULL in start_unregistering().
That allows anybody to get a reference to such puppy, preventing its
freeing and reuse. I... | ```diff
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index c1e0cf408af9..956264d09ba0 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -957,6 +957,11 @@ extern void setup_sysctl_set(struct ctl_table_set *p,
struct ctl_table_set *parent,
int (*is_seen)(struct ctl_table_set *));
+... |
734550921e9b7ab924a43aa3d0bd4239dac4fbf1 | Analyze and fix the following issue in the Linux kernel code: [PATCH] beginning of sysctl cleanup - ctl_table_set | Problem Details:
New object: set of sysctls [currently - root and per-net-ns].
Contains: pointer to parent set, list of tables and "should I see this set?"
method (->is_seen(set)).
Current lists of tables are subsumed by that; net-ns contains such a beast.
->lookup() for ctl_table_root returns pointer to ctl_table_set ... | ```diff
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 24141b4d1a11..c1e0cf408af9 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -947,6 +947,16 @@ struct ctl_table;
struct nsproxy;
struct ctl_table_root;
+struct ctl_table_set {
+ struct list_head list;
+ struct ctl_table_set... |
d70b67c8bc72ee23b55381bd6a884f4796692f77 | Analyze and fix the following issue in the Linux kernel code: [patch] vfs: fix lookup on deleted directory | Problem Details:
Lookup can install a child dentry for a deleted directory. This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.
This isn't a big problem normally, since memory pressure or umount
will clear out the directory dentry an... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 01e67dddcc3d..3b26a240ade9 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -519,7 +519,14 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, s
*/
result = d_lookup(parent, name);
if (!result) {
- struct dentry * dentry = d_alloc(paren... |
6c3b8fc618905d7599dcc514c99ce4293d476f39 | Analyze and fix the following issue in the Linux kernel code: netns: fix ip_rt_frag_needed rt_is_expired | Problem Details:
Running recent kernels, and using a particular vpn gateway, I've been
having to edit my mails down to get them accepted by the smtp server.
Git bisect led to commit e84f84f276473dcc673f360e8ff3203148bdf0e2 -
netns: place rt_genid into struct net. The conversion from a != test
to rt_is_expired() put o... | ```diff
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e4ab0ac94f92..a507c5e27d0e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1502,7 +1502,7 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
rth->fl.iif != 0 ||
dst_metric_locked(&rth->u.dst, RTAX_MTU) ||
... |
93bc4e89c260d91576840c4881d1066d84ccd422 | Analyze and fix the following issue in the Linux kernel code: netfilter: fix double-free and use-after free | Problem Details:
As suggested by Patrick McHardy, introduce a __krealloc() that doesn't
free the original buffer to fix a double-free and use-after-free bug
introduced by me in netfilter that uses RCU.
Reported-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Tested-by: Dieter... | ```diff
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 9aa90a6f20e0..be6f1d40b66a 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -96,6 +96,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
/*
* Common kmalloc functions provided by all allocators
*/
+void * __m... |
f858b4869a9136dd28cc2ab37f8b89268cc99462 | Analyze and fix the following issue in the Linux kernel code: netfilter: ip{,6}tables_security: fix future section mismatch | Problem Details:
Currently not visible, because NET_NS is mutually exclusive with SYSFS
which is required by SECURITY.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/ipv4/netfilter/iptable_security.c b/net/ipv4/netfilter/iptable_security.c
index 2b472ac2263a..db6d312128e1 100644
--- a/net/ipv4/netfilter/iptable_security.c
+++ b/net/ipv4/netfilter/iptable_security.c
@@ -32,7 +32,7 @@ static struct
struct ipt_replace repl;
struct ipt_standard entries[3];
... |
deec9ae31e6079551ce9260d29a4cf83e5b19a83 | Analyze and fix the following issue in the Linux kernel code: atmel-mci: debugfs support | Problem Details:
Create additional files under the host's debugfs directory containing
additional host-specific debug information.
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> | ```diff
diff --git a/drivers/mmc/host/atmel-mci-regs.h b/drivers/mmc/host/atmel-mci-regs.h
index a9a5657706c6..26bd80e65031 100644
--- a/drivers/mmc/host/atmel-mci-regs.h
+++ b/drivers/mmc/host/atmel-mci-regs.h
@@ -82,6 +82,8 @@
# define MCI_OVRE ( 1 << 30) /* RX Overrun Error */
# define MCI_UNRE ( 1 << 31) /*... |
6edd8ee60ac9b974bd6ec3b1bcb2aab02762fa8c | Analyze and fix the following issue in the Linux kernel code: mmc: Export internal host state through debugfs | Problem Details:
When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug
containing information about an mmc host's internal state. Currently,
just a single file is created, "ios", which contains information about
the current operating parameters for the bus (clock speed, bus width,
etc.)
Host drivers ... | ```diff
diff --git a/drivers/mmc/core/Makefile b/drivers/mmc/core/Makefile
index 19a1a254a0c5..889e5f898f6f 100644
--- a/drivers/mmc/core/Makefile
+++ b/drivers/mmc/core/Makefile
@@ -12,3 +12,4 @@ mmc_core-y := core.o bus.o host.o \
sdio.o sdio_ops.o sdio_bus.o \
sdio_cis.o sdio_io.o sdio_irq.o
+mmc... |
c5d5e9c40fc6cabedd5fdc7441e6e9d37f5c9bba | Analyze and fix the following issue in the Linux kernel code: imxmmc: fix crash when no platform data is provided | Problem Details:
Don't crash if no platform data is provided.
In this case assume that card is present.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> | ```diff
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index 9cda12fba9aa..f61406da65d2 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -905,7 +905,8 @@ static void imxmci_check_status(unsigned long data)
{
struct imxmci_host *host = (struct imxmci_host *)data;
- if( h... |
5fc63dfba8a016caf832572aeaa90abef82f0ba0 | Analyze and fix the following issue in the Linux kernel code: imxmmc: fix platform resources | Problem Details:
Fixup platform resources handling.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> | ```diff
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index 77493339303b..9cda12fba9aa 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -901,26 +901,6 @@ static const struct mmc_host_ops imxmci_ops = {
.get_ro = imxmci_get_ro,
};
-static struct resource *platform_devi... |
322069c9df1fd4da269b2a57d78f753684962523 | Analyze and fix the following issue in the Linux kernel code: imxmmc: remove DEBUG definition | Problem Details:
Removed DEBUG #define #undef, because module is automaticaly
compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined.
Currently it just generates compiler warning about redefinition.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-... | ```diff
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index 5e880c0f1349..77493339303b 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -26,12 +26,6 @@
*
*/
-#ifdef CONFIG_MMC_DEBUG
-#define DEBUG
-#else
-#undef DEBUG
-#endif
-
#include <linux/module.h>
#include <l... |
a9906a19193db69ad0158f289f839edf8aaf103f | Analyze and fix the following issue in the Linux kernel code: tracehook: comment fixes | Problem Details:
This fixes some typos and errors in <linux/tracehook.h> comments.
No code changes.
Signed-off-by: Roland McGrath <roland@redhat.com> | ```diff
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 589f429619c9..b1875582c1a1 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -244,7 +244,7 @@ static inline int tracehook_prepare_clone(unsigned clone_flags)
* tracehook_finish_clone - new child created and being ... |
e84e954a72153ffd5630df6156720440b430c877 | Analyze and fix the following issue in the Linux kernel code: [ARM] PXA: squash warning in pxafb | Problem Details:
Fixes a warning about using the wrong type in pxafb.c
Signed-off-by: Ian Molton <spyro@f2s.com> | ```diff
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 2b707a8ce5de..69de2fed6c58 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1336,7 +1336,7 @@ static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi)
fbi->dma_buff_phys = fbi->map_dma;
fbi->palette_cpu = (u16 *)... |
aafe0ad81d7458b6c61eeb39068432683c70c9a9 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: PXA25x UDC - Fix warning during build | Problem Details:
Fixes an unterminated ' warning building PXA25X UDC.
Signed-off-by: Ian Molton <spyro@f2s.com> | ```diff
diff --git a/include/asm-arm/arch-pxa/pxa25x-udc.h b/include/asm-arm/arch-pxa/pxa25x-udc.h
index 840305916b6d..1b80a4805a60 100644
--- a/include/asm-arm/arch-pxa/pxa25x-udc.h
+++ b/include/asm-arm/arch-pxa/pxa25x-udc.h
@@ -2,7 +2,7 @@
#define _ASM_ARCH_PXA25X_UDC_H
#ifdef _ASM_ARCH_PXA27X_UDC_H
-#error You ... |
689796a141cea79d745a4689c65dd01c39e5e100 | Analyze and fix the following issue in the Linux kernel code: dsp56k: Fix BKL pushdown | Problem Details:
commit 236b8756a2b6f90498d45b2c36d43e5372f2d4b8 ("dsp56k: BKL pushdown")
removed the `struct inode *inode' parameter from dsp56k_ioctl(), but
forgot to update the use of `inode' in the first line of the function.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <t... | ```diff
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 19b88504e960..ca7c72a486b2 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -304,9 +304,9 @@ static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t co
}
static long dsp56k_ioctl(struct file *file, unsign... |
c9c5ced90abc22a94c96fa7db0e29c13483a6db0 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Additional NPIV corrections. | Problem Details:
Minor fixes addressing:
- rport managements during vport deletion.
- acquire proper physical-ha during qla24xx_abort_command() and
qla24xx_queuecommand()
- do not needlessly acquire the pha for non-NPIV capable ISPs.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bott... | ```diff
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index fcec43a32be3..7a4409ab30ea 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1177,6 +1177,11 @@ static int
qla24xx_vport_delete(struct fc_vport *fc_vport)
{
scsi_qla_host_t *vha = fc_vpo... |
3d164fb09bb5cb8a223eddf634fc0d355714fcfe | Analyze and fix the following issue in the Linux kernel code: [SCSI] ch: fix ch_remove oops | Problem Details:
The following commit causes ch_remove oops:
commit 24b42566c3fcbb5a9011d1446783d0f5844ccd45
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date: Fri May 16 17:55:12 2008 -0700
SCSI: fix race in device_create
There is a race from when a device is created with device_create() and
then the d... | ```diff
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index aa2011b64683..3c257fe0893e 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -930,6 +930,7 @@ static int ch_probe(struct device *dev)
if (init)
ch_init_elem(ch);
+ dev_set_drvdata(dev, ch);
sdev_printk(KERN_INFO, sd, "Attached scsi change... |
3dabec7175bc6d49e88748cf03951357e74496ca | Analyze and fix the following issue in the Linux kernel code: [SCSI] 3w-9xxx: add MSI support and misc fixes | Problem Details:
This patch for the 3w-9xxx scsi driver applies on top of the
BKL-pushdown changes in -git9.
This patch does the following:
- Increase max AENs drained to 256.
- Add MSI support and "use_msi" module parameter.
- Fix bug in twa_get_param() on 4GB+.
- Use pci_resource_len() for ioremap().
Signed-off-by... | ```diff
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 7045511f9ad2..b92c19bb6876 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -4,7 +4,7 @@
Written By: Adam Radford <linuxraid@amcc.com>
Modifications By: Tom Couch <linuxraid@amcc.com>
- Copyright (C) 2004-2007 Appl... |
52d7e861cc071688f5fa3ee1b6e94785adeff8db | Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Miscellaneous fixes | Problem Details:
Properly setup the size of the async event queue. This fixes a bug where async events
were not getting processed by the driver.
Setup target_id field in the driver's target struct so that target sysfs attributes
work for multiple targets.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-o... | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index f1e5fac1c1dd..1917acb9102e 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -1136,7 +1136,7 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
login_info->max_cmds = max_requests ... |
2d0da2a44e065a5bdd90bed2ebe0b9216c27f682 | Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Fix hang on module removal | Problem Details:
If certain ELS events are received during module removal, after the kthread
is stopped, the rmmod can hang. This fixes the ibmvfc driver so that ELS
events during rmmod are ignored by stopping all device activity prior to
killing the kthread and also changes reinitialization to not attempt a reinit
if ... | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 1781cec97fba..f1e5fac1c1dd 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -521,9 +521,10 @@ static void ibmvfc_set_host_action(struct ibmvfc_host *vhost,
static void ibmvfc_reinit_host(struct... |
b3c10489cb464b12a74dda65f826433f71f2c2e2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Target refcounting fixes | Problem Details:
Fix up some refcounting on the ibmvfc drivers internal target struct
when accessed through some sysfs attributes.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 8d393800f47e..1781cec97fba 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -854,39 +854,41 @@ static void ibmvfc_retry_host_init(struct ibmvfc_host *vhost)
}
/**
- * __ibmvfc_find_target - ... |
12265709ac6e197f4d40d9ec1fd3af97b4196a35 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_eh_prep_cmnd should save scmd->underflow | Problem Details:
This patch (as1116) fixes a bug in scsi_eh_prep_cmnd() and
scsi_eh_restore_cmnd(). These routines are supposed to save any
values they change and restore them later, but someone forgot to
save & restore scmd->underflow.
This fixes part of the problem reported in Bugzilla #9638.
[jejb: fix up rejecti... | ```diff
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index fc4b2d05f2e1..171b82d748cf 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -667,6 +667,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
ses->sdb = scmd->sdb;
ses->next_rq = scmd->r... |
765cbc6dad16b87724803e359d6be792ddf08614 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh: Implement common device table handling | Problem Details:
Instead of having each and every driver implement its own
device table scanning code we should rather implement a common
routine and scan the device tables there.
This allows us also to implement a general notifier chain
callback for all device handler instead for one per handler.
[sekharan: Fix rejec... | ```diff
diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c
index ab6c21cd9689..3f798171ed69 100644
--- a/drivers/scsi/device_handler/scsi_dh.c
+++ b/drivers/scsi/device_handler/scsi_dh.c
@@ -33,7 +33,7 @@ static struct scsi_device_handler *get_device_handler(const char *name)
... |
f27bac2761cab5a2e212dea602d22457a9aa6943 | Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: update index allocation and use ida instead of idr | Problem Details:
Update index allocation as follows.
* sd_index_idr is used only for ID allocation and mapping
functionality is not used. Use more memory efficient ida instead.
* idr and ida have their own locks inside them and don't need them for
operation. Drop it.
* index wasn't freed if probing failed afte... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 0c63947d8a9d..99dddcae7851 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -99,8 +99,7 @@ static void scsi_disk_release(struct device *cdev);
static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
static void sd_print_res... |
ecefe8a97577d6c1a68d14ab6fb19bce99448af2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix shared tag map tag allocation | Problem Details:
When drivers use a shared tag map we can end up with more requests
than tags, because the tag map is shost->can_queue tags and there
can be sdevs * sdev->queue_depth requests. In scsi_request_fn
if tag allocation fails we just drop down to just dequeueing the
tag without a tag. The problem is that driv... | ```diff
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 88d1b5f44e59..fe77ccacf319 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1497,6 +1497,21 @@ static void scsi_request_fn(struct request_queue *q)
}
spin_lock(shost->host_lock);
+ /*
+ * We hit this when the d... |
5d90027fb579eee41ec1b61f23195ed2fdd51da2 | Analyze and fix the following issue in the Linux kernel code: [SCSI] stex: fix queue depth setting | Problem Details:
We want to set the queue depth to something reasonable - not
the can_queue.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index f308a0308829..3790906a77d1 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -467,7 +467,7 @@ stex_slave_alloc(struct scsi_device *sdev)
/* Cheat: usually extracted from Inquiry data */
sdev->tagged_supported = 1;
- scsi_activate_tcq... |
d510d965e17a81d4d41c03a3927f6ef450b73ff5 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: fix queue depth setting | Problem Details:
We want to set the queue depth to something reasonable - not
the can_queue.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: David Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 5822dd595826..88bebb13bc52 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -46,6 +46,8 @@ MODULE_PARM_DESC(ql4xextended_error_logging,
int ql4_mod_unload = 0;
+#define QL4_DEF_QDEPTH 32
+
/*
... |
885ace9e2f120439043ffa1bb72a2fa1f3afc645 | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix shared tag map setup | Problem Details:
Currently qla4xxx and stex pass in their can_queue values into
scsi_activate_tcq because they wanted the tag map that large.
The problem with this is that it ends up also setting the queue
depth to that large value. All we want to do this in this case
is set the device queue depth and the other device ... | ```diff
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 36c92f961e15..5276e73c58fc 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -902,11 +902,20 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
-... |
626dcb1ee39aa1010c27df31970ff0ecfb287208 | Analyze and fix the following issue in the Linux kernel code: [SCSI] st: Move buffer pointer back when data could not be written. | Problem Details:
Move buffer pointer back when data could not be written. Bug found by
Mike Christie.
Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 4684cc716aa4..41b1f81b1651 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -17,7 +17,7 @@
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
*/
-static const char *verstr = "20080224";
+static const char *verst... |
e792121ec85672c1fa48f79d13986a3f4f56c590 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Correct overflow during dump-processing on large-memory ISP23xx parts. | Problem Details:
Total ram words can exceed a 16bit value on large-memory boards.
Safely extend to a 32bit width.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | ```diff
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index cbef785765cf..510ba64bc286 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -216,7 +216,7 @@ qla24xx_soft_reset(scsi_qla_host_t *ha)
static int
qla2xxx_dump_ram(scsi_qla_host_t *ha, uint32_t... |
3d1e412ac5570a669e1b1fc5fd0f6859250c3d76 | Analyze and fix the following issue in the Linux kernel code: video/console/stico{n,re}.c: make code static | Problem Details:
This patch makes the following needlessly global code static:
- sticon.c: sticonsole_init()
- sticore.c: struct default_sti
- sticore.c: sti_init_graph()
- sticore.c: sti_inq_conf()
- sticore.c: sti_rom_copy()
- sticore.c: sti_select_fbfont()
- sticore.c: sti_select_font()
- sticore.c: sti_get_... | ```diff
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index a11cc2fdd4cd..4055dbdd1b42 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -370,7 +370,7 @@ static const struct consw sti_con = {
-int __init sticonsole_init(void)
+static int __init stic... |
e286781d5f2e9c846e012a39653a166e9d31777d | Analyze and fix the following issue in the Linux kernel code: mm: speculative page references | Problem Details:
If we can be sure that elevating the page_count on a pagecache page will
pin it, we can speculatively run this operation, and subsequently check to
see if we hit the right page rather than relying on holding a lock or
otherwise pinning a reference to the page.
This can be done if get_page/put_page beh... | ```diff
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 83768df27806..f1936d51b458 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -576,6 +576,18 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags)
list_for_each_safe(elem, tmp, &list) {
cas_page_t *page = list_ent... |
8174c430e445a93016ef18f717fe570214fa38bf | Analyze and fix the following issue in the Linux kernel code: x86: lockless get_user_pages_fast() | Problem Details:
Implement get_user_pages_fast without locking in the fastpath on x86.
Do an optimistic lockless pagetable walk, without taking mmap_sem or any
page table locks or even mmap_sem. Page table existence is guaranteed by
turning interrupts off (combined with the fact that we're always looking
up the curre... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6b2debfabddc..6bdde845818e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -22,6 +22,7 @@ config X86
select HAVE_IDE
select HAVE_OPROFILE
select HAVE_IOREMAP_PROT
+ select HAVE_GET_USER_PAGES_FAST
select HAVE_KPROBES
select ARCH_WANT_OPTIO... |
21cc199baa815d7b3f1ace4be20b9558cbddc00f | Analyze and fix the following issue in the Linux kernel code: mm: introduce get_user_pages_fast | Problem Details:
Introduce a new get_user_pages_fast mm API, which is basically a
get_user_pages with a less general API (but still tends to be suited to
the common case):
- task and mm are always current and current->mm
- force is always 0
- pages is always non-NULL
- don't pass back vmas
This restricted API can be ... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d87a5a5fe87d..f3fd70d6029f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -833,6 +833,39 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
struct vm_area_struct **pprev, unsigned long start,
unsigned long end, unsigned lo... |
a0a8f5364a5ad248aec6cb705e0092ff563edc2f | Analyze and fix the following issue in the Linux kernel code: x86: implement pte_special | Problem Details:
Implement the pte_special bit for x86. This is required to support
lockless get_user_pages, because we need to know whether or not we can
refcount a particular page given only its pte (and no vma).
[hugh@veritas.com: fix a BUG]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Dave Kleikamp <shaggy@au... | ```diff
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 3e5dbc4195f4..04caa2f544df 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -18,6 +18,7 @@
#define _PAGE_BIT_UNUSED2 10
#define _PAGE_BIT_UNUSED3 11
#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
+#def... |
20d8b67c06fa5e74f44e80b0a0fd68c8327f7c6a | Analyze and fix the following issue in the Linux kernel code: relay: add buffer-only channels; useful for early logging | Problem Details:
Allows one to create and use a channel with no associated files. Files
can be initialized later. This is useful in scenarios such as logging in
early code, before VFS is up. Therefore, such channels can be created and
used as soon as kmem_cache_init() completed.
This is needed by kmemtrace to do tr... | ```diff
diff --git a/Documentation/filesystems/relay.txt b/Documentation/filesystems/relay.txt
index 094f2d2f38b1..510b722667ac 100644
--- a/Documentation/filesystems/relay.txt
+++ b/Documentation/filesystems/relay.txt
@@ -294,6 +294,16 @@ user-defined data with a channel, and is immediately available
(including in cr... |
7babe8db99d305340cf4828ce1f5a1481d5622ef | Analyze and fix the following issue in the Linux kernel code: Full conversion to early_initcall() interface, remove old interface | Problem Details:
A previous patch added the early_initcall(), to allow a cleaner hooking of
pre-SMP initcalls. Now we remove the older interface, converting all
existing users to the new one.
[akpm@linux-foundation.org: cleanups]
[akpm@linux-foundation.org: build fix]
[kosaki.motohiro@jp.fujitsu.com: warning fix]
[ko... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3260a5c42b91..adb8077dc463 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -292,7 +292,6 @@ extern void sched_show_task(struct task_struct *p);
#ifdef CONFIG_DETECT_SOFTLOCKUP
extern void softlockup_tick(void);
-extern void s... |
89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9 | Analyze and fix the following issue in the Linux kernel code: kexec jump: save/restore device state | Problem Details:
This patch implements devices state save/restore before after kexec.
This patch together with features in kexec_jump patch can be used for
following:
- A simple hibernation implementation without ACPI support. You can kexec a
hibernating kernel, save the memory image of original system and shutdow... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7ecb679f0130..6b2debfabddc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1282,9 +1282,10 @@ config CRASH_DUMP
config KEXEC_JUMP
bool "kexec jump (EXPERIMENTAL)"
depends on EXPERIMENTAL
- depends on KEXEC && PM_SLEEP && X86_32
+ depends on KE... |
f1d82698029b92a88f5500b99f66514b6dee2bc3 | Analyze and fix the following issue in the Linux kernel code: memstick: use fully asynchronous request processing | Problem Details:
Instead of using a separate thread to pump requests from block layer queue
to memstick, do so inline, utilizing the callback design of the memstick.
[akpm@linux-foundation.org: fix warnings]
Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off... | ```diff
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index 7162f772bbfb..a38005008a20 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -249,8 +249,11 @@ EXPORT_SYMBOL(memstick_next_req);
*/
void memstick_new_req(struct memstick_host *host)
{... |
b77899985bdfd85a8e5a6e485033a9b4713d2471 | Analyze and fix the following issue in the Linux kernel code: memstick: allow "set_param" method to return an error code | Problem Details:
Some controllers (Jmicron, for instance) can report temporal failure
condition during power-on. It is desirable to account for this using a
return value of "set_param" device method. The return value can also be
handy to distinguish between supported and unsupported device parameters
in run time.
[a... | ```diff
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index 61b98c333cb0..3c7d9a79c1ea 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -415,10 +415,14 @@ err_out:
return NULL;
}
-static void memstick_power_on(struct memstick_host *host)
+st... |
0147600172b4a5d261165d1aa5ef818d84da1557 | Analyze and fix the following issue in the Linux kernel code: tpm: Use correct data types for sizes in tpm_write() and tpm_read() | Problem Details:
Use the correct data types for the size parameters in tpm_write() and
tpm_read(). Note that rw_verify_area() makes sure that this bug cannot
be exploited to produce a buffer overrun.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Marcel Selhorst <tpm@selhorst.net>
Signed-off-by: Andrew Morto... | ```diff
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index f354d720b777..ae766d868454 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -1028,7 +1028,7 @@ ssize_t tpm_write(struct file *file, const char __user *buf,
size_t size, loff_t *off)
{
struct tpm_chip *chip = file->priv... |
ec288bd37e1925f513db40871bc46115cf7fb733 | Analyze and fix the following issue in the Linux kernel code: tpm: increase size of internal TPM response buffers | Problem Details:
This patch increases size of driver internal response buffers. Some TPM
responses defined in TCG TPM Specification Version 1.2 Revision 103 have
increased size and do not fit previously defined buffers. Some TPM
responses do not have fixed size, so bigger response buffers have to be
allocated. 200B ... | ```diff
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index e1fc193d9396..f354d720b777 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -580,91 +580,133 @@ void tpm_continue_selftest(struct tpm_chip *chip)
}
EXPORT_SYMBOL_GPL(tpm_continue_selftest);
+#define TPM_INTERNAL_RESULT_SI... |
1956a96de488feb05e95c08c9d5e80f63a4be2b1 | Analyze and fix the following issue in the Linux kernel code: x86 calgary: fix handling of devices that aren't behind the Calgary | Problem Details:
The calgary code can give drivers addresses above 4GB which is very bad
for hardware that is only 32bit DMA addressable.
With this patch, the calgary code sets the global dma_ops to swiotlb or
nommu properly, and the dma_ops of devices behind the Calgary/CalIOC2
to calgary_dma_ops. So the calgary cod... | ```diff
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 1eb86be93d7a..b67a4b1d4eae 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -37,6 +37,7 @@
#include <linux/delay.h>
#include <linux/scatterlist.h>
#include <linux/iommu-helper.h>
+
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.