id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
aadf31de16a7b2878af00a02e6557df84efa784b
Analyze and fix the following issue in the Linux kernel code: llc: Fix races between llc2 handler use and (un)registration
Problem Details: When registering the handlers, any state they rely on must be completely initialised first. When unregistering, we must wait until they are definitely no longer running. llc_rcv() must also avoid reading the handler pointers again after checking for NULL. Signed-off-by: Ben Hutchings <ben@decadent.o...
```diff diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index e32cab44ea95..dd3e83328ad5 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c @@ -42,6 +42,7 @@ static void (*llc_type_handlers[2])(struct llc_sap *sap, void llc_add_pack(int type, void (*handler)(struct llc_sap *sap, struct sk_buff...
6024935f5ff5f1646bce8404416318e5fd4a0c4a
Analyze and fix the following issue in the Linux kernel code: llc2: Fix silent failure of llc_station_init()
Problem Details: llc_station_init() creates and processes an event skb with no effect other than to change the state from DOWN to UP. Allocation failure is reported, but then ignored by its caller, llc2_init(). Remove this possibility by simply initialising the state as UP. Signed-off-by: Ben Hutchings <ben@decadent...
```diff diff --git a/include/net/llc.h b/include/net/llc.h index 226c846cab08..f2d0fc570527 100644 --- a/include/net/llc.h +++ b/include/net/llc.h @@ -133,7 +133,7 @@ extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); e...
69af59970bec925d182ca5ebd80e643fdd90b1cc
Analyze and fix the following issue in the Linux kernel code: staging: comedi: adl_pci7x3x: fix pointer-to-int-cast warning
Problem Details: This driver uses the void *private variable in the comedi_subdevice to pass the offset needed to read/write the appropriate register to get/set the channels for the subdevice. The adl_pci7x3x_do_insn_bits() and adl_pci7x3x_di_insn_bits() functions were retrieving this offset by casting the s->private ...
```diff diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c index 990670a3c5b1..41963fba4fc2 100644 --- a/drivers/staging/comedi/drivers/adl_pci7x3x.c +++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c @@ -121,7 +121,7 @@ static int adl_pci7x3x_do_insn_bits(struct co...
2f123cbcf0ddaf526bd681081a1f2fe8c30ef59a
Analyze and fix the following issue in the Linux kernel code: Staging: xgifb: fix bitwise vs logical bug
Problem Details: This is a static checker fix and not something I can test. The intent of the code here is to set some bit flags. For a logical OR the ">> 1" shift wouldn't make a difference. So it should be using a bitwise OR. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Peter Huewe <peterh...
```diff diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 80dba6a425ba..fdb7d1a78b3b 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -1269,7 +1269,7 @@ static unsigned char GetXG27FPBits(struct vb_device_info *pVBInfo) if (temp <= 2) temp &= ...
95605332997211f377af55d05209c3ef2b86bed1
Analyze and fix the following issue in the Linux kernel code: staging "vme" Fix typos.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index e25645e226e3..0170788fcdee 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -64,13 +64,13 @@ static unsigned int bus_num; * * However the VME driver at http:/...
48d1788493f874e5d32dccb2911a7bc91c248b4b
Analyze and fix the following issue in the Linux kernel code: reiserfs: fix deadlocks with quotas
Problem Details: The BKL push-down for reiserfs made lock recursion a special case that needs to be handled explicitly. One of the cases that was unhandled is dropping the quota during inode eviction. Both reiserfs_evict_inode and reiserfs_write_dquot take the write lock, but when the journal lock is taken it only drop...
```diff diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index 4c0c7d163d15..a98b7740a0fc 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c @@ -1334,9 +1334,7 @@ struct buffer_head *reiserfs_read_bitmap_block(struct super_block *sb, else if (bitmap == 0) block = (REISERFS_DISK_OFFSET_IN_BYTES >>...
bb2b6d19ec8b593b66402e2895c4314955b19833
Analyze and fix the following issue in the Linux kernel code: udf: fix udf_setsize() for file data in ICB
Problem Details: If the new size is larger than the old size and the old file data was stored in the ICB (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) and the new size still fits in the ICB, skip the call to udf_extend_file() as it does not handle this i_alloc_type value (it calls BUG()). Signed-off-by: Ian Abbott <a...
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index fafaad795cd6..aa233469b3c1 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1124,14 +1124,17 @@ int udf_setsize(struct inode *inode, loff_t newsize) if (err) return err; down_write(&iinfo->i_data_sem); - } else + } else { iinfo->i_l...
6c723a68c661008adf415ee90efe5f737e928ce0
Analyze and fix the following issue in the Linux kernel code: IB/ipoib: Fix RCU pointer dereference of wrong object
Problem Details: Commit b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path") introduced a bug where in ipoib_neigh_free() (which is called from a few errors flows in the driver), rcu_dereference() is invoked with the wrong pointer object, which results in a crash. Signed-off-by: Shlomo Pongrat...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 97920b77a5d0..3e2085a3ee47 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1052,7 +1052,7 @@ void ipoib_neigh_free(struct ipoib_neigh *neigh) for ...
fa16ebed31f336e41970f3f0ea9e8279f6be2d27
Analyze and fix the following issue in the Linux kernel code: IB/ipoib: Add missing locking when CM object is deleted
Problem Details: Commit b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path") introduced a bug where in ipoib_cm_destroy_tx() a CM object is moved between lists without any supported locking. Under a stress test, this eventually leads to list corruption and a crash. Previously when this routin...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 95ecf4eadf5f..24683fda8e21 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -1271,12 +1271,15 @@ struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev...
640de636a1f149a92fe54f564ce931ec6b8418c6
Analyze and fix the following issue in the Linux kernel code: MIPS: OCTEON: Fix breakage due to 8250 changes.
Problem Details: The changes in linux-next removing serial8250_register_port() cause OCTEON to fail to compile. Lets make OCTEON use the new serial8250_register_8250_port() instead. Signed-off-by: David Daney <david.daney@cavium.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Sig...
```diff diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c index 138b2216b4f8..569f41bdcc46 100644 --- a/arch/mips/cavium-octeon/serial.c +++ b/arch/mips/cavium-octeon/serial.c @@ -47,40 +47,40 @@ static int __devinit octeon_serial_probe(struct platform_device *pdev) { int irq, res; s...
4855d6f3116e891b66198838b683dce3dcf6e874
Analyze and fix the following issue in the Linux kernel code: net: ipv6: proc: Fix error handling
Problem Details: Fix error handling in case making of dir dev_snmp6 failes Signed-off-by: Igor Maravic <igorm@etf.rs> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index da2e92d05c15..745a32042950 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -307,10 +307,10 @@ static int __net_init ipv6_proc_init_net(struct net *net) goto proc_dev_snmp6_fail; return 0; +proc_dev_snmp6_fail: + proc_net_remove(net, "snmp6"); pr...
9b469a60d68b13c288d5c3fc23de29d9d482dbe6
Analyze and fix the following issue in the Linux kernel code: net: qmi_wwan: add Sierra Wireless devices
Problem Details: Add 6 new devices and one modified device, based on information from laptop vendor Windows drivers. Sony provides a driver with two new devices using a Gobi 2k+ layout (1199:68a5 and 1199:68a9). The Sony driver also adds a non-standard QMI/net interface to the already supported 1199:9011 Gobi device....
```diff diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index c6a587366a57..24524b24329b 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -401,8 +401,11 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x1010, 4)}, /* ZTE (Vodafone) K3571-Z */...
2899656b494dcd118123af1126826b115c8ea6f9
Analyze and fix the following issue in the Linux kernel code: netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev()
Problem Details: This patch fixes several problems in the call path of netpoll_send_skb_on_dev(): 1. Disable IRQ's before calling netpoll_send_skb_on_dev(). 2. All the callees of netpoll_send_skb_on_dev() should use rcu_dereference_bh() to dereference ->npinfo. 3. Rename arp_reply() to netpoll_arp_reply(), the fo...
```diff diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 2d178baa49df..61aee86cf21d 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -57,7 +57,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, struct net_device *dev); static inline void netpol...
57c5d46191e75312934c00eba65b13a31ca95120
Analyze and fix the following issue in the Linux kernel code: netpoll: take rcu_read_lock_bh() in netpoll_rx()
Problem Details: In __netpoll_rx(), it dereferences ->npinfo without rcu_dereference_bh(), this patch fixes it by using the 'npinfo' passed from netpoll_rx() where it is already dereferenced with rcu_dereference_bh(). Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-b...
```diff diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 907812efb4d9..5d881c388273 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -52,7 +52,7 @@ void netpoll_set_trap(int trap); void __netpoll_cleanup(struct netpoll *np); void __netpoll_free_rcu(struct netpoll *np); void n...
f1c6300183dbf5b9da25988e13f6f25a9e27151b
Analyze and fix the following issue in the Linux kernel code: x86, apic: fix broken legacy interrupts in the logical apic mode
Problem Details: Recent commit 332afa656e76458ee9cf0f0d123016a0658539e4 cleaned up a workaround that updates irq_cfg domain for legacy irq's that are handled by the IO-APIC. This was assuming that the recent changes in assign_irq_vector() were sufficient to remove the workaround. But this broke couple of AMD platforms...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a6c64aaddf9a..c265593ec2cd 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1356,6 +1356,16 @@ static void setup_ioapic_irq(unsigned int irq, struct irq_cfg *cfg, if (!IO_APIC_IRQ(irq)) re...
7ccbde57ce312ff1388c2990699f8863280808ac
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix possible compile warnings regarding CONFIG_PM
Problem Details: Replace with a proper ifdef check of CONFIG_PM_SLEEP in hda_intel.c. But other places in HD-audio driver are still marked with CONFIG_PM, since these can be called for power-saving even without CONFIG_PM_SLEEP. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 23ad7e216a6b..464ea16bdd9e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2409,11 +2409,10 @@ static void azx_power_notify(struct hda_bus *bus) } #endif /* CONFIG_SND_HDA_POWER_SAVE */ -#ifdef CONFIG_PM +#if...
3bdcff70b6cd049e6f4437b955850f5db83653cc
Analyze and fix the following issue in the Linux kernel code: ALSA: lx6464es: Add a missing error check
Problem Details: Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44541 Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index d1ab43706735..5579b08bb35b 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c @@ -851,6 +851,8 @@ static int __devinit lx_pcm_create(struct lx6464es *chip) /* hardcoded device name & channel count */ ...
a33ba827460cdab644e907fc0c740dc7fde56c17
Analyze and fix the following issue in the Linux kernel code: TTY: synclink_cs, fix build
Problem Details: Commit "TTY: synclink_cs, use dynamic tty devices" added a call to tty_port_register_device with a proper device as the last argument. But it was not correct and it causes build failures: synclink_cs.c: In function ‘mgslpc_add_device’: synclink_cs.c:2735:16: error: request for member ‘dev’ in something...
```diff diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 923c3a47db0c..d9335ae1fadf 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -2732,7 +2732,7 @@ static void mgslpc_add_device(MGSLPC_INFO *info) hdlcdev_init(info); #endif tty_po...
d0d3913895e5b50623bd4dafd876e41c1169031d
Analyze and fix the following issue in the Linux kernel code: perf script: Fix a NULL pointer dereference
Problem Details: If 'perf script --gen-script' was called with a perf.data which contains no tracepoint event, it'd segfault due to NULL pevent pointer. Fix it. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Feng Tang <feng.tang@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul Mackerras <paulus@samba.org>...
```diff diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 4cb7f3831f78..a5a554efeb50 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c @@ -293,7 +293,7 @@ struct event_format *trace_find_next_event(struct pevent *pevent, { static int...
a1b3a6ce0f1510b14b18d019c4cda137585b1f69
Analyze and fix the following issue in the Linux kernel code: [media] media: davinci: fix section mismatch warnings
Problem Details: This patch fixes section mismatch warnings for davinci video drivers. [mchehab@redhat.com: applied it as a fixup over the previous (and wrong) changeset c6afbf2] Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Laurent Pinchart <lau...
```diff diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/video/davinci/dm355_ccdc.c index 2eb7dbd6dbac..ce0e4131c067 100644 --- a/drivers/media/video/davinci/dm355_ccdc.c +++ b/drivers/media/video/davinci/dm355_ccdc.c @@ -965,7 +965,7 @@ static struct ccdc_hw_device ccdc_hw_dev = { }, }; -stat...
68e035c950dbceaf660144bf74054dfdfb6aad15
Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: fix missing locking while changing conntrack from nfqueue
Problem Details: Since 9cb017665 netfilter: add glue code to integrate nfnetlink_queue and ctnetlink, we can modify the conntrack entry via nfnl_queue. However, the change of the conntrack entry via nfnetlink_queue requires appropriate locking to avoid concurrent updates. Signed-off-by: Pablo Neira Ayuso <pablo@netfil...
```diff diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 14f67a2cbcb5..da4fc37a8578 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -1896,10 +1896,15 @@ static int ctnetlink_nfqueue_parse(const struct nlattr *attr, struct nf_...
265d931a9e9a7e290faa5e2145f4b2ebf38ea84c
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix 'Beep Playback Switch' with no underlying mute switch
Problem Details: Some Conexant devices (e g CX20590) have no mute capability on their Beep widgets. This patch makes sure we don't try setting mutes on those widgets. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index d26ae65b43b7..0849aac449f2 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c @@ -231,15 +231,22 @@ void snd_hda_detach_beep_device(struct hda_codec *codec) } EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device); +static bool ...
12a19b5f836c1a1b838e668f9aa804d017d8c58b
Analyze and fix the following issue in the Linux kernel code: usb: musb: omap2430: don't loop indefinitely in interrupt.
Problem Details: When called during resume_irqs, omap2430_musb_set_vbus() is run with interrupts disabled, In that case 'jiffies' never changes so the loop can loop forever. So impose a maximum loop count and add an 'mdelay' to ensure we wait a reasonable amount of time for bit to be cleared. This fixes a hang on re...
```diff diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index e32aff9920f2..af5f4214673d 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -34,6 +34,7 @@ #include <linux/dma-mapping.h> #include <linux/pm_runtime.h> #include <linux/err.h> +#include <linux/delay.h> #...
7d54a904285b6e780291b91a518267bec5591913
Analyze and fix the following issue in the Linux kernel code: drm/i915: Apply post-sync write for pipe control invalidates
Problem Details: When invalidating the TLBs it is documentated as requiring a post-sync write. Failure to do so seems to result in a GPU hang. Exposure to this hang on IVB seems to be a result of removing the extra stalls required for SNB pipecontrol workarounds: commit 6c6cf5aa9c583478b19e23149feaa92d01fb8c2d Author...
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 414af1e2973b..e2a73b38abe9 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -227,31 +227,36 @@ gen6_render_ring_flush(struct intel_ring_buffer *ring, * num...
35a38556d900b9cb5dfa2529c93944b847f8a8a4
Analyze and fix the following issue in the Linux kernel code: drm/i915: reorder edp disabling to fix ivb MacBook Air
Problem Details: eDP is tons of fun. It turns out that at least the new MacBook Air 5,1 model absolutely doesn't like the new force vdd dance we've introduced in commit 6cb49835da0426f69a2931bc2a0a8156344b0e41 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sun May 20 17:14:50 2012 +0200 drm/i915: enable v...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 0a56b9ab0f58..a6c426afaa7a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1174,10 +1174,14 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp) WARN(!intel_dp->want_panel_vd...
f43e04ec46b67071d432fc3f368dc9891a3443e5
Analyze and fix the following issue in the Linux kernel code: GPIO: gpio-pxa: fix building without CONFIG_OF
Problem Details: Commit 7212157267 ("GPIO: gpio-pxa: fix devicetree functions") added an "xlate" function pointer to the irq_domain_ops, but this function is nor declared or defined anywhere when CONFIG_OF is disabled, causing the build error: drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undecla...
```diff diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 793767b0962a..9cac88a65f78 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -512,6 +512,7 @@ static int pxa_gpio_nums(void) return count; } +#ifdef CONFIG_OF static struct of_device_id pxa_gpio_dt_ids[] = { { .comp...
4ec2601f6f383c8684f21562c0906e15c0dbccdd
Analyze and fix the following issue in the Linux kernel code: staging "usbip" Fix typos.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index 1d5b3fc62160..694cfd7596f3 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c @@ -155,7 +155,7 @@ static int tweak_set_configuration_cmd(struct urb *urb) * eventually reassigned to the device ...
fafbc202cd3c6ff1dc77430176c4c41102ebbdfd
Analyze and fix the following issue in the Linux kernel code: staging: speakup: i18n.c: Fix leak in msg_set()
Problem Details: If we end up returning -EINVAL from the function we will leak the memory allocated to 'newstr' which has been allocated but not yet assigned to anything. Fix the leak by properly freeing the memory again before we return. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman ...
```diff diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index ca01734d13c5..7c1658b971dc 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -555,6 +555,7 @@ ssize_t msg_set(enum msg_index_t index, char *text, size_t length) && index <= MSG_FORMATTED_END)...
935d59ff255896515741c1e5f00f28e630d1c3cf
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192u: Fix typo in staging/rtl8192u
Problem Details: Correct spelling typo in staging/rtl8192u Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 1c0a1db6420f..13f45c3125ce 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2114,7 +2114,7 @@ struct ieee80211_device { ...
3d604a398c2b9b7c2df06228da77ea293047d31f
Analyze and fix the following issue in the Linux kernel code: staging: rtl8187se: Fix typo in staging/rtl8187se
Problem Details: Correct spelling typo and adjust comment line length. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index b94c48b29302..5f5a30223d56 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -1094,7 +1094,7 @@ struct ieee80211_device { i...
db2c8da02a2175fe2d129aa55fb0b790ec07a1ac
Analyze and fix the following issue in the Linux kernel code: staging: rtl8192e: Fix typo in staging/rtl8192e
Problem Details: Correct spelling typo in staging/rtl8192e. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 481b1e4d4913..1853665764a0 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -202,7 +202,7 @@ static void dm_check_ac_dc_power(struct net_device *d...
18978952c1815c0d6c25f0d8849c67204074b3e2
Analyze and fix the following issue in the Linux kernel code: staging: ft1000: Fix ft1000_control function timeout argument usage.
Problem Details: Function ft1000_control have input argument timeout which was not passed to usb_control_msg instead hardcoded to LARGE_TIMEOUT. Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index 31929ef5332d..21c5ed6d14f9 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c @@ -73,7 +73,7 @@ static int ft1000_control(struct ft1000_dev...
6ebb56d974b2c0b31effd1bb2bde554582a9ebd8
Analyze and fix the following issue in the Linux kernel code: staging: panel: fix checkpatch warnings
Problem Details: Now checkpatch clean. $ find drivers/staging/panel -name "*.[ch]"|xargs ./scripts/checkpatch.pl \ -f --terse --nosummary|cut -f3- -d":"|sort |uniq -c|sort -n 2 WARNING: Single statement macros should not use a do {} while (0) loop Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by...
```diff diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 39f9982c2708..d9fec5b3faac 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -137,8 +137,8 @@ #define r_ctr(x) (parport_read_control((x)->port)) #define r_dtr(x) (parport_read_data((x...
103b748e21ced078f868f9218cef85b0917cebb2
Analyze and fix the following issue in the Linux kernel code: Staging: nvec: fix coding style issues
Problem Details: This commit fixes coding style issues that includes long lines. Based on the original patch submitted by Adnan Ali <adnan.ali@codethink.co.uk> Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 3655d8639736..fb52fe0d13ce 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -736,12 +736,14 @@ static int __devinit tegra_nvec_probe(struct platform_device *pdev) nvec->gpio = pdata->gpio; nvec->i2c_a...
e996f9de8534522a4ab0472e19f214cf3c7ca863
Analyze and fix the following issue in the Linux kernel code: staging:ccg: Fix missing brackets for sizeof (found by sparse).
Problem Details: Fix following: WARNING: sizeof fsg should be sizeof(fsg) + memset(&fsg, 0, sizeof fsg); Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Reviewed-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c index 6a7aab8d9bf5..81ac6bbba55f 100644 --- a/drivers/staging/ccg/ccg.c +++ b/drivers/staging/ccg/ccg.c @@ -728,7 +728,7 @@ static int mass_storage_function_init(struct ccg_usb_function *f, struct fsg_common *common; int err; - memset(&fsg...
472aba5f91fd6413c9c75e71366f133aa8c7f2f2
Analyze and fix the following issue in the Linux kernel code: staging: gdm72xx: fix reference counting in gdm_wimax_event_init
Problem Details: This patch fixes the commit "staging/gdm72xx: cleanup little at gdm_wimax_event_rcv" (8df858ea76b76dde9a39d4edd9aaded983582cfe), which mishandles the reference counting of wm_event. Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c index 0716efc1817d..6cb810701a3e 100644 --- a/drivers/staging/gdm72xx/gdm_wimax.c +++ b/drivers/staging/gdm72xx/gdm_wimax.c @@ -258,12 +258,16 @@ static int gdm_wimax_event_init(void) if (!wm_event.ref_cnt) { wm_event.so...
86d03a0f4f575dda7988800a3da8d6e9f776a819
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: isoc latency for audio burst
Problem Details: Set audio latency. This fixes issue where audio clips heard during link outage. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 6c287ac6eaea..f546b5aee869 100644 --- a/drivers/staging/ozwpan/ozpd.c +++ b/drivers/staging/ozwpan/ozpd.c @@ -24,12 +24,6 @@ /*------------------------------------------------------------------------------ */ #define OZ_MAX_TX_...
5494ebdf3c1ac634b133369736632be82a0255f8
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: Return correct actual_length to userland
Problem Details: This fixes issue where wrong retrun value was received by userland application after writing data to raw hid device. Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 4ac1f2731861..76821cb6d25f 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -933,13 +933,14 @@ void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode, u8 *data, } else { int copy_len; ...
24168911bedc23b02a0fa5043befa37580e6a9cb
Analyze and fix the following issue in the Linux kernel code: staging: ozwpan: Insulate driver from HZ value
Problem Details: This patch fixes issue caused due to different HZ value on system which do not have HZ=1000 Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 617bfed4a3d6..4ac1f2731861 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -1053,7 +1053,7 @@ int oz_hcd_heartbeat(void *hport) ep = ep_from_link(e); if (ep->credit < 0) continue; - ...
d7de993503aa23f34d58b7945cf00ad9a9486bda
Analyze and fix the following issue in the Linux kernel code: staging: omapdrm: Fix DMM sparse warnings
Problem Details: Fix the following sparse warnings: drivers/staging/omapdrm/omap_dmm_tiler.c:123:13: warning: symbol 'omap_dmm_irq_handler' was not declared. Should it be static? drivers/staging/omapdrm/omap_dmm_tiler.c:370:24: warning: Using plain integer as NULL pointer Signed-off-by: Andy Gross <andy.gro...
```diff diff --git a/drivers/staging/omapdrm/omap_dmm_tiler.c b/drivers/staging/omapdrm/omap_dmm_tiler.c index 86197831f63e..ec7a5c8f5363 100644 --- a/drivers/staging/omapdrm/omap_dmm_tiler.c +++ b/drivers/staging/omapdrm/omap_dmm_tiler.c @@ -120,7 +120,7 @@ static int wait_status(struct refill_engine *engine, uint32_t...
931846901c08a53b43590dd99bbf53026c4f0890
Analyze and fix the following issue in the Linux kernel code: staging: vt6656: Fix typo in vt6656
Problem Details: Correct spelling typo in staging/vt6656 Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 3fd0478a9a54..c82b3e695b8d 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -26,7 +26,7 @@ * Date: Feb. 19, 2004 * * Functions: - * IFRFbWriteEmbeded - Embeded write RF register via MAC + * ...
0142919c583cad4e6c82566f59a95ff1e2a728f5
Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: Fix typos.
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/tidspbridge/Documentation/error-codes b/drivers/staging/tidspbridge/Documentation/error-codes index 12826e2a3aaa..ad73cba058eb 100644 --- a/drivers/staging/tidspbridge/Documentation/error-codes +++ b/drivers/staging/tidspbridge/Documentation/error-codes @@ -69,7 +69,7 @@ The error c...
2258937b2137214bae796ec929394a282f531ed7
Analyze and fix the following issue in the Linux kernel code: staging: android: ashmem: Fix comment/license formatting
Problem Details: Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 69cf2db1d69c..94a740d2883d 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -1,20 +1,20 @@ /* mm/ashmem.c -** -** Anonymous Shared Memory Subsystem, ashmem -** -** Copyright (C) 2008 Go...
2ea4b442589b30210a166b9630c2547ebbe2cb82
Analyze and fix the following issue in the Linux kernel code: [media] rc/Kconfig: Fix a warning
Problem Details: drivers/media/rc/Kconfig:291:warning: multi-line strings not supported Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index 016f9ab1c1e9..4682a5a3c3ed 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -288,7 +288,7 @@ config IR_TTUSBIR be called ttusbir. config IR_RX51 - tristate "Nokia N900 IR transmitter diode + tristate "Nokia N90...
3d4e9e57e6da4ccd4c9710c76651175bc756799e
Analyze and fix the following issue in the Linux kernel code: staging: csr: Fix up version.h includes
Problem Details: Include version.h where actually needed, remove where unneeded. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/csr/csr_panic.c b/drivers/staging/csr/csr_panic.c index 353a829bb74c..095f7fa3ae2c 100644 --- a/drivers/staging/csr/csr_panic.c +++ b/drivers/staging/csr/csr_panic.c @@ -9,7 +9,6 @@ *****************************************************************************/ #include <linux/ke...
a6c42258ac8735aa25a4e5b711df2e516c3aff14
Analyze and fix the following issue in the Linux kernel code: staging/csr: fix coding style problems in handle_bh_error
Problem Details: the following fixes: * fix line over 80 * fix no space at start of line * use tabs instead of spaces * no need of opening & closing braces for single statement if block Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@blu...
```diff diff --git a/drivers/staging/csr/bh.c b/drivers/staging/csr/bh.c index 3193df215181..addee05a4516 100644 --- a/drivers/staging/csr/bh.c +++ b/drivers/staging/csr/bh.c @@ -160,39 +160,41 @@ uf_wait_for_thread_to_stop(unifi_priv_t *priv, struct uf_thread *thread) * None. * -------------------------------...
b29687fb8857061348db95c13712ca36549725b2
Analyze and fix the following issue in the Linux kernel code: staging/csr: fix coding style problems in uf_wait_for_thread_to_stop
Problem Details: the following fixes: * fix no space at the start of line * line over 80 characters * use tabs instead of spaces at starting of every line Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Pelto...
```diff diff --git a/drivers/staging/csr/bh.c b/drivers/staging/csr/bh.c index 7a00aa8691b9..2597e22291ca 100644 --- a/drivers/staging/csr/bh.c +++ b/drivers/staging/csr/bh.c @@ -122,23 +122,24 @@ void uf_stop_thread(unifi_priv_t *priv, struct uf_thread *thread) * * -------------------------------------------------...
f7523ab6c0a7c9eefee2ab7fd0df48fca839b490
Analyze and fix the following issue in the Linux kernel code: staging/csr: fix coding style problems in uf_stop_thread
Problem Details: The following warnings and errors were fixed: * fix no space at the start of a line * fix line over 80 characters * use tabs instead of spaces Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka ...
```diff diff --git a/drivers/staging/csr/bh.c b/drivers/staging/csr/bh.c index 2b7c4c09d5f7..7a00aa8691b9 100644 --- a/drivers/staging/csr/bh.c +++ b/drivers/staging/csr/bh.c @@ -94,15 +94,16 @@ int uf_start_thread(unifi_priv_t *priv, */ void uf_stop_thread(unifi_priv_t *priv, struct uf_thread *thread) { - if (!...
cff9e59f65019428ba8f172dcc8af0154590de42
Analyze and fix the following issue in the Linux kernel code: staging/csr: clean coding style in uf_start_thread
Problem Details: in bh.c the function uf_start_thread needed a coding style fixes. The following fixes: * fix no space at the start of line * fix over 80 character lines * fix no brace needed for single statement blocks (if..else or for and while) * use tabs instead of 4 spaces at the start of every line Cc: Mikko V...
```diff diff --git a/drivers/staging/csr/bh.c b/drivers/staging/csr/bh.c index b089c28d5610..2b7c4c09d5f7 100644 --- a/drivers/staging/csr/bh.c +++ b/drivers/staging/csr/bh.c @@ -32,45 +32,49 @@ * 0 on success or else a Linux error code. * -----------------------------------------------------------------------...
2dd58c9d8de3858c51a2f903cc40c0d919a7ce27
Analyze and fix the following issue in the Linux kernel code: staging/csr: coding style fixes at sdio_linux_remove_irq and at install_irq
Problem Details: the following coding style problems were fixed: 1. move function return type from top to the starting of the function 2. remove all the spaces at the start of a line and used tabs Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/csr/sdio_mmc.c b/drivers/staging/csr/sdio_mmc.c index d3fd57cdde0b..b203d2b95137 100644 --- a/drivers/staging/csr/sdio_mmc.c +++ b/drivers/staging/csr/sdio_mmc.c @@ -845,19 +845,18 @@ uf_glue_sdio_int_handler(struct sdio_func *func) * Status of the removal. * --------------...
02c4be05d9718d5d0f45db39cbef8a927ff4ebb8
Analyze and fix the following issue in the Linux kernel code: staging/csr: coding style fixes in CsrTimeGet
Problem Details: the following warnings were fixed: 1. removed all spaces before the start of a line and used tabs 2. removed the braces around the if as it encloses only a single statement Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/csr/csr_time.c b/drivers/staging/csr/csr_time.c index 83586ca34e8c..2043f253ae4c 100644 --- a/drivers/staging/csr/csr_time.c +++ b/drivers/staging/csr/csr_time.c @@ -24,20 +24,18 @@ CsrTime CsrTimeGet(CsrTime *high) { - struct timespec ts; - u64 time; - CsrTime low; + s...
9e58d05a1b24d2c0471c3b4df8f473a7543d7647
Analyze and fix the following issue in the Linux kernel code: Staging: ipack/bridges/tpci200: avoid kernel bug when uninstalling a device
Problem Details: Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/ipack/bridges/tpci200.c b/drivers/staging/ipack/bridges/tpci200.c index 2b83fa8e550a..a7fb2cfe51ee 100644 --- a/drivers/staging/ipack/bridges/tpci200.c +++ b/drivers/staging/ipack/bridges/tpci200.c @@ -604,8 +604,8 @@ static int tpci200_slot_unregister(struct ipack_device *dev) if...
53fa8c46881a5a500fdcc4cf86359d92211b1e9b
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: ssv_dnp: fix checkpatch.pl warning
Problem Details: Fix checkpatch.pl warning about printk issue by merging two printk calls into one dev_info call. Signed-off-by: Güngör Erseymen <gelurine@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c index 84b9f2a4280b..d1f5118c3afa 100644 --- a/drivers/staging/comedi/drivers/ssv_dnp.c +++ b/drivers/staging/comedi/drivers/ssv_dnp.c @@ -177,8 +177,6 @@ static int dnp_attach(struct comedi_device *dev, struct comed...
b08deebebe13c73b35701d180a4689dfb34db519
Analyze and fix the following issue in the Linux kernel code: [media] saa7134-dvb: Fix kworld sbtvd I2C gate control
Problem Details: The correct place to put i2c_gate_ctrl is before calling tda18271_attach, because the driver tda18271 will use it to enable or disable the i2c-bus from the demodulator to the tuner. And thus eliminate the error message: "Unknown device (255) detected @ 1-00c0, device not supported" in the driver tda18...
```diff diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index d0f53bb153e3..b209de40a4f8 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -1796,10 +1796,10 @@ static int dvb_init(struct saa7134_dev *dev) dvb_...
a342ca1c78627c3a8b2a8c4e6d5f6ab1b88e6169
Analyze and fix the following issue in the Linux kernel code: TTY: mxser, fix invalid module_parm permissions
Problem Details: 444 means 0674 and we do not definitely want that. Use S_IRUGO which is much more safer. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-by: Rusty Russell <rusty@ozlabs.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 8bc265154ad7..bb2da4ca8257 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -2338,7 +2338,7 @@ static struct tty_port_operations mxser_port_ops = { */ static bool allow_overlapping_vector; -module_param(allow_overlapping_vector, bool...
3ec0a17ef5f4ea922b10ebfdb99473c4d8d6120d
Analyze and fix the following issue in the Linux kernel code: TTY: con3215, unset raw3215[line]
Problem Details: raw3215[line] is set in probe, but not unset in remove. This will lead to random crashes if the device is removed and the corresponding tty opened later. open would dereference freed memory. So set raw3215[line] to NULL in remove to fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Martin Schw...
```diff diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 6c0116d48c74..16554982671c 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -716,10 +716,17 @@ static int raw3215_probe (struct ccw_device *cdev) static void raw3215_remove (struct ccw_device *cdev) { s...
72a33bf58c50892bce7ee4f58d487e818dec1c7e
Analyze and fix the following issue in the Linux kernel code: TTY: tty_port, add some documentation
Problem Details: I forgot to document tty_port_register_device and tty_port_install when they were added. Fix it now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 5246763cff0c..c2f0592bcb2c 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -33,6 +33,17 @@ void tty_port_init(struct tty_port *port) } EXPORT_SYMBOL(tty_port_init); +/** + * tty_port_register_device - register tty device ...
2064db725cc6d4ea19a24c138bc37939b63e3ae6
Analyze and fix the following issue in the Linux kernel code: drm/nv86/fifo: suspend fix
Problem Details: This fix is a backport from the reworked nouveau driver. It masks off the engines we're not expecting to use before attempting a channel kickoff. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv84_fifo.c b/drivers/gpu/drm/nouveau/nv84_fifo.c index cc82d799fc3b..c564c5e4c30a 100644 --- a/drivers/gpu/drm/nouveau/nv84_fifo.c +++ b/drivers/gpu/drm/nouveau/nv84_fifo.c @@ -117,17 +117,22 @@ nv84_fifo_context_del(struct nouveau_channel *chan, int engine) struct drm_de...
44b9f44e111c1e4a50bff66a642cc7c5cb59af4e
Analyze and fix the following issue in the Linux kernel code: nouveau: fixup scanout enable in nvc0_pm
Problem Details: Fixes screen being black after changing performance level. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: stable@vger.kernel.org [3.5+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nvc0_pm.c b/drivers/gpu/drm/nouveau/nvc0_pm.c index 7c95c44e2887..4e712b10ebdb 100644 --- a/drivers/gpu/drm/nouveau/nvc0_pm.c +++ b/drivers/gpu/drm/nouveau/nvc0_pm.c @@ -557,7 +557,7 @@ prog_mem(struct drm_device *dev, struct nvc0_pm_state *info) nouveau_mem_exec(&exec, in...
3d7a1da2c2bddb916450b1a124a9bcd9c507bdce
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/aux: mask off higher bits of auxch index in i2c table entry
Problem Details: At least partially fixes DP output detection on W530. Not sure if more issues remain, or if my adaptor is just behaving weirdly (it does that sometimes). In any case, this patch is necessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c index 77e564667b5c..240cf962c999 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c @@ -229,7 +229,7 @@ nouveau_i2c_init(struct drm_device *dev) } break; case 6: /* N...
1265057fa02c7bed3b6d9ddc8a2048065a370364
Analyze and fix the following issue in the Linux kernel code: workqueue: fix CPU binding of flush_delayed_work[_sync]()
Problem Details: delayed_work encodes the workqueue to use and the last CPU in delayed_work->work.data while it's on timer. The target CPU is implicitly recorded as the CPU the timer is queued on and delayed_work_timer_fn() queues delayed_work->work to the CPU it is running on. Unfortunately, this leaves flush_delaye...
```diff diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 20000305a8a6..b14d5d59af7c 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -102,6 +102,7 @@ struct work_struct { struct delayed_work { struct work_struct work; struct timer_list timer; + int cpu; }; stati...
41f63c5359d14ca995172b8f6eaffd93f60fec54
Analyze and fix the following issue in the Linux kernel code: workqueue: use mod_delayed_work() instead of cancel + queue
Problem Details: Convert delayed_work users doing cancel_delayed_work() followed by queue_delayed_work() to mod_delayed_work(). Most conversions are straight-forward. Ones worth mentioning are, * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always use mod_delayed_work() and cancel loop in edac_mc_r...
```diff diff --git a/block/genhd.c b/block/genhd.c index cac7366957c3..5d8b44a6442b 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1534,10 +1534,8 @@ void disk_flush_events(struct gendisk *disk, unsigned int mask) spin_lock_irq(&ev->lock); ev->clearing |= mask; - if (!ev->block) { - cancel_delayed_work(&ev->...
0a67fe458471cc13adeb0e10694e10674bf383eb
Analyze and fix the following issue in the Linux kernel code: [media] lmedm04: fix data usage past the end of the buffer
Problem Details: On Mon, 2012-08-13 at 19:58 +0300, Dan Carpenter wrote: > Hello Mauro Carvalho Chehab, > > The patch db6651a9ebb3: "[media] lmedm04: fix build" from Aug 12, > 2012, leads to the following warning: > drivers/media/dvb/dvb-usb-v2/lmedm04.c:769 lme2510_download_firmware() > error: usb_control_msg() 'dat...
```diff diff --git a/drivers/media/dvb/dvb-usb-v2/lmedm04.c b/drivers/media/dvb/dvb-usb-v2/lmedm04.c index c6bc1b8b58b8..c41d9d9ec7b5 100644 --- a/drivers/media/dvb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/dvb/dvb-usb-v2/lmedm04.c @@ -766,10 +766,6 @@ static int lme2510_download_firmware(struct dvb_usb_device *d, } ...
d9bc8510c5fb55ce7092ebc928c0791e738ea5ae
Analyze and fix the following issue in the Linux kernel code: [media] cx88: Remove duplicate const
Problem Details: This patch fixes the following sparse warnings by removing use of duplicate const. drivers/media/video/cx88/cx88.h:152:40: warning: duplicate const drivers/media/video/cx88/cx88-core.c:256:33: warning: duplicate const drivers/media/video/cx88/cx88-alsa.c:769:41: warning: duplicate const As comment...
```diff diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index dfac6e34859f..3aa6856ead3b 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -749,7 +749,7 @@ static struct snd_kcontrol_new snd_cx88_alc_switch = { * Only boards with e...
418edaaba96e58112b15c82b4907084e2a9caf42
Analyze and fix the following issue in the Linux kernel code: RDMA/ucma.c: Fix for events with wrong context on iWARP
Problem Details: It is possible for asynchronous RDMA_CM_EVENT_ESTABLISHED events to be generated with ctx->uid == 0, because ucma_set_event_context() copies ctx->uid to the event structure outside of ctx->file->mut. This leads to a crash in the userspace library, since it gets a bogus event. Fix this by taking the m...
```diff diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 6bf850422895..055ed59838dc 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -267,6 +267,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id, if (!uevent) return event->event == RDMA...
1d16e6d3965bff8d96995132a3b6beab7841e842
Analyze and fix the following issue in the Linux kernel code: [media] dvb-usb: use %*ph to dump small buffers
Problem Details: [crope@iki.fi: fix trivial merge conflict] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-usb-v2/af9015.c b/drivers/media/dvb/dvb-usb-v2/af9015.c index 10363f6b5234..e77429b37a7d 100644 --- a/drivers/media/dvb/dvb-usb-v2/af9015.c +++ b/drivers/media/dvb/dvb-usb-v2/af9015.c @@ -1199,8 +1199,7 @@ static int af9015_rc_query(struct dvb_usb_device *d) /* Only proces...
6b982fcf0260b8371604fcf6a12c6beecb731c57
Analyze and fix the following issue in the Linux kernel code: mm/frontswap: fix uninit'ed variable warning
Problem Details: Fixes uninitialized variable warning on 'type' in frontswap_shrink(). type is set before use by __frontswap_unuse_pages() called by __frontswap_shrink() called by frontswap_shrink() before use by try_to_unuse(). Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Konrad Rzeszutek...
```diff diff --git a/mm/frontswap.c b/mm/frontswap.c index 6b3e71a2cd48..89dc399d3328 100644 --- a/mm/frontswap.c +++ b/mm/frontswap.c @@ -292,7 +292,7 @@ static int __frontswap_shrink(unsigned long target_pages, void frontswap_shrink(unsigned long target_pages) { unsigned long pages_to_unuse = 0; - int type, ret; ...
22c5649eef0fc37532e20c14d2656b28ca708a69
Analyze and fix the following issue in the Linux kernel code: p54: fix powerpc gcc warnings
Problem Details: My commit "p54: parse output power table" introduced the following compiler warnings for powerpc-allmodconfig eeprom.c: In function 'p54_get_maxpower': eeprom.c:291 warning: comparison of distinct pointer types lacks a cast eeporm.c:292 warning: comparison of distinct pointer types lacks a cast eeprom...
```diff diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c index d4d86107e05a..1ef1bfe6a9d7 100644 --- a/drivers/net/wireless/p54/eeprom.c +++ b/drivers/net/wireless/p54/eeprom.c @@ -288,10 +288,14 @@ static int p54_get_maxpower(struct p54_common *priv, void *data) for (j = 0; j < ARR...
df32381896f5f0c78a371df2e49ab7c776b1a5ba
Analyze and fix the following issue in the Linux kernel code: mac80211: fix unnecessary beacon update after peering status change
Problem Details: ieee80211_bss_info_change_notify is called everytime a peer link is established or closed, because the accepting_plinks flag in the meshconf IE *might* have changed. With this patch the corresponding functions return the BSS_CHANGED_BEACON flag when a beacon update is necessary. Also it makes mesh_ac...
```diff diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 6fac18c0423f..856dcf49ce75 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -136,10 +136,13 @@ bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie) * mesh_accept_plinks_update - update accepting_plink in local mesh beacons * *...
4da212e2ffaa34edb887a3a86424124fe8341e34
Analyze and fix the following issue in the Linux kernel code: [media] saa7134: simplify timer activation
Problem Details: This simplies the code and resolves a possible race condition between ir_raw_decode_timer_end() and saa7134_raw_decode_irq(). If the interrupt handler is called after ir_raw_decode_timer_end() calls ir_raw_event_handle() but before clearing ir->active, then the timer won't be rearmed. Compile tested ...
```diff diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 05c6e217d8a7..0f78f5e537e2 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -446,11 +446,8 @@ static void saa7134_input_timer(unsigned long da...
640583836b9488c806349e3839c9d8b0f15da1fa
Analyze and fix the following issue in the Linux kernel code: [media] iguanair: fix receiver overflow
Problem Details: The Pioneer CU-700 remote causes receiver overflows if you hold down any button. The remote does not send NEC IR repeats, it repeats the entire NEC code after 20ms. The iguanair hardware advertises an interval of 10 which just not enough; with 100 URBs per second and at most 7 edges per URB, we handle...
```diff diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 9810008b41d4..6a09c2e53753 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -484,9 +484,8 @@ static int __devinit iguanair_probe(struct usb_interface *intf, init_completion(&ir->completion); pipein = ...
7dd6753f6d2e7e0ccbf2263cef3a9fff6bc89988
Analyze and fix the following issue in the Linux kernel code: ath5k: fix spin_lock_irqsave/spin_lock_bh nesting in mesh
Problem Details: Lockdep found an inconsistent lock state when joining a mesh with ath5k. The problem is that ath5k takes the lock for its beacon state, ah->block, with spin_lock_irqsave(), while mesh internally takes the sync_offset_lock with spin_lock_bh() in mesh_sync_offset_adjust_tbtt(), which in turn is called u...
```diff diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 8c4c040a47b8..2aab20ee9f38 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -2056,9 +2056,7 @@ ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf) void ath5...
e1352fde5682ab1bdd2a9e5d75c22d1fe210ef77
Analyze and fix the following issue in the Linux kernel code: ath9k: fix decrypt_error initialization in ath_rx_tasklet()
Problem Details: ath_rx_tasklet() calls ath9k_rx_skb_preprocess() and ath9k_rx_skb_postprocess() in a loop over the received frames. The decrypt_error flag is initialized to false just outside ath_rx_tasklet() loop. ath9k_rx_accept(), called by ath9k_rx_skb_preprocess(), only sets decrypt_error to true and never to fal...
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 12aca02228c2..4480c0cc655f 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -1044,7 +1044,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) struct i...
e18287d301bf56dd820137026d51ab38cf6c2e83
Analyze and fix the following issue in the Linux kernel code: ARM: mv78xx0: fix win_cfg_base prototype
Problem Details: Patch b6d1c33a31 "ARM: Orion: Consolidate the address map setup" tried to merge the address map for the four orion platforms, but apparently got it wrong for mv78xx0. Admittedly I don't understand what this code actually does, but it's clear that the current version is wrong. Without this patch, build...
```diff diff --git a/arch/arm/mach-mv78xx0/addr-map.c b/arch/arm/mach-mv78xx0/addr-map.c index 62b53d710efd..a9bc84180d21 100644 --- a/arch/arm/mach-mv78xx0/addr-map.c +++ b/arch/arm/mach-mv78xx0/addr-map.c @@ -37,7 +37,7 @@ #define WIN0_OFF(n) (BRIDGE_VIRT_BASE + 0x0000 + ((n) << 4)) #define WIN8_OFF(n) (BRIDGE_VI...
51d59c6b422f3f95940ae4e5b42f165595906aee
Analyze and fix the following issue in the Linux kernel code: KVM: x86: fix pvclock guest stopped flag reporting
Problem Details: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough. Reviewed-by: Eric B Munson <emunson@mgebm.net> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatt...
```diff diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 1309e69b57fa..fc0e752e7564 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -420,6 +420,8 @@ struct kvm_vcpu_arch { unsigned int hw_tsc_khz; unsigned int time_offset; struct page *time...
116e4f592a4d207031b2eaf9dacb57de587146ef
Analyze and fix the following issue in the Linux kernel code: [media] iguanair: reset the IR state after rx overflow or receiver enable
Problem Details: Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 68172585c961..8de690aa2c7e 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -123,6 +123,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len) break; case CMD_RX_OVERFLOW: dev_warn(i...
884bfd08e3d4f694574e54bd1886cd8817d9b986
Analyze and fix the following issue in the Linux kernel code: [media] iguanair: fix return value for transmit
Problem Details: Also fix error codes returned from open. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index f1c5846b35f4..68172585c961 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -327,7 +327,7 @@ static int iguanair_tx(struct rc_dev *dev, unsigned *txbuf, unsigned count) { struct iguanair *ir = dev->priv;...
c6afbf298bde96209099c3b9aaf35c5937789a75
Analyze and fix the following issue in the Linux kernel code: [media] davinci: fix build warning when CONFIG_DEBUG_SECTION_MISMATCH is enabled
Problem Details: Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/davinci/dm355_ccdc.c b/drivers/media/video/davinci/dm355_ccdc.c index 5b68847d4017..2eb7dbd6dbac 100644 --- a/drivers/media/video/davinci/dm355_ccdc.c +++ b/drivers/media/video/davinci/dm355_ccdc.c @@ -1060,7 +1060,7 @@ static int dm355_ccdc_remove(struct platform_device *pdev) ...
3aafe5ae08f2aed378e06d78b207883879d25cbe
Analyze and fix the following issue in the Linux kernel code: perf symbols: Use both runtime and debug images
Problem Details: We keep both a 'runtime' elf image as well as a 'debug' elf image around and generate symbols by looking at both of these. This eliminates the need for the want_symtab/goto restart mechanism combined with iterating over and reopening the elf images a second time. Also give dso__synthsize_plt_symbols(...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 36e4a458e7a1..5b37e13f08fb 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -525,6 +525,11 @@ static int dso__swap_init(struct dso *dso, unsigned char eidata) return 0; } +bool symsrc__possibly_run...
261360b6e90a782f0a63d8f61a67683c376c88cf
Analyze and fix the following issue in the Linux kernel code: perf symbols: Convert dso__load_syms to take 2 symsrc's
Problem Details: To properly handle platforms with an opd section, both a runtime image (which contains the opd section but possibly lacks symbols) and a symbol image (which probably lacks an opd section but has symbols). The next patch ("perf symbol: use both runtime and debug images") adjusts the callsite in dso__lo...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 492ebecfbfb6..36e4a458e7a1 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -619,7 +619,8 @@ out_close: return err; } -int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *ss, +int ds...
d26cd12b46cb6b5595143804b43ba5aa7968551e
Analyze and fix the following issue in the Linux kernel code: perf symbols: Factor want_symtab out of dso__load_sym()
Problem Details: Only one callsite of dso__load_sym() uses the want_symtab functionality, so place the logic at the callsite instead of within dso__load_sym(). This sets us up for removal of want_symtab completely once we keep multiple elf handles (within symsrc's) around. Setup for the later patch "perf symbols: Us...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 591594775904..492ebecfbfb6 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -525,6 +525,10 @@ static int dso__swap_init(struct dso *dso, unsigned char eidata) return 0; } +bool symsrc__has_symtab(s...
a44f605b2f6eadb771a052aa3a5eefb342b38a39
Analyze and fix the following issue in the Linux kernel code: perf symbols: Switch dso__synthesize_plt_symbols() to use symsrc
Problem Details: Previously dso__synthesize_plt_symbols() was reopening the elf file to obtain dynsyms from it. Rather than reopen the file, use the already opened reference within the symsrc to access it. Setup for the later patch "perf symbols: Use both runtime and debug images" Signed-off-by: Cody P Schafer <cody...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 3a9c38a39bc9..591594775904 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -166,7 +166,7 @@ static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, * And always look at the original dso, not at ...
005f92947a0da7eb47b0f1ff611f8fc3d7ab4751
Analyze and fix the following issue in the Linux kernel code: perf symbols: Set symtab_type in dso__load_sym
Problem Details: In certain cases, dso__load requires dso->symbol_type to be set prior to calling it. With the introduction of symsrc*, the symtab_type is now stored in a symsrc which is then passed to dso__load_sym(). Change dso__load_sym() to use the symtab_type from them symsrc (setting dso->symtab_type as well). ...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 6974b2a44ee7..3a9c38a39bc9 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -645,6 +645,8 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *ss, int nr = 0; size_t opdidx = 0; +...
b68e2f919c6d3a0422239c98673c35ff503e52fb
Analyze and fix the following issue in the Linux kernel code: perf symbols: Introduce symsrc structure.
Problem Details: Factors opening of certain sections & tracking certain elf info into an external structure. The goal here is to keep multiple elfs (and their looked up sections/indexes) around during the symbol generation process (in dso__load()). We need this to properly resolve symbols on PPC due to the use of fun...
```diff diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index a9a194d49c1b..6974b2a44ee7 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -536,24 +536,25 @@ static int dso__swap_init(struct dso *dso, unsigned char eidata) return 0; } -int dso__load_sym(struct...
cee25168e9c4ef7f9417632af2dc78b8521dfda7
Analyze and fix the following issue in the Linux kernel code: drm/i915: ensure i2c adapter is all set before adding it
Problem Details: i2c_add_adapter() may do i2c transfers on the bus to detect supported devices. Therefore the adapter needs to be all set before adding it. This was not the case for the bit-banging fallback, resulting in an oops if the device detection GMBUS transfers timed out. Fix the issue by calling i2c_add_adapter...
```diff diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index d79500bc1ce5..b9755f6378d8 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -486,9 +486,6 @@ int intel_setup_gmbus(struct drm_device *dev) bus->dev_priv = dev_priv; bus->adapter....
ebb6cc03596cc89c89670473282ea46573feb34f
Analyze and fix the following issue in the Linux kernel code: perf/x86: Fixes for Nehalem-EX uncore driver
Problem Details: This patch includes following fixes and update: - Only some events in the Sbox and Mbox can use the match/mask registers, add code to check this. - The format definitions for xbr_mm_cfg and xbr_match registers in the Rbox are wrong, xbr_mm_cfg should use 32 bits, xbr_match should use 64 bits...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index a7ccd68aa13a..84434e2a676f 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -796,7 +796,6 @@ static struct intel_uncore_type *nhm_msr_...
cffa59baa5f1cf3e3e9e172697db48912471531c
Analyze and fix the following issue in the Linux kernel code: perf, x86: Fix uncore_types_exit section mismatch
Problem Details: Fix the following section mismatch: WARNING: arch/x86/kernel/cpu/built-in.o(.text+0x7ad9): Section mismatch in reference from the function uncore_types_exit() to the function .init.text:uncore_type_exit() The function uncore_types_exit() references the function __init uncore_type_exit(). This is oft...
```diff diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 7563fda9f033..a7ccd68aa13a 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -2373,7 +2373,7 @@ static void __init uncore_type_exit(str...
532b1858c5241bedfff5ab863d7cf012e8b81a6b
Analyze and fix the following issue in the Linux kernel code: sched: Fix __sched_period comment
Problem Details: It should be sched_nr_latency so fix it before it annoys me more. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1344435364-18632-1-git-send-email-bp@amd64.org Signed-off-by: Thomas Gleixner <tglx@linutroni...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c219bf8d704c..99285a85e210 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -597,7 +597,7 @@ calc_delta_fair(unsigned long delta, struct sched_entity *se) /* * The idea is to set a period in which each task runs once. * - * When ther...
0bce9c46bf3b15f485d82d7e81dabed6ebcc24b1
Analyze and fix the following issue in the Linux kernel code: mutex: Place lock in contended state after fastpath_lock failure
Problem Details: ARM recently moved to asm-generic/mutex-xchg.h for its mutex implementation after the previous implementation was found to be missing some crucial memory barriers. However, this has revealed some problems running hackbench on SMP platforms due to the way in which the MUTEX_SPIN_ON_OWNER code operates. ...
```diff diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h index 580a6d35c700..c04e0db8a2d6 100644 --- a/include/asm-generic/mutex-xchg.h +++ b/include/asm-generic/mutex-xchg.h @@ -26,7 +26,13 @@ static inline void __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) { i...
8f6189684eb4e85e6c593cd710693f09c944450a
Analyze and fix the following issue in the Linux kernel code: sched: Fix migration thread runtime bogosity
Problem Details: Make stop scheduler class do the same accounting as other classes, Migration threads can be caught in the act while doing exec balancing, leading to the below due to use of unmaintained ->se.exec_start. The load that triggered this particular instance was an apparently out of control heavily threaded...
```diff diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c index 7b386e86fd23..da5eb5bed84a 100644 --- a/kernel/sched/stop_task.c +++ b/kernel/sched/stop_task.c @@ -27,8 +27,10 @@ static struct task_struct *pick_next_task_stop(struct rq *rq) { struct task_struct *stop = rq->stop; - if (stop && stop->...
e221d028bb08b47e624c5f0a31732c642db9d19a
Analyze and fix the following issue in the Linux kernel code: sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled
Problem Details: Root task group bandwidth replenishment must service all CPUs, regardless of where the timer was last started, and regardless of the isolation mechanism, lest 'Quoth the Raven, "Nevermore"' become rt scheduling policy. Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zi...
```diff diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 573e1ca01102..944cb68420e9 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -788,6 +788,19 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) const struct cpumask *span; span = sched_rt_period_mask(); +#ifdef CON...
35cf4e50b16331def6cfcbee11e49270b6db07f5
Analyze and fix the following issue in the Linux kernel code: sched,cgroup: Fix up task_groups list
Problem Details: With multiple instances of task_groups, for_each_rt_rq() is a noop, no task groups having been added to the rt.c list instance. This renders __enable/disable_runtime() and print_rt_stats() noop, the user (non) visible effect being that rt task groups are missing in /proc/sched_debug. Signed-off-by: M...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e2c5841c7dfe..6aa212f3c581 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7252,6 +7252,7 @@ int in_sched_functions(unsigned long addr) #ifdef CONFIG_CGROUP_SCHED struct task_group root_task_group; +LIST_HEAD(task_groups); #endif ...
bea6832cc8c4a0a9a65dd17da6aaa657fe27bc3e
Analyze and fix the following issue in the Linux kernel code: sched: fix divide by zero at {thread_group,task}_times
Problem Details: On architectures where cputime_t is 64 bit type, is possible to trigger divide by zero on do_div(temp, (__force u32) total) line, if total is a non zero number but has lower 32 bit's zeroed. Removing casting is not a good solution since some do_div() implementations do cast to u32 internally. This pro...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2cb4e7777998..e2c5841c7dfe 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3142,6 +3142,20 @@ void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) # define nsecs_to_cputime(__nsecs) nsecs_to_jiffies(__nsecs) #e...
a35b6466aabb051568b844e8c63f87a356d3d129
Analyze and fix the following issue in the Linux kernel code: sched, cgroup: Reduce rq->lock hold times for large cgroup hierarchies
Problem Details: Peter Portante reported that for large cgroup hierarchies (and or on large CPU counts) we get immense lock contention on rq->lock and stuff stops working properly. His workload was a ton of processes, each in their own cgroup, everybody idling except for a sporadic wakeup once every so often. It was ...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d0cc03b3e70b..c219bf8d704c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3387,6 +3387,14 @@ static int tg_load_down(struct task_group *tg, void *data) static void update_h_load(long cpu) { + struct rq *rq = cpu_rq(cpu); + unsigned...
0f75a710dfd8fd5cd9e558e3f26c474c8fa63e3c
Analyze and fix the following issue in the Linux kernel code: perf symbols: Remove unused function map__objdump_2ip
Problem Details: map__objdump_2ip was introduced in: ee11b90b12 perf top: Fix annotate for userspace And it's last user removed in: 36532461a0 perf top: Ditch private annotation code, share perf annotate's Remove it. Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com> Cc: David Hansen <dave@linux.vnet.ibm.com>...
```diff diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 287cb3452b4b..7d37159c1e99 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -262,14 +262,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip) return addr; } -u64 map__objdump_2ip(struct map *map, u64 addr) -{ - u64 ip = map->...
3180d89b47701072cf129f800a735baf3acdbb8a
Analyze and fix the following issue in the Linux kernel code: hotplug: Fix UP bug in smpboot hotplug code
Problem Details: Because kernel subsystems need their per-CPU kthreads on UP systems as well as on SMP systems, the smpboot hotplug kthread functions must be provided in UP builds as well as in SMP builds. This commit therefore adds smpboot.c to UP builds and excludes irrelevant code via #ifdef. Signed-off-by: Pa...
```diff diff --git a/kernel/Makefile b/kernel/Makefile index c0cc67ad764c..e5602d32acb3 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -10,7 +10,7 @@ obj-y = fork.o exec_domain.o panic.o printk.o \ kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ hrtimer.o rwsem.o nsproxy.o srcu.o s...
f97f8f06a49febbc3cb3635172efbe64ddc79700
Analyze and fix the following issue in the Linux kernel code: smpboot: Provide infrastructure for percpu hotplug threads
Problem Details: Provide a generic interface for setting up and tearing down percpu threads. On registration the threads for already online cpus are created and started. On deregistration (modules) the threads are stoppped. During hotplug operations the threads are created, started, parked and unparked. The datastruc...
```diff diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h new file mode 100644 index 000000000000..e0106d8581d3 --- /dev/null +++ b/include/linux/smpboot.h @@ -0,0 +1,43 @@ +#ifndef _LINUX_SMPBOOT_H +#define _LINUX_SMPBOOT_H + +#include <linux/types.h> + +struct task_struct; +/* Cookie handed to the thread...
f59abbf28696389c91c2697c7db31f20cfa91d8a
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix typo in function header comment
Problem Details: Signed-off-by: Dmitrii Cherkasov <DCherkasov@luxsoft.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 9912182682ec..bb3b7fe05ccd 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -950,7 +950,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) } /*...
e43b5ec05afdc232be25aa481315035c1888d389
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fence virtual address and free it once idle v4
Problem Details: Virtual address need to be fenced to know when we can safely remove it. This patch also properly clear the pagetable. Previously it was serouisly broken. Kernel 3.5/3.4 need a similar patch but adapted for difference in mutex locking. v2: For to update pagetable when unbinding bo (don't bailout if ...
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 583e0f19e1c7..b237a29142d1 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -300,6 +300,7 @@ struct radeon_bo_va { uint64_t soffset; uint64_t eoffset; uint32_t flags; + struct ra...
69b62ad8a488727d5aab931c238aa399e6c3550c
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix some missing parens in asic macros
Problem Details: Better safe than sorry. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 5431af292408..583e0f19e1c7 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -1733,11 +1733,11 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v); #define radeon_pm_finish(rdev)...