id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
fa948761e685fb03823b3029e5b6bdb52229d6ce
Analyze and fix the following issue in the Linux kernel code: mfd: Fix initialisation of tps65910 interrupts
Problem Details: Fix regression introduced by commit a2974732ca7614aaf0baf9d6dd3ad893d50ce1c5 (TPS65911: Add new irq definitions) which caused irq_num to be incorrectly set for tps65910. Cc: stable@kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: S...
```diff diff --git a/drivers/mfd/tps65910-irq.c b/drivers/mfd/tps65910-irq.c index 2bfad5c86cc7..a56be931551c 100644 --- a/drivers/mfd/tps65910-irq.c +++ b/drivers/mfd/tps65910-irq.c @@ -178,8 +178,10 @@ int tps65910_irq_init(struct tps65910 *tps65910, int irq, switch (tps65910_chip_id(tps65910)) { case TPS65910: ...
d0e84caeb4cd535923884735906e5730329505b4
Analyze and fix the following issue in the Linux kernel code: mfd: Check for twl4030-madc NULL pointer
Problem Details: If the twl4030-madc device wasn't registered, and another device, such as twl4030-madc-hwmon, calls twl4030_madc_conversion() a NULL pointer is dereferenced. Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index cb44b53dee35..7cbf2aa9e64f 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c @@ -510,8 +510,9 @@ int twl4030_madc_conversion(struct twl4030_madc_request *req) u8 ch_msb, ch_lsb; int ret; - if (!req) + if (!re...
66cc5b8e50af87b0bbd0f179d76d2826f4549c13
Analyze and fix the following issue in the Linux kernel code: mfd: Copy the device pointer to the twl4030-madc structure
Problem Details: Worst case this fixes the following error: [ 72.086212] (NULL device *): conversion timeout! Best case it prevents a crash Signed-off-by: Kyle Manna <kyle@kylemanna.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index b5d598c3aa71..cb44b53dee35 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c @@ -706,6 +706,8 @@ static int __devinit twl4030_madc_probe(struct platform_device *pdev) if (!madc) return -ENOMEM; + madc->dev =...
aa9d842c5f2da6cdef2777f2f062f61898be89d3
Analyze and fix the following issue in the Linux kernel code: mfd: Rename wm8350 static gpio_set_debounce()
Problem Details: The kernel already has a function with this name declared in asm-generic/gpio.h. So if this header leaks into wm8350/gpio.c we get drivers/mfd/wm8350-gpio.c:40:12: error: conflicting types for 'gpio_set_debounce' include/asm-generic/gpio.h:156:12: note: previous declaration of 'gpio_set_debounce' was ...
```diff diff --git a/drivers/mfd/wm8350-gpio.c b/drivers/mfd/wm8350-gpio.c index ebf99bef392f..d584f6b4d6e2 100644 --- a/drivers/mfd/wm8350-gpio.c +++ b/drivers/mfd/wm8350-gpio.c @@ -37,7 +37,7 @@ static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) return ret; } -static int gpio_set_debounce(struct w...
8efcc57dedfebc99c3cd39564e3fc47cd1a24b75
Analyze and fix the following issue in the Linux kernel code: mfd: Fix value of WM8994_CONFIGURE_GPIO
Problem Details: This needs to be an out of band value for the register and on this device registers are 16 bit so we must shift left one to the 17th bit. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index d12f8d635a81..97cf4f27d647 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h @@ -26,7 +26,7 @@ struct wm8994_ldo_pdata { struct regulator_init_data *init_data; }; -#define WM8994_CONFIG...
b49d8b5d7007a673796f3f99688b46931293873e
Analyze and fix the following issue in the Linux kernel code: net/9p: Fix kernel crash with msize 512K
Problem Details: With msize equal to 512K (PAGE_SIZE * VIRTQUEUE_NUM), we hit multiple crashes. This patch fix those. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 175b5135bdcf..e317583fcc73 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -263,7 +263,6 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req) { int in, out, inp, outp; struct virtio_chan *chan = client->trans...
fcf4de5acf09889e3f0c131ebe385c983006d71b
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Print gart initialization details on all chipsets
Problem Details: This was previously done for r300 only. Use %016llX instead of %08X for printing the table address. Also fix typos in gart warning messages. Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index d8d71a399f52..0b517e16fd3a 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -910,6 +910,9 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev) WREG32(VM_CONTEXT1_CNTL,...
6bcd8d3c782b7b2c98c8f414a6bb43cf6b84e53c
Analyze and fix the following issue in the Linux kernel code: vmwgfx: Fix confusion caused by using "fence" in various places
Problem Details: This is needed before we introduce the fence objects. Otherwise this will be even more confusing. The plan is to use the following: seqno: A 32-bit sequence number that may be passed in the fifo. marker: Objects, carrying a seqno, that track fifo submission time. They are used for fifo lag based throt...
```diff diff --git a/drivers/gpu/drm/vmwgfx/Makefile b/drivers/gpu/drm/vmwgfx/Makefile index c9281a1b1d3b..f41e8b499978 100644 --- a/drivers/gpu/drm/vmwgfx/Makefile +++ b/drivers/gpu/drm/vmwgfx/Makefile @@ -4,6 +4,6 @@ ccflags-y := -Iinclude/drm vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ ...
781b8bdb2dde76ebd52c26954c09c4500f02522c
Analyze and fix the following issue in the Linux kernel code: vmwgfx: Remove the fifo debug ioctl
Problem Details: It was only used for bringup debugging, and probably doesn't work anymore. Remove it. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index bff79326c3ec..26eebdceb821 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -82,9 +82,6 @@ #define DRM_IOCTL_VMW_EXECBUF \ DRM_IOW(DRM_COMMAND_BASE + DRM_VMW_EXECBUF, ...
b06947b50053f2d21ad8ddf218cdb64fc8026896
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix DP detect and EDID fetch for DP bridges
Problem Details: Sink type is always DP for DP bridges and EDID fetch on DP bridges is always i2c over aux rather than plain i2c. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 4f0c1ecac72e..c4b8741dbf58 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -1297,12 +1297,33 @@ radeon_dp_detect(struct drm_connector *connector,...
572e27c00c9d1250ae2b4951eae7e73992174138
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix AP mode connect event parsing and TIM updates
Problem Details: This cleans up the connect event parsing by defining a union in struct wmi_connect_event to match with the three possible sets of fields that the target uses depending on which type of connect event is being indicated. In addition, two AP cases are now separated from ath6kl_connect_event() so that corr...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index fdb796fe79b2..054da13ce488 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -560,6 +560,10 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u16 ...
d6e51e6a0cc50b6dd8d9f3a733427cca3f9afdee
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix WMI message structure for AP_SET_PVB
Problem Details: There is a 2-octet reserved field between the flag and aid fields. Fix that to make the target actually behave as requested. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index c9ec6303db72..b2c5c40727fb 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -2740,6 +2740,7 @@ int ath6kl_wmi_set_pvb_cmd(struct wmi *wmi, u16 aid, bool flag) cmd...
decbd919f4bb9cb698486880c026c4104b13d3c3
Analyze and fix the following issue in the Linux kernel code: ext4: only call ext4_jbd2_file_inode when an inode has been extended
Problem Details: In delayed allocation mode, it's important to only call ext4_jbd2_file_inode when the file has been extended. This is necessary to avoid a race which first got introduced in commit 678aaf481, but which was made much more common with the introduction of the "punch hole" functionality. (Especially when...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d1b1ef71e5b7..f86b149fb8b1 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1471,13 +1471,13 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd) for (i = 0; i < map.m_len; i++) unmap_underlying_metadata(bdev, map.m_pblk + i); - } ...
c5d2e650bd805a00ff9af537d5b5dede598a198c
Analyze and fix the following issue in the Linux kernel code: ASoC: Blackfin: bf5xx-ad193x: Fix codec device name
Problem Details: Fix the codec_name field of the dai_link to match the actual device name of the codec. Otherwise the card won't be instantiated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.or...
```diff diff --git a/sound/soc/blackfin/bf5xx-ad193x.c b/sound/soc/blackfin/bf5xx-ad193x.c index a118a0fb9d81..5956584ea3a4 100644 --- a/sound/soc/blackfin/bf5xx-ad193x.c +++ b/sound/soc/blackfin/bf5xx-ad193x.c @@ -103,7 +103,7 @@ static struct snd_soc_dai_link bf5xx_ad193x_dai[] = { .cpu_dai_name = "bfin-tdm.0", ...
747da0f80e566500421bd7760b2e050fea3fde5e
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix reporting of partial jack updates
Problem Details: We need to report the entire jack state to the core jack code, not just the bits that were being updated by the caller, otherwise the status reported by other detection methods will be omitted from the state seen by userspace. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: L...
```diff diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 38b00131b2fe..fa31d9c2abd8 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -105,7 +105,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) snd_soc_dapm_sync(dapm); - snd_jack_report(jack->jack, status...
3ce05599907c604a8af9cefe8c5e0702a30d1112
Analyze and fix the following issue in the Linux kernel code: fbdev: sh_mobile_lcdc: Split channel initialization from probe function
Problem Details: Move channel initialization to sh_mobile_lcdc_channel_init() and call the function from sh_mobile_lcdc_probe(). This makes the code more readable and prepares it for fix/var initialization rework. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Florian Tobias Schandi...
```diff diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 366315bedc0d..d1576e2b2c02 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -1485,15 +1485,129 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) return 0; } -static ...
91fba48d59666718e3d3e86964755b80d39cdbdd
Analyze and fix the following issue in the Linux kernel code: fbdev: sh_mobile_lcdc: Update fix.line_length in .fb_set_par()
Problem Details: Instead of updating the fixed screen information line length manually after calling fb_set_var() in sh_mobile_fb_reconfig(), update the field in the .fb_set_par() operation handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Florian Tobias Schandinat <FlorianSch...
```diff diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 1ff215c42c41..b6da1d644619 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -998,11 +998,6 @@ static void sh_mobile_fb_reconfig(struct fb_info *info) /* Couldn't reconfigure, hopefull...
9e28547f887c3040747d8422e1feef79bea93bd8
Analyze and fix the following issue in the Linux kernel code: iommu/msm: ->unmap() should return order of unmapped page
Problem Details: Users of the IOMMU API (kvm specifically) assume that iommu_unmap() returns the order of the unmapped page (on success). Fix msm_iommu_unmap() accordingly. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Cc: Stepan Moskovchenko <stepanm@codeaurora.org> Cc: David Brown <davidb@codeaurora.org> Acked-by...
```diff diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 1a584e077c61..d1733f672f16 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -543,6 +543,13 @@ static int msm_iommu_unmap(struct iommu_domain *domain, unsigned long va, } ret = __flush_iotlb(domain); + + /* + ...
5e1b612cb16f446996398bd23b6cd59ea0206938
Analyze and fix the following issue in the Linux kernel code: iommu/omap: ->unmap() should return order of unmapped page
Problem Details: Users of the IOMMU API (kvm specifically) assume that iommu_unmap() returns the order of the unmapped page. Fix omap_iommu_unmap() to do so and adopt omap-iovmm accordingly. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 4311bc32cfa6..bd5f6064c74a 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1081,18 +1081,13 @@ static int omap_iommu_unmap(struct iommu_domain *domain, unsigned long da, struct omap_iommu_domain *omap_domai...
503473ac2a3952e6af254b0769fe788a67d797e5
Analyze and fix the following issue in the Linux kernel code: dmaengine/ste_dma40: fix memory leak due to prepared descriptors
Problem Details: Prepared descriptors that are not submitted will not be freed. Add prepared descriptor to a list to be able to release them upon dmaengine_terminate_all(). Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.c...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 92ec0a26401a..467e4dcb20a0 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -177,6 +177,7 @@ struct d40_base; * @pending_queue: Submitted jobs, to be issued by issue_pending() * @active: Active descriptor. * @queue: ...
70a207ad4db2f0c60308b3f32086263c438c67a3
Analyze and fix the following issue in the Linux kernel code: dmaengine/ste_dma40: fix Oops due to double free of client descriptor
Problem Details: The client list may exist in two lists at the same time. This makes free fail since the same desc is freed multiple times. Remove desc from client list when adding it to the pending queue. Move free of client owned descriptors from free_dma() to terminate_all(). Unable to handle kernel paging request ...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 37388d10497a..92ec0a26401a 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -644,8 +644,11 @@ static struct d40_desc *d40_first_active_get(struct d40_chan *d40c) return d; } +/* remove desc from current queue and add ...
82babbb361f207a80cffa8ac34c2b6a0b62acc88
Analyze and fix the following issue in the Linux kernel code: dmaengine/ste_dma40: fix memory leak due to prepared descriptors
Problem Details: Prepared descriptors that are not submitted will not be freed. Add prepared descriptor to a list to be able to release them upon dmaengine_terminate_all(). Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.c...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 92ec0a26401a..467e4dcb20a0 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -177,6 +177,7 @@ struct d40_base; * @pending_queue: Submitted jobs, to be issued by issue_pending() * @active: Active descriptor. * @queue: ...
7404368c22b4910ab839238e48d96be45180f6fc
Analyze and fix the following issue in the Linux kernel code: dmaengine/ste_dma40: fix Oops due to double free of client descriptor
Problem Details: The client list may exist in two lists at the same time. This makes free fail since the same desc is freed multiple times. Remove desc from client list when adding it to the pending queue. Move free of client owned descriptors from free_dma() to terminate_all(). Unable to handle kernel paging request ...
```diff diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 37388d10497a..92ec0a26401a 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -644,8 +644,11 @@ static struct d40_desc *d40_first_active_get(struct d40_chan *d40c) return d; } +/* remove desc from current queue and add ...
b02b5da4d15d7f7a250888d003121e1b5b69d00b
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: Fix mask value for S5P64X0 CPU IDs
Problem Details: The current value for S5P64XX_CPU_MASK does not include the necessary bits, which causes detection failure. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> [kgene.kim@samsung.com: changed the value] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 6070c6b00200..efd920ec3b75 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -30,7 +30,7 @@ extern unsigned long samsung_cpu_id; #define S5P6440_CPU_ID ...
2747f5e56564e715810038a1a2d8f4041f866558
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: Fix mask for S3C64xx CPU IDs
Problem Details: The difference in CPU ID between S3C6400 and S3C6410 is a single bit and that bit wasn't included in the mask causing the S3C6410 to be misdetected as a S3C6400. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> [kgene.kim@samsung.com: changed the value] Signed-off-by: Kukjin Kim <kgene....
```diff diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 6fdd5ef5e7b1..6070c6b00200 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -26,7 +26,7 @@ extern unsigned long samsung_cpu_id; #define S3C6400_CPU_ID 0...
11869befc7285be712623536daa30791aec1682f
Analyze and fix the following issue in the Linux kernel code: athk6l: Fix channel list processing in scan requests
Problem Details: Limit the length of the channel list to WMI_MAX_CHANNELS to avoid rejection of the request in wmi.c. Since there is not really much point in using a specific list of more than 32 channels, drop the channel list if more channels are specified and scan all channels. Fix cfg80211 scan API use: ar->scan_r...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 7db66589ee0c..1fe55f6f5d17 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -793,10 +793,16 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy...
f9ea0753a18448a5e92369317b6ac061fe1275bf
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix endianness in register write
Problem Details: Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index e69cd5b552a7..ae2f59137622 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -523,7 +523,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *tar...
38c35ffd38be9fbbf2ec0b67a802472d3f58f9fa
Analyze and fix the following issue in the Linux kernel code: ath6kl: Make ath6kl_diag_write32() non-static
Problem Details: So that this can be called from debug.c when adding support to write chip register. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index faf801571214..e69cd5b552a7 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -523,6 +523,7 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *tar...
1df726ef0a700587a712a3660b2caa8e533c7de9
Analyze and fix the following issue in the Linux kernel code: NET: am79c961: fix race in link status code
Problem Details: The link status code operates from a timer, and writes the index register without first taking a lock. A well-placed interrupt between writing the index register and reading the data register could change the index register on us, which will return wrong data. Add the necessary lock. Signed-off-by: R...
```diff diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c index 52fe21e1e2cd..3b1416e3d217 100644 --- a/drivers/net/arm/am79c961a.c +++ b/drivers/net/arm/am79c961a.c @@ -308,8 +308,11 @@ static void am79c961_timer(unsigned long data) struct net_device *dev = (struct net_device *)data; struct de...
6988d647231d284733f6c8bfea473a17dccdd39f
Analyze and fix the following issue in the Linux kernel code: sh: Fix implicit declaration of function numa_node_id
Problem Details: CC arch/sh/kernel/topology.o arch/sh/kernel/topology.c: In function ‘topology_init’: arch/sh/kernel/topology.c:77: error: implicit declaration of function ‘numa_node_id’ Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c index 38e862852dd0..ecc2d3d0f54a 100644 --- a/arch/sh/kernel/topology.c +++ b/arch/sh/kernel/topology.c @@ -11,6 +11,7 @@ #include <linux/cpumask.h> #include <linux/init.h> #include <linux/percpu.h> +#include <linux/topology.h> #include <lin...
7b4615ba8108649ed30804450eb054925e347ad3
Analyze and fix the following issue in the Linux kernel code: ASoC: sn95031: Fix the logic to find free channel
Problem Details: In the case of no free channel available, current implementation returns 0 instead of negative errno. This patch fixes the logic to return -EINVAL if no free channel available. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Acked-by: Liam Girdwood <lrg@...
```diff diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index 84ffdebb8a8b..b4f1cb494ffc 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c @@ -79,7 +79,7 @@ static void configure_adc(struct snd_soc_codec *sn95031_codec, int val) */ static int find_free_channel(struct snd_s...
9ea7a0df63630ad8197716cd313ea66e28906fc0
Analyze and fix the following issue in the Linux kernel code: jbd2: add debugging information to jbd2_journal_dirty_metadata()
Problem Details: Add debugging information in case jbd2_journal_dirty_metadata() is called with a buffer_head which didn't have jbd2_journal_get_write_access() called on it, or if the journal_head has the wrong transaction in it. In addition, return an error code. This won't change anything for ocfs2, which will BUG_O...
```diff diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index f5240aa15601..aca179017582 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -109,9 +109,11 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata...
f8a26f052a5f62c7555d09680c1fe8cbfcac590f
Analyze and fix the following issue in the Linux kernel code: [media] drxd: fix divide error
Problem Details: Fix division by zero in drxd triggered by running "femon" before any DVB tuning has been done (by "scandvb" or anything else). Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c index 2238bf0be959..bcad01ca1a13 100644 --- a/drivers/media/dvb/frontends/drxd_hard.c +++ b/drivers/media/dvb/frontends/drxd_hard.c @@ -889,10 +889,15 @@ static int ReadIFAgc(struct drxd_state *state, u32 * pValue) ...
857011e4d9bf47b39abcc89541a58c56e4df34be
Analyze and fix the following issue in the Linux kernel code: [media] et61x251: Use current logging styles
Problem Details: Add pr_fmt and convert printks to pr_<level> Remove explicit prefixes from logging messages. One of the prefixes was defective, a copy/paste error. Use ##__VA_ARGS__ for variadic macros. Whitespace neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@re...
```diff diff --git a/drivers/media/video/et61x251/et61x251.h b/drivers/media/video/et61x251/et61x251.h index 14bb907d650e..337ded4a6388 100644 --- a/drivers/media/video/et61x251/et61x251.h +++ b/drivers/media/video/et61x251/et61x251.h @@ -165,45 +165,49 @@ et61x251_attach_sensor(struct et61x251_device* cam, #undef DBG...
7de3461c93a6d65355113cca333723eb8a1a0225
Analyze and fix the following issue in the Linux kernel code: [media] ene_ir: Use current logging styles
Problem Details: Add pr_fmt. Convert ene_warn and ene_notice to pr_<level>. Use pr_debug in __dbg macro and a little neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 2b9c2569d74a..cf10ecf5acec 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c @@ -30,6 +30,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/kernel.h> #include <linux/module.h> #include <...
6c03e38b34dcfcdfa2f10cf984995a48f030f039
Analyze and fix the following issue in the Linux kernel code: [media] em28xx: clean up resources should init fail
Problem Details: This patch ensures that the em28xx_init_dev() function cleans up after itself, in the event that it fails. This isimportant because the struct em28xx will be deallocated if em28xx_init_dev() returns an error. [mchehab@redhat.com: Fix merge conflicts and simplify the goto labels] Signed-off-by: Chris R...
```diff diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 677db1454071..5fddcd0869de 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -2806,7 +2806,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, s...
38b61eb2dac06fdc42815b004e9824d8196cfcfb
Analyze and fix the following issue in the Linux kernel code: [media] em28xx: use atomic bit operations for devices-in-use mask
Problem Details: Use atomic bit operations for the em28xx_devused mask, to prevent an unlikely race condition should two adapters be plugged in simultaneously. The operations also clearer than explicit bit manipulation anyway. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mcheh...
```diff diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index d947026e4795..677db1454071 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -60,7 +60,7 @@ static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS ...
e9013fb6eb397df9fd2e71d4f31a8bad4e65d046
Analyze and fix the following issue in the Linux kernel code: [media] ddbridge: fix ddb_ioctl()
Problem Details: There were a several problems in this function: 1) Potential integer overflow in the comparison: if (fio.write_len + fio.read_len > 1028) { 2) If the user gave bogus values for write_len and read_len then returning -EINVAL is more appropriate than returning -ENOMEM. 3) wbuf was set to the addres...
```diff diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c b/drivers/media/dvb/ddbridge/ddbridge-core.c index 573d540f213e..fe56703cecfb 100644 --- a/drivers/media/dvb/ddbridge/ddbridge-core.c +++ b/drivers/media/dvb/ddbridge/ddbridge-core.c @@ -1438,7 +1438,7 @@ static long ddb_ioctl(struct file *file, unsigned i...
0db4bf42baae95ddd457b0c4911e851c9169750e
Analyze and fix the following issue in the Linux kernel code: [media] CXD2820R: Replace i2c message translation with repeater gate control
Problem Details: This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert Schlabbach for identifying the register address and field to set. The old i2c intercept code that prefixed messages with a passthrough byte has been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been updated ...
```diff diff --git a/drivers/media/dvb/frontends/cxd2820r.h b/drivers/media/dvb/frontends/cxd2820r.h index 2906582dc94c..03cab7b547fb 100644 --- a/drivers/media/dvb/frontends/cxd2820r.h +++ b/drivers/media/dvb/frontends/cxd2820r.h @@ -93,9 +93,6 @@ extern struct dvb_frontend *cxd2820r_attach( struct i2c_adapter *i2c,...
14f55794b24506a82e995a92e599a3aa9d08781e
Analyze and fix the following issue in the Linux kernel code: [media] DVB: dvb_frontend: Fix compatibility criteria for satellite receivers
Problem Details: identify a satellite receiver by its 'delivery_system' instead of 'modulation', which may overlap between different delivery systems. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index d02c32e754f4..d218fe2fd061 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1132,16 +1132,13 @@ static void dtv_property_adv_params_sync(struct dvb_f...
2be4751b21ae1cacb002da48cfc5bf6743fee8c1
Analyze and fix the following issue in the Linux kernel code: ext4: fix 2nd xfstests 127 punch hole failure
Problem Details: This patch fixes a second punch hole bug found by xfstests 127. This bug happens because punch hole needs to flush the pages of the hole to avoid race conditions. But if the end of the hole is in the same page as i_size, the buffer heads beyond i_size need to be unmapped and the page needs to be zero...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 18f7e04a4fa3..9124cd24e093 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4166,6 +4166,20 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length) loff_t first_page_offset, last_page_offset; int ret, credits, blocks_rele...
ba06208a1315ab2d2217e09c79582b886c9f629e
Analyze and fix the following issue in the Linux kernel code: ext4: fix xfstests 75, 112, 127 punch hole failure
Problem Details: This patch addresses a bug found by xfstests 75, 112, 127 when blocksize = 1k This bug happens because the punch hole code only zeros out non block aligned regions of the page. This means that if the blocks are smaller than a page, then the block aligned regions of the page inside the hole are left u...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 57cf568a98ab..18f7e04a4fa3 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4162,17 +4162,14 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length) struct address_space *mapping = inode->i_mapping; struct ext4_map_blocks...
f2d0c1c625bc79aa524b52eea2de4262a9be1d90
Analyze and fix the following issue in the Linux kernel code: [media] em28xx: add em28xx_ prefix to functions
Problem Details: Makes it more straight-forward to follow stack traces if the functions don't have generic names. Using this as a crutch while trying to better understand the lockdep warnings I get when loading the em28xx driver. CC: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Jarod Wilson <jarod@re...
```diff diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 47b4cfa423d2..b3406ebd57d7 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c @@ -122,7 +122,7 @@ static inline void print_err_status(struct em28xx *dev, } } ...
5c9f480bdb584944b5af390ccdd8c3e586bdafdb
Analyze and fix the following issue in the Linux kernel code: [media] DVB: dvb_frontend: avoid possible race condition on first event
Problem Details: enqueued before the frontend thread wakes up. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 23d79d0f25ee..45ea843d93de 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1891,8 +1891,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,...
56ce5ac41af87c157cf4c6e4e6fec31d7d48025e
Analyze and fix the following issue in the Linux kernel code: [media] DVB: dvb_frontend: fix stale parameters on initial frontend event
Problem Details: Modify it to use the data given by the user. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index efe9c30605e8..23d79d0f25ee 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1827,6 +1827,13 @@ static int dvb_frontend_ioctl_legacy(struct file *file...
4a47a0e09c504e3ce0ccdb405411aefc5b09deb8
Analyze and fix the following issue in the Linux kernel code: fb: sh-mobile: Fix deadlock risk between lock_fb_info() and console_lock()
Problem Details: Following on Herton's patch "fb: avoid possible deadlock caused by fb_set_suspend" which moves lock_fb_info() out of fb_set_suspend() to its callers, correct sh-mobile's locking around call to fb_set_suspend() and the same sort of deaklocks with console_lock() due to order of taking the lock. console_...
```diff diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 7d54e2c612f7..647ba984f00f 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -1111,6 +1111,7 @@ static long sh_hdmi_clk_configure(struct sh_hdmi *hdmi, unsigned long hdmi_rate, static void sh_hd...
9e769ff3f585db8f978f9113be83d36c7e3965dd
Analyze and fix the following issue in the Linux kernel code: fb: avoid possible deadlock caused by fb_set_suspend
Problem Details: A lock ordering issue can cause deadlocks: in framebuffer/console code, all needed struct fb_info locks are taken before acquire_console_sem(), in places which need to take console semaphore. But fb_set_suspend is always called with console semaphore held, and inside it we call lock_fb_info which gets...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 5aac00eb1830..ad936295d8f4 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1738,8 +1738,6 @@ void fb_set_suspend(struct fb_info *info, int state) { struct fb_event event; - if (!lock_fb_info(info)) - return; event.info =...
f49446ebdb043344058f67d25fbb7e3d9b306511
Analyze and fix the following issue in the Linux kernel code: fbdev: au1200fb: silence debug output
Problem Details: it's annoying and takes up way too much space in dmesg. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index ed5dcdb29cf7..a19a40effd88 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c @@ -49,7 +49,7 @@ #define DRIVER_NAME "au1200fb" #define DRIVER_DESC "LCD controller driver for AU1200 processors" -#define DEBUG 1 +#define ...
363d58f5071df66cbe57c8a68e8bc84efe91f16e
Analyze and fix the following issue in the Linux kernel code: video: mb862xx-i2c: fix for reliable decoder register access
Problem Details: Increase delay when polling for tx status. This fixes the unreliable video decoder i2c register access. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/mb862xx/mb862xx-i2c.c b/drivers/video/mb862xx/mb862xx-i2c.c index b953099edd8e..934081d2b7ae 100644 --- a/drivers/video/mb862xx/mb862xx-i2c.c +++ b/drivers/video/mb862xx/mb862xx-i2c.c @@ -23,7 +23,7 @@ static int mb862xx_i2c_wait_event(struct i2c_adapter *adap) u32 reg; do { - ...
e33acde91140f1809952d1c135c36feb66a51887
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Don't take domain->lock recursivly
Problem Details: The domain_flush_devices() function takes the domain->lock. But this function is only called from update_domain() which itself is already called unter the domain->lock. This causes a deadlock situation when the dma-address-space of a domain grows larger than 1GB. Cc: stable@kernel.org Signed-off-by: J...
```diff diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 45652231dae8..0e4227f457af 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -847,14 +847,9 @@ static void domain_flush_complete(struct protection_domain *domain) static void domain_flush_devices(struct protection_...
f1ca1512e765337a7c09eb875eedef8ea4e07654
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Make sure iommu->need_sync contains correct value
Problem Details: The value is only set to true but never set back to false, which causes to many completion-wait commands to be sent to hardware. Fix it with this patch. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index a14f8dc23462..45652231dae8 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -605,7 +605,9 @@ static void build_inv_all(struct iommu_cmd *cmd) * Writes the command to the IOMMUs command buffer and informs the * ...
b142b91401b8e39671db74bd4fe89f281f4c2978
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix endianness in requesting chip register read
Problem Details: Need to make sure the chip address for which we need the value si endian safe. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 937c7a238c12..bda14d1d6f2f 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -178,8 +178,8 @@ void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cook...
d054ac16eeb658bccadb06b12c39cee22243b10f
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: make sure pci max read request size is valid on evergreen+ (v2)
Problem Details: If the bios or OS sets the pci max read request size to 0 or an invalid value (6,7), it can result in a hang or slowdown. Check and set it to something sane if it's invalid. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=42162 v2: use pci reg defines from include/linux/pci_regs.h Signed-off-by:...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index d8d71a399f52..dc0a5b56c81a 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -41,6 +41,31 @@ static void evergreen_gpu_init(struct radeon_device *rdev); void evergreen_fini(struc...
addb44be036dd5fc814be770ec4b90f08c820e76
Analyze and fix the following issue in the Linux kernel code: ath6kl: cleanup diagnose window read and write functions
Problem Details: Just to make them a bit easier to read and unify naming. 32 suffix in the function name means that it will be a 32 bit transfer. If there's no number a buffer is transfered instead. Use void pointers to get rid of ugly casts. Don't provide target address as a pointer, pass it by value. Same for the v...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 58c810acdbf2..c5213d509093 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -507,9 +507,9 @@ enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *tar...
bdf5396be177b689c00ae6ebed00d13fafaed36e
Analyze and fix the following issue in the Linux kernel code: ath6kl: add firmware log support
Problem Details: Firmware sends binary logs with WMIX_DBGLOG_EVENTID event. Create a buffer which stores the latest logs and which can be copied from fwlog debugfs file with cp command. To save memory firmware log support is enabled only when CONFIG_ATH6KL_DEBUG is enabled. Signed-off-by: Kalle Valo <kvalo@qca.qualco...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index cfbbad9feb9e..319e768d9ad6 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -21,6 +21,7 @@ #include <linux/rtnetlink.h> #include <linux/firmware.h> #include <l...
ed467e69f16e6b480e2face7bc5963834d025f91
Analyze and fix the following issue in the Linux kernel code: xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead.
Problem Details: We have hit a couple of customer bugs where they would like to use those parameters to run an UP kernel - but both of those options turn of important sources of interrupt information so we end up not being able to boot. The correct way is to pass in 'dom0_max_vcpus=1' on the Xen hypervisor line and the...
```diff diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index e79dbb95482b..d4fc6d454f8d 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -32,6 +32,7 @@ #include <xen/page.h> #include <xen/events.h> +#include <xen/hvc-console.h> #include "xen-ops.h" #include "mmu.h" @@ -207,6 +208,15 @@ static v...
d198d499148a0c64a41b3aba9e7dd43772832b91
Analyze and fix the following issue in the Linux kernel code: xen: x86_32: do not enable iterrupts when returning from exception in interrupt context
Problem Details: If vmalloc page_fault happens inside of interrupt handler with interrupts disabled then on exit path from exception handler when there is no pending interrupts, the following code (arch/x86/xen/xen-asm_32.S:112): cmpw $0x0001, XEN_vcpu_info_pending(%eax) sete XEN_vcpu_info_mask(%eax) will enable in...
```diff diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S index 22a2093b5862..b040b0e518ca 100644 --- a/arch/x86/xen/xen-asm_32.S +++ b/arch/x86/xen/xen-asm_32.S @@ -113,11 +113,13 @@ xen_iret_start_crit: /* * If there's something pending, mask events again so we can - * jump back into xen_hype...
62cc5fc7b2e0218144e162afb8191db9b924b5e6
Analyze and fix the following issue in the Linux kernel code: xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
Problem Details: During a kexec boot some virqs such as timer and debugirq were already registered by the old kernel. The hypervisor will return -EEXISTS from the new EVTCHNOP_bind_virq request and the BUG in bind_virq_to_irq() triggers. Catch the -EEXISTS error and loop through all possible ports to find what port b...
```diff diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 30df85d8fca8..31493e906bbd 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -877,11 +877,32 @@ static int bind_interdomain_evtchn_to_irq(unsigned int remote_domain, return err ? : bind_evtchn_to_irq(bind_interdomain.local_port); } ...
5d3c488dfe5f797d9f3cee2e8928aad8a2f6e44f
Analyze and fix the following issue in the Linux kernel code: tipc: Fix node lock problems during broadcast message reception
Problem Details: Modifies TIPC's incoming broadcast packet handler to ensure that the node lock associated with the sender of the packet is held whenever node-related data structure fields are accessed. The routine is also restructured with a single exit point, making it easier to ensure the node lock is properly relea...
```diff diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 5200457eaeb4..bc01ca6891e4 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -426,20 +426,26 @@ int tipc_bclink_send_msg(struct sk_buff *buf) void tipc_bclink_recv_pkt(struct sk_buff *buf) { struct tipc_msg *msg = buf_msg(buf); - struct tipc_node ...
169073db442cb9e5aa2b70a2e4158d4f35a3b810
Analyze and fix the following issue in the Linux kernel code: tipc: Prevent broadcast link stalling when another node fails
Problem Details: Ensure that broadcast link messages that have not been acknowledged by a newly failed node do not get an implied acknowledgement until the failed node is removed from the broadcast link's map of reachable nodes. Previously, a race condition allowed a new broadcast link message to be sent after the imp...
```diff diff --git a/net/tipc/node.c b/net/tipc/node.c index 810b39545264..d75432f5e726 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -349,9 +349,9 @@ static void node_lost_contact(struct tipc_node *n_ptr) n_ptr->bclink.defragm = NULL; } + tipc_nmap_remove(&tipc_bcast_nmap, n_ptr->addr); tipc_bclin...
58d84c4ee0389ddeb86238d5d8359a982c9f7a5b
Analyze and fix the following issue in the Linux kernel code: xfs: fix ->write_inode return values
Problem Details: Currently we always redirty an inode that was attempted to be written out synchronously but has been cleaned by an AIL pushed internall, which is rather bogus. Fix that by doing the i_update_core check early on and return 0 for it. Also include async calls for it, as doing any work for those is just ...
```diff diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index c1b022f20d35..2366c54cc4fa 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -879,33 +879,17 @@ xfs_log_inode( struct xfs_trans *tp; int error; - xfs_iunlock(ip, XFS_ILOCK_SHARED); tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); erro...
a846401f9f99f2b823a5d685b2977cc2f41134be
Analyze and fix the following issue in the Linux kernel code: ath6kl: fix compilation when NL80211_TESTMODE is disabled
Problem Details: ERROR: "ath6kl_tm_rx_report_event" [drivers/net/wireless/ath/ath6kl/ath6kl.ko] undefined Reported-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/testmode.h b/drivers/net/wireless/ath/ath6kl/testmode.h index 2e6b723d1da2..43dffcc11fb1 100644 --- a/drivers/net/wireless/ath/ath6kl/testmode.h +++ b/drivers/net/wireless/ath/ath6kl/testmode.h @@ -16,5 +16,21 @@ #include "core.h" +#ifdef CONFIG_NL80211_TESTMODE...
05730b32a78dab4bed8fb7ccc64c53d9fcf31e9d
Analyze and fix the following issue in the Linux kernel code: vmwgfx: Switch to VGA when we drop master and vmwgfx fbdev is not active
Problem Details: Previously this was not done when any 3D resource was active, since that meant disabling the fifo with all 3D state lost. Now, if there are still 3D resources active, we use the svga hide feature. This fixes X server VT switching with 3D enabled. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 62d54b940474..3d6a073e130b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -209,7 +209,14 @@ static void vmw_release_device(struct vmw_private *dev_priv) vmw_fifo_release(...
be38ab6ea7b0de0542a0ff78690d63bb22f66a4d
Analyze and fix the following issue in the Linux kernel code: vmwgfx: Fix potential execbuf deadlocks
Problem Details: Perform all command stream validation in a bounce buffer separate from the fifo. This makes the fifo available to all validation-generated commands, which would otherwise attempt to grab the fifo recursively, causing a deadlock. This is in preparation for GMR2 and swappable surfaces. Also maintain ref...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 96949b93d920..62d54b940474 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -467,6 +467,8 @@ static int vmw_driver_unload(struct drm_device *dev) unregister_pm_notifier(&...
6558429bc4c7351cc3d80fc9055f1204a9adf060
Analyze and fix the following issue in the Linux kernel code: vmwgfx: Fix 'bbp' typo
Problem Details: Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index d84e7a64ba08..0c24347d56a6 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -505,7 +505,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf, SVGA3dCmdHeader *header)...
f8dbab29f4d4b977a56776af0d5296b0e6386aef
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: Don't try to use a non-existing interface
Problem Details: > [34883.426065] tm6000 #0: registered device video0 > [34883.430591] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0) > [34883.437763] usbcore: registered new interface driver tm6000 > [34884.608372] BUG: unable to handle kernel NULL pointer dereference at 00000002 > [34884.615514] IP...
```diff diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 9cef1d11a01e..b3c4e0529f4f 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -621,6 +621,12 @@ int tm6000_reset(struct tm6000_core *dev) msleep(5); + /* + * Not all...
43dcd13b9a807ea9e832e4c6b138d825a7b65577
Analyze and fix the following issue in the Linux kernel code: fbdev: fix parsing of standard timings
Problem Details: The standard timings parses uses 1:1 dimensions when the ratio in the EDID data is 0. However, for EDID 1.3 and later the dimensions are 16:10 when the ratio is 0. Pass the version and revision numbers to get_std_timing() which can then make the right decision about dimensions. Signed-off-by: Tomi Va...
```diff diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 4f57485f8c54..cef65574db6c 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -493,7 +493,8 @@ static int get_est_timing(unsigned char *block, struct fb_videomode *mode) return num; } -static int get_std_timing(unsigned char *b...
f88a91ccc8c341e6058c017823e2db266f374024
Analyze and fix the following issue in the Linux kernel code: video: nuc900fb: remove include of mach/clkdev.h
Problem Details: Since commit aa3831cf9d29cfeaebd8c2169378b74111364487 "ARM: Consolidate the clkdev header files", the header file arch/arm/mach-nuc93x/include/mach/clkdev.h is removed. This patch fixes below build error: drivers/video/nuc900fb.c:42:25: error: mach/clkdev.h: No such file or directory make[2]: *** [dr...
```diff diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c index 0fff59782e45..37dd8507e12b 100644 --- a/drivers/video/nuc900fb.c +++ b/drivers/video/nuc900fb.c @@ -39,7 +39,6 @@ #include <mach/regs-clock.h> #include <mach/regs-ldm.h> #include <mach/fb.h> -#include <mach/clkdev.h> #include "nuc900fb...
368936741cb3ccfd9f71efba6022a4afd56e2a4e
Analyze and fix the following issue in the Linux kernel code: video: mxsfb: add missing include of linux/module.h
Problem Details: Include linux/module.h to fix below build error: from drivers/video/mxsfb.c:42: arch/arm/mach-mxs/include/mach/memory.h:22:1: warning: this is the location of the previous definition drivers/video/mxsfb.c:574: error: 'THIS_MODULE' undeclared here (not in a function) drivers/video/mxsf...
```diff diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 0b2f2dd41416..d837d63c456f 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -39,6 +39,7 @@ * the required value in the imx_fb_videomode structure. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/pla...
866e4ed77448a0c311e1b055eb72ea05423fd799
Analyze and fix the following issue in the Linux kernel code: xfs: fix xfs_mark_inode_dirty during umount
Problem Details: During umount we do not add a dirty inode to the lru and wait for it to become clean first, but force writeback of data and metadata with I_WILL_FREE set. Currently there is no way for XFS to detect that the inode has been redirtied for metadata operations, as we skip the mark_inode_dirty call during ...
```diff diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index b9c172b3fbbe..673704fab748 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -70,9 +70,8 @@ xfs_synchronize_times( } /* - * If the linux inode is valid, mark it dirty. - * Used when committing a dirty inode into a transaction so that - * the i...
aca420bc51f48b0701963ba3a6234442a0cabebd
Analyze and fix the following issue in the Linux kernel code: libceph: fix leak of osd structs during shutdown
Problem Details: We want to remove all OSDs, not just those on the idle LRU. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index ce310eee708d..16836a7df7a6 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -685,6 +685,18 @@ static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) put_osd(osd); } +static void remove_all_osds(struct ce...
81b829655d418316f0707b3656b45cff7a1dbf12
Analyze and fix the following issue in the Linux kernel code: nfsd4: simplify stateid generation code, fix wraparound
Problem Details: Follow the recommendation from rfc3530bis for stateid generation number wraparound, simplify some code, and fix or remove incorrect comments. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 0198328c0e84..106e8fa63cdf 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3168,6 +3168,12 @@ grace_disallows_io(struct inode *inode) return locks_in_grace() && mandatory_lock(inode); } +/* Returns true iff a is later than b: */ +s...
b7d7ca35807b4c8ca3271885b47e67c843376f77
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix off-by-one-error in SEQUENCE reply
Problem Details: The values here represent highest slotid numbers. Since slotid's are numbered starting from zero, the highest should be one less than the number of slots. Reported-by: Rick Macklem <rmacklem@uoguelph.ca> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 04ad9a2ca3d0..f982d8574d95 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3221,9 +3221,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr, WRITEMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN); WRITE32(seq->seqid); WRI...
49bb1e619568ec84785ceb366f07db2a6f0b64cc
Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-s3c: Fix mmc card I/O problem
Problem Details: This patch fixes the problem in sdhci-s3c host driver for Samsung Soc's. During the card identification stage the mmc core driver enumerates for the best bus width in combination with the highest available data rate. It starts enumerating from the highest bus width (8) to lowest width (1). In case of ...
```diff diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 2bd7bf4fece7..fe886d6c474a 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -302,6 +302,8 @@ static int sdhci_s3c_platform_8bit_width(struct sdhci_host *host, int width) ctrl &= ~SDHCI_CTRL_8BITBUS; ...
778e277cb82411c9002ca28ccbd216c4d9eb9158
Analyze and fix the following issue in the Linux kernel code: mmc: core: prevent aggressive clock gating racing with ios updates
Problem Details: We have seen at least two different races when clock gating kicks in in a middle of ios structure update. First one happens when ios->clock is changed outside of aggressive clock gating framework, for example via mmc_set_clock(). The race might happen when we run following code: mmc_set_ios(): ... ...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 63ffc65f84af..b27b94078c21 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -728,15 +728,17 @@ static inline void mmc_set_ios(struct mmc_host *host) */ void mmc_set_chip_select(struct mmc_host *host, int mode) { + mmc_...
08c14071fda4e69abb9d5b1566651cd092b158d3
Analyze and fix the following issue in the Linux kernel code: mmc: rename mmc_host_clk_{ungate|gate} to mmc_host_clk_{hold|release}
Problem Details: As per suggestion by Linus Walleij: > If you think the names of the functions are confusing then > you may rename them, say like this: > > mmc_host_clk_ungate() -> mmc_host_clk_hold() > mmc_host_clk_gate() -> mmc_host_clk_release() > > Which would make the usecases more clear (This is C...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 91a0a7460ebb..63ffc65f84af 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -133,7 +133,7 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq) if (mrq->done) mrq->done(mrq); - mmc_host_clk_gat...
8d90e1e382688d55a75677cc4c7210a697125554
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: Plug memory leak on PCM free
Problem Details: When releasing hardware resources, the DMA buffer allocated to the PCM device needs to be freed to prevent a memory leak. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index cbe66ca0ec8a..7d675c72fd47 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -304,6 +304,7 @@ static int snd_tm6000_hw_free(struct snd_pcm_substream *substream) schedul...
88e834a841bde22b4c0aa71809e02c118c5b219d
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: Initialize isochronous transfers only once
Problem Details: This fixes a memory leak where isochronous buffers would be set up for each video buffer, while it is sufficient to set them up only once per device. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index bef6023424af..873c8ee8b3ba 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -754,7 +754,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, s...
3d1a51db7e908cd7b3440ecb4cbf00f15a8f33bf
Analyze and fix the following issue in the Linux kernel code: [media] tm6000: Miscellaneous cleanups
Problem Details: This commit fixes a number of coding style issues as well as some issues reported by checkpatch and sparse. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index bd5fa89af07c..8388243d7e03 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -397,7 +397,7 @@ static struct snd_pcm_ops snd_tm6000_pcm_ops = { /* * Alsa Constructor - C...
fd34cb08babcd898c6b0e30cd7d507ffa62685a1
Analyze and fix the following issue in the Linux kernel code: [media] tuner/xc2028: Fix frequency offset for radio mode
Problem Details: In radio mode, no frequency offset should be used. Instead of taking Thierry's patch that creates a separate function to calculate the digital offset, it seemed better to just keep everything at the same place. Reported-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carval...
```diff diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index b6b2868cb3f0..3acbaa04e1b3 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c @@ -940,11 +940,16 @@ static int generic_set_freq(struct dvb_frontend *fe...
f9287c1f2d329f4d78a3bbc9cf0db0ebae6f146a
Analyze and fix the following issue in the Linux kernel code: ext4: ext4_mkdir should dirty dir_block with newly created directory inode
Problem Details: ext4_mkdir calls ext4_handle_dirty_metadata with dir_block and the inode "dir". Unfortunately, dir_block belongs to the newly created directory (which is "inode"), not the parent directory (which is "dir"). Fix the incorrect association. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-b...
```diff diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 09f930b7a785..f0abe4323136 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1862,7 +1862,7 @@ retry: ext4_set_de_type(dir->i_sb, de, S_IFDIR); inode->i_nlink = 2; BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata"); - err = ext4_handle_dirt...
bcaa992975041e40449be8c010c26192b8c8b409
Analyze and fix the following issue in the Linux kernel code: ext4: ext4_rename should dirty dir_bh with the correct directory
Problem Details: When ext4_rename performs a directory rename (move), dir_bh is a buffer that is modified to update the '..' link in the directory being moved (old_inode). However, ext4_handle_dirty_metadata is called with the old parent directory inode (old_dir) and dir_bh, which is incorrect because dir_bh does not ...
```diff diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index f8068c7bae9f..09f930b7a785 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2529,7 +2529,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, PARENT_INO(dir_bh->b_data, new_dir->i_sb->s_blocksize) = cpu_to_le32(new_dir...
1cd9f0976aa4606db8d6e3dc3edd0aca8019372a
Analyze and fix the following issue in the Linux kernel code: ext2,ext3,ext4: don't inherit APPEND_FL or IMMUTABLE_FL for new inodes
Problem Details: This doesn't make much sense, and it exposes a bug in the kernel where attempts to create a new file in an append-only directory using O_CREAT will fail (but still leave a zero-length file). This was discovered when xfstests #79 was generalized so it could run on all file systems. Signed-off-by: "The...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index b7d7bd0f066e..5c38120c389c 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -358,8 +358,7 @@ struct flex_groups { /* Flags that should be inherited by new inodes from their parent. */ #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_F...
8c0bec2151a47906bf779c6715a10ce04453ab77
Analyze and fix the following issue in the Linux kernel code: ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining
Problem Details: The i_mutex lock and flush_completed_IO() added by commit 2581fdc810 in ext4_evict_inode() causes lockdep complaining about potential deadlock in several places. In most/all of these LOCKDEP complaints it looks like it's a false positive, since many of the potential circular locking cases can't take p...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index e717dfd2f2b4..b7d7bd0f066e 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -175,6 +175,7 @@ struct mpage_da_data { */ #define EXT4_IO_END_UNWRITTEN 0x0001 #define EXT4_IO_END_ERROR 0x0002 +#define EXT4_IO_END_QUEUED 0x0004 struct ext4_io_page { str...
20afc60f892d285fde179ead4b24e6a7938c2f1b
Analyze and fix the following issue in the Linux kernel code: x86, perf: Check that current->mm is alive before getting user callchain
Problem Details: An event may occur when an mm is already released. I added an event in dequeue_entity() and caught a panic with the following backtrace: [ 434.421110] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 [ 434.421258] IP: [<ffffffff810464ac>] __get_user_pages_fast+0x9c/0x120 .....
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 4ee3abf20ed6..cfa62ec090ec 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1900,6 +1900,9 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) perf_call...
7f310a5d4e8525ac0cc2f58c973d2100ce034410
Analyze and fix the following issue in the Linux kernel code: perf_event: Fix broken calc_timer_values()
Problem Details: We detected a serious issue with PERF_SAMPLE_READ and timing information when events were being multiplexing. Samples would have time_running > time_enabled. That was easy to reproduce with a libpfm4 example (ran 3 times to cause multiplexing on Core 2): $ syst_smpl -e uops_retired:freq=1 & $ syst_...
```diff diff --git a/kernel/events/core.c b/kernel/events/core.c index 45847fbb599a..0f857782d06f 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -3396,8 +3396,8 @@ static int perf_event_index(struct perf_event *event) } static void calc_timer_values(struct perf_event *event, - u64 *running, - ...
0d352e3d006c9589f22580212c3822cf62b6d775
Analyze and fix the following issue in the Linux kernel code: ARM: hw_breakpoint: trap undef instruction exceptions in reset_ctrl_regs
Problem Details: The ARM debug registers can only be accessed if the DBGSWENABLE signal to the core is driven HIGH by the DAP. The architecture does not provide a way to detect the value of this signal, so the best we can do is register an undef_hook to trap debug register co-processor accesses and then fail if the tra...
```diff diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 448143e44b65..64ac5c672396 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -857,11 +857,31 @@ static int hw_breakpoint_pending(unsigned long addr, unsigned int fsr, /* * One-time initial...
6f26aa05c9edffff6a4c2cd71774bc659a5cceec
Analyze and fix the following issue in the Linux kernel code: ARM: hw_breakpoint: add support for multiple watchpoints
Problem Details: ARM debug architecture 7.1 mandates that the DFAR is updated on a watchpoint debug exception to contain the faulting virtual address of the memory access. This allows us to determine which watchpoints have fired and therefore report useful information to userspace. This patch adds support for using th...
```diff diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h index 0ac141a87616..c190bc992f0e 100644 --- a/arch/arm/include/asm/hw_breakpoint.h +++ b/arch/arm/include/asm/hw_breakpoint.h @@ -58,6 +58,7 @@ static inline void decode_ctrl_reg(u32 reg, /* Watchpoints */ #define ARM_BRE...
c512de955f0982aafa49d3f00d5643052a6790e5
Analyze and fix the following issue in the Linux kernel code: ARM: hw_breakpoint: reserve one breakpoint for watchpoint stepping
Problem Details: The current hw_breakpoint code on ARM reserves 1 breakpoint for each watchpoint that is available. Since debug architectures prior to 7.1 are restricted to 1 watchpoint anyway, only one breakpoint was ever reserved. This patch changes the reservation strategy so that a single breakpoint is reserved, r...
```diff diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index b6ddbfaae52c..156b8af13571 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -45,7 +45,6 @@ static DEFINE_PER_CPU(struct perf_event *, wp_on_reg[ARM_MAX_WRP]); /* Number of BRP/WRP registe...
b5d5b8f98641edac6641af9e19e933083ade603b
Analyze and fix the following issue in the Linux kernel code: ARM: hw_breakpoint: add initial Cortex-A15 (debug v7.1) support
Problem Details: This patch adds initial support for Cortex-A15 (debug architecture v7.1) to the hw_breakpoint ARM backend. Signed-off-by: Will Deacon <will.deacon@arm.com>
```diff diff --git a/arch/arm/include/asm/hw_breakpoint.h b/arch/arm/include/asm/hw_breakpoint.h index f389b2704d82..0ac141a87616 100644 --- a/arch/arm/include/asm/hw_breakpoint.h +++ b/arch/arm/include/asm/hw_breakpoint.h @@ -50,6 +50,7 @@ static inline void decode_ctrl_reg(u32 reg, #define ARM_DEBUG_ARCH_V6_1 2 #de...
0b390e2126e03b6ec41f96fb0550b1526d00e203
Analyze and fix the following issue in the Linux kernel code: ARM: perf: use cpumask_t to record active IRQs
Problem Details: Commit 5dfc54e0 ("ARM: GIC: avoid routing interrupts to offline CPUs") prevents the GIC from setting the affinity of an IRQ to a CPU with id >= nr_cpu_ids. This was previously abused by perf on some platforms where more IRQs were registered than possible CPUs. This patch fixes the problem by using a c...
```diff diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 8514855ffc2e..d507fe148e00 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -69,6 +69,7 @@ static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events); struct arm_pmu { enum arm_perf_pmu_ids id; + c...
117ef9570bf3a332eca443231f41dd3a52fcfb2c
Analyze and fix the following issue in the Linux kernel code: ASoC: imx: Fix build warning of unused 'card' variable
Problem Details: Fixes the following warning: CC sound/soc/imx/imx-pcm-fiq.o sound/soc/imx/imx-pcm-fiq.c: In function 'imx_pcm_fiq_new': sound/soc/imx/imx-pcm-fiq.c:243: warning: unused variable 'card' CC sound/soc/imx/imx-pcm-dma-mx2.o Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-o...
```diff diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c index 309c59e6fb6c..7945625e0e08 100644 --- a/sound/soc/imx/imx-pcm-fiq.c +++ b/sound/soc/imx/imx-pcm-fiq.c @@ -240,7 +240,6 @@ static int ssi_irq = 0; static int imx_pcm_fiq_new(struct snd_soc_pcm_runtime *rtd) { - struct snd_card *card...
6c5b756aaa3e4a20c8d4b47b9dc4799b9cfdfcb8
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix register cache sync register_writable WARN_ONs
Problem Details: Currently the condition for these WARN_ONs is reversed and they are placed before the actual check whether we are going to write to that register. So if the codec implements the register_writable callback we'll get a warning for each writable register when syncing the register cache. While we are at i...
```diff diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index d9f8aded51f3..20b7f3b003a3 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -203,14 +203,14 @@ static int snd_soc_rbtree_cache_sync(struct snd_soc_codec *codec) rbnode = rb_entry(node, struct snd_soc_rbtree_node, node); for ...
728a52222461a8cf0d5c375da1ef514a72d5194b
Analyze and fix the following issue in the Linux kernel code: ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_free
Problem Details: We have dapm_context instead of codec parameter. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7e15914b3633..d67c637557a7 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2763,7 +2763,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_ignore_suspend); /** * snd_soc_dapm_free - free dapm resources - * @card: SoC device + * @dapm: DAPM co...
d4ba7854c9ea388e83731ee4b3c6546076f70f9d
Analyze and fix the following issue in the Linux kernel code: ASoC: imx-ssi: use dma_writecombine consistently
Problem Details: If the channel is allocated as writecombine, then mmaping it should also use writecombine. Also, add a proper device for the call. Ported from a similar fix for mach-mxs. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti...
```diff diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 10a8e2783751..3b8d5cd2516a 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c @@ -357,8 +357,8 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, struct snd_pcm_runtime *runtime = substream->runtime; int ret; - ...
229ed6b55f3caa4f1a975fd297ec44c5cedf4ea0
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix default key installation in AP mode
Problem Details: Signed-off-by: Edward Lu <elu@qca.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index af8e9ccb256d..a3aa15058947 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1025,6 +1025,7 @@ static int ath6kl_cfg80211_set_default_key(struct w...
38acde3c137919c1aeced3eab0f79bb416f5ad8a
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix a typo in ath6k context
Problem Details: Signed-off-by: Edward Lu <elu@qca.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 72735ee0ee5e..af8e9ccb256d 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -168,7 +168,8 @@ static int ath6kl_set_auth_type(struct ath6kl *ar, s...
3c774bbab78435e349de2c88fc6e054716f8f2ea
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix AP mode (Re)AssocReq IE processing
Problem Details: Need to use correct length field for association request frame and parse the IEs to find WPA/WPS/RSN IE. In addition, copying of the IE better make sure it fits in into the buffer to avoid buffer overflows. In addition, add the (Re)AssocReq IEs to the cfg80211 new station event for user space. Signed...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index b64b2a357560..89e29ead254f 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -61,7 +61,8 @@ static void ath6kl_add_new_sta(struct ath6kl *ar, u8 *mac, u16 aid, u8 ...
94e532d1a053b1514ffdad00408eee925104bf27
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix system freeze under heavy data load
Problem Details: Patch "ath6kl: Fix buffer alignment for scatter-gather write" does memmove for a length (scat_req->scat_list[i].len) which is not the actual length of data that is suppossed to be moved. The right lengh is packet->act_len + HTC_HDR_LENGTH. Using wrong length for data move during buffer alignment causes...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c index 20016602dfd8..dc575a82af16 100644 --- a/drivers/net/wireless/ath/ath6kl/htc.c +++ b/drivers/net/wireless/ath/ath6kl/htc.c @@ -22,6 +22,17 @@ #define CALC_TXRX_PADDED_LEN(dev, len) (__ALIGN_MASK((len), (dev)->blo...
1df94a8578eb099d9362cc0b84ef85015c47bbc5
Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix buffer alignment for scatter-gather I/O
Problem Details: For non-scatter buffers, there is already a bounce buffer which takes care of alignment. This patch is influenced by a rough patch of Kalle. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
```diff diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 214d1144b9bf..a1aa2ef398f7 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -42,6 +42,9 @@ #define ATH6KL_MAX_ENDPOINTS 4 #define MAX_NODE_NUM 15 ...