id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4c6b8b4d62fb4cb843c32db71e0a8301039908f3
Analyze and fix the following issue in the Linux kernel code: x86: fix: s2ram + P4 + tsc = annoyance
Problem Details: s2ram recently became useful here, except for the kernel's annoying habit of disabling my P4's perfectly good TSC. [ 107.894470] CPU 1 is now offline [ 107.894474] SMP alternatives: switching to UP code [ 107.895832] CPU0 attaching sched-domain: [ 107.895836] domain 0: span 1 [ 107.895838] gro...
```diff diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c index 9125efe66a06..05d8f25de6ae 100644 --- a/arch/x86/kernel/tsc_sync.c +++ b/arch/x86/kernel/tsc_sync.c @@ -129,23 +129,23 @@ void __cpuinit check_tsc_sync_source(int cpu) while (atomic_read(&stop_count) != cpus-1) cpu_relax(); - /* -...
9484b1eb4d05957d3114dc63026448eb66106c06
Analyze and fix the following issue in the Linux kernel code: x86: fix make mrproper
Problem Details: Michael Opdenacker reported: For backward compatibility with earlier (< 2.6.24) kernels, arch/i386/boot/bzImage or arch/x86_64/boot/bzImage symbolic links to arch/x86/boot/bzImage are created when you build an x86 kernel. The arch/i386 or arch/x86_64 directories are then created for this only purpose....
```diff diff --git a/arch/x86/Makefile_32 b/arch/x86/Makefile_32 index 50394da2f6c1..f806ceccff7a 100644 --- a/arch/x86/Makefile_32 +++ b/arch/x86/Makefile_32 @@ -156,7 +156,8 @@ install: $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install archclean: - $(Q)rm -rf $(objtree)/arch/i386/boot + $(Q)rm -rf $...
37a47db8d7f0f38dac5acf5a13abbc8f401707fa
Analyze and fix the following issue in the Linux kernel code: x86: assign IRQs to HPET timers, fix
Problem Details: Looks like IRQ 31 is assigned to timer 3, even without the patch! I wonder who wrote the number 31. But the manual says that it is zero by default. I think we should check whether the timer has been allocated an IRQ before proceeding to assign one to it. Here is a patch that does this. Signed-off-by...
```diff diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 786aa227afdf..a3c56c9b8a02 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -117,7 +117,8 @@ int is_hpet_enabled(void) static void hpet_reserve_platform_timers(unsigned long id) { struct hpet __iomem *hpet = hpet_virt_addr...
e3f37a54f690d3e64995ea7ecea08c5ab3070faf
Analyze and fix the following issue in the Linux kernel code: x86: assign IRQs to HPET timers
Problem Details: The userspace API for the HPET (see Documentation/hpet.txt) did not work. The HPET_IE_ON ioctl was failing as there was no IRQ assigned to the timer device. This patch fixes it by allocating IRQs to timer blocks in the HPET. arch/x86/kernel/hpet.c | 13 +++++-------- drivers/char/hpet.c | 45 +++...
```diff diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 9ec2ab793042..786aa227afdf 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -117,8 +117,7 @@ int is_hpet_enabled(void) static void hpet_reserve_platform_timers(unsigned long id) { struct hpet __iomem *hpet = hpet_virt_addr...
efd9ac8630e89b9ee7ce64008bd7783952374f37
Analyze and fix the following issue in the Linux kernel code: time: fold __get_realtime_clock_ts() into getnstimeofday()
Problem Details: - getnstimeofday() was just a wrapper around __get_realtime_clock_ts() - Replace calls to __get_realtime_clock_ts() by calls to getnstimeofday() - Fix bogus reference to get_realtime_clock_ts(), which never existed Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: john stultz ...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index ab46ae8c062b..77680195cf84 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -82,13 +82,12 @@ static inline s64 __get_nsec_offset(void) } /** - * __get_realtime_clock_ts - Returns the time of day in a timespec +...
b10db7f0d2b589a7f88dc3026e150756cb437a28
Analyze and fix the following issue in the Linux kernel code: time: more timer related cleanups
Problem Details: I was confused by FSEC = 10^15 NSEC statement, plus small whitespace fixes. When there's copyright, there should be GPL. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 2f99ee206b95..9ec2ab793042 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -16,7 +16,8 @@ #define HPET_MASK CLOCKSOURCE_MASK(32) #define HPET_SHIFT 22 -/* FSEC = 10^-15 NSEC = 10^-9 */ +/* FSEC = 10^-15 + NSEC = 10^-9 *...
4c9dc6412247abf4972080c51cd16a58c4009c19
Analyze and fix the following issue in the Linux kernel code: time: timer cleanups
Problem Details: Small cleanups to tick-related code. Wrong preempt count is followed by BUG(), so it is hardly KERN_WARNING. Signed-off-by: Pavel Machek <pavel@suse.cz> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-...
```diff diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 1a21b6fdb674..d36ee2fd1a3b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -296,7 +296,7 @@ void tick_nohz_stop_sched_tick(void) /* Check, if the timer was already in the past */ if (hrtimer_active(&ts->sched_...
213eca7f4888e9817e8076cdab6b9f7295c181f6
Analyze and fix the following issue in the Linux kernel code: kobj: fix threshold_init_device/kobject_uevent_env oops
Problem Details: the logic in this function is just crazy. It's recursive, but we can circumvent the creation for the kobject and whole creation of the threshold_block if some conditions are met. That's why we see the allocate_threshold_blocks so many times in the callstack, yet only a few kobjects created. Then we ...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 753588755fee..073afa7dd89a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c @@ -450,7 +450,8 @@ recurse: if (err) goto out_free; - kobject_uevent(&b->kobj...
ec04b13f67be3c90b38c625f4b8bdfea54c1ff60
Analyze and fix the following issue in the Linux kernel code: lguest: Reboot support
Problem Details: Reboot Implemented (Prevent fd leak, fix style and fix documentation --RR) Signed-off-by: Balaji Rao <balajirrao@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 9b0e322118b5..86cac3e622ab 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -153,6 +153,9 @@ struct virtqueue void (*handle_output)(int fd, struct virtqueue *me); }; +/* Remember the arguments ...
7ea08093e0ccbad030188ded3cb082d8b8094d35
Analyze and fix the following issue in the Linux kernel code: lguest: fix drivers/lguest Makefile entry
Problem Details: Parts depend on CONFIG_LGUEST, not just CONFIG_LGUEST_GUEST Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/Makefile b/drivers/Makefile index 8cb37e3557d4..57fb1450560a 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -73,7 +73,7 @@ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_EDAC) += edac/ obj-$(CONFIG_MCA) += mca/ obj-$(CONFIG_EISA) += eisa/ -obj-$(CONFIG_LGUEST_GUEST) += lguest/ +ob...
149a051f82d2b3860fe32fa182dbc83a66274894
Analyze and fix the following issue in the Linux kernel code: as-iosched: fix double locking bug in as_merged_requests()
Problem Details: If the two requests belong to the same io context, we will attempt to lock the same lock twice. But swapping contexts is pointless in that case, so just check for rioc == nioc before doing the double lock and copy. Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jens Axboe <jens.axboe@oracle...
```diff diff --git a/block/as-iosched.c b/block/as-iosched.c index b201d16a7102..96036846a001 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1275,9 +1275,13 @@ static void as_merged_requests(struct request_queue *q, struct request *req, * Don't copy here but swap, because when anext is * removed...
6f23e3872cff238589f9bf39c71db2ea880c9a26
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a potential race between umount and nfs_access_cache_shrinker()
Problem Details: Thanks to Yawei Niu for spotting the race. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5ca762de88bf..476cb0f837fd 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1694,13 +1694,19 @@ int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask) restart: spin_lock(&nfs_access_lru_lock); list_for_each_entry(nfsi, &nfs_access_lru_list, access_cache...
e6f810759505bc86c009854b82cc495ffd8eb020
Analyze and fix the following issue in the Linux kernel code: NFS: Add an asynchronous delegreturn operation for use in nfs_clear_inode
Problem Details: Otherwise, there is a potential deadlock if the last dput() from an NFSv4 close() or other asynchronous operation leads to nfs_clear_inode calling the synchronous delegreturn. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index b03dcd8403f1..2dead8d1dd55 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -174,11 +174,11 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct return status; } -static int nfs_do_return_delegation(stru...
fc6014771bde8a215a9a4ea24b45f76afeb3c922
Analyze and fix the following issue in the Linux kernel code: NFS: Address memory leaks in the NFS client mount option parser
Problem Details: David Howells noticed that repeating the same mount option twice during an NFS mount request can result in orphaned memory in certain cases. Only the client_address and mount_server.hostname strings are initialized in the mount parsing loop, so those appear to be the only two pointers that might be wr...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 0d1bc61d0b68..22c49c02897d 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1006,12 +1006,14 @@ static int nfs_parse_mount_options(char *raw, string = match_strdup(args); if (string == NULL) goto out_nomem; + kfree(mnt->client_address); m...
65fdf7d264213a9a8de44f9a20e002a26c267a76
Analyze and fix the following issue in the Linux kernel code: NLM: Fix a bogus 'return' in nlmclnt_rpc_release
Problem Details: Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index b1a4dba443bc..b6b74a60e1eb 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -244,7 +244,7 @@ void nlm_release_call(struct nlm_rqst *call) static void nlmclnt_rpc_release(void *data) { - return nlm_release_call(data); + nlm_release_cal...
86d61d8638ddf9cdf87df26c7fa69b2804425fbe
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix up constant string declarations in struct rpcbind_args
Problem Details: ...and eliminate an unnecessary cast. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index b60fa92321a5..a6cd35883fa7 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -73,9 +73,9 @@ struct rpcbind_args { u32 r_vers; u32 r_prot; unsigned short r_port; - char * r_netid; - char r_addr[RPCBIND_MAXUADDRLEN...
bf4285e75c3272ad9bfdeb886d247962bb2985f8
Analyze and fix the following issue in the Linux kernel code: NFS: Fix minor mixed sign comparison in NFS client's write logic
Problem Details: Clean up: PAGE_CACHE_SIZE is unsigned, and nfs_pageio_init() takes a size_t. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/write.c b/fs/nfs/write.c index fbd64f2fa7f9..5ac5b27b639a 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -939,7 +939,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i static void nfs_pageio_init_write(struct nfs_pageio_descriptor *pgio, struct...
a661b77fc12a172edea4b709e37f8cd58a6bd500
Analyze and fix the following issue in the Linux kernel code: NFS: Fix use of copy_to_user() in idmap_pipe_upcall
Problem Details: The idmap_pipe_upcall() function expects the copy_to_user() function to return a negative error value if the call fails, but copy_to_user() returns an unsigned long number of bytes that couldn't be copied. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Mykleb...
```diff diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index c56fc7d5a46e..d93e071b900c 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -358,17 +358,15 @@ idmap_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg, char __user *dst, size_t buflen) { char *data = (char *)msg->data + msg->copied; - ssize_t m...
7df089952fca41cb336733e1167c0a25e5a025d8
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix use of copy_to_user() in gss_pipe_upcall()
Problem Details: The gss_pipe_upcall() function expects the copy_to_user() function to return a negative error value if the call fails, but copy_to_user() returns an unsigned long number of bytes that couldn't be copied. Can rpc_pipefs actually retry a partially completed upcall read? If not, then gss_pipe_upcall() s...
```diff diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 1f2d85e869c0..6dac38792288 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -472,16 +472,15 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg, char __user *dst, size_t buflen) {...
59dca3b28cb915745019d4f4c27d97b6b6ab12c6
Analyze and fix the following issue in the Linux kernel code: NFS: Fix the 'proto=' mount option
Problem Details: Currently, if you have a server mounted using networking protocol, you cannot specify a different value using the 'proto=' option on another mountpoint. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 03d9bed7849a..18fcb05a0707 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -100,6 +100,7 @@ struct nfs_client_initdata { const struct sockaddr *addr; size_t addrlen; const struct nfs_rpc_ops *rpc_ops; + int proto; }; /* @@ -138,6 +139,8 @@ sta...
ff052645c939b2fd8d467105adf98fa621cc244b
Analyze and fix the following issue in the Linux kernel code: NFS: Change nfs_find_client() to take "struct sockaddr *"
Problem Details: Adjust arguments and callers of nfs_find_client() to pass a "struct sockaddr *" instead of "struct sockaddr_in *" to support non-IPv4 addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Trond: Also fix up protocol version number argument...
```diff diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index bbf67f148ff9..9b6bbf1b9787 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -164,12 +164,11 @@ void nfs_callback_down(void) static int nfs_callback_authenticate(struct svc_rqst *rqstp) { - struct sockaddr_in *addr = svc_addr_in(rqstp); stru...
3f43c6667acb4e02962b2829a4d4ebb6b6e6f70e
Analyze and fix the following issue in the Linux kernel code: NFS: Address a couple of nits in nfs_follow_referral()
Problem Details: Clean up: fix an outdated block comment, and address a comparison between a signed and unsigned integer. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index dd5fef20c702..bd1b1617905d 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c @@ -114,10 +114,7 @@ static inline int valid_ipaddr4(const char *buf) * nfs_follow_referral - set up mountpoint when hitting a referral on moved error ...
9f6ad26d2abfd9a2ec4a34b934ca75c4239ab8cf
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix socket address handling in rpcb_clnt
Problem Details: Make sure rpcb_clnt passes the correct address length to rpc_create(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index f876e37d1972..c1310f796224 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -148,12 +148,13 @@ static void rpcb_wake_rpcbind_waiters(struct rpc_xprt *xprt, int status) } static struct rpc_clnt *rpcb_create(char *hostname, ...
322e2efe6224be5de2852a7fddfac5cf11317af3
Analyze and fix the following issue in the Linux kernel code: SUNRPC: temp var should match return type of xdr_skb_read_actor
Problem Details: The return type of xdr_skb_read_actor functions is size_t. This fixes a nit I unwittingly overlooked in commit dd456471. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index 97ac45f034d6..a661a3acb37e 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c @@ -72,7 +72,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct struct page **ppage = xdr->pages; unsigned int len, pglen ...
d4b37ff73540ab90bee57b882a10b21e2f97939f
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix an unnecessary implicit type cast in rpcrdma_count_chunks()
Problem Details: Nit: rl_nchunks is an unsigned integer, so pass it into rpcrdma_count_chunks() via an unsigned integer argument. This eliminates a harmless mixed sign comparison in rpcrdma_count_chunks() Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Thomas Talpey <Thomas.Talpey@netapp.com> Signed-off-by: T...
```diff diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 72c8eab30d9b..e55427f73dfe 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -552,7 +552,7 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst) * RDMA'd by server. See map at rpcrdma_create_chunks()! ...
67a391d72ca7efb387c30ec761a487e50a3ff085
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix TCP rebinding logic
Problem Details: Currently the TCP rebinding logic assumes that if we're not using a reserved port, then we don't need to reconnect on the same port if a disconnection event occurs. This breaks most RPC duplicate reply cache implementations. Also take into account the fact that xprt_min_resvport and xprt_max_resvport ...
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index abb40c140738..b5544514ee57 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1276,34 +1276,53 @@ static void xs_set_port(struct rpc_xprt *xprt, unsigned short port) } } +static unsigned short xs_get_srcport(struct sock_xprt *...
66af1e558538137080615e7ad6d1f2f80862de01
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Fix a race in xs_tcp_state_change()
Problem Details: When scheduling the autoclose RPC call, we want to ensure that we don't race against the test_bit() call in xprt_clear_locked(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 30b17b3bc1a9..6f524a9e7fd0 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -246,6 +246,7 @@ struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); void xprt_complete_rqst(struct rpc_task...
fccca7fc6aab4e6b519e2d606ef34632e4f50e33
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a sillyrename race...
Problem Details: Ensure that readdir revalidates its data cache after blocking on sillyrename. Also fix a typo in nfs_do_call_unlink(): swap the ^= for an |=. The result is the same, since we've already checked that the flag is unset, but it makes the code more readable. Signed-off-by: Trond Myklebust <Trond.Myklebus...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f697b5c74b7c..d9abdb1d6a2a 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -537,12 +537,6 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) lock_kernel(); - res = nfs_revalidate_mapping_nolock(inode, filp->f_mapping); - if (res < 0...
52bda2b5bab87c388848bbc0f4d28d04858d5a7d
Analyze and fix the following issue in the Linux kernel code: dlm: use dlm prefix on alloc and free functions
Problem Details: The dlm functions in memory.c should use the dlm_ prefix. Also, use kzalloc/kfree directly for dlm_direntry's, removing the wrapper functions. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c index 46754553fdcc..600bb1d1a9b6 100644 --- a/fs/dlm/dir.c +++ b/fs/dlm/dir.c @@ -49,7 +49,7 @@ static struct dlm_direntry *get_free_de(struct dlm_ls *ls, int len) spin_unlock(&ls->ls_recover_list_lock); if (!found) - de = allocate_direntry(ls, len); + de = kzall...
11b2498ba7c88343d91630d679c8f2aeb8d57c48
Analyze and fix the following issue in the Linux kernel code: dlm: don't print common non-errors
Problem Details: Change log_error() to log_debug() for conditions that can occur in large number in normal operation. Signed-off-by: David Teigland <teigland@redhat.com>
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 7bc6ad9299a2..63fe74df97c2 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -4258,7 +4258,7 @@ int dlm_recover_master_copy(struct dlm_ls *ls, struct dlm_rcom *rc) put_rsb(r); out: if (error) - log_print("recover_master_copy %d %x", error, rl->rl_lkid); + ...
6bd8fedaa16da1e24f38712ee759950d8c5f4f09
Analyze and fix the following issue in the Linux kernel code: dlm: bind connections from known local address when using TCP
Problem Details: A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want. In the case of the D...
```diff diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index e9923ca9c2d9..57728448f1b9 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -864,7 +864,7 @@ static void sctp_init_assoc(struct connection *con) static void tcp_connect_to_sock(struct connection *con) { int result = -EHOSTUNREACH; - struct so...
71f1cb05f773661b6fa98c7a635d7a395cd9c55d
Analyze and fix the following issue in the Linux kernel code: SELinux: Add warning messages on network denial due to error
Problem Details: Currently network traffic can be sliently dropped due to non-avc errors which can lead to much confusion when trying to debug the problem. This patch adds warning messages so that when these events occur there is a user visible notification. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by...
```diff diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b3c064744d32..81bfcf114484 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3443,6 +3443,11 @@ static int selinux_parse_skb(struct sk_buff *skb, struct avc_audit_data *ad, break; } + if (unlikely(ret)) + print...
9e97198dbf318be7958b57900d05b37c7e09ad7c
Analyze and fix the following issue in the Linux kernel code: splice: fix problem with atime not being updated
Problem Details: A bug report on nfsd that states that since it was switched to use splice instead of sendfile, the atime was no longer being updated on the input file. do_generic_mapping_read() does this when accessing the file, make splice do it for the direct splice handler. Signed-off-by: Jens Axboe <jens.axboe@or...
```diff diff --git a/fs/splice.c b/fs/splice.c index 0a0b79b01d05..1577a7391d23 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1031,7 +1031,11 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, goto out_release; } +done: pipe->nrbufs = pipe->curbuf = 0; + if (bytes > 0) + file_accesse...
e7d9dc9cfd9bcc9ca688fe7f94c0da7d0700bfe6
Analyze and fix the following issue in the Linux kernel code: cciss: fix bug in overriding ->data_len before completion
Problem Details: For BLOCK_PC requests, we need that length for completing the request. Andrew Vasquez <andrew.vasquez@qlogic.com> reported the following oops Hitting a consistent BUG() with recent Linus' linux-2.6.git: [ 12.941428] ------------[ cut here ]------------ [ 12.944874] kernel BUG at drivers/block/c...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index ef50068def88..855ce8e5efba 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2524,7 +2524,6 @@ after_error_processing: resend_cciss_cmd(h, cmd); return; } - cmd->rq->data_len = 0; cmd->rq->completion_data = cmd; blk_co...
7da975a231ae8c11593fd79d1083215321be213a
Analyze and fix the following issue in the Linux kernel code: Fix blktrace compile warning
Problem Details: request_queue_t is deprecated Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 06dadba349ac..cfc3147e5cf9 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h @@ -282,10 +282,10 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, __blk_add_trace(bt, from...
023ccde109b995bb99862bf9c87efd006b1d1885
Analyze and fix the following issue in the Linux kernel code: block: fix warning on compile with CONFIG_BLOCK
Problem Details: struct io_context was not defined, just add an empty forward decl. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 71e7a847dffc..e18d4192f6e8 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -825,6 +825,7 @@ static inline void exit_io_context(void) { } +struct io_context; static inline int put_io_context(struct io_context *ioc) { r...
9bf722598fcd51073974850ae026b44389430ecc
Analyze and fix the following issue in the Linux kernel code: xsysace: end request handling fix
Problem Details: In ace_fsm_dostate(), the variable 'i' was used only for passing sector size of the request to end_that_request_first(). So I removed it and changed the code to pass the size in bytes directly to __blk_end_request() Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 2c81465fd60c..78ebfffc77e3 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -483,7 +483,6 @@ static void ace_fsm_dostate(struct ace_device *ace) u32 status; u16 val; int count; - int i; #if defined(DEBUG) dev_db...
cd80d548594aae0ee915e01050279399cb14943b
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: fix braces at single statement blocks
Problem Details: This patch fixes a couple of warnings reported by checkpatch.pl. No functional changes introduced. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 92e6e2d7b7f3..dbe60eb55e29 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c @@ -114,7 +114,8 @@ static void malta_hw0_irqdispatch(void) irq = get_int(); if...
52b3fc04ba3289ffa42fac84bfa35ef2613fc917
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: else should follow close brace in malta_int.c
Problem Details: This patch fixes two errors reported by checkpatch.pl. No functional changes introduced. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index a2689129798a..2473a77cea60 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c @@ -329,8 +329,7 @@ void __init arch_init_irq(void) set_vi_handler(MSC01E_INT_CORE...
54bf038e2216212b1728861b1a15fc0cc1ad1d2e
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
Problem Details: The checkpatch.pl script reported a few warnings about header files. This patch fixes these warnings. Compile-tested using the default Malta config. No functional changes introduced. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 1b4b9c507e28..41eb2321c329 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c @@ -26,13 +26,13 @@ #include <linux/sched.h> #include <linux/slab.h> #include <lin...
1997267072d6bfadb37d336779e6122c2d44343d
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta, Atlas, Sead: remove an extern from .c files
Problem Details: This patch moves the "extern" declaration for the function mips_reboot_setup() from the board setup .c files to the header file include/asm-mips/mips-boards/generic.h. This fixes a warning produced by the checkpatch.pl script. No functional changes introduced. This was compile-tested by building the...
```diff diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index e405d112a067..5ce800420012 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c @@ -34,8 +34,6 @@ #include <asm/time.h> #include <asm/traps.h> -extern vo...
f80714966795ecfe6261509d0270d9761b07b462
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: fix oversized lines in malta_int.c
Problem Details: This patch fixes all "line over 80 characters" warnings found in arch/mips/mips-boards/malta/malta_int.c by the checkpatch.pl script. No functional changes introduced. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 6d371f4ac358..1b4b9c507e28 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c @@ -304,17 +304,25 @@ void __init arch_init_irq(void) case MIPS_REVISION_SCON_SOCIT...
af825586c04d5ab9871d3980db9a0aa23197789e
Analyze and fix the following issue in the Linux kernel code: [MIPS] Malta: use tabs not spaces
Problem Details: This patch fixes all "use tabs not spaces" warnings reported by the checkpatch.pl script on the board-specific files. No functional changes introduced. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 2483b4068e2d..6d371f4ac358 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c @@ -47,7 +47,7 @@ static DEFINE_SPINLOCK(mips_irq_lock); static inline int mips_pcib...
68efdb81c6c3b5c1df7169a4b460907198b19103
Analyze and fix the following issue in the Linux kernel code: [MIPS] IP22/IP28: fix extracting board/chip rev
Problem Details: Taken from Peter Fuersts IP28 patches Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/sgi/ioc.h b/include/asm-mips/sgi/ioc.h index f3e3dc9bb732..343ed15f8dc4 100644 --- a/include/asm-mips/sgi/ioc.h +++ b/include/asm-mips/sgi/ioc.h @@ -138,8 +138,8 @@ struct sgioc_regs { u8 _sysid[3]; volatile u8 sysid; #define SGIOC_SYSID_FULLHOUSE 0x01 -#define SGIOC_SYSID_BOA...
92b1e6a64a8d9d5ed3ec8797eed8b36e2164a410
Analyze and fix the following issue in the Linux kernel code: [MIPS] tlbex.c: cleanup debug code
Problem Details: Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 21bcf084882f..c298344fcb71 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -720,6 +720,22 @@ il_bgez(u32 **p, struct reloc **r, unsigned int reg, enum label_id l) i_bgez(p, reg, 0); } +/* + * For debug purposes. + */ +static inl...
20d60d9973c3b441902b0a3f4f6f7e7ade08f77d
Analyze and fix the following issue in the Linux kernel code: [MIPS] R4000/R4400 errata workarounds
Problem Details: This is the gereric part of R4000/R4400 errata workarounds. They include compiler and assembler support as well as some source code modifications to address the problems with some combinations of multiply/divide+shift instructions as well as the daddi and daddiu instructions. Changes included are...
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 12bf96334174..11bc17ce0ebf 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -91,6 +91,9 @@ config MACH_DECSTATION select BOOT_ELF32 select CEVT_R4K select CSRC_R4K + select CPU_DADDI_WORKAROUNDS if 64BIT + select CPU_R4000_WORKAROUNDS if 64...
9d2f0b7a3de28d06ba4011b835b9a7e772553f0d
Analyze and fix the following issue in the Linux kernel code: [MTD] [OneNAND] fix call to onenand_verify when writing subpages
Problem Details: Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
```diff diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index e5882b609cf1..799bb1bc3dbc 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -1431,7 +1431,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, } /* O...
8686c99875f3849047660a5b6d02438443f22ce7
Analyze and fix the following issue in the Linux kernel code: module: fix the module name length in param_sysfs_builtin
Problem Details: the original code use KOBJ_NAME_LEN for built-in module name length, that's defined to 20 in linux/kobject.h, but this is not enough appearntly, many module names are longer than this; #define KOBJ_NAME_LEN 20 another macro is MODULE_NAME_LEN defined in linux/module.h, I think this ...
```diff diff --git a/kernel/params.c b/kernel/params.c index 67f65ee7211d..42fe5e6126c0 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -376,8 +376,6 @@ int param_get_string(char *buffer, struct kernel_param *kp) extern struct kernel_param __start___param[], __stop___param[]; -#define MAX_KBUILD_MODNAME KOBJ...
efa5345e39d01deef349c120f55ac6b6eabe7457
Analyze and fix the following issue in the Linux kernel code: module: Fix gratuitous sprintf in module.c
Problem Details: Andrew sent an older version of this patch: we shouldn't use sprintf to copy a string. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/kernel/module.c b/kernel/module.c index 17314691d3cc..276abd7b7ff7 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -738,7 +738,7 @@ sys_delete_module(const char __user *name_user, unsigned int flags) mutex_lock(&module_mutex); } /* Store the name of the last unloaded module for diagnos...
a2da4052f1df6bc77749f84496fe731ab8b458f7
Analyze and fix the following issue in the Linux kernel code: module: Don't report discarded init pages as kernel text.
Problem Details: Current code could cause a bug in symbol_put_addr() if an arch used kmalloc module text: we might think the symbol belongs to the core kernel. The downside is that this might make backtraces through (discarded) init functions harder to read on some archs, but we already have that issue for modules and...
```diff diff --git a/kernel/extable.c b/kernel/extable.c index 7fe262855317..a26cb2e17023 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -46,7 +46,8 @@ int core_kernel_text(unsigned long addr) addr <= (unsigned long)_etext) return 1; - if (addr >= (unsigned long)_sinittext && + if (system_state == S...
b939e3766ec19eb556cb784c2faace253c6e1560
Analyze and fix the following issue in the Linux kernel code: ext4: Use the ext4_ext_actual_len() helper function
Problem Details: ext4 uses the high bit of the extent length to encode whether the extent is intialized or not. The helper function ext4_ext_get_actual_len should be used to get the actual length of the extent. This addresses the kernel bug documented here: http://bugzilla.kernel.org/show_bug.cgi?id=9732 kernel...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index ce9aa5860569..bc7081f1fbe8 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1029,7 +1029,7 @@ ext4_ext_search_left(struct inode *inode, struct ext4_ext_path *path, { struct ext4_extent_idx *ix; struct ext4_extent *ex; - int depth; + int dep...
dbf9d7da33f79302fb1e4d7c6b2f6598e8608e72
Analyze and fix the following issue in the Linux kernel code: ext4: fix uniniatilized extent splitting error
Problem Details: Fix bug reported by Dmitry Monakhov caused by lost error code Testcase: blksize = 0x1000; fd = open(argv[1], O_RDWR|O_CREAT, 0700); unsigned long long sz = 0x10000000UL; /* allocating big blocks chunk */ syscall(__NR_fallocate, fd, 0, 0UL, sz) /* grab all other available...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 0cffb59fff46..ce9aa5860569 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2373,9 +2373,10 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, ret = ext4_ext_convert_to_initialized(handle, inode, path, iblock, ...
3dbd0ede4d5320bd4c3cb914fec0595135b6d9a1
Analyze and fix the following issue in the Linux kernel code: ext4: Enable the multiblock allocator by default
Problem Details: Enable the multiblock allocator by default. Fix ext4_show_options() so if it is not enabled, the nomballoc option included in /proc/mounts. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3a51ffc47790..b60c34038bb8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -736,6 +736,8 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",nobh"); if (!test_opt(sb, EXTENTS)) seq_puts(seq, ",noextents");...
c549a95d40efd83fc054785dd1634e8b71fba890
Analyze and fix the following issue in the Linux kernel code: ext4: fix up EXT4FS_DEBUG builds
Problem Details: Builds with EXT4FS_DEBUG defined (to enable ext4_debug()) fail without these changes. Clean up some format warnings too. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com>
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 7ae223ed152f..80a4616c8244 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -1630,7 +1630,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, sbi = EXT4_SB(sb); es = EXT4_SB(sb)->s_es; - ext4_debug("goal=%lu.\n", goal); + e...
aa22df2cc84011808ad7227437ac8f0e01030480
Analyze and fix the following issue in the Linux kernel code: ext4: Fix ext4_show_options to show the correct mount options.
Problem Details: We need to look at the default value and make sure the mount options are not set via default value before showing them via ext4_show_options Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index aa22acd6eb06..64fc7f111734 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -665,18 +665,20 @@ static inline void ext4_show_quota_options(struct seq_file *seq, struct super_bl */ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)...
f5a7a6b0d9b6af7d46124ed3f6b3995225cb62d0
Analyze and fix the following issue in the Linux kernel code: jbd2: Fix assertion failure in fs/jbd2/checkpoint.c
Problem Details: Before we start committing a transaction, we call __journal_clean_checkpoint_list() to cleanup transaction's written-back buffers. If this call happens to remove all of them (and there were already some buffers), __journal_remove_checkpoint() will decide to free the transaction because it isn't (yet) ...
```diff diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 3fccde7ba008..7e958c86242f 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -602,15 +602,15 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) /* * There is one special case to worry about: if we have just pulled ...
36df53f4a3e445175fc1e9d7f433599482ec6d7f
Analyze and fix the following issue in the Linux kernel code: jbd2: Remove printk from J_ASSERT to preserve registers during BUG
Problem Details: Signed-off-by: Chris Snook <csnook@redhat.com> Cc: "Stephen C. Tweedie" <sct@redhat.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 06ef11457051..d5f7cff4cb28 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -256,17 +256,7 @@ typedef struct journal_superblock_s #include <linux/fs.h> #include <linux/sched.h> -#define JBD2_ASSERTIONS -#ifdef JBD2_ASSERTIONS -#de...
e7c95593001cb96ef5dd121a4523286c574c7133
Analyze and fix the following issue in the Linux kernel code: ext4: fix oops on corrupted ext4 mount
Problem Details: When mounting an ext4 filesystem with corrupted s_first_data_block, things can go very wrong and oops. Because blocks_count in ext4_fill_super is a u64, and we must use do_div, the calculation of db_count is done differently than on ext4. If first_data_block is corrupted such that it is larger than e...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1484a087bba0..32e3ecb35cd7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1997,6 +1997,17 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) if (EXT4_BLOCKS_PER_GROUP(sb) == 0) goto cantfind_ext4; + + /* ensure block...
07620f69eff6671fea6bd382c95709f757e33768
Analyze and fix the following issue in the Linux kernel code: ext4/super.c: fix #ifdef's (CONFIG_EXT4_* -> CONFIG_EXT4DEV_*)
Problem Details: Based on a report by Robert P. J. Day. Signed-off-by: Adrian Bunk <bunk@kernel.org>
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0931831537a2..1484a087bba0 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -706,7 +706,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",debug"); if (test_opt(sb, OLDALLOC)) seq_puts(seq, ",oldalloc");...
cb47dce79145d04634156fd18437e1e78af712e4
Analyze and fix the following issue in the Linux kernel code: ext4: Return after ext4_error in case of failures
Problem Details: This fix some instances where we were continuing after calling ext4_error. ext4_error call panic only if errors=panic mount option is set. So we need to make sure we return correctly after ext4_error call Reported by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.v...
```diff diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 9568a57c607c..ff3428e195b4 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -587,11 +587,13 @@ do_more: in_range(ext4_inode_bitmap(sb, desc), block, count) || in_range(block, ext4_inode_table(sb, desc), sbi->s_itb_per_group) || in_r...
fe7fdc37b5404afb068f928ceba7c3e591b501ca
Analyze and fix the following issue in the Linux kernel code: ext3: Fix the max file size for ext3 file system.
Problem Details: The max file size for ext3 file system is now calculated with hardcoded 4K block size. The patch fixes it to be calculated with the right block size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
```diff diff --git a/fs/ext3/super.c b/fs/ext3/super.c index cb14de1502c3..f3675cc630e9 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -1436,11 +1436,31 @@ static void ext3_orphan_cleanup (struct super_block * sb, static loff_t ext3_max_size(int bits) { loff_t res = EXT3_NDIR_BLOCKS; - /* This constant is ca...
902be4c5efe0289594c3acf43da40fe7ff0a138b
Analyze and fix the following issue in the Linux kernel code: ext2: Fix the max file size for ext2 file system.
Problem Details: The max file size for ext2 file system is now calculated with hardcoded 4K block size. The patch fixes it to be calculated with the right block size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 154e25f13d77..6abaf75163f0 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -680,11 +680,31 @@ static int ext2_check_descriptors (struct super_block * sb) static loff_t ext2_max_size(int bits) { loff_t res = EXT2_NDIR_BLOCKS; - /* This constant is ca...
1d03ec984ca41ba184822d1101babb3fa3e26c77
Analyze and fix the following issue in the Linux kernel code: ext4: Fix sparse warnings.
Problem Details: Fix sparse warnings related to static functions and local variables. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 68537229ee1c..754c0d36d162 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1088,7 +1088,7 @@ static ext4_lblk_t ext4_ext_next_leaf_block(struct inode *inode, * then we have to correct all indexes above. * TODO: do we need to correct tree in...
2aa9fc4c405467f6afbbb2162ff8afaced47d99b
Analyze and fix the following issue in the Linux kernel code: ext4: fixes block group number being set to a negative value
Problem Details: This patch fixes various places where the group number is set to a negative value. Signed-off-by: Avantika Mathur <mathur@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 64dea8689e1f..7b5cfa62b663 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -260,12 +260,14 @@ error_return: * For other inodes, search forward from the parent directory\'s block * group to find a free inode. */ -static ext4_group_t find_group_...
a72d7f834e1afa08421938d7eb06bd8e56b0e58c
Analyze and fix the following issue in the Linux kernel code: ext4: Avoid rec_len overflow with 64KB block size
Problem Details: With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry lenght. So we store 0xffff instead and convert value when read from / written to disk. The patch also converts some places to use ext4_next_entry() when we are changing them anyway. Signed-off-b...
```diff diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index f612bef98315..145a9c0c972d 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -67,7 +67,7 @@ int ext4_check_dir_entry (const char * function, struct inode * dir, unsigned long offset) { const char * error_msg = NULL; - const int rlen = le16_to_cpu(de->rec...
afc7cbca5bfd556c3e12d3acefbee5ab0cbd4670
Analyze and fix the following issue in the Linux kernel code: ext4: Support large blocksize up to PAGESIZE
Problem Details: This patch set supports large block size(>4k, <=64k) in ext4, just enlarging the block size limit. But it is NOT possible to have 64kB blocksize on ext4 without some changes to the directory handling code. The reason is that an empty 64kB directory block would have a rec_len == (__u16)2^16 == 0, and t...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1ca0f546c466..ab7010dde1b5 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1624,6 +1624,11 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) goto out_fail; } + if (!sb_set_blocksize(sb, blocksize)) { + printk(KERN_E...
6b11d8179d1c6e560edc02c40a53b65fde83bf3f
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix userspace ABI breakage in sysfs
Problem Details: The userspace ABI of ocfs2's internal cluster stack (o2cb) was broken by commit c60b71787982cefcf9fa09aa281fa8c4c685d557 "kset: convert ocfs2 to use kset_create". Specifically, the '/sys/o2cb' kset was moved to '/sys/fs/o2cb'. This breaks all ocfs2 tools and renders the filesystem unmountable. This ...
```diff diff --git a/fs/ocfs2/cluster/sys.c b/fs/ocfs2/cluster/sys.c index a4b07730b2e1..0c095ce7723d 100644 --- a/fs/ocfs2/cluster/sys.c +++ b/fs/ocfs2/cluster/sys.c @@ -64,7 +64,7 @@ int o2cb_sys_init(void) { int ret; - o2cb_kset = kset_create_and_add("o2cb", NULL, fs_kobj); + o2cb_kset = kset_create_and_add("o2...
85040bcb4643cba578839e953f25e2d1965d83d0
Analyze and fix the following issue in the Linux kernel code: [IPV6] ADDRLABEL: Fix double free on label deletion.
Problem Details: If an entry is being deleted because it has only one reference, we immediately delete it and blindly register the rcu handler for it, This results in oops by double freeing that object. This patch fixes it by consolidating the code paths for the deletion; let its rcu handler delete the object if it h...
```diff diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 38674121ae5f..a3c5a72218fd 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -106,6 +106,11 @@ static inline void ip6addrlbl_free(struct ip6addrlbl_entry *p) kfree(p); } +static void ip6addrlbl_free_rcu(struct rcu_head *h) +{ + ip...
3c582b30bc2592081e9b23e253ca098fa7d57dc2
Analyze and fix the following issue in the Linux kernel code: [PPP]: Sparse warning fixes.
Problem Details: Fix a bunch of warnings in PPP and related drivers. Mostly because sparse doesn't like it when the the function is only marked private in the forward declaration. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c index eb98b661efba..034c1c650bcb 100644 --- a/drivers/net/ppp_deflate.c +++ b/drivers/net/ppp_deflate.c @@ -206,7 +206,7 @@ static void z_comp_reset(void *arg) * Returns the length of the compressed packet, or 0 if the * packet is incompress...
6d834e04e596d6803cf1074a07fd67e7b5662f1b
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED]: act_api: fix netlink API conversion bug
Problem Details: Fix two invalid attribute accesses, indices start at 1 with the new netlink API. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/act_api.c b/net/sched/act_api.c index ebd21d2cb5f1..ae077ed208af 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -997,11 +997,11 @@ find_dump_kind(struct nlmsghdr *n) if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1), NLMSG_ALIGN(nla_len(tb1)), NULL) < 0) retur...
f5e5cb75539749960d7d35f8a7da29e2f4b96320
Analyze and fix the following issue in the Linux kernel code: [NET_SCHED]: sch_atm: fix format string warning
Problem Details: Fix format string warning introduces by the netlink API conversion: net/sched/sch_atm.c:250: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'int'. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index eb01aae117df..e58739153782 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -246,7 +246,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, if (!excess) return -ENOENT; } - pr_debug("atm_tc_change: type %d, ...
a88ee229253b31e3a844b30525ff77fbfe3111d3
Analyze and fix the following issue in the Linux kernel code: [IPV4] fib_trie: dump table in sorted order
Problem Details: It is easier with TRIE to dump the data traversal rather than interating over every possible prefix. This saves some time and makes the dump come out in sorted order. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index dab439b52672..2ea94ebe19f8 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -1908,67 +1908,71 @@ static int fn_trie_dump_fa(t_key key, int plen, struct list_head *fah, return skb->len; } -static int fn_trie_dump_plen(struct trie *t, ...
936722922f6d2366378de606a40c14f96915474d
Analyze and fix the following issue in the Linux kernel code: [IPV4] fib_trie: compute size when needed
Problem Details: Compute the number of prefixes when needed, rather than doing bookeeping. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 899210b3c6b7..1a9231fcebbf 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -143,12 +143,12 @@ struct trie_stat { unsigned int tnodes; unsigned int leaves; unsigned int nullpointers; + unsigned int prefixes; unsigned int nodesizes...
1008e0f7b9dd211f918e93090f615e8064aca900
Analyze and fix the following issue in the Linux kernel code: ath5k: use 3 instead of 0x00000003
Problem Details: reviewed beacon timer initialization with register traces from madwifi: what we are doing is correct :). one minor fix: use 3 instead of 0x00000003 - it's more readable. drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC Signed-off-by: Bruno Randolf <bruno@thinktube.com> Signed-off-b...
```diff diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index eb00818e8ce6..3a4bf4035a23 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c @@ -2605,10 +2605,8 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval) break; de...
1f7d87b0ecacefe4541c75901cbcf29efba42ca6
Analyze and fix the following issue in the Linux kernel code: b43: Fix MAC control and microcode init
Problem Details: This zeros out all microcode related memory before loading the microcode. This also fixes initialization of the MAC control register. The _only_ place where we overwrite the contents of the MAC control register is at the beginning of b43_chip_init(). All other places must do read() -> mask/set -> writ...
```diff diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 2e563662c9a2..88d2c15d3fbe 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -1778,9 +1778,20 @@ static int b43_upload_microcode(struct b43_wldev *dev) const __be32 *data; unsigned int i,...
247ae4492065ed73bf5f287e38cd4c54ce192b27
Analyze and fix the following issue in the Linux kernel code: ath5k: reset key cache after resume
Problem Details: Otherwise it may be impossible to connected to an open network after a resume. This is a modified version of an original patch by Alex Eskin <alexeskin@yahoo.com>: https://bugzilla.redhat.com/show_bug.cgi?id=425950#c8 Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 75e5970c0799..5ff115da91e3 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c @@ -604,7 +604,8 @@ ath5k_pci_resume(struct pci_dev *pdev) { struct ieee80211_hw *hw = pci_get_drvdata(pde...
61cb5dd6d1c81fbb5629f60db4e2a7faa7124b7a
Analyze and fix the following issue in the Linux kernel code: b43: Fix firmware caching
Problem Details: We must also store the ID string (filename) for the cached firmware blobs and verify that we really have the right firmware cached before using it. If we don't have the right fw cached, we must free it and request the correct blobs. This fixes bandswitch on A/B/G multi-PHY devices. Signed-off-by: Mic...
```diff diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index c7eea30aa949..32a24f5c4fa6 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h @@ -665,16 +665,23 @@ struct b43_wl { bool beacon1_uploaded; }; +/* In-memory representation of a cached microcode f...
71ebb4aac87e4a1504a155084d658d0a92ac63fb
Analyze and fix the following issue in the Linux kernel code: mac80211: fix rx flow sparse errors, make functions static
Problem Details: This patch adds static declarations to functions in the Rx flow in order to eliminate sparse errors Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index e7da1cde3abc..2019b4f0528d 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -1154,8 +1154,8 @@ end_no_lock: sta_info_put(sta); } -void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16...
c09c7237eadc65916305835ca1e3ee8a03f01159
Analyze and fix the following issue in the Linux kernel code: rc80211-pid: fix last_sample initialization
Problem Details: Fix last_sample initialization. kzalloc'ing the per-STA data wasn't enough, as jiffies can assume negative values as well. This fixes a bug which prevented correct PID operation for a while after booting. Thanks to Michael Buesch for reporting this. Reported-and-tested-by: Michael Buesch <mb@bu3sch.d...
```diff diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 962286d893d6..554c4baed6fb 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c @@ -496,6 +496,8 @@ static void *rate_control_pid_alloc_sta(void *priv, gfp_t gfp) if (spinfo == NULL) return NU...
f99b751fca5b16bea53c0d6724935e1949350052
Analyze and fix the following issue in the Linux kernel code: mac80211: fix RCU locking in __ieee80211_rx_handle_packet
Problem Details: Commit c7a51bda ("mac80211: restructure __ieee80211_rx") extracted __ieee80211_rx_handle_packet out of __ieee80211_rx and hence changed the locking rules for __ieee80211_rx_handle_packet(), it is now invoked under RCU lock. There is, however, one instance left where it contains an rcu_read_unlock() in ...
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 465fce0f62ad..96b0faf40b11 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1730,7 +1730,6 @@ void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct sk_buff *skb, ieee80211_invoke_rx_handlers(local, local->rx_handlers, &rx, ...
bfe6a50156ab0c33729378fae7038bce3c6c5184
Analyze and fix the following issue in the Linux kernel code: b43legacy: Remove the PHY spinlock
Problem Details: This fixes a sparse warning about weird locking. The spinlock is not needed, so simply remove it. This also adds some sanity checks to the PHY and radio locking to protect against recursive locking. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43legacy/b43legacy.h b/drivers/net/wireless/b43legacy/b43legacy.h index 8352a4e1cfc9..93419adb925e 100644 --- a/drivers/net/wireless/b43legacy/b43legacy.h +++ b/drivers/net/wireless/b43legacy/b43legacy.h @@ -415,7 +415,6 @@ struct b43legacy_phy { u8 calibrated:1; u8 radio_...
a8bdf29c6cd117644d27677962fe832b33036c77
Analyze and fix the following issue in the Linux kernel code: mac80211: Assign correct TID for local bridged packets
Problem Details: This patch assigns correct TID to frames transmitted between two stations in the same BSS in AP mode. The problem is that skb->protocol is not set to ETH_P_IP and it is wrong to use that field at this stage. The fix compares the LLC/Protocol headers explicitly to check if the encapsulated frame is IP f...
```diff diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 455fadc3d84e..024519522d37 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c @@ -28,6 +28,7 @@ struct ieee80211_sched_data struct sk_buff_head requeued[TC_80211_MAX_QUEUES]; }; +static const char llc_ip_hdr[8] = {0xAA, 0xAA, 0x3, 0, 0, 0, 0x...
61cf46ad581ba43073d3bcb0be549eb60fbbf9f8
Analyze and fix the following issue in the Linux kernel code: [IPV6] NDISC: Sparse: Use different variable name for local use.
Problem Details: Fix the following sparse warnings: | net/ipv6/ndisc.c:1300:21: warning: symbol 'opt' shadows an earlier one | net/ipv6/ndisc.c:1078:7: originally declared here Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
```diff diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index bdfc4ea61941..0d33a7d32125 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -1297,11 +1297,11 @@ skip_defrtr: } if (ndopts.nd_useropts) { - struct nd_opt_hdr *opt; - for (opt = ndopts.nd_useropts; - opt; - opt = ndisc_next_useropt...
5d5619b40c2474de01c64bdf6bb9f1211d3e967a
Analyze and fix the following issue in the Linux kernel code: [IPV6] ADDRCONF: Sparse: Make inet6_dump_addr() code paths more straight-forward.
Problem Details: Fix the following sparse warning: | net/ipv6/addrconf.c:3384:2: warning: context imbalance in 'inet6_dump_addr' - different lock contexts for basic block Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index aba7b5d52a9f..e40213db9e4c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3335,11 +3335,11 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ifa = ifa->if_next, ip_idx++) { if (ip_idx < s_ip_...
2334ecbdb27bd1745c0fc6d05cce09ed9585e4c1
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Sparse: Declare non-static ipv6_{route,icmp,frag}_sysctl_init() in header.
Problem Details: Fix the following sparse warnings: | net/ipv6/route.c:2491:18: warning: symbol 'ipv6_route_sysctl_init' was not declared. Should it be static? | net/ipv6/icmp.c:922:18: warning: symbol 'ipv6_icmp_sysctl_init' was not declared. Should it be static? | net/ipv6/reassembly.c:628:6: warning: symbol 'ipv6_fr...
```diff diff --git a/include/net/ipv6.h b/include/net/ipv6.h index c8e8cb241090..3712caeae74e 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -586,6 +586,10 @@ extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, int __user *optlen); #ifdef CONFIG_PROC_FS +extern struct ctl_table *ipv...
40fee36e11b49f92bc7c385bd45d7805c0127a34
Analyze and fix the following issue in the Linux kernel code: [IPV6] ADDRLABEL: Sparse: Make several functions static.
Problem Details: Fix following sparse warnings: | net/ipv6/addrlabel.c:172:25: warning: symbol 'ip6addrlbl_alloc' was not declared. Should it be static? | net/ipv6/addrlabel.c:219:5: warning: symbol '__ip6addrlbl_add' was not declared. Should it be static? | net/ipv6/addrlabel.c:260:5: warning: symbol 'ip6addrlbl_add' ...
```diff diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 6f1ca607edda..38674121ae5f 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -169,9 +169,9 @@ u32 ipv6_addr_label(const struct in6_addr *addr, int type, int ifindex) } /* allocate one entry */ -struct ip6addrlbl_entry *ip6addrlbl_a...
5e8b9df6e8786e4d5ee5ac951240cb2eaaac3014
Analyze and fix the following issue in the Linux kernel code: [IPV6] UDPLITE: Sparse: Declare non-static symbols in header.
Problem Details: Fix the following sparse warnings: | net/ipv6/udplite.c:45:14: warning: symbol 'udplitev6_prot' was not declared. Should it be static? | net/ipv6/udplite.c:80:12: warning: symbol 'udplitev6_init' was not declared. Should it be static? | net/ipv6/udplite.c:99:6: warning: symbol 'udplitev6_exit' was not ...
```diff diff --git a/net/ipv6/udp_impl.h b/net/ipv6/udp_impl.h index 2d3fda601232..21be3a83e7bc 100644 --- a/net/ipv6/udp_impl.h +++ b/net/ipv6/udp_impl.h @@ -5,6 +5,7 @@ #include <net/protocol.h> #include <net/addrconf.h> #include <net/inet_common.h> +#include <net/transp_v6.h> extern int __udp6_lib_rcv(struct...
77d0d350e96c9453be255d8eff8dc97555710b17
Analyze and fix the following issue in the Linux kernel code: [IPV6] UDP,UDPLITE: Sparse: {__udp6_lib,udp,udplite}_err() are of void.
Problem Details: Fix following sparse warnings: | net/ipv6/udp.c:262:2: warning: returning void-valued expression | net/ipv6/udplite.c:29:2: warning: returning void-valued expression Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
```diff diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index bf58acab2064..bd4b9df8f614 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -259,7 +259,7 @@ static __inline__ void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, int type, int code, int offset, __be32 info ) { - return __udp6_li...
fc80be87dca8968fa087aae81544ba3f86afdd50
Analyze and fix the following issue in the Linux kernel code: [IPV4] UDP,UDPLITE: Sparse: {__udp4_lib,udp,udplite}_err() are of void.
Problem Details: Fix following sparse warnings: | net/ipv4/udp.c:421:2: warning: returning void-valued expression | net/ipv4/udplite.c:38:2: warning: returning void-valued expression Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
```diff diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cb2411cb87da..ecd9d91b30c6 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -418,7 +418,7 @@ out: void udp_err(struct sk_buff *skb, u32 info) { - return __udp4_lib_err(skb, info, udp_hash); + __udp4_lib_err(skb, info, udp_hash); } /* diff --git a/net...
583c28e5645c464b57b4f5d3d53113c06bb0ac5f
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix driver phy_flags name space.
Problem Details: Prefix "bp->phy_flags" names with BNX2_PHY_FLAG_* for consistency. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5605d419128e..255197be35c1 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -296,7 +296,7 @@ bnx2_read_phy(struct bnx2 *bp, u32 reg, u32 *val) u32 val1; int i, ret; - if (bp->phy_flags & PHY_INT_MODE_AUTO_POLLING_FLAG) { + if (bp->phy_f...
dd329bfa96dd9dabfc3b5154317bf5fbe9440455
Analyze and fix the following issue in the Linux kernel code: [IPV4]: igmp sparse warnings
Problem Details: Partial sparse warning fix. The other conditional locking is too much for sparse to handle. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 285d26218a51..016cfdb184f3 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -2329,6 +2329,7 @@ static struct ip_mc_list *igmp_mc_get_idx(struct seq_file *seq, loff_t pos) } static void *igmp_mc_seq_start(struct seq_file *seq, loff_t *pos) + __acquire...
1402c8519acba215f5a6101b9e5ada07ab371273
Analyze and fix the following issue in the Linux kernel code: [VLAN]: sparse warning fix
Problem Details: Minor sparse warning fix. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 2a4e1aabb23b..a0ec47925597 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -220,6 +220,7 @@ static inline int is_vlan_dev(struct net_device *dev) /* start read of /proc/net/vlan/config */ static void *vlan_seq_start(struct seq_fi...
f86e82fb547efe05457391df069cce7ab530b181
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix driver software flag namespace.
Problem Details: Prefix "bnx2->flags" names with BNX2_* for consistency. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 65812870c5ac..5605d419128e 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -580,7 +580,7 @@ bnx2_alloc_mem(struct bnx2 *bp) /* Combine status and statistics blocks into one allocation. */ status_blk_size = L1_CACHE_ALIGN(sizeof(struct ...
1097f5e92107ca3950fabf5e1d724faa80c91e7f
Analyze and fix the following issue in the Linux kernel code: [BNX2]: Fix minor bug in bnx2_has_work().
Problem Details: It is more correct to get the status block from the bnx2_napi struct instead of the bnx2 struct. It happens that they are the same in this case because we are using the first MSIX vector. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 44734613ab37..18ed8068dc2d 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -2903,8 +2903,7 @@ bnx2_tx_msix(int irq, void *dev_instance) static inline int bnx2_has_work(struct bnx2_napi *bnapi) { - struct bnx2 *bp = bnapi->bp; - struct sta...
73738001ac8fb1d006157e9ce89458a135c7571f
Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/rt2x00/rt2x00usb.c: fix uninitialized var warning
Problem Details: Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index a52939aa38af..84e9bdb73910 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c @@ -419,7 +419,7 @@ int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev) struct s...
d2594d07abdbf49f9bd3df7e02708716de0f59e9
Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/iwlwifi/iwl-3945.c: fix printk warning
Problem Details: drivers/net/wireless/iwlwifi/iwl-3945.c: In function 'iwl3945_add_radiotap': drivers/net/wireless/iwlwifi/iwl-3945.c:269: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linvi...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 0779a23729e5..76c4ed1135f2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -265,7 +265,7 @@ void iwl3945_add_radiotap(struct iwl3945_priv *priv, struct sk_bu...
222b01b7fef6e7ebea9e76ce08a783571569797b
Analyze and fix the following issue in the Linux kernel code: b43legacy: fix use-after-free rfkill bug
Problem Details: Fix rfkill code which caused a use-after-free bug. Thanks to David Woodhouse for spotting this out. Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index 520910fd5c45..d178dfbb1c9f 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c @@ -141,8 +141,11 @@ void b43legacy_rfkill_init(struct b43legacy_wldev *dev) rfk->r...
61d30020dc2c49d36d95f3efb8b5ed727e459087
Analyze and fix the following issue in the Linux kernel code: libertas: pepper main with debug statement
Problem Details: libertas: re-pepper debug statementThe recent fluff of updates didn't put proper lbs_deb_enter/leave calls into the source code. Add them where appropriate. Also contains some whitespace changes. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tux...
```diff diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 8f3e661db986..84fb49ca0fae 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -388,6 +388,8 @@ static int lbs_dev_open(struct net_device *dev) struct lbs_private *priv = ...
ae3e0fcf901e4b7df87aef7ab39093e142a8de8b
Analyze and fix the following issue in the Linux kernel code: libertas cs/sdio: fix 'NOHZ: local_softirq_pending 08' message
Problem Details: netif_rx should be called only from interrupt context. if_cs and if_sdio receive packets from other contexts, and thus should call netif_rx_ni. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.co...
```diff diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 6332fd451a1e..149557a478ac 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c @@ -247,7 +247,10 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) priv->s...
8a1b02452862dd30980ad0ef493eed687bc81474
Analyze and fix the following issue in the Linux kernel code: iwlwifi: style fixes to usage of << and >> operators
Problem Details: The << and >> operators need space on each side. Cc: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h index 0c80ed5d7ea6..46bb2c7d11dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-commands.h @@ -508,8 +508,8 @@ struct iwl3945_qosparam_cmd {...