id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
06412088ce98f745405b8f65cfc51ddd6b842bbf
Analyze and fix the following issue in the Linux kernel code: ASoC: s3c2412-i2s: Fix dai registration
Problem Details: As s3c2412-i2s is using the s3c_i2sv2 it should call the more specialised s3c_i2sv2_register_dai instead of simply calling snd_soc_register_dai. Without this call the snd_soc_dai_ops structure isn't initialised correctly. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Mark Brown <broo...
```diff diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 72185078ddf8..79fbeea99d46 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -166,7 +166,7 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = { static __devinit int s3c2412_iis_dev_prob...
4f97615d19c370d1d907ef37f8bcd9c3672851ca
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a compile issue when CONFIG_NFS_V4_1 is undefined
Problem Details: struct nfs_direct_req can't compile when struct pnfs_ds_commit_info is undefined. Reported-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Fred Isaman <iisaman@netapp.com>
```diff diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index c940d46eb423..6deb8f097c42 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1176,6 +1176,11 @@ struct nfs41_free_stateid_res { struct nfs4_sequence_res seq_res; }; +#else + +struct pnfs_ds_commit_info { +}; + #endif...
fec6c20b570bcf541e581fc97f2e0cbdb9725b98
Analyze and fix the following issue in the Linux kernel code: efi: Validate UEFI boot variables
Problem Details: A common flaw in UEFI systems is a refusal to POST triggered by a malformed boot variable. Once in this state, machines may only be restored by reflashing their firmware with an external hardware device. While this is obviously a firmware bug, the serious nature of the outcome suggests that operating s...
```diff diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index d25599f2a3f8..891e4674d29b 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -191,6 +191,176 @@ utf16_strncmp(const efi_char16_t *a, const efi_char16_t *b, size_t len) } } +static bool +validate_device_path...
fa599c333d3d66846545026b41bcf36d1350fe30
Analyze and fix the following issue in the Linux kernel code: ARM: SPEAr3xx: Correct keyboard data passed from DT
Problem Details: keyboard data passed via DT is in wrong format. Fix it. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm/boot/dts/spear300-evb.dts b/arch/arm/boot/dts/spear300-evb.dts index eaecc29b9d81..6a79d69775b5 100644 --- a/arch/arm/boot/dts/spear300-evb.dts +++ b/arch/arm/boot/dts/spear300-evb.dts @@ -81,87 +81,87 @@ }; kbd@a0000000 { - linux,keymap = < 0x00010000 - 0x00020100 - ...
3ec5652ab70f6e9a888d9e5f67c858af354323b3
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: init with early_initcall, not arch_initcall
Problem Details: 1- Call dynamic_debug_init() from early_initcall, not arch_initcall. 2- Call dynamic_debug_init_debugfs() from fs_initcall, not module_init. RFC: This works for me on a 64 bit desktop and a i586 SBC, but is untested on other arches. I presume there is or was a reason original code used arch_initcall,...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index cfd84638b1a4..7ca29a0a3019 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1042,7 +1042,7 @@ out_err: return 0; } /* Allow early initialization for boot messages via boot param */ -arch_initcall(dynamic_debug_init); +early_initcall(...
29e36c9ffb696ed8d73e1aee713d483ec74a9a43
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: update Documentation/*, Kconfig.debug
Problem Details: In dynamic-debug-howto.txt: - add section: Debug Messages at Module Initialization Time - update flags indicators in example outputs to include '=' - make flags descriptions tabular - add item on '_' flag-char - add dyndbg, boot-args examples - rewrap some paragraphs with long lines In Kconfig.debug,...
```diff diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 74e6c7782678..6e1684981da2 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt @@ -2,17 +2,17 @@ Introduction ============ -This document describes how to use the dynam...
8e59b5cfb9a6f43753236b554d785e8efca62db7
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: add modname arg to exec_query callchain
Problem Details: Pass module name into ddebug_exec_queries(), ddebug_exec_query(), and ddebug_parse_query() as separate parameter. In ddebug_parse_query(), the module name is added into the query struct before the query-string is parsed. This allows the query-string to be shorter: instead of: $modname.dyndbg="mod...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 76da6aa66ce7..cfd84638b1a4 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -338,7 +338,7 @@ static int check_set(const char **dest, char *src, char *name) * Returns 0 on success, <0 on error. */ static int ddebug_parse_query(char *w...
4107692760db8160a65347f7bb2fa7fa7bf9b0d1
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: print ram usage by ddebug tables if verbose
Problem Details: Print ram usage of dynamic-debug tables and verbose section so user knows cost of enabling CONFIG_DYNAMIC_DEBUG. This only counts the size of the _ddebug tables for builtins and the __verbose section that they refer to, not those used in loadable modules. Signed-off-by: Jim Cromie <jim.cromie@gmail.c...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 66e0ec4d21f7..76da6aa66ce7 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -970,7 +970,8 @@ static int __init dynamic_debug_init(void) const char *modname = NULL; char *cmdline; int ret = 0; - int n = 0; + int n = 0, entries = 0, m...
af442399fcf378a21ffe924b182f6d9ee70001ca
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: simplify dynamic_debug_init error exit
Problem Details: We dont want errors while parsing ddebug_query to unload ddebug tables, so set success after tables are loaded, and return 0 after query parsing is done. Simplify error handling code since its no longer used for success, and change goto label to out_err to clarify this. Signed-off-by: Jim Cromie <jim...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 3b06f926d5b8..66e0ec4d21f7 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -984,7 +984,7 @@ static int __init dynamic_debug_init(void) if (strcmp(modname, iter->modname)) { ret = ddebug_add_module(iter_start, n, modname); if (...
6ab676e96422f33a873006096f928feeded7ce3b
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: combine parse_args callbacks together
Problem Details: Refactor ddebug_dyndbg_boot_param_cb and ddebug_dyndbg_module_param_cb into a common helper function, and call it from both. The handling of foo.dyndbg is unneeded by the latter, but harmless. The 2 callers differ only by pr_info and the return code they pass to the helper for when an unknown param i...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 09f2cda88058..3b06f926d5b8 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -862,39 +862,43 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, } EXPORT_SYMBOL_GPL(ddebug_add_module); -/* handle both dyndbg=".." and $module....
f0b919d967284313be4a767ba92ab5a88cb27410
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: deprecate ddebug_query, suggest dyndbg instead
Problem Details: With ddebug_dyndbg_boot_params_cb() handling bare dyndbg params, we dont need ddebug_query param anymore. Add a warning when processing ddebug_query= param that it is deprecated, and to change it to dyndbg= Add a deprecation notice for v3.8 to feature-removal-schedule.txt, and add a suggested depreca...
```diff diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 709e08e9a222..e458d2b2ae95 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -2,7 +2,14 @@ The following is a list of files and features that are g...
baa495d9de2af97310128bfc0e365a813b63d5bb
Analyze and fix the following issue in the Linux kernel code: x86/PCI: fix memleak with get_current_resources()
Problem Details: In pci_scan_acpi_root(), when pci_use_crs is set, get_current_resources() is used to get pci_root_info, and it will allocate name and resource array. Later if pci_create_root_bus() can not create bus (could be already there...) it will only free bus res list, but the name and res array is not freed. ...
```diff diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index ed2835e148b5..a99b7d75f5ca 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -315,49 +315,55 @@ static void add_resources(struct pci_root_info *info) } } +static void free_pci_root_info(struct pci_root_info *info) +{ + kfree(info->nam...
8a7dc4b04b22be285ea5bef7d01a02f91e30d562
Analyze and fix the following issue in the Linux kernel code: nfsd: fix nfs4recover.c printk format warning
Problem Details: Fix printk format warnings -- both items are size_t, so use %zu to print them. fs/nfsd/nfs4recover.c:580:3: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'size_t' fs/nfsd/nfs4recover.c:580:3: warning: format '%lu' expects type 'long unsigned int', but argument 4 has t...
```diff diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 4767429264a2..ed3f9206a0ee 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -577,7 +577,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) struct cld_net *cn = nn->cld_net; if (mlen != sizeof(*cms...
66f2c99af3d6f2d0aa1120884cf1c60613ef61c0
Analyze and fix the following issue in the Linux kernel code: mac80211: fix AP mode EAP tx for VLAN stations
Problem Details: EAP frames for stations in an AP VLAN are sent on the main AP interface to avoid race conditions wrt. moving stations. For that to work properly, sta_info_get_bss must be used instead of sta_info_get when sending EAP packets. Previously this was only done for cooked monitor injected packets, so this pa...
```diff diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 782a60198df4..e76facc69e95 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1158,7 +1158,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, tx->sta = rcu_dereference(sdata->u.vlan.sta); if (!tx->sta && sdata->dev->ieee80211_ptr...
b48420c1d3019ce8d84fb8e58f4ca86b8e3655b8
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: make dynamic-debug work for module initialization
Problem Details: This introduces a fake module param $module.dyndbg. Its based upon Thomas Renninger's $module.ddebug boot-time debugging patch from https://lkml.org/lkml/2010/9/15/397 The 'fake' module parameter is provided for all modules, whether or not they need it. It is not explicitly added to each module, but...
```diff diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index bf1b0fcc3c65..4697e4b59d6f 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -44,6 +44,9 @@ extern int ddebug_remove_module(const char *mod_name); extern __printf(2, 3) int __dynamic_pr_debug(struc...
9fb48c744ba6a4bf58b666f4e6fdac3008ea1bd4
Analyze and fix the following issue in the Linux kernel code: params: add 3rd arg to option handler callback signature
Problem Details: Add a 3rd arg, named "doing", to unknown-options callbacks invoked from parse_args(). The arg is passed as: "Booting kernel" from start_kernel(), initcall_level_names[i] from do_initcall_level(), mod->name from load_module(), via parse_args(), parse_one() parse_args() already has the "name" par...
```diff diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index ea36486378d8..1b14d25162cb 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -320,7 +320,8 @@ extern int parse_args(const char *name, unsigned num, s16 level_min, s16 level_max, - ...
1cebce36d660c83bd1353e41f3e66abd4686f215
Analyze and fix the following issue in the Linux kernel code: tcp: fix infinite cwnd in tcp_complete_cwr()
Problem Details: When the cwnd reduction is done, ssthresh may be infinite if TCP enters CWR via ECN or F-RTO. If cwnd is not undone, i.e., undo_marker is set, tcp_complete_cwr() falsely set cwnd to the infinite ssthresh value. The correct operation is to keep cwnd intact because it has been updated in ECN or F-RTO. S...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2a702e3a4ae6..d99efd7dfb6c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2868,11 +2868,14 @@ static inline void tcp_complete_cwr(struct sock *sk) /* Do not moderate cwnd if it's already undone in cwr or recovery. */ if (tp->...
05be18241e83d2ac6b656c8f924e74b3998c173f
Analyze and fix the following issue in the Linux kernel code: bpf jit: Let the powerpc jit handle negative offsets
Problem Details: Now the helper function from filter.c for negative offsets is exported, it can be used it in the jit to handle negative offsets. First modify the asm load helper functions to handle: - know positive offsets - know negative offsets - any offset then the compiler can be modified to explicitly use these...
```diff diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index af1ab5e9a691..5c3cf2d04e41 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h @@ -48,7 +48,13 @@ /* * Assembly helpers from arch/powerpc/net/bpf_jit.S: */ -extern u8 sk_load_word[], sk_load_half[], sk_load_byte...
518fbf9cdf17875d808596afd77fc115a6f942ca
Analyze and fix the following issue in the Linux kernel code: net: fix sk_sockets_allocated_read_positive
Problem Details: Denys Fedoryshchenko reported frequent crashes on a proxy server and kindly provided a lockdep report that explains it all : [ 762.903868] [ 762.903880] ================================= [ 762.903890] [ INFO: inconsistent lock state ] [ 762.903903] 3.3.4-build-0061 #8 Not tainted [ 762....
```diff diff --git a/include/net/sock.h b/include/net/sock.h index 188532ee88b6..5a0a58ac4126 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1129,9 +1129,9 @@ sk_sockets_allocated_read_positive(struct sock *sk) struct proto *prot = sk->sk_prot; if (mem_cgroup_sockets_enabled && sk->sk_cgrp) - retur...
3faa286055c02291dc9b6d838601dcb105a64a14
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: fix leading spaces in dynamic_debug.h
Problem Details: clean up some space-before-tabs problems. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 7e3c53a900d8..bf1b0fcc3c65 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -17,8 +17,8 @@ struct _ddebug { const char *format; unsigned int lineno:18; /* - * The flags field controls the be...
b8ccd5dee776d85e29cf139c77595b7369e294bc
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: replace if (verbose) pr_info with macro vpr_info
Problem Details: Use vpr_info to declutter code, reduce indenting, and change one additional pr_info call in ddebug_exec_queries. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 310c753cf83e..8675717c0f16 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -107,20 +107,22 @@ static char *ddebug_describe_flags(struct _ddebug *dp, char *buf, return buf; } -#define vpr_info_dq(q, msg) \ -do { \ - if (...
bb63f1f8a08cf8028564ad04831ebd7a8ffb9cba
Analyze and fix the following issue in the Linux kernel code: bridge: Fix fatal typo in setup of multicast_querier_expired
Problem Details: Unfortunately it seems that I didn't properly test the case of an expired external querier in the recent multicast bridge series. The setup of the timer in that case is completely broken and leads to a NULL-pointer dereference. This patch fixes it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org...
```diff diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 708e84f31888..5ca4c50ea233 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -744,8 +744,7 @@ static void br_multicast_local_router_expired(unsigned long data) static void br_multicast_querier_expired(unsigned lo...
880bca3a2a6f159d7453e0cbcbfe2f1d8204d907
Analyze and fix the following issue in the Linux kernel code: USB: cdc-wdm: add debug messages on cleanup
Problem Details: Device state cleanup is done in either wdm_disconnect or wdm_release depending on the order they are called. Adding a couple of debug messages to document the program flow. Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@lin...
```diff diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 650e1da4d2bf..4e8451ca2d6c 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -620,10 +620,12 @@ static int wdm_release(struct inode *inode, struct file *file) if (!desc->count) { dev_dbg(&desc->intf->de...
15ed103a98008d85f20956e0e29c2cae78051efe
Analyze and fix the following issue in the Linux kernel code: edac: Fix spelling errors.
Problem Details: Signed-off-by: David Mackey <tdmackey@twitter.com> Signed-off-by: Vinson Lee <vlee@twitter.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h index e48ab3108ad8..841bb2d7ce61 100644 --- a/drivers/edac/edac_core.h +++ b/drivers/edac/edac_core.h @@ -107,13 +107,13 @@ extern int edac_debug_level; * * CPU caches (L1 and L2) * DMA engines - * Core CPU swithces + * Core CPU switches *...
90449e5dee4800721a352af11ae4d65d4a56ba93
Analyze and fix the following issue in the Linux kernel code: qla1280: Remove redundant NULL check before release_firmware() call
Problem Details: release_firmware() checks for NULL pointers internally so checking before calling the function is redundant. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 6c6486f626ee..538230be5cca 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -4473,17 +4473,14 @@ qla1280_exit(void) pci_unregister_driver(&qla1280_pci_driver); /* release any allocated firmware images */ for (i = 0; i < ...
3cc6e78777ae6f577b67e26c76577ef357ac9009
Analyze and fix the following issue in the Linux kernel code: remoteproc: remove redundant NULL check before release_firmware()
Problem Details: release_firmware deals gracefully with NULL pointers, so checking first is redundant. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index ee15c68fb519..3d2884b0a4fc 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1105,8 +1105,7 @@ static void rproc_fw_config_virtio(const struct firmware *fw, void *context...
cf92549f1c95e0b1fd980828c35416dc2e548d2b
Analyze and fix the following issue in the Linux kernel code: qla2xxx: Remove redundant NULL check before release_firmware() call.
Problem Details: release_firmware() checks for NULL pointers internally so checking before calling it is redundant. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index a2f999273a5f..91b6fe6000eb 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4106,8 +4106,7 @@ qla2x00_release_firmware(void) mutex_lock(&qla_fw_lock); for (idx = 0; idx < FW_BLOBS; idx++) - ...
ee51f4432e375d07c29758e592c8c1ad1a343208
Analyze and fix the following issue in the Linux kernel code: aic94xx: Get rid of redundant NULL check before release_firmware() call
Problem Details: release_firmware() checks for NULL pointers internally, so checking before calling the function is redundant. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c index 390168f62a13..5fdca93892ad 100644 --- a/drivers/scsi/aic94xx/aic94xx_seq.c +++ b/drivers/scsi/aic94xx/aic94xx_seq.c @@ -1228,8 +1228,7 @@ static int asd_seq_start_lseq(struct asd_ha_struct *asd_ha, int lseq) int asd_re...
53c0ad522e215251f55623e80b921129aafa0d48
Analyze and fix the following issue in the Linux kernel code: tehuti: delete redundant NULL check before release_firmware()
Problem Details: release_firmware() checks for NULL pointers - no need to test before the call. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index ad973ffc9ff3..a445e777f086 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c @@ -341,8 +341,8 @@ static int bdx_fw_load(struct bdx_priv *priv) out: if (master) WRITE_RE...
e3c5530b96b9c5994cfb2544a037161790c4f7c3
Analyze and fix the following issue in the Linux kernel code: tg3: remove redundant NULL test before release_firmware() call
Problem Details: There is no need to test for a NULL pointer before calling release_firmware - the function does that on its own. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 062ac333fde6..9fbf73e41e30 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -15842,8 +15842,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) if (dev) { st...
b2cbf2e31bd26abaddcb1ce4cefb09e025247d52
Analyze and fix the following issue in the Linux kernel code: typhoon: get rid of redundant conditional before all to release_firmware()
Problem Details: There's no need to test for a NULL pointer before calling release_firmware() since the function does that check itself, so remove the redundant test. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c index 1234a14b2b73..b15366635147 100644 --- a/drivers/net/ethernet/3com/typhoon.c +++ b/drivers/net/ethernet/3com/typhoon.c @@ -2549,8 +2549,7 @@ typhoon_init(void) static void __exit typhoon_cleanup(void) { - if (typhoon_...
c69a6ca1a4e398e7e85cab792ddbd874d9335233
Analyze and fix the following issue in the Linux kernel code: radeon_cp: Remove unneeded tests for NULL before calling release_firmware()
Problem Details: release_firmware() does its own tests for NULL pointers so there's no need to explicitly test before calling it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 0ebb7d4796fa..ef67e181377b 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -1827,14 +1827,10 @@ void radeon_do_release(struct drm_device * dev) r600_do_cleanup_cp(dev); e...
cd0f8911c5d0cc04763f87cf118c66b867e2e6d2
Analyze and fix the following issue in the Linux kernel code: ASoC: core: Fix dai_link dereference.
Problem Details: We should check dailess before dereferencing. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4d8869852ad6..a61671b89e9b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1218,7 +1218,7 @@ static int soc_post_component_init(struct snd_soc_card *card, #ifdef CONFIG_DEBUG_FS /* add DPCM sysfs entries */ - if (!dai_link->dyn...
e875c1e3e758447ba81ca450d89434b3b0496d37
Analyze and fix the following issue in the Linux kernel code: ASoC: tlv312aic23: unbreak resume
Problem Details: * commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to a bug preventing resumeof the codec as regmap expects a 9 bits data register but 0xFFFF is passed in tlv320aic23_set_bias_level and this values gets cached preventing any write to the TLV320AIC23_PWR register as the final value produce...
```diff diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 16d55f91a653..df1e07ffac32 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c @@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai, static int tlv320aic23_set_bias...
6cf51852486af3d79f57bf46d00209a14244dbaa
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_CT: fix wrong checking in the timeout assignment path
Problem Details: The current checking always succeeded. We have to check the first character of the string to check that it's empty, thus, skipping the timeout path. This fixes the use of the CT target without the timeout option. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index 59530e93fa58..3746d8b9a478 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -227,7 +227,7 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par) } #ifdef CONFIG_NF_CONNTRACK_TIMEOUT - if (info->timeout) { + if (inf...
8537de8a7ab6681cc72fb0411ab1ba7fdba62dd0
Analyze and fix the following issue in the Linux kernel code: ipvs: kernel oops - do_ip_vs_get_ctl
Problem Details: Change order of init so netns init is ready when register ioctl and netlink. Ver2 Whitespace fixes and __init added. Reported-by: "Ryan O'Hara" <rohara@redhat.com> Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Jesper Dangaard Br...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 6d90dda2ddb5..72522f087375 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -1203,6 +1203,8 @@ ip_vs_lookup_real_service(struct net *net, int af, __u16 protocol, extern int ip_vs_use_count_inc(void); extern void ip_vs_use_count_dec(vo...
d6d7c873529abd622897cad5e36f1fd7d82f5110
Analyze and fix the following issue in the Linux kernel code: HID: fix return value of hidraw_report_event() when !CONFIG_HIDRAW
Problem Details: Commit b6787242f327 ("HID: hidraw: add proper error handling to raw event reporting") forgot to update the static inline version of hidraw_report_event() for the case when CONFIG_HIDRAW is unset. Fix that up. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse...
```diff diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h index 9cdc9b67ff49..45e9fcb8d877 100644 --- a/include/linux/hidraw.h +++ b/include/linux/hidraw.h @@ -82,7 +82,7 @@ void hidraw_disconnect(struct hid_device *); #else static inline int hidraw_init(void) { return 0; } static inline void hidraw_exit(...
93b42cae16d7af185ebdee0f4e85feccfd40d986
Analyze and fix the following issue in the Linux kernel code: ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue()
Problem Details: Return status of ath6kl_htc_tx_issue() is ignored in ath6kl_htc_tx_from_queue(), but failed tx packet is is not cleaned up. To fix memory leak in this case, call completion with error. Also, throw an error debug message when tx fails in ath6kl_sdio_write_async() due to shortage in bus request buffer. ...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index 89eccadd5386..2798624d3a9d 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -854,6 +854,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_targe...
1881ced5963520154aebb616ad7b2ff9c2c7f012
Analyze and fix the following issue in the Linux kernel code: ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx()
Problem Details: There are few cases where the tx skb is dropped but netstats is not updated, fix this. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 82f2f5cb475b..67206aedea6c 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -362,15 +362,11 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev) ...
2baf8377997cce10bb730f306392f29794dea217
Analyze and fix the following issue in the Linux kernel code: drm/edid: fix collision between two patches breaking build
Problem Details: this fixes a report that the new load code needed to be updated for ajax's validity changes. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c index da9acba2dd6c..48c927c37041 100644 --- a/drivers/gpu/drm/drm_edid_load.c +++ b/drivers/gpu/drm/drm_edid_load.c @@ -173,7 +173,7 @@ static int edid_load(struct drm_connector *connector, char *name, } memcpy(edid, fwdata, fwsi...
b99da31ed8521eb78d5d6930f3128f8ecdb75fae
Analyze and fix the following issue in the Linux kernel code: drm/nv10/gpio: fix thinko in mask for gpio lines 2-9
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv10_gpio.c b/drivers/gpu/drm/nouveau/nv10_gpio.c index 550ad3fcf0af..9d79180069df 100644 --- a/drivers/gpu/drm/nouveau/nv10_gpio.c +++ b/drivers/gpu/drm/nouveau/nv10_gpio.c @@ -65,7 +65,7 @@ nv10_gpio_drive(struct drm_device *dev, int line, int dir, int out) if (line < 10...
5206b524c9b4e289ab0565e7bffd503d2e671c6e
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/bios: fix regression on some nv4x board
Problem Details: We started using the connector table on nv4x a while back, and this VBIOS has bad connector indices which causes the wrong encoders to get paired with connectors. Add a quirk to fix this... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 80963d05b54a..0be4a815e706 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -6156,10 +6156,14 @@ dcb_fake_connectors(struct nvbios *bios) /* heuristic: if we ...
41baf6368ea2c2ad9eca44dbb07490a46202f474
Analyze and fix the following issue in the Linux kernel code: Input: usbtouchscreen - fix typo
Problem Details: Signed-off-by: Shawn Landden <shawnlandden@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index ba7c56567ee7..148774e03ae8 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -756,7 +756,7 @@ config TOUCHSCREEN_USB_EASYTOUCH bool "EasyTouch USB Touch controller device support" i...
14fb1fa6e266fb9c4622b210d2636a2004a47e2b
Analyze and fix the following issue in the Linux kernel code: powerpc: Use WARN instead of dump_stack when printing EEH error backtrace
Problem Details: When we get an EEH error we just print a backtrace with dump_stack which is rather cryptic. We really should print something before spewing out the backtrace. Also switch from dump_stack to WARN so we get more information about the fail - what modules were loaded, what process was running etc. This wa...
```diff diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index a75e37dc41aa..ecd394cf34e6 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -489,7 +489,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) * a ...
894a65c857b2e595da1c65d1ad1a7c559ac88c8d
Analyze and fix the following issue in the Linux kernel code: powerpc: Remove altivec fix for gcc versions before 4.0
Problem Details: Now we require gcc 4.0 on 64-bit we can remove the pre gcc 4.0 -maltivec workaround. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 68455ddb63b7..6ee3beb4d264 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -77,18 +77,8 @@ CPP = $(CC) -E $(KBUILD_CFLAGS) CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ ifeq ($(CONFIG_PPC...
ea5c64b06743b505e0eb4e6caa1810fe685c9559
Analyze and fix the following issue in the Linux kernel code: powerpc/windfarm: Improve display of fan speeds in sysfs
Problem Details: Controls registered as RPM and PWM fans are now displayed with the "RPM" or "%" suffix respectively to make it clearer to the user what the value actually means since the fan type isn't otherwise obvious. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index ce8897933a84..ebafc2543d5f 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c @@ -164,13 +164,24 @@ static ssize_t wf_show_control(struct device *dev, struct device_attribute *...
e326b30fda9a985a2e7fda6fb9212b86bf025c39
Analyze and fix the following issue in the Linux kernel code: powerpc/pmac: Convert windfarm_smu_sat to new i2c probing
Problem Details: This simplifies the driver to stop using the deprecated attach interface. While at it we also implement teardown properly and fix the refcounting by using a kref. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 65a8ff3e1f8e..72dfe191235b 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -20,7 +20,7 @@ #include "windfarm.h" -#define VERSION "0.2" +#define VERSION "1.0" #de...
81e5d8646ff6bf323dddcf172aa3cef84468fa12
Analyze and fix the following issue in the Linux kernel code: i2c/powermac: Register i2c devices from device-tree
Problem Details: This causes i2c-powermac to register i2c devices exposed in the device-tree, enabling new-style probing of devices. Note that we prefix the IDs with "MAC," in order to prevent the generic drivers from matching. This is done on purpose as we only want drivers specifically tested/designed to operate on ...
```diff diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 03685a329d7d..fc536f2971c0 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c @@ -1503,6 +1503,7 @@ static int __init pmac_i2c_create_platform_devices(void...
823df43552da39fd48a2dd74949363a1c8cf62bb
Analyze and fix the following issue in the Linux kernel code: powerpc: No need to save XER in a system call
Problem Details: The XER is a volatile register so there is no need to save and restore it over a system call - zero it out in the exception stack frame instead. This should fix a 5 cycle stall of the mfxer/std seen on POWER7. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <ben...
```diff diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index e212c2f57fd8..7f1e6de9a5a9 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -82,6 +82,7 @@ system_call_common: std r11,GPR10(r1) std r11,GPR11(r1) std r11,GPR12(r1) + std r11,_XER(r1) st...
aaa10eb1d0034eccc096f583fe308f0921617598
Analyze and fix the following issue in the Linux kernel code: 8250_pci: fix pch uart matching
Problem Details: The rules used to make 8250_pci "ignore" the PCH uarts are lacking pci subids entries, preventing it to match and thus is breaking serial port support for theses systems. This has been tested on a nanoETXexpress-TT, which has a specifici uart clock. Tested-by: Erwan Velu <Erwan.Velu@zodiacaerospace.c...
```diff diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 24ea98c6e77a..28e7c7cce893 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -1648,54 +1648,72 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { { .vendor ...
3fa10cc83fb92750af11fab81e11ad96dc75d656
Analyze and fix the following issue in the Linux kernel code: TTY: n_tty, do not dereference user buffer
Problem Details: copy_from_read_buf currently copies data to a user buffer and then checks if the data is single EOF. But it checks it by accessing the user buffer. First, the buffer may be changed by other threads of the user program already. Second, it accesses the buffer without any checks. It might be write-only fo...
```diff diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 94b6eda87afd..ee1c268f5f9d 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -1630,6 +1630,7 @@ static int copy_from_read_buf(struct tty_struct *tty, int retval; size_t n; unsigned long flags; + bool is_eof; retval = 0; spin_lo...
2f338c8a1904e2e7aa5a8bd12fb0cf2422d17da4
Analyze and fix the following issue in the Linux kernel code: USB: cdc-wdm: fix memory leak
Problem Details: cleanup() is not called if the last close() comes after disconnect(). That leads to a memory leak. Rectified by checking for an earlier disconnect() in release() Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation...
```diff diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index b29a9815e4d2..650e1da4d2bf 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -622,6 +622,8 @@ static int wdm_release(struct inode *inode, struct file *file) kill_urbs(desc); if (!test_bit(WDM_DISCONNEC...
949fd38c7b22168bc16fea100a51c8d4a3eab144
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in ni_at_a2150.c
Problem Details: This is a patch to the ni_at_a2150.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index c25e44c1905e..4fc469da45e2 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -539,7 +539,10 @@ static int a2150_ai_cmdtest(struct comedi_de...
190908ba6dd1e17f00cb7f403d31c19feeeb63bf
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in cb_pcimdas.c.
Problem Details: This is a patch to the cb_pcimdas.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index f92b8000b60d..842d99db00d6 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -139,9 +139,12 @@ MODULE_DEVICE_TABLE(pci, cb_pcimdas_pci_table); ...
ac971c948598b1ca6638ae7a89d3e237b90ad02b
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in daqboard2000.c
Problem Details: This is a patch to the daqboard2000.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 952b08177b4a..480f418b28c1 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -411,9 +411,12 @@ static int daqboard2000_ai_insn_read(str...
3c5510ba5091f3d7be338875c84451b07a3dd498
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in cb_pcidda.c
Problem Details: This is a patch to the cb_pcidda.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index 41e06c12ff5e..38efb4a07168 100644 --- a/drivers/staging/comedi/drivers/cb_pcidda.c +++ b/drivers/staging/comedi/drivers/cb_pcidda.c @@ -51,9 +51,12 @@ Please report success/failure with other different car...
acbaa0bf052a363de640725972563a34d61cfb82
Analyze and fix the following issue in the Linux kernel code: staging: sm7xx: rename function
Problem Details: This patch changes the name of function cfb_blank to smtc_blank. This function is not implemented like a generic function for frame buffer. Having the old prefix becomes confused when reading fb_ops structs. Tested with SM712 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kr...
```diff diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 83756a89b66f..746c4cd5d30e 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -266,7 +266,7 @@ static inline unsigned int chan_to_field(unsigned int chan, return chan << bf->offset; } -static...
6f54b0948ad459fa9ffa22335aba2e2a86365b60
Analyze and fix the following issue in the Linux kernel code: staging: sm7xx: use dynamic debug support to show info and errors
Problem Details: This patch makes happy checkpatch script. It uses dynamic debug support to show info and errors. It unifies the way to report messages in the same way that debug messages. Tested with SM712 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation....
```diff diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 69721c2c50e4..e351e083a869 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -736,17 +736,17 @@ static void smtc_unmap_mmio(struct smtcfb_info *sfb) */ static int smtc_map_smem(struct smtcfb...
bfdd40361987b5c2bd427f0fcf869b8862d4498d
Analyze and fix the following issue in the Linux kernel code: staging: sm7xx: use dynamic debug support
Problem Details: This patch uses dynamic debug support. Tested with SM712 Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index abed491ef465..69721c2c50e4 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -33,12 +33,6 @@ #include "smtcfb.h" -#ifdef DEBUG -#define smdbg(format, arg...) printk(KERN_DEBUG format , ## ar...
810b4de25e53459323ff48957b0162b48d6cbd57
Analyze and fix the following issue in the Linux kernel code: tty/serial/pmac_zilog: Fix "nobody cared" IRQ message
Problem Details: Following commit a79dd5a titled "tty/serial/pmac_zilog: Fix suspend & resume", my Powerbook G4 Titanium showed the following stack dump: [ 36.878225] irq 23: nobody cared (try booting with the "irqpoll" option) [ 36.878251] Call Trace: [ 36.878291] [dfff3f00] [c000984c] show_stack+0x7c/0x194 (un...
```diff diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 08ebe901bb59..654755a990df 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -469,7 +469,7 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id) tty = NULL; if (r3 & (CHAEXT | CHATxI...
4013369f3782af9a488e37c2b603f1dcf008ea76
Analyze and fix the following issue in the Linux kernel code: powerpc/irqdomain: Fix broken NR_IRQ references
Problem Details: The switch from using irq_map to irq_alloc_desc*() for managing irq number allocations introduced new bugs in some of the powerpc interrupt code. Several functions rely on the value of NR_IRQS to determine the maximum irq number that could get allocated. However, with sparse_irq and using irq_alloc_d...
```diff diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index e648af92ced1..0e40843a1c6e 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h @@ -18,10 +18,6 @@ #include <linux/atomic.h> -/* Define a way to iterate across irqs. */ -#define for_each_irq(i) \ ...
8751ed14dcdd692733072966bf97b6b8c21ccaad
Analyze and fix the following issue in the Linux kernel code: powerpc/8xx: Fix NR_IRQ bugs and refactor 8xx interrupt controller
Problem Details: The mpc8xx driver uses a reference to NR_IRQS that is buggy. It uses NR_IRQs for the array size of the ppc_cached_irq_mask bitmap, but NR_IRQs could be smaller than the number of hardware irqs that ppc_cached_irq_mask tracks. Also, while fixing that problem, it became apparent that the interrupt cont...
```diff diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index d5f5416be310..b724622c3a0b 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c @@ -18,69 +18,45 @@ extern int cpm_get_irq(struct pt_regs *regs); static struct irq_domain *mpc8xx_pic_host; ...
64f371bc3107e69efce563a3d0f0e6880de0d537
Analyze and fix the following issue in the Linux kernel code: autofs: make the autofsv5 packet file descriptor use a packetized pipe
Problem Details: The autofs packet size has had a very unfortunate size problem on x86: because the alignment of 'u64' differs in 32-bit and 64-bit modes, and because the packet data was not 8-byte aligned, the size of the autofsv5 packet structure differed between 32-bit and 64-bit modes despite looking otherwise iden...
```diff diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index d8d8e7ba6a1e..908e18455413 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -269,6 +269,17 @@ int autofs4_fill_super(struct super_block *, void *, int); struct autofs_info *autofs4_new_ino(struct autofs_sb_info *); void autofs4_...
9883035ae7edef3ec62ad215611cb8e17d6a1a5d
Analyze and fix the following issue in the Linux kernel code: pipes: add a "packetized pipe" mode for writing
Problem Details: The actual internal pipe implementation is already really about individual packets (called "pipe buffers"), and this simply exposes that as a special packetized mode. When we are in the packetized mode (marked by O_DIRECT as suggested by Alan Cox), a write() on a pipe will not merge the new data with ...
```diff diff --git a/fs/pipe.c b/fs/pipe.c index 25feaa3faac0..fec5e4ad071a 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -346,6 +346,16 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static const struct pipe_buf_operations packet_pipe_buf_ops = { + .can_merge = 0, + ...
d2cf3361677e5bb5d01d45052212b7050a9aa8c4
Analyze and fix the following issue in the Linux kernel code: net/l2tp: add support for L2TP over IPv6 UDP
Problem Details: Now that encap_rcv() works on IPv6 UDP sockets, wire L2TP up to IPv6. Support has been tested with and without hardware offloading. This version fixes the L2TP over localhost issue with incorrect checksums being reported. Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: David S. Miller...
```diff diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index 23cefa1111bf..b4775418d525 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h @@ -19,10 +19,11 @@ #ifdef __KERNEL__ #include <linux/in.h> +#include <linux/in6.h> #endif /* Structure used to connect() the...
d89bdff152acc0c1e1c8093832547a553b69b45c
Analyze and fix the following issue in the Linux kernel code: drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN
Problem Details: PCH_GBE_ETH_ALEN is equal to ETH_ALEN, so we can replace it with ETH_ALEN. If they are not equal, it must be a bug, since this is ethernet, and the address has been already stored to mc_addr_list as ETH_ALEN bytes when call pch_gbe_mac_mc_addr_list_update. Signed-off-by: RongQing.Li <roy.qing.li@gmai...
```diff diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 89c6bcf4bca2..835e3bbdac18 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -79,7 +79,6 @@ const char pch_...
86cc070eb19640d42941d3074e42c761d4c1c59c
Analyze and fix the following issue in the Linux kernel code: net/at91_ether: use gpio_to_irq for phy IRQ line
Problem Details: Use the gpio_to_irq() function to retrieve the phy IRQ line from the GPIO pin specification. This fix is needed now that we have moved to irqdomains on AT91. Reported-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Andrew Victor <avictor.za@gmail.com> Cc...
```diff diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 62761e19e210..77884191a8c6 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c @@ -263,7 +263,7 @@ static void enable_phyirq(struct net_device *dev) retu...
71dfc5fa5160bb73752f0731539404569a77faca
Analyze and fix the following issue in the Linux kernel code: NFS: get module in idmap PipeFS notifier callback
Problem Details: This is bug fix. Notifier callback is called from SUNRPC module. So before dereferencing NFS module we have to make sure, that it's alive. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index b7f348bb618b..ba3019f5934c 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -554,12 +554,16 @@ static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event, struct nfs_client *clp; int error = 0; + if (!try_module_get(THIS_MODULE)) + ret...
fcbf94b9dedd2ce08e798a99aafc94fec8668161
Analyze and fix the following issue in the Linux kernel code: Revert "autofs: work around unhappy compat problem on x86-64"
Problem Details: This reverts commit a32744d4abae24572eff7269bc17895c41bd0085. While that commit was technically the right thing to do, and made the x86-64 compat mode work identically to native 32-bit mode (and thus fixing the problem with a 32-bit systemd install on a 64-bit kernel), it turns out that the automount ...
```diff diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index eb1cc92cd67d..d8d8e7ba6a1e 100644 --- a/fs/autofs4/autofs_i.h +++ b/fs/autofs4/autofs_i.h @@ -110,7 +110,6 @@ struct autofs_sb_info { int sub_version; int min_proto; int max_proto; - int compat_daemon; unsigned long exp_timeout; unsigned...
14904927fcef6bb881fd995b478a0d2e700c1818
Analyze and fix the following issue in the Linux kernel code: ARM: 7401/1: mm: Fix section mismatches
Problem Details: WARNING: vmlinux.o(.text+0x111b8): Section mismatch in reference from the function arm_memory_present() to the function .init.text:memory_present() The function arm_memory_present() references the function __init memory_present(). This is often because arm_memory_present lacks a __init annotation or th...
```diff diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 595079fa9d1d..8f5813bbffb5 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -293,11 +293,11 @@ EXPORT_SYMBOL(pfn_valid); #endif #ifndef CONFIG_SPARSEMEM -static void arm_memory_present(void) +static void __init arm_memory_present(void) {...
3a69ddd6f872180b6f61fda87152b37202118fbc
Analyze and fix the following issue in the Linux kernel code: drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.
Problem Details: Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when using separate stencil buffers. Without it, the GPU tries to use the LRA eviction policy, which isn't supported. This was supposed to be off by default, but seems t...
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index b4bb1ef77ddc..9d24d65f0c3e 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -568,6 +568,7 @@ #define CM0_MASK_SHIFT 16 #define CM0_IZ_OPT_DISABLE (1<<6) #define CM0_ZR...
700698e7c303f5095107c62a81872c2c3dad1702
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: need to set up ss on DP bridges as well
Problem Details: Makes Nutmeg DP to VGA bridges work for me. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42490 Noticed by Jerome Glisse (after weeks of debugging). Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index c5c31e091a92..af1054f8202a 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -958,8 +958,8 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_d...
cde2e9a651b76d8db36ae94cd0febc82b637e5dd
Analyze and fix the following issue in the Linux kernel code: drop_monitor: fix sleeping in invalid context warning
Problem Details: Eric Dumazet pointed out this warning in the drop_monitor protocol to me: [ 38.352571] BUG: sleeping function called from invalid context at kernel/mutex.c:85 [ 38.352576] in_atomic(): 1, irqs_disabled(): 0, pid: 4415, name: dropwatch [ 38.352580] Pid: 4415, comm: dropwatch Not tainted 3.4.0-rc2...
```diff diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 5c3c81a609e5..a221a5bbecf7 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -42,7 +42,7 @@ static void send_dm_alert(struct work_struct *unused); * netlink alerts */ static int trace_state = TRACE_OFF; -static DEFINE_...
4a6d70c9505fef1d8906b1d61db3de5d8ecf9454
Analyze and fix the following issue in the Linux kernel code: ftrace/x86: Remove the complex ftrace NMI handling code
Problem Details: As ftrace function tracing would require modifying code that could be executed in NMI context, which is not stopped with stop_machine(), ftrace had to do a complex algorithm with various stages of setup and memory barriers to make it work. With the new breakpoint method, this is no longer required. Th...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1d14cc6b79ad..1324139612e1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -40,7 +40,6 @@ config X86 select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_GRAPH_FP_TEST select HAVE_FUNCTION_TRACE_MCOUNT_TEST - select HAVE_FTRACE_NMI_ENTER if ...
414fa985f91bdf61fe2baf8111c0ddbdb94808ea
Analyze and fix the following issue in the Linux kernel code: KVM: Improve readability of KVM API doc
Problem Details: This helps to identify sections and it also fixes the numbering from 4.54 to 4.61. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
```diff diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index a1552210b16d..b48f92786ab3 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -2,6 +2,7 @@ The Definitive KVM (Kernel-based Virtual Machine) API Documentation ========================...
7eb7ce4d2e8991aff4ecb71a81949a907ca755ac
Analyze and fix the following issue in the Linux kernel code: xen: correctly check for pending events when restoring irq flags
Problem Details: In xen_restore_fl_direct(), xen_force_evtchn_callback() was being called even if no events were pending. This resulted in (depending on workload) about a 100 times as many xen_version hypercalls as necessary. Fix this by correcting the sense of the conditional jump. This seems to give a significant ...
```diff diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S index 79d7362ad6d1..3e45aa000718 100644 --- a/arch/x86/xen/xen-asm.S +++ b/arch/x86/xen/xen-asm.S @@ -96,7 +96,7 @@ ENTRY(xen_restore_fl_direct) /* check for unmasked and pending */ cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pendin...
4c1bcdb5a3354b250b82a67549f57ac27a3bb85f
Analyze and fix the following issue in the Linux kernel code: wl1251: fix crash on remove due to leftover work item
Problem Details: This driver currently leaves elp_work behind when stopping, which occasionally results in data corruption because work function ends up accessing freed memory, typical symptoms of this are various worker_thread crashes. Fix it by cancelling elp_work. Cc: stable@vger.kernel.org # v2.6.37+ Signed-off-by...
```diff diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index 41302c7b1ad0..d1afb8e3b2ef 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c @@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) cancel_work_sync(&wl->irq_work)...
328c32f0f85467af5a6c4c3289e168d9ad2555af
Analyze and fix the following issue in the Linux kernel code: wl1251: fix crash on remove due to premature kfree
Problem Details: Currently SDIO glue frees it's own structure before calling wl1251_free_hw(), which in turn calls ieee80211_unregister_hw(). The later call may result in a need to communicate with the chip to stop it (as it happens now if the interface is still up before rmmod), which means calls are made back to the ...
```diff diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c index f78694295c39..1b851f650e07 100644 --- a/drivers/net/wireless/wl1251/sdio.c +++ b/drivers/net/wireless/wl1251/sdio.c @@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func) if (wl->irq) ...
1ed2ec37b44e86eaa8e0a03b908a39c80f65ee45
Analyze and fix the following issue in the Linux kernel code: iwlwifi: use 6000G2B for 6030 device series
Problem Details: "iwlwifi: use correct released ucode version" change the ucode api ok from 6000G2 to 6000G2B, but it shall belong to 6030 device series, not the 6005 device series. Fix it Cc: stable@vger.kernel.org #3.3+ Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxd...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index b1b69515b1a0..f0c91505a7f7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c @@ -336,7 +336,7 @@ static const struct iwl_bt_params iwl6000_bt_params = { #define ...
b948a85c1f26d48395de8c6c7e392f008f1be666
Analyze and fix the following issue in the Linux kernel code: brcm80211: fmac: fix missing completion events issue
Problem Details: dpc takes care of all data packets transmissions for sdio function 2. It is possible that it misses some completion events when the traffic is heavy or it's running on a slow cpu. A linked list is introduced to make sure dpc is invoked whenever needed. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broa...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 2bf5dda29291..eb3829b03cd3 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c @@ -574,6 +574,8 @@ struct brcmf_sdio { ...
1cc2699057bafc512137272e1e848640bad14a41
Analyze and fix the following issue in the Linux kernel code: brcm80211: fmac: fix SDIO function 0 register r/w issue
Problem Details: SDIO stack doesn't have a structure for function 0. The structure pointer stored in card->sdio_func[0] is actually for function 1. With current implementation the register read/write is applied to function 1. This pathch fixes the issue. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Revie...
```diff diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 4688904908ec..758c115b556e 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -108,9 +108,15 @@ stat...
9b5415b536cc3193e9608a7fced1372df8ce4dcf
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a use-before-initialised warning in fs/nfs/write.c and fs/nfs/pnfs.c
Problem Details: If the allocation of nfs_write_header fails, the list of nfs_pages that needs to be cleaned up is still on desc->pg_list... Reported-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Fred Isaman <iisaman@netapp.com>
```diff diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 4da05e469be5..39cbac548730 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1308,7 +1308,7 @@ pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc) whdr = nfs_writehdr_alloc(); if (!whdr) { - desc->pg_completion_ops->error_cleanup(&hdr->pages); ...
fede766f28dd766d4e8feb321fdb19edb21ef6fb
Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid deadlocks from GFP_KERNEL allocations during btrfs_real_readdir
Problem Details: Btrfs has an optimization where it will preallocate dentries during readdir to fill in enough information to open the inode without an extra lookup. But, we're calling d_alloc, which is doing GFP_KERNEL allocations, and that leads to deadlocks because our readdir code has tree locks held. For now, di...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d953f8820464..3ce7805d1117 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4192,7 +4192,6 @@ static int btrfs_real_readdir(struct file *filp, void *dirent, struct btrfs_path *path; struct list_head ins_list; struct list_head del_list; - struc...
2431a8154634027ce3915200699f26fb3725a1f2
Analyze and fix the following issue in the Linux kernel code: spi/spi-bfin5xx: Fix flush of last bit after each spi transfer
Problem Details: This patch ensures that the last bit of a transfer gets correctly flushed out of the register. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index 432d0190e6ba..9bb4d4af8547 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c @@ -587,6 +587,7 @@ static void bfin_spi_pump_transfers(unsigned long data) if (message->state == DONE_STATE) { dev_dbg(&drv_data->pdev-...
128465ca7c0775609b1c24f66cd6bddac5f59c9b
Analyze and fix the following issue in the Linux kernel code: spi/spi-bfin5xx: fix reversed if condition in interrupt mode
Problem Details: This condition is used to determine 8 bits or 16 and 32 bits transfer. Obviously it is reversed. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index c0cdcb7c8135..432d0190e6ba 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c @@ -396,7 +396,7 @@ static irqreturn_t bfin_spi_pio_irq_handler(int irq, void *dev_id) /* last read */ if (drv_data->rx) { dev_dbg(...
df0117481cd94dbb8970f4be9d05b0568fa09ab1
Analyze and fix the following issue in the Linux kernel code: NFS: Prevent garbage cinfo->ds from leaking out
Problem Details: This is a bugfix that applies on top of the previous directio patches, that fixes a bug introduced in "NFS: create struct nfs_commit_info". Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 806a55f513d9..80a63f6d9e14 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -1184,7 +1184,12 @@ filelayout_free_layout_hdr(struct pnfs_layout_hdr *lo) static struct pnfs_ds_commit_info * filelayout_get_ds_info(struct ino...
6c75dc0d498caa402fb17b1bf769835a9db875c8
Analyze and fix the following issue in the Linux kernel code: NFS: merge _full and _partial write rpc_ops
Problem Details: Decouple nfs_pgio_header and nfs_write_data, and have (possibly multiple) nfs_write_datas each take a refcount on nfs_pgio_header. For the moment keeps nfs_write_header as a way to preallocate a single nfs_write_data with the nfs_pgio_header. The code doesn't need this, and would be prettier without,...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 90b00ce42cbe..22a40c408449 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -768,11 +768,17 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq, bytes = min(wsize,count); result = -ENOMEM; - whdr = nfs_writehdr_alloc(...
4db6e0b74c0f6dfc2f9c0690e8df512e3b635983
Analyze and fix the following issue in the Linux kernel code: NFS: merge _full and _partial read rpc_ops
Problem Details: Decouple nfs_pgio_header and nfs_read_data, and have (possibly multiple) nfs_read_datas each take a refcount on nfs_pgio_header. For the moment keeps nfs_read_header as a way to preallocate a single nfs_read_data with the nfs_pgio_header. The code doesn't need this, and would be prettier without, but...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 0faba4cb531d..90b00ce42cbe 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -319,10 +319,16 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq, bytes = min(rsize,count); result = -ENOMEM; - rhdr = nfs_readhdr_alloc(nf...
799ba8d53d32c84bd2a867ca2689538a48176140
Analyze and fix the following issue in the Linux kernel code: NFS4.1: Add lseg to struct nfs4_fl_commit_bucket
Problem Details: Also create a commit_info structure to hold the bucket array and push it up from the lseg to the layout where it really belongs. While we are at it, fix a refcounting bug due to an (incorrect) implicit assumption that filelayout_scan_ds_commit_list always completely emptied the src list. This clarifi...
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 5acfd9ea8a31..15aeba20d57d 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -650,10 +650,66 @@ filelayout_free_lseg(struct pnfs_layout_segment *lseg) dprintk("--> %s\n", __func__); nfs4_fl_put_deviceid(fl->dsaddr); -...
e245d4250d0326cfcf7c816a2081b6ab2ea810be
Analyze and fix the following issue in the Linux kernel code: NFS: Remove unused function nfs_lookup_with_sec()
Problem Details: This fixes a compiler warning. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 78dde307317f..d51868e5683c 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -148,59 +148,6 @@ rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors) return pseudoflavor; } -static int nfs_negotiate_security(const struct...
f05d147f7e3cf0d86b3a4bd5603029a7cb109633
Analyze and fix the following issue in the Linux kernel code: NFS: Fix following referral mount points with different security
Problem Details: I create a new proc_lookup_mountpoint() to use when submounting an NFS v4 share. This function returns an rpc_clnt to use for performing an fs_locations() call on a referral's mountpoint. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 45966d953169..49c09b4a535a 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -186,10 +186,10 @@ static inline void nfs_fs_proc_exit(void) /* nfs4namespace.c */ #ifdef CONFIG_NFS_V4 -extern struct vfsmount *nfs_do_refmount(struct dentry *dentry...
31e4dda4747713de13889f7c79c7aec341fea61b
Analyze and fix the following issue in the Linux kernel code: NFS: Fix SECINFO_NO_NAME
Problem Details: I was using the same decoder function for SECINFO and SECINFO_NO_NAME, so it was returning an error when it tried to decode an OP_SECINFO_NO_NAME header as OP_SECINFO. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 203c0967451b..c77e802db736 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -5094,16 +5094,13 @@ out_err: return -EINVAL; } -static int decode_secinfo(struct xdr_stream *xdr, struct nfs4_secinfo_res *res) +static int decode_secinfo_common(struct...
7654b72417e10e294563496e25211200f9b8b6d3
Analyze and fix the following issue in the Linux kernel code: Btrfs: Fix space checking during fs resize
Problem Details: Fix out-of-space checking, addressing a warning and potential resource leak when resizing the filesystem down while allocating blocks. Signed-off-by: Daniel J Blueman <daniel@quora.org> Reviewed-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 5a105a086acf..646ee21bb035 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3813,7 +3813,7 @@ restart: ret = btrfs_block_rsv_check(rc->extent_root, rc->block_rsv, 5); if (ret < 0) { - if (ret != -EAGAIN) { + if (ret !...
1f699d38b6556c393ac80f1c23c2053502a51631
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix block_rsv and space_info lock ordering
Problem Details: may_commit_transaction() calls spin_lock(&space_info->lock); spin_lock(&delayed_rsv->lock); and update_global_block_rsv() calls spin_lock(&block_rsv->lock); spin_lock(&sinfo->lock); Lockdep complains about this at run time. Everywhere except in update_global_block_rsv()...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 84497f8eb043..6fc2e6f5aab8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4214,8 +4214,8 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info) num_bytes = calc_global_metadata_size(fs_info); - spin_loc...
3e74317ad773ba9df36db1fa32848cba41ac4d1a
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix repair code for RAID10
Problem Details: btrfs_map_block sets mirror_num, so that the repair code knows eventually which device gave us the read error. For RAID10, mirror_num must be 1 or 2. Before this fix mirror_num was incorrectly related to our stripe index. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Chris Mason...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 3b984173d25b..1411b99555a4 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3807,10 +3807,11 @@ static int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, else if (mirror_num) stripe_index += mirror_num - 1; else { +...
f57b8488bc39f7674cbadf4e2db05a7db8ffa660
Analyze and fix the following issue in the Linux kernel code: ASoC: dpcm: Fixup debugFS for DPCM state.
Problem Details: Remove writable debugFS permission, use simple_open() and fix indentation. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 4e3be82e79cb..c0b394fdd689 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2241,12 +2241,6 @@ static char *dpcm_state_string(enum snd_soc_dpcm_state state) return "unknown"; } -static int dpcm_state_open_file(struct inode *inode, s...
604bb229b5269747e5763efe05726b080276d77f
Analyze and fix the following issue in the Linux kernel code: ASoC: da7210: Minor bugfix for non pll slave mode
Problem Details: This patch fixes a bug discovered during testing of non pll slave mode. Due to the bug chip was not getting correctly configured and as a result there was no sound output while playback. After applying this patch, both pll and non pll modes work fine. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcu...
```diff diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index f92d1f777757..10f52ff14daa 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -1159,8 +1159,9 @@ static int da7210_probe(struct snd_soc_codec *codec) /* Enable Aux2 */ snd_soc_write(codec, DA7210_AUX2, DA7210_AUX...
88a3a255a510ed193bf0cc35424761c3c9247586
Analyze and fix the following issue in the Linux kernel code: spi/bcm63xx: set master driver mode_bits.
Problem Details: We were not properly advertising the MODE bits supported by this driver, fix that. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 80e5ed34e0d9..7491971139a6 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -404,6 +404,7 @@ static int __devinit bcm63xx_spi_probe(struct platform_device *pdev) master->prepare_transfer_hardware = bcm63xx_spi_pr...
5a00689930ab975fdd1b37b034475017e460cf2a
Analyze and fix the following issue in the Linux kernel code: Avoid reading past buffer when calling GETACL
Problem Details: Bug noticed in commit bf118a342f10dafe44b14451a1392c3254629a1f When calling GETACL, if the size of the bitmap array, the length attribute and the acl returned by the server is greater than the allocated buffer(args.acl_len), we can Oops with a General Protection fault at _copy_from_pages() when we att...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 60d5f4c26dda..f5f125fdae1b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3684,19 +3684,23 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu if (npages == 0) npages = 1; + /* Add an extra page to handle...
d4b9b578cba7231c1fbafbe901a2e8f38654e056
Analyze and fix the following issue in the Linux kernel code: spi/spi-ep93xx.c: use dma_transfer_direction instead of dma_data_direction
Problem Details: A new enum indicating the dma channel direction was introduced by: commit 49920bc66984a512f4bcc7735a61642cd0e4d6f2 dmaengine: add new enum dma_transfer_direction The following commit changed spi-ep93xx to use the new enum: commit a485df4b4404379786c4bdd258bc528b2617449d spi, serial: move to ...
```diff diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 6db2887852d6..e8055073e84d 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c @@ -545,13 +545,12 @@ static void ep93xx_spi_pio_transfer(struct ep93xx_spi *espi) * in case of failure. */ static struct dma_async_tx_descr...