id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
94692349c4fc1bc74c19a28f9379509361a06a3b
Analyze and fix the following issue in the Linux kernel code: perf: Fix multi-event parsing bug
Problem Details: This patch fixes an issue with event parsing. The following commit appears to have broken the ability to specify a comma separated list of events: commit ceb53fbf6dbb1df26d38379a262c6981fe73dd36 Author: Ingo Molnar <mingo@elte.hu> Date: Wed Apr 27 04:06:33 2011 +0200 perf stat: Fail...
```diff diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index ffa493a24333..41982c373faf 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -734,6 +734,9 @@ parse_event_modifier(const char **strp, struct perf_event_attr *attr) if (!*str) return 0; + i...
17fb76165f307f7be2cfbc93958356fe50fa4791
Analyze and fix the following issue in the Linux kernel code: drivers/staging/vt6656/main_usb.c: Delete unnecessary call to usb_kill_urb
Problem Details: Since in each case nothing has been done with the recently allocated urb, it is not necessary to kill it before freeing it. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression urb; statement S; position p1,p2; @@ urb = usb_alloc_urb@...
```diff diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 9a8eaf135a0d..e18efd43e3e0 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -955,7 +955,6 @@ static BOOL device_alloc_bufs(PSDevice pDevice) { pDevice->pInterruptURB = usb_alloc_ur...
7ed2911c8f727077249fc5170a1ab842465aef21
Analyze and fix the following issue in the Linux kernel code: gma500: finish off the fault handler
Problem Details: GEM wants to mmap the object through the GTT (which avoids aliasing) so we need to put the object into the GTT before we provide the fault mapping for it. While we are at it update the pin interface so that it digs dev out of the GEM object itself. This provides a rather cleaner API and call environme...
```diff diff --git a/drivers/staging/gma500/psb_gem.c b/drivers/staging/gma500/psb_gem.c index 2132fe94e126..76ff7bacd35b 100644 --- a/drivers/staging/gma500/psb_gem.c +++ b/drivers/staging/gma500/psb_gem.c @@ -1,5 +1,5 @@ /* - * psb backlight interface + * psb GEM interface * * Copyright (c) 2011, Intel Corpora...
cacd18a8476ce145ca5dcd46dc5b75585fd1289c
Analyze and fix the following issue in the Linux kernel code: staging: usbip: fix wrong endian conversion
Problem Details: Fix number_of_packets wrong endian conversion in function correct_endian_ret_submit() Signed-off-by: David Chang <dchang@novell.com> Acked-by: Arjan Mels <arjan.mels@gmx.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 0f2cd977ca2a..68f51068abf1 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -589,7 +589,7 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu, ...
e6251a921716fca9c2e3008af2d8d0d5657a59bc
Analyze and fix the following issue in the Linux kernel code: USB: gadget: f_audio: Fix invalid dereference of initdata
Problem Details: as_out_ep_desc contines to be used during gadget enumeration and thus should not be marked as __initdata Signed-off-by: Martin Jackson <mjackson220.list@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c index 0111f8a9cf7f..8ee330a2ab58 100644 --- a/drivers/usb/gadget/f_audio.c +++ b/drivers/usb/gadget/f_audio.c @@ -177,7 +177,7 @@ static struct uac_format_type_i_discrete_descriptor_1 as_type_i_desc = { }; /* Standard ISO OUT Endpoint ...
2b7aaf503d56216b847c8265421d2a7d9b42df3e
Analyze and fix the following issue in the Linux kernel code: OHCI: fix regression caused by nVidia shutdown workaround
Problem Details: This patch (as1463) fixes a regression caused by commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b (OHCI: work around for nVidia shutdown problem). The original problem encountered by people using NVIDIA chipsets was that USB devices were not turning off when the system shut down. For example, the LED ...
```diff diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index d84d6f0314f9..ad8166c681e2 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c @@ -181,10 +181,18 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd) */ static int ohci_quirk_nvidia_shutdown(struct usb_hcd *h...
f56e03e8dc149bf0ac2888d6843584f48c8700fc
Analyze and fix the following issue in the Linux kernel code: net: ping: fix build failure
Problem Details: If CONFIG_PROC_SYSCTL=n the building process fails: ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net' Moved inet_get_ping_group_range_net() to ping.c. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: E...
```diff diff --git a/include/net/ping.h b/include/net/ping.h index 23062c369c62..682b5ae9af51 100644 --- a/include/net/ping.h +++ b/include/net/ping.h @@ -44,8 +44,6 @@ extern struct proto ping_prot; extern void ping_rcv(struct sk_buff *); extern void ping_err(struct sk_buff *, u32 info); -extern void inet_get_ping...
372b2312010bece1e36f577d6c99a6193ec54cbd
Analyze and fix the following issue in the Linux kernel code: net: use hlist_del_rcu() in dev_change_name()
Problem Details: Using plain hlist_del() in dev_change_name() is wrong since a concurrent reader can crash trying to dereference LIST_POISON1. Bug introduced in commit 72c9528bab94 (net: Introduce dev_get_by_name_rcu()) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemlo...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index b624fe4d9bd7..30a4078b3fa2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1007,7 +1007,7 @@ rollback: } write_lock_bh(&dev_base_lock); - hlist_del(&dev->name_hlist); + hlist_del_rcu(&dev->name_hlist); write_unlock_bh(&dev_base_lock); synchroni...
14fb57dccb6e1defe9f89a66f548fcb24c374c1d
Analyze and fix the following issue in the Linux kernel code: x86, AMD: Fix ARAT feature setting again
Problem Details: Trying to enable the local APIC timer on early K8 revisions uncovers a number of other issues with it, in conjunction with the C1E enter path on AMD. Fixing those causes much more churn and troubles than the benefit of using that timer brings so don't enable it on K8 at all, falling back to the origina...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 3532d3bf8105..6f9d1f6063e9 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -613,7 +613,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) #endif /* As a rule processors have APIC timer running in deep...
328935e6348c6a7cb34798a68c326f4b8372e68a
Analyze and fix the following issue in the Linux kernel code: Revert "x86, AMD: Fix APIC timer erratum 400 affecting K8 Rev.A-E processors"
Problem Details: This reverts commit e20a2d205c05cef6b5783df339a7d54adeb50962, as it crashes certain boxes with specific AMD CPU models. Moving the lower endpoint of the Erratum 400 check to accomodate earlier K8 revisions (A-E) opens a can of worms which is simply not worth to fix properly by tweaking the errata chec...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index bb9eb29a52dd..3532d3bf8105 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -698,7 +698,7 @@ cpu_dev_register(amd_cpu_dev); */ const int amd_erratum_400[] = - AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0x0f, 0x4, 0x2...
2842bb20eed2e25cde5114298edc62c8883a1d9a
Analyze and fix the following issue in the Linux kernel code: jbd: Fix forever sleeping process in do_get_write_access()
Problem Details: In do_get_write_access() we wait on BH_Unshadow bit for buffer to get from shadow state. The waking code in journal_commit_transaction() has a bug because it does not issue a memory barrier after the buffer is moved from the shadow state and before wake_up_bit() is called. Thus a waitqueue check can ha...
```diff diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 69b180459463..f486ff697781 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -722,8 +722,13 @@ wait_for_iobuf: required. */ JBUFFER_TRACE(jh, "file as BJ_Forget"); journal_file_buffer(jh, commit_transaction, BJ_Forget); - /* Wak...
4e299c1d9113b5c1c3845c0d4e78d09dd60a4fe8
Analyze and fix the following issue in the Linux kernel code: ext2: fix error msg when mounting fs with too-large blocksize
Problem Details: When ext2 mounts a filesystem, it attempts to set the block device blocksize with a call to sb_set_blocksize, which can fail for several reasons. The current failure message in ext2 prints: EXT2-fs (loop1): error: blocksize is too small which is not correct in all cases. This can be demonstrated ...
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 0a78dae7e2cb..1dd62ed35b85 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -898,7 +898,8 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) brelse(bh); if (!sb_set_blocksize(sb, blocksize)) { - ext2_msg(sb, KERN_ERR,...
d9b01934d56a96d9f4ae2d6204d4ea78a36f5f36
Analyze and fix the following issue in the Linux kernel code: jbd: fix fsync() tid wraparound bug
Problem Details: If an application program does not make any changes to the indirect blocks or extent tree, i_datasync_tid will not get updated. If there are enough commits (i.e., 2**31) such that tid_geq()'s calculations wrap, and there isn't a currently active transaction at the time of the fdatasync() call, this ca...
```diff diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index b3713afaaa9e..e2d4285fbe90 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -437,9 +437,12 @@ int __log_space_left(journal_t *journal) int __log_start_commit(journal_t *journal, tid_t target) { /* - * Are we already doing a recent enough commit?...
86c4f6d85595cd7da635dc6985d27bfa43b1ae10
Analyze and fix the following issue in the Linux kernel code: ext3: Fix fs corruption when make_indexed_dir() fails
Problem Details: When make_indexed_dir() fails (e.g. because of ENOSPC) after it has allocated block for index tree root, we did not properly mark all changed buffers dirty. This lead to only some of these buffers being written out and thus effectively corrupting the directory. Fix the issue by marking all changed dat...
```diff diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index f6ce3e79d315..34b6d9bfc48a 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1416,10 +1416,19 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, frame->at = entries; frame->bh = bh; bh = bh2; + /* + * Mark buffers dirty here s...
cffbcd0c23bf17c411b35d13fceb25bd5ec9afea
Analyze and fix the following issue in the Linux kernel code: Kconfig: fix copy/paste-ism for dell-wmi-aio driver
Problem Details: Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 0485e394712a..485c09eef424 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -111,7 +111,7 @@ config DELL_WMI_AIO All-In-One machines. To compile this driver as a module, choose M here: the mod...
9937a5e2f32892db0dbeefc2b3bc74b3ae3ea9c7
Analyze and fix the following issue in the Linux kernel code: scsi: remove performance regression due to async queue run
Problem Details: Commit c21e6beb removed our queue request_fn re-enter protection, and defaulted to always running the queues from kblockd to be safe. This was a known potential slow down, but should be safe. Unfortunately this is causing big performance regressions for some, so we need to improve this logic. Looking ...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e9901b8f8443..01e4e51c4b68 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -74,8 +74,6 @@ struct kmem_cache *scsi_sdb_cache; */ #define SCSI_QUEUE_DELAY 3 -static void scsi_run_queue(struct request_queue *q); - /* ...
049262940eb585ff2a671d2db6fa38dfd96687f1
Analyze and fix the following issue in the Linux kernel code: doc: timers-howto: fix a typo ("unsgined")
Problem Details: Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/timers/timers-howto.txt b/Documentation/timers/timers-howto.txt index c9ef29d2ede3..038f8c77a076 100644 --- a/Documentation/timers/timers-howto.txt +++ b/Documentation/timers/timers-howto.txt @@ -24,7 +24,7 @@ ATOMIC CONTEXT: ndelay(unsigned long nsecs) udelay(unsigned long usec...
52d3cb88d75701f800db16561ff12c7692b56e55
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c
Problem Details: spec->automute_lines shouldn't be set unless the line-detection is available. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 473ddc72b5cd..1f00cdbf2341 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1584,7 +1584,7 @@ static void alc_init_auto_hp(struct hda_codec *codec) AC_USRSP_EN | ALC880_FRONT_EVENT); spec...
93d29cc63f1832dbbbab721cce1b9f845becf4d7
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Correct buffer start in edc sysfs debug print.
Problem Details: The debug print prints the first byte of the buffer which is buf[8]. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 260c0300b3e7..4e51124899fd 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -633,7 +633,7 @@ qla2x00_sysfs_write_edc(struct file *filp, struct kobject *kobj, if (rval != QLA_SUCCESS) { ...
53296788f425def50d09c7e0d773bdeaae57c623
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Update firmware version after flash update for ISP82xx.
Problem Details: The driver keeps a copy of the fw_version within the ha structure. For ISP82xx, this local copy doesn't get updated, and as a result, the old firmware version ends up getting displayed. This patch fixes this issue. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Madhuranath Iy...
```diff diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 24d2d195d3c6..cb6969320b47 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -5435,6 +5435,13 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ha->isp_abort_cnt = 0; clear_bit(ISP_ABORT_RET...
43ebf16d762b082663976b679b813e1b546548d1
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix hang during driver unload when vport is active.
Problem Details: Bumping ref count during fc_vport_terminate() was the cause. vport delete would wait for ref count to drop to zero and that would never happen. Cc: stable@kernel.org Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Botto...
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7168e7f24437..010f560ab99d 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -2368,21 +2368,26 @@ qla2x00_remove_one(struct pci_dev *pdev) base_vha = pci_get_drvdata(pdev); ha = base_vha->hw; -...
cefcaba67ab97fb756b3a6af5139c94d861b660d
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix virtual port failing to login after chip reset.
Problem Details: This patch ensures qla82xx_watchdog is not being run for the vport. It also makes sure that beacon ON is not done for the vport, as it will lead to the waking up of the dpc thread again and again. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyeng...
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 0ca66645e10c..7168e7f24437 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -3623,7 +3623,8 @@ qla2x00_timer(scsi_qla_host_t *vha) if (!pci_channel_offline(ha->pdev)) pci_read_config_word(ha->p...
9f40682e2857a3c2ddb80a87b185af3c6a708346
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix vport delete hang when logins are outstanding.
Problem Details: Timer is required to flush out entries that may be present in work queues. Cc: stable@kernel.org Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <jbottomley@parallels.com> Signed-off-by: James Bottomley <James...
```diff diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 75faf480aa73..260c0300b3e7 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1877,14 +1877,15 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) scsi_remove_host(vha->host); + /* Allow...
72ef0e5757c160fc627d2c89b6379bc102ccab5c
Analyze and fix the following issue in the Linux kernel code: [SCSI] mptsas: Fix annoying warning
Problem Details: Shut up drivers/message/fusion/mptsas.c: In function 'mptsas_event_process': drivers/message/fusion/mptsas.c:5015: warning: unused variable 'log_info' for configs with CONFIG_SCSI_MPT2SAS_LOGGING unset. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Acked-by: "Desai, Kashyap" <Kashyap.Desa...
```diff diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 66f94125de4e..7596aecd5072 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -5012,7 +5012,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) (ioc_stat & MPI_IOC...
f1e430e6369f5edac552d99bff15369ef8c6bbd2
Analyze and fix the following issue in the Linux kernel code: Input: ad714x - fix captouch wheel option algorithm
Problem Details: As reported by Jean-Francois Dagenais, the wheel algorithm caused a divide by zero exception due to missing variable pre-initialization. In fact it turned out that the whole algorithm had several problems. It is therefore replaced with something that is known working. Signed-off-by: Michael Hennerich ...
```diff diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c index 5f683ec2999e..c3a62c42cd28 100644 --- a/drivers/input/misc/ad714x.c +++ b/drivers/input/misc/ad714x.c @@ -79,13 +79,7 @@ struct ad714x_slider_drv { struct ad714x_wheel_drv { int abs_pos; int flt_pos; - int pre_mean_value; int pr...
e223cc7e96ddbcd32c4a0314d42ae56ade8008e5
Analyze and fix the following issue in the Linux kernel code: Input: ad714x - fix threshold and completion interrupt masks
Problem Details: Fix two issues in the threshold and completion interrupt mask and unmask functions. According to the AD714x datasheets the highest stage completion interrupt should be enabled. Fix mask computation. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff...
```diff diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c index 2ceb0289a757..0f2db45f730c 100644 --- a/drivers/input/misc/ad714x.c +++ b/drivers/input/misc/ad714x.c @@ -158,10 +158,10 @@ static void ad714x_use_com_int(struct ad714x_chip *ad714x, unsigned short data; unsigned short mask; - ma...
dc5f4f5e9a3434bfe925f05db9db2908fbab771f
Analyze and fix the following issue in the Linux kernel code: Input: ad714x - fix up input configuration
Problem Details: Add missing input name and set up parent devices so input devices will show in proper places in sysfs tree. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c index c431d09e401a..2ceb0289a757 100644 --- a/drivers/input/misc/ad714x.c +++ b/drivers/input/misc/ad714x.c @@ -1149,6 +1149,8 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq, input[alloc_idx]->id.bustype = ...
6dcae1eaee2b437536b2fe928a609f9589691ebf
Analyze and fix the following issue in the Linux kernel code: bluetooth: Fix warnings in l2cap_core.c
Problem Details: net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’: net/bluetooth/l2cap_core.c:3758:15: warning: ‘sk’ may be used uninitialized in this function net/bluetooth/l2cap_core.c:3758:15: note: ‘sk’ was declared here net/bluetooth/l2cap_core.c:3791:15: warning: ‘sk’ may be used uninitialized in this f...
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4f3bc741183c..a86f9ba4f05c 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -3755,7 +3755,7 @@ done: static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, struct sk_buff *skb) { - str...
b5e6ab589d570ac79cc939517fab05c87a23c262
Analyze and fix the following issue in the Linux kernel code: mm: fix kernel-doc warning in page_alloc.c
Problem Details: Fix new kernel-doc warning in mm/page_alloc.c: Warning(mm/page_alloc.c:2370): No description found for parameter 'nid' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 570d944daeb5..3f8bce264df6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2358,6 +2358,7 @@ EXPORT_SYMBOL(alloc_pages_exact); /** * alloc_pages_exact_nid - allocate an exact number of physically-contiguous * pages on a node. + * @nid: the pr...
93d2175d3d31f11ba04fcfa0e9a496a1b4bc8b34
Analyze and fix the following issue in the Linux kernel code: PCI: Clear bridge resource flags if requested size is 0
Problem Details: During pci remove/rescan testing found: pci 0000:c0:03.0: PCI bridge to [bus c4-c9] pci 0000:c0:03.0: bridge window [io 0x1000-0x0fff] pci 0000:c0:03.0: bridge window [mem 0xf0000000-0xf00fffff] pci 0000:c0:03.0: bridge window [mem 0xfc180000000-0xfc197ffffff 64bit pref] pci 0000:c0:0...
```diff diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index ebf51ad1b714..a806cb321d2e 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -579,7 +579,7 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, } size0 = calculate_iosize(size, min_size, size1, ...
834cb0fc4712a3b21c6b8c5cb55bd13607191311
Analyze and fix the following issue in the Linux kernel code: xhci: Fix memory leak bug when dropping endpoints
Problem Details: When the USB core wants to change to an alternate interface setting that doesn't include an active endpoint, or de-configuring the device, the xHCI driver needs to issue a Configure Endpoint command to tell the host to drop some endpoints from the schedule. After the command completes, the xHCI driver...
```diff diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 013e113b818a..8f2a56ece44f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1701,8 +1701,17 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) xhci_dbg_ctx(xhci, virt_dev->out_ctx, LAST_CT...
30f89ca021c3e584b61bc5a14eede89f74b2e826
Analyze and fix the following issue in the Linux kernel code: xhci: Fix memory leak in ring cache deallocation.
Problem Details: When an endpoint ring is freed, it is either cached in a per-device ring cache, or simply freed if the ring cache is full. If the ring was added to the cache, then virt_dev->num_rings_cached is incremented. The cache is designed to hold up to 31 endpoint rings, in array indexes 0 to 30. When the devi...
```diff diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 6938cc8d848f..26caba4c1950 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -209,14 +209,13 @@ void xhci_free_or_cache_endpoint_ring(struct xhci_hcd *xhci, rings_cached = virt_dev->num_rings_cached; i...
07f4beb0b5bbfaf36a64aa00d59e670ec578a95a
Analyze and fix the following issue in the Linux kernel code: tick: Clear broadcast active bit when switching to oneshot
Problem Details: The first cpu which switches from periodic to oneshot mode switches also the broadcast device into oneshot mode. The broadcast device serves as a backup for per cpu timers which stop in deeper C-states. To avoid starvation of the cpus which might be in idle and depend on broadcast mode it marks the oth...
```diff diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index da800ffa810c..723c7637e55a 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -522,10 +522,11 @@ static void tick_broadcast_init_next_event(struct cpumask *mask, */ void tick_broadcast_setup_oneshot(st...
865be7a81071a77014c83cd01536c989eed362b4
Analyze and fix the following issue in the Linux kernel code: x86, cpu: Fix detection of Celeron Covington stepping A1 and B0
Problem Details: Steppings A1 and B0 of Celeron Covington are currently misdetected as Pentium II (Dixon). Fix it by removing the stepping check. [ hpa: this fixes this specific bug... the CPUID documentation specifies that the L2 cache size can disambiguate additional CPUs; this patch does not fix that. ] Signed...
```diff diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index df86bc8c859d..32e86aa52743 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -400,12 +400,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) switch (c->x86_model) { case 5: - if (c->x86_...
34e268d87d60da7968d7300aae7d575be9d16ae7
Analyze and fix the following issue in the Linux kernel code: ASoC: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Problem Details: Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In file included from arch/x86/include/asm/uaccess.h:573, from include/linux/poll.h:14, from include/sound/pcm.h:29, from include/sound/ac97_codec.h:31, from sound/s...
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c1a4cf480c72..5968745213f8 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -242,7 +242,7 @@ static ssize_t codec_reg_write_file(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { char buf[32]; - int b...
ecbc42b70acbc6327adefe9635db93fcf62bf59d
Analyze and fix the following issue in the Linux kernel code: sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines
Problem Details: Implement the three IPIs (resched, single and cpu-mask) generation and interrupt handler catch. The sun4m has 15 soft-IRQs and three of them is used with this patch, the three IPIs was previously implemented with the cross-call IRQ15 which does not work with locking routines such as spinlocks because I...
```diff diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index d759cf31c8ee..8341963f4c84 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -269,19 +269,22 @@ smp4m_ticker: /* Here is where we check for possible SMP IPI passed to us * on some level other than 15 which is t...
8547920fc6f0d288fcc57ca705ccb2d00920fc72
Analyze and fix the following issue in the Linux kernel code: drm/i915: clean up unused ring_get_irq/ring_put_irq functions
Problem Details: This patch depends on patch "drm/i915: fix user irq miss in BSD ring on g4x". Once the previous patch apply, ring_get_irq/ring_put_irq become unused. So simply remove them. Signed-off-by: Feng, Boqun <boqun.feng@intel.com> Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Keith Packar...
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 69cdbcd6e5b7..95c4b1429935 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -620,35 +620,6 @@ ring_add_request(struct intel_ring_buffer *ring, return 0; } ...
5bfa1063a775836a84f97e4df863fc36e1f856ad
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix user irq miss in BSD ring on g4x
Problem Details: On g4x, user interrupt in BSD ring is missed. This is because though g4x and ironlake share the same bsd_ring, their interrupt control interfaces have _two_ differences. 1.different irq enable/disable functions: On g4x are i915_enable_irq and i915_disable_irq. On ironlake are ironlake_enable_irq and i...
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 3971b5e6ad60..69cdbcd6e5b7 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -687,12 +687,37 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring, u32 gflag, u3...
6f404e441d169afc90929ef5e451ec9779c1f11a
Analyze and fix the following issue in the Linux kernel code: net: Change netdev_fix_features messages loglevel
Problem Details: Those reduced to DEBUG can possibly be triggered by unprivileged processes and are nothing exceptional. Illegal checksum combinations can only be caused by driver bug, so promote those messages to WARN. Since GSO without SG will now only cause DEBUG message from netdev_fix_features(), remove the worka...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 92009440d28b..b624fe4d9bd7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5186,27 +5186,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features) /* Fix illegal checksum combinations */ if ((features & NETIF_F_HW_CSUM) && (features & (...
ebde6f8acba92abfc203585198a54f47e83e2cd0
Analyze and fix the following issue in the Linux kernel code: vmxnet3: Fix inconsistent LRO state after initialization
Problem Details: During initialization of vmxnet3, the state of LRO gets out of sync with netdev->features. This leads to very poor TCP performance in a IP forwarding setup and is hitting many VMware users. Simplified call sequence: 1. vmxnet3_declare_features() initializes "adapter->lro" to true. 2. The kernel auto...
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 51f2ef142a5b..976467253d20 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c @@ -311,6 +311,9 @@ vmxnet3_set_flags(struct net_device *netdev, u32 data) /* toggle the L...
867955f5682f7157fdafe8670804b9f8ea077bc7
Analyze and fix the following issue in the Linux kernel code: sfc: Fix oops in register dump after mapping change
Problem Details: Commit 747df2258b1b9a2e25929ef496262c339c380009 ('sfc: Always map MCDI shared memory as uncacheable') introduced a separate mapping for the MCDI shared memory (MC_TREG_SMEM). This means we can no longer easily include it in the register dump. Since it is not particularly useful in debugging, substitu...
```diff diff --git a/drivers/net/sfc/nic.c b/drivers/net/sfc/nic.c index 10f1cb79c147..9b29a8d7c449 100644 --- a/drivers/net/sfc/nic.c +++ b/drivers/net/sfc/nic.c @@ -1937,6 +1937,13 @@ void efx_nic_get_regs(struct efx_nic *efx, void *buf) size = min_t(size_t, table->step, 16); + if (table->offset >= efx->type-...
099fb8ab1e57e5d609ac686cc0ab6d1835a79155
Analyze and fix the following issue in the Linux kernel code: rtlwifi: rtl8192c-common: rtl8192ce: Fix for HT40 regression
Problem Details: The changes that were made to rtl8192ce when rtl8192cu was added broke HT40. The errors included a typo in rtlwifi, a missing routine in rtl8192ce and a missing callback of that routine in rtl8192c-common. This patch fixes the regression reported in Bug #35082. Signed-off-by: Larry Finger <Larry.Fing...
```diff diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c index 2bb71195e976..39b0297ce925 100644 --- a/drivers/net/wireless/rtlwifi/ps.c +++ b/drivers/net/wireless/rtlwifi/ps.c @@ -190,7 +190,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw) ppsc->swrf_processing = true...
349eb8cf45aadd35836fdfde75b3265a01b2aaa1
Analyze and fix the following issue in the Linux kernel code: mac80211: annotate and fix RCU in mesh code
Problem Details: This adds proper RCU annotations to the mesh path table code, and fixes a number of bugs in the code that I found while checking the sparse warnings I got as a result of the annotations. Some things like the changes in mesh_path_add() or mesh_pathtbl_init() only serve to shut up sparse, but other chan...
```diff diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index eb733c0d61aa..249e733362e7 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -289,10 +289,6 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata) return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP;...
1928ecab620907a0953f811316d05f367f3f4dba
Analyze and fix the following issue in the Linux kernel code: mac80211: fix and simplify mesh locking
Problem Details: The locking in mesh_{mpath,mpp}_table_grow not only has an rcu_read_unlock() missing, it's also racy (though really only technically since it's invoked from a single function only) since it obtains the new size of the table without any locking, so two invocations of the function could attempt the same ...
```diff diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index e7c5fddb4804..eb733c0d61aa 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -120,6 +120,7 @@ struct mesh_path { * buckets * @mean_chain_len: maximum average length for the hash buckets' list, if it is * reached, the table will grow ...
d0df9eecf9f61f70fd847656f5eb113e06e46a03
Analyze and fix the following issue in the Linux kernel code: mac80211: Deactivate mesh path timers when freeing nodes
Problem Details: Mesh paths are deleted via mesh_path_del() which properly deactivates the timer associated to a mesh path. But if paths were deleted by mesh_table_free(..., true) timers would not be deactivated. This fixes this case. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Javier Cardon...
```diff diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 0aa96cd6bd27..f775202552e5 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -719,8 +719,10 @@ static void mesh_path_node_free(struct hlist_node *p, bool free_leafs) struct mpath_node *node = hlist_entry(p...
42be450565b0fc4607fae3e3a7da038d367a23ed
Analyze and fix the following issue in the Linux kernel code: x86, AMD, cacheinfo: Fix L3 cache index disable checks
Problem Details: We provide two slots to disable cache indices, and have a check to prevent both slots to be used for the same index. If the user disables the same index on different subcaches, both slots will hold the same index, e.g. $ echo 2047 > /sys/devices/system/cpu/cpu0/cache/index3/cache_disable_0 $ cat ...
```diff diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 31590a001e2a..c105c533ed94 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c @@ -453,27 +453,16 @@ int amd_set_l3_disable_slot(struct amd_l3_cache *l3, int cpu, unsigned ...
50e7534427283afd997d58481778c07bea79eb63
Analyze and fix the following issue in the Linux kernel code: x86, AMD, cacheinfo: Fix fallout caused by max3 conversion
Problem Details: 732eacc0542d0aa48797f675888b85d6065af837 converted code around the kernel using nested max() macros to use the new max3 macro but forgot to remove the old line in intel_cacheinfo.c. Fix it. Cc: Hagen Paul Pfeifer <hagen@jauu.net> Cc: Frank Arnold <farnold@amd64.org> Signed-off-by: Borislav Petkov <bor...
```diff diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 1ce1af2899df..31590a001e2a 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c @@ -327,7 +327,6 @@ static void __cpuinit amd_calc_l3_indices(struct amd_l3_cache *l3) l3->...
72874daa5e9064c4e8d689e6a04b1e96f687f872
Analyze and fix the following issue in the Linux kernel code: PM: Fix build issue in clock_ops.c for CONFIG_PM_RUNTIME unset
Problem Details: Fix a build issue in drivers/base/power/clock_ops.c occuring when CONFIG_PM_RUNTIME is not set. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index d74abf334391..c0dd09df7be8 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -380,6 +380,7 @@ static int pm_runtime_clk_notify(struct notifier_block *nb, { struct pm_clk_notifier_block *clknb;...
ec034b208dc8aa5dc73ec46c3f27e34c5efbf113
Analyze and fix the following issue in the Linux kernel code: mac80211: fix TX a-MPDU locking
Problem Details: During my quest to make mac80211 not have any RCU warnings from sparse, I came across the a-MPDU code again and it wasn't quite clear why it isn't racy. So instead of assigning the tid_tx array with just the spinlock held in ieee80211_start_tx_ba_session use a separate temporary array protected only by...
```diff diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 63d852cb4ca2..f614ee602089 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -136,6 +136,14 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1 ieee80211_tx_skb(sdata, skb); } +void ieee80211_as...
805d7d23ef9806e47b550ad80270c4cea4ffc984
Analyze and fix the following issue in the Linux kernel code: iwlwifi: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Problem Details: Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In file included from arch/x86/include/asm/uaccess.h:573, from include/net/checksum.h:25, from include/linux/skbuff.h:28, from drivers/net/wireless/iwlwifi/iwl-agn-rs.c:28: In functi...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index dbe6295bbf23..91f26556ac23 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c @@ -3086,7 +3086,7 @@ static ssize_t rs_sta_dbgfs_scale_table_write(struct fi...
8220ba3e2e671492b777159d8dac721f95f4a0ec
Analyze and fix the following issue in the Linux kernel code: iwlegacy: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Problem Details: Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In file included from arch/x86/include/asm/uaccess.h:573, from include/net/checksum.h:25, from include/linux/skbuff.h:28, from drivers/net/wireless/iwlegacy/iwl-4965-rs.c:28: In func...
```diff diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c index 89509392ef5d..24d149909ba3 100644 --- a/drivers/net/wireless/iwlegacy/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlegacy/iwl-4965-rs.c @@ -2604,7 +2604,7 @@ static ssize_t iwl4965_rs_sta_dbgfs_scale_table...
f5ec25deb2471bd49e907ab2f9ef6f860eb7cf95
Analyze and fix the following issue in the Linux kernel code: pstore: fix potential logic issue in pstore read interface
Problem Details: 1) in the calling of erst_read, the parameter of buffer size maybe overflows and cause crash 2) the return value of erst_read should be checked more strictly Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index ddb68c4f8d3e..e6cef8e1b534 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -1006,7 +1006,14 @@ skip: } len = erst_read(record_id, &rcd->hdr, sizeof(*rcd) + - erst_erange.size); + erst_info.bufsize); + /* T...
06cf91b4b4aafa50ee0a94c81d2c6922a18af242
Analyze and fix the following issue in the Linux kernel code: pstore: fix pstore filesystem mount/remount issue
Problem Details: Currently after mount/remount operation on pstore filesystem, the content on pstore will be lost. It is because current ERST implementation doesn't support multi-user usage, which moves internal pointer to the end after accessing it. Adding multi-user support for pstore usage. Signed-off-by: Chen Gong...
```diff diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index d5a89d067f98..ddb68c4f8d3e 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -929,6 +929,8 @@ static int erst_check_table(struct acpi_table_erst *erst_tab) return 0; } +static int erst_open_pstore(struct pstore_inf...
8d38d74b648513dd8ed8bd2b67d899208ef4e09e
Analyze and fix the following issue in the Linux kernel code: pstore: fix one type of return value in pstore
Problem Details: the return type of function _read_ in pstore is size_t, but in the callback function of _read_, the logic doesn't consider it too much, which means if negative value (assuming error here) is returned, it will be converted to positive because of type casting. ssize_t is enough for this function. Signed...
```diff diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index d6cb0ff6988e..d5a89d067f98 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -929,7 +929,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab) return 0; } -static size_t erst_reader(u64 *id, enum pstor...
7c1bfd685bcdc822ab1d7411ea05c82bd2a7b260
Analyze and fix the following issue in the Linux kernel code: xen/pci: Fix compiler error when CONFIG_XEN_PRIVILEGED_GUEST is not set.
Problem Details: If we have CONFIG_XEN and the other parameters to build an Linux kernel that is non-privileged, the xen_[find|register|unregister]_ device_domain_owner functions should not be compiled. They should use the nops defined in arch/x86/include/asm/xen/pci.h instead. This fixes: arch/x86/pci/xen.c:496: err...
```diff diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 393981feb12f..8214724ce54d 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -473,6 +473,7 @@ void __init xen_setup_pirqs(void) } #endif +#ifdef CONFIG_XEN_DOM0 struct xen_device_domain_owner { domid_t domain; struct pci_dev *dev; @@ ...
602a5322a7a1b6b005cb50d423939bb7a8782838
Analyze and fix the following issue in the Linux kernel code: sfc: Fix TX queue numbering when separate_tx_channels=1
Problem Details: This option appears to have been broken by commit 8313aca38b3937947fffebca6e34bac8e24300c8 ('sfc: Allocate each channel separately, along with its RX and TX queues'). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
```diff diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 38a55e9e89e4..796c47e03f65 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c @@ -1319,8 +1319,20 @@ static void efx_remove_interrupts(struct efx_nic *efx) static void efx_set_channels(struct efx_nic *efx) { + struct efx_channel *c...
9d03545d886bedd2c81b8f28ae0cc68c356d02f7
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix wrong data type access in a few codec drivers
Problem Details: Commit fafd217 ("ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol") changed the control private data type that is passed to snd_soc_cnew when creating dapm mixer and mux controls. Commit did not update a few codec drivers that are using their own put callbacks and thus are accessing a wrong d...
```diff diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 6c43c13f0430..c3d96fc8c267 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -157,7 +157,8 @@ static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg, static int snd_soc_dapm_put_vol...
d0b48af6c2b887354d0893e598d92911ce52620e
Analyze and fix the following issue in the Linux kernel code: ASoC: Ensure output PGA is enabled for line outputs in wm_hubs
Problem Details: Also fix a left/right typo while we're at it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com. Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 4005e9af5d61..c7c2fec482a6 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -787,17 +787,17 @@ static const struct snd_soc_dapm_route analogue_routes[] = { static const struct snd_soc_dapm_route lineout1_diff_...
86f315bbb2374f1f077500ad131dd9b71856e697
Analyze and fix the following issue in the Linux kernel code: Revert "mmc: fix a race between card-detect rescan and clock-gate work instances"
Problem Details: This reverts commit 26fc8775b51484d8c0a671198639c6d5ae60533e, which has been reported to cause boot/resume-time crashes for some users: https://bbs.archlinux.org/viewtopic.php?id=118751. Signed-off-by: Chris Ball <cjb@laptop.org> Cc: <stable@kernel.org>
```diff diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 2b200c1cfbba..461e6a17fb90 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -94,7 +94,7 @@ static void mmc_host_clk_gate_delayed(struct mmc_host *host) spin_unlock_irqrestore(&host->clk_lock, flags); return; } - mm...
c4d5ee13984f57b2f881635c49045151679f5e8a
Analyze and fix the following issue in the Linux kernel code: kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o
Problem Details: Based on a patch by Rabin Vincent. Fix building with KBUILD_NOCMDDEP=1, which currently does not work because it does not build built-in.o with no dependencies: LD fs/notify/built-in.o ld: cannot find fs/notify/dnotify/built-in.o: No such file or directory ld: cannot find fs/notify/inotify/bui...
```diff diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index c034dd7161a6..be39cd1c74cf 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -197,6 +197,8 @@ ifneq ($(KBUILD_NOCMDDEP),1) # User may override this check using make KBUILD_NOCMDDEP=1 arg-check = $(strip $(filter-out $(cmd_$(1...
9b940f8e8c32456c8a6428fa4313a4bcca7b4fcb
Analyze and fix the following issue in the Linux kernel code: ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing
Problem Details: This patch addresses bugs found while testing punch hole with the fsx test. The patch corrects the number of blocks that are zeroed out while splitting an extent, and also corrects the return value to return the number of blocks split out, instead of the number of blocks zeroed out. This patch has b...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index e363f21b091b..5f243da8ff1d 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2818,8 +2818,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, (EXT4_EXT_MAY_ZEROOUT & split_flag)) { /* case 3 */ zero_ex.ee_block = - ...
0b26859027ce0005ef89520af20351360e51ad76
Analyze and fix the following issue in the Linux kernel code: ext4: fix oops in ext4_quota_off()
Problem Details: If quota is not enabled when ext4_quota_off() is called, we must not dereference quota file inode since it is NULL. Check properly for this. This fixes a bug in commit 21f976975cbe (ext4: remove unnecessary [cm]time update of quota file), which was merged for 2.6.39-rc3. Reported-by: Amir Goldstein ...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index fc827bb2a69b..268935118251 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4681,6 +4681,9 @@ static int ext4_quota_off(struct super_block *sb, int type) if (test_opt(sb, DELALLOC)) sync_filesystem(sb); + if (!inode) + goto out; + /* Update mo...
70087dc38cc77ca8f46059564c00338777734762
Analyze and fix the following issue in the Linux kernel code: blk-throttle: Use task_subsys_state() to determine a task's blkio_cgroup
Problem Details: Currentlly we first map the task to cgroup and then cgroup to blkio_cgroup. There is a more direct way to get to blkio_cgroup from task using task_subsys_state(). Use that. The real reason for the fix is that it also avoids a race in generic cgroup code. During remount/umount rebind_subsystems() is ca...
```diff diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index f0605ab2a761..471fdcc5df85 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -114,6 +114,13 @@ struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup) } EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup); +struct blkio_cgroup *task_blkio...
bbf2b37a98d22d5b111f03674dd4f093dd6c0ae5
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix extremely rare mount failure
Problem Details: This patch fixes an extremely rare mount failure after a power cut, when mount fails with ENOSPC error because UBIFS could not find the GC LEB. In short, the reason for this failure is that after recovery the GC head LEB contains less free space than it had contained just before the power cut happened...
```diff diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 74281f135b04..731d9e2e7b50 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -564,13 +564,16 @@ static int fix_unclean_leb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, } /** - * drop_incomplete_group - drop nodes from an incomple...
e6e4d9ed11fb1fab8b3256a3dc14d71b5e984ac4
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_ct_sip: fix SDP parsing in TCP SIP messages for some Cisco phones
Problem Details: Some Cisco phones do not place the Content-Length field at the end of the SIP message. This is valid, due to a misunderstanding of the specification the parser expects the SDP body to start directly after the Content-Length field. Fix the parser to scan for \r\n\r\n to locate the beginning of the SDP b...
```diff diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 1f81abde131f..c05c0dc33499 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -1419,6 +1419,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff, const char *dptr, *end...
e503f9e4b092e2349a9477a333543de8f3c7f5d9
Analyze and fix the following issue in the Linux kernel code: x86, apic: Fix spurious error interrupts triggering on all non-boot APs
Problem Details: This patch fixes a bug reported by a customer, who found that many unreasonable error interrupts reported on all non-boot CPUs (APs) during the system boot stage. According to Chapter 10 of Intel Software Developer Manual Volume 3A, Local APIC may signal an illegal vector error when an LVT entry is se...
```diff diff --git a/arch/x86/include/asm/apicdef.h b/arch/x86/include/asm/apicdef.h index d87988bacf3e..34595d5e1038 100644 --- a/arch/x86/include/asm/apicdef.h +++ b/arch/x86/include/asm/apicdef.h @@ -78,6 +78,7 @@ #define APIC_DEST_LOGICAL 0x00800 #define APIC_DEST_PHYSICAL 0x00000 #define APIC_DM_FIXED 0x000...
9d510db423303b4f3555074dd7bdd0d692e432a4
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix-up free space on mount if flag is set
Problem Details: If a UBIFS filesystem is being mounted read-write, or is being remounted from read-only to read-write, check for the "space_fixup" flag and fix all LEBs containing empty space if necessary. Artem: tweaked the patch a bit Signed-off-by: Matthew L. Creech <mlcreech@gmail.com> Signed-off-by: Artem Bityu...
```diff diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 575ea8353d08..6db0bdaa9f74 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1396,6 +1396,12 @@ static int mount_ubifs(struct ubifs_info *c) } else ubifs_assert(c->lst.taken_empty_lebs > 0); + if (!c->ro_mount && c->space_fixup) { + err = ubi...
9f58d3503a1368673609db1962e4a584261b62eb
Analyze and fix the following issue in the Linux kernel code: UBIFS: add a superblock flag for free space fix-up
Problem Details: The 'space_fixup' flag can be set in the superblock of a new filesystem by mkfs.ubifs to indicate that any eraseblocks with free space remaining should be fixed-up the first time it's mounted (after which the flag is un-set). This means that the UBIFS image has been flashed by a "dumb" flasher and the ...
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index b5ba2ea5b626..f46d77e9f031 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -316,6 +316,8 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node) printk(KERN_DEBUG "\tflags %#x\n", sup_flags); printk(KERN_DEBUG "\t big_lpt...
5f23188e036aabfe9245f9e61adbb4ea27ed8f35
Analyze and fix the following issue in the Linux kernel code: ARM: 6900/1: Suspend: Fix build error on ARCH_S5PC100
Problem Details: The current mainline codes of ARCH_S5PC100 cannot support suspend to ram. So needs this for preventing build error. Cc: Russell King <rmk+kernel at arm.linux.org.uk> Signed-off-by: Kukjin Kim <kgene.kim at samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 377a7a595b08..96839d9ee35d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2010,7 +2010,7 @@ menu "Power management options" source "kernel/power/Kconfig" config ARCH_SUSPEND_POSSIBLE - depends on !ARCH_S5P64X0 && !ARCH_S5P6442 + depends on !AR...
49dbf5892fc67466ac2780c1d42d8a02726f5538
Analyze and fix the following issue in the Linux kernel code: OMAP: DSS2: DSI: Use system workqueue for delayed work instead of a private workqueue
Problem Details: In the previous DSI driver design, a private workqueue was needed to prevent a deadlock as explained in the commit : 0f16aa0ae6b84d7ae72fbe8999e6a94cb78edd4e . In the current design, the workqueue is only used for queueing delayed work in the case where we don't get a FRAMEDONE interrupt for 250 millis...
```diff diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 091b3184948e..f04244bba76e 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -294,8 +294,6 @@ struct dsi_data { bool te_enabled; bool ulps_enabled; - struct workqueue_struct *workqueue; - voi...
db670dac49b5423b39b5e523d28fe32045d71b10
Analyze and fix the following issue in the Linux kernel code: sched: Fix and optimise calculation of the weight-inverse
Problem Details: If the inverse loadweight should be zero, function "calc_delta_mine" calculates the inverse of "lw->weight" (in 32bit integer ops). This calculation is actually a little bit impure (because it is inverting something around "lw-weight"+1), especially when "lw->weight" becomes smaller. The correct inve...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 70bec4f1edbb..c62acf45d3b9 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1330,15 +1330,15 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, { u64 tmp; + tmp = (u64)delta_exec * weight; + if (!lw->inv_weight) { if (BITS_PER_LONG...
ec514c487c3d4b652943da7b0afbc094eee08cfa
Analyze and fix the following issue in the Linux kernel code: sched: Fix rt_rq runtime leakage bug
Problem Details: This patch is to fix the real-time scheduler bug reported at: https://lkml.org/lkml/2011/4/26/13 That is, when running multiple real-time threads on every logical CPUs and then turning off one CPU, the kernel will bug at function __disable_runtime(). Function __disable_runtime() bugs and reports l...
```diff diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index e7cebdc65f82..f8fcf8297c5f 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -183,6 +183,14 @@ static inline u64 sched_rt_period(struct rt_rq *rt_rq) return ktime_to_ns(rt_rq->tg->rt_bandwidth.rt_period); } +typedef struct task_group *rt_rq_i...
c49139d8096dc1c392455dbc3f158b46038fc9d4
Analyze and fix the following issue in the Linux kernel code: UBIFS: remove BUG statement
Problem Details: Remove a 'BUG()' statement when we are unable to find a bud and add a similar 'ubifs_assert()' statement instead. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 4378baa6694b..0f50fbfe630f 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -487,7 +487,6 @@ static int replay_bud(struct ubifs_info *c, struct bud_entry *b) int jhead = b->bud->jhead; struct ubifs_scan_leb *sleb; struct ubifs_scan_node *sn...
7703f09ded1b8719d2defe0f61215b4a08702ffa
Analyze and fix the following issue in the Linux kernel code: UBIFS: double check that buds are replied in order
Problem Details: Commit 52c6e6f990669deac3f370f1603815adb55a1dbd provides misleading infomation in the commit messages - buds are replied in order. And the real reason why that fix helped is probably because it made sure we seek head even in read-only mode (so deferred recovery will have seeked heads). This patch adds...
```diff diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index e27346f6c67c..5e815034aabd 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -713,6 +713,7 @@ static int replay_buds(struct ubifs_info *c) { struct bud_entry *b; int err, uninitialized_var(free), uninitialized_var(dirty); + unsigned long long...
b23b64516500df6b70fcafb820970f18538252cf
Analyze and fix the following issue in the Linux kernel code: crypto: aesni-intel - Merge with fpu.ko
Problem Details: Loading fpu without aesni-intel does nothing. Loading aesni-intel without fpu causes modes like xts to fail. (Unloading aesni-intel will restore those modes.) One solution would be to make aesni-intel depend on fpu, but it seems cleaner to just combine the modules. This is probably responsible for ...
```diff diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 1a58ad89fdf7..c04f1b7a9139 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile @@ -2,8 +2,6 @@ # Arch-specific CryptoAPI modules. # -obj-$(CONFIG_CRYPTO_FPU) += fpu.o - obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o obj-$(...
752d2635ebb12b6122ba05775f7d1ccfef14b275
Analyze and fix the following issue in the Linux kernel code: drm: Take lock around probes for drm_fb_helper_hotplug_event
Problem Details: We need to hold the dev->mode_config.mutex whilst detecting the output status. But we also need to drop it for the call into drm_fb_helper_single_fb_probe(), which indirectly acquires the lock when attaching the fbcon. Failure to do so exposes a race with normal output probing. Detected by adding some...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 11d7a72c22d9..140b9525b48a 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1516,17 +1516,33 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel) } EXPORT_SY...
fb0b760605d1f3bb7afc83ffd7a770f92bb62fca
Analyze and fix the following issue in the Linux kernel code: drm: fix nouveau_acpi build
Problem Details: Fix build errors when CONFIG_ACPI is enabled but MXM_WMI is not enabled by selecting both MXM_WMI and ACPI_WMI (the latter just for kconfig dependencies): nouveau_acpi.c:(.text+0x2400c8): undefined reference to `mxm_wmi_call_mxmx' nouveau_acpi.c:(.text+0x2400cf): undefined reference to `mxm_wmi_call_m...
```diff diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index e83c5b1e1f0f..ca1639918f57 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -11,7 +11,8 @@ config DRM_NOUVEAU select FRAMEBUFFER_CONSOLE if !EXPERT select FB_BACKLIGHT if DRM_NOUVEAU_BAC...
e614b2e7ca9f9946cede13b34c950b92af6fa7ef
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Associate memtimings with performance levels on cards <= nv98
Problem Details: v2 (Ben Skeggs): fix ramcfg strap, and remove bogus handling of perf 0x40 Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index e4c26a2df02a..224d3a1ce6ec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -410,6 +410,19 @@ struct nouveau_pm_voltage { int nr_level; }; +struct nouveau_pm_mem...
eea55c89e504a4affe66367ba3ecbae16296d9ef
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix uninitialised variable warning
Problem Details: Looks like a false positive to me, but, anyways! Reported-by: Jimmy Rentz <jb17bsome@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 8771677d6c5e..38ea662568c1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -498,7 +498,7 @@ nouveau_card_init(struct drm_device *dev) { struct drm_nouveau...
976661093dab143f164b81f15133724fa2a4bb86
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix a crash at card takedown for NV40 and older cards
Problem Details: NV40 and older cards (pre NV50) reserve a vram bo for the vga memory at card init. This bo is then freed at card shutdown. The problem is that the ttm bo vram manager was already freed. So a crash occurs when the vga bo is freed. The fix is to free the vga bo prior to freeing the ttm bo vram manager. ...
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 9c7bc3f396c4..ce3cb5eb33d0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -154,8 +154,6 @@ nouveau_mem_vram_fini(struct drm_device *dev) { struct drm_nouveau_pri...
3acf67f66e40633c8235d126bf3a7e59d27c6107
Analyze and fix the following issue in the Linux kernel code: drm/nv40/gr: oops, fix random bits getting set in engine obj
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 638c8878e529..5beb01b8ace1 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c @@ -196,7 +196,9 @@ nv40_graph_object_new(struct nouveau_channel *chan, int engine, nv_wo32(o...
619d4f7e219f4e65137b66ac878cd1eba8e51e10
Analyze and fix the following issue in the Linux kernel code: drm/nv50: improve nv50_pm_get_clock()
Problem Details: Many of the nv50 cards have their shader and/or memory pll disabled at some stage. This patch addresses those cases, so that the function returns the correct frequency. When the shader pll is disabled, the blob reports 2*core clock Whereas for memory, the data stored in the vbios. This action is incor...
```diff diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c index 7dbb305d7e63..8a2810011bda 100644 --- a/drivers/gpu/drm/nouveau/nv50_pm.c +++ b/drivers/gpu/drm/nouveau/nv50_pm.c @@ -47,6 +47,21 @@ nv50_pm_clock_get(struct drm_device *dev, u32 id) reg0 = nv_rd32(dev, pll.reg + 0); ...
1f962797fb1343f02cbacb94d80c4560d47b67a9
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/pm: fix compilation failure when CONFIG_POWER_SUPPLY is not set
Problem Details: Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Reported-by: Stratos Psomadakis <psomas@ece.ntua.gr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 0b1caebc6eee..dc8a0cc8e5dc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -449,7 +449,7 @@ nouveau_hwmon_fini(struct drm_device *dev) #endif } -#ifdef CONFIG_ACPI +...
92abe7499239f7b570194b34c50e3772783e2640
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix suspend failure path to reinitialise all engines
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index ba871736fc14..126216fbd789 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -162,11 +162,10 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) stru...
0b89a072f942412c45d00f74e7e789e019e5de2c
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix missing whitespace checkpatch.pl errors.
Problem Details: This patch fixes messages such as ERROR: space required after that ',' ERROR: spaces required around that '=' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 6b362d5a6d6f..711ee0d9627d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -883,13 +883,13 @@ extern void nouveau_channel_ref(struct nouveau_channel *chan, extern v...
f9ec8f6c8dea942bc4be5cc1f34c99df7a4d78ee
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix brace placement checkpatch.pl errors.
Problem Details: Fix 'ERROR: that open brace { should be on the previous line' Fix 'ERROR: else should follow close brace }' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
```diff diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c index 748b9d9c2949..cc3cd175ab9d 100644 --- a/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c @@ -790,8 +790,7 @@ nv04_crtc_do_mode_set_base(struct drm_crtc *crtc, if (atomic) { drm_fb = pas...
f212949ced2397b5f00e987bb5d4bb34dc69cc8d
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Clean up trailing whitespace and C99-style comments.
Problem Details: Fix 'ERROR: trailing whitespace', Fix 'ERROR: do not use C99 // comments' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index a30adec5beaa..e04c4b651955 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -861,7 +861,7 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *...
71298e2f0b6fb6dce9f2b2e999652edf1f643d9e
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix indentation-related checkpatch.pl error messages.
Problem Details: Fix 'ERROR: code indent should use tabs where possible' Fix 'ERROR: space required before the open parenthesis (' Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index a76514a209b3..6b362d5a6d6f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -887,13 +887,13 @@ extern void nouveau_channel_idle(struct nouveau_channel *chan); int r...
8eea1be174a1ea4b86323167bbadc8a6abdca613
Analyze and fix the following issue in the Linux kernel code: drm/i915: Revert i915.semaphore=1 default from 47ae63e0
Problem Details: My Q67 / i7-2600 box has rev09 Sandy Bridge graphics. It hangs instantly when GNOME loads and it hangs so hard the reset button doesn't work. Setting i915.semaphore=0 fixes it. Semaphores were disabled in a1656b9090f7008d2941c314f5a64724bea2ae37 in 2.6.38 and were re-enabled by commit 47ae63e0c2e5f...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index c34a8dd31d02..32d1b3e829c8 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -49,7 +49,7 @@ module_param_named(panel_ignore_lid, i915_panel_ignore_lid, int, 0600); unsigned int i915_powersav...
a67b8887ced9d54cab7759bdb19deafed37481eb
Analyze and fix the following issue in the Linux kernel code: vga_switcheroo: don't toggle-switch devices
Problem Details: If the requested device is already active, ignore the request. This restores the original behaviour of the interface. The change was probably an unintended side effect of commit 66b37c6777c4 vga_switcheroo: split switching into two stages which did not take into account to duplicate the !active chec...
```diff diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index e01cacba685f..498b284e5ef9 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -219,9 +219,6 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client) int i; struct vg...
33b2f5598b4ee68021364a7b795c09ad66bc0aa8
Analyze and fix the following issue in the Linux kernel code: caif: Bugfix debugfs directory name must be unique.
Problem Details: Race condition caused debugfs_create_dir() to fail due to duplicate name. Use atomic counter to create unique directory name. net_ratelimit() is introduced to limit debug printouts. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 7baae11a6126..5cf9c73a4078 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -48,6 +48,7 @@ static struct dentry *debugfsdir; #ifdef CONFIG_DEBUG_FS struct debug_fs_counter { atomic_t caif_nr_socks; + atomic_t caif_sock_cre...
0f08190fe8af3cdb6ba19690eb0fa253ecef4bde
Analyze and fix the following issue in the Linux kernel code: IPVS: fix netns if reading ip_vs_* procfs entries
Problem Details: Without this patch every access to ip_vs in procfs will increase the netns count i.e. an unbalanced get_net()/put_net(). (ipvsadm commands also use procfs.) The result is you can't exit a netns if reading ip_vs_* procfs entries. Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Signed-of...
```diff diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 51f3af7c4743..059af3120be7 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c @@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = { .open = ip_vs_app_open, .read = seq_read...
d8083deb4f1aa0977980dfb834fcc336ef38318f
Analyze and fix the following issue in the Linux kernel code: bridge: fix forwarding of IPv6
Problem Details: The commit 6b1e960fdbd75dcd9bcc3ba5ff8898ff1ad30b6e bridge: Reset IPCB when entering IP stack on NF_FORWARD broke forwarding of IPV6 packets in bridge because it would call bp_parse_ip_options with an IPV6 packet. Reported-by: Noah Meyerhans <noahm@debian.org> Signed-off-by: Stephen Hemminger <she...
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index f3bc322c5891..74ef4d4846a4 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -737,7 +737,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb, nf_bridge->mask |= BRNF_PKT_TYPE; } -...
aece948f5ddd70d70df2f35855c706ef9a4f62e2
Analyze and fix the following issue in the Linux kernel code: perf evlist: Fix per thread mmap setup
Problem Details: The PERF_EVENT_IOC_SET_OUTPUT ioctl was returning -EINVAL when using --pid when monitoring multithreaded apps, as we can only share a ring buffer for events on the same thread if not doing per cpu. Fix it by using per thread ring buffers. Tested with: [root@felicio ~]# tuna -t 26131 -CP | nl 1 ...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 416538248a4b..0974f957b8fa 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -427,7 +427,7 @@ static void mmap_read_all(void) { int i; - for (i = 0; i < evsel_list->cpus->nr; i++) { + for (i = 0; i < ev...
b90194181988063266f3da0b7bf3e57268c627c8
Analyze and fix the following issue in the Linux kernel code: perf tools: Honour the cpu list parameter when also monitoring a thread list
Problem Details: The perf_evlist__create_maps was discarding the --cpu parameter when a --pid or --tid was specified, fix that. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org>...
```diff diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 45da8d186b49..1884a7c7eb8f 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -348,7 +348,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, pid_t target_pid, if (evlist->threads == NULL) return -1; - i...
6976a6f2acde2b0443cd64f1d08af90630e4ce81
Analyze and fix the following issue in the Linux kernel code: ext4: don't dereference null pointer when make_indexed_dir() fails
Problem Details: Fix for a null pointer bug found while running punch hole tests Signed-off-by: Allison Henderson <achender@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 3c7a06e58469..b754b7721f51 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1413,6 +1413,10 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, frame->at = entries; frame->bh = bh; bh = bh2; + + ext4_handle_dirty_metadata(handl...
c050999e2c00b189a21df3ee9ad8d27c85ce9c34
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix sparse warning
Problem Details: error: bad constant expression Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Evan Swanson <evan.swanson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
```diff diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c index 9f972460e780..ac99b0458fe2 100644 --- a/drivers/net/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ixgbe/ixgbe_sriov.c @@ -324,7 +324,7 @@ static inline void ixgbe_vf_reset_msg(struct ixgbe_adapter *adapter, u32 vf) static int ixgbe_rc...
d034acf1851c15c3da56d31e7eb4151e40ed0119
Analyze and fix the following issue in the Linux kernel code: ixgbe: Merge ATR reinit into the service task
Problem Details: This change merges the ATR table reinitialization into the service task. This is yet another opportunity to avoid any race conditions as we don't want to be attempting to reinitialize the table during a possible reset. In addition this change adds a counter for table reinitialization so that it can be...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 760b850e8292..a180cde6008a 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -382,6 +382,7 @@ struct ixgbe_adapter { #define IXGBE_FLAG2_SEARCH_FOR_SFP (u32)(1 << 4) #define IXGBE_FLAG2_SFP_NEEDS_RESE...
93c52dd0033be3cb91376916b8461fcb94ef0c22
Analyze and fix the following issue in the Linux kernel code: ixgbe: Merge watchdog functionality into service task
Problem Details: This patch is meant to merge the functionality of the ixgbe watchdog task into the service task. By doing this all link state functionality will be controlled by a single task. As a result the reliability of the interface will be improved as the likelihood of any race conditions is further reduced. ...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index cbb04ba58289..193c6c4243cb 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -455,11 +455,9 @@ struct ixgbe_adapter { unsigned long link_check_timeout; struct work_struct reset_task; - struct work_struct watch...
7086400d87a06588c13270949db9134afc9553ba
Analyze and fix the following issue in the Linux kernel code: ixgbe: Combine SFP and multi-speed fiber task into single service task
Problem Details: This change is meant to address several race conditions with multi-speed fiber SFP+ modules in 82599 adapters. Specifically issues have been seen in which both the SFP configuration and the multi-speed fiber configuration are running simultaneously which will result in the device getting into an erron...
```diff diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index ec948ffec553..cbb04ba58289 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h @@ -367,19 +367,20 @@ struct ixgbe_adapter { #define IXGBE_FLAG_VMDQ_ENABLED (u32)(1 << 19) #define IXGBE_FLAG_FAN_FAIL_CAP...