id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f8859d98c1d1e73393285fb9dd57007839956247
Analyze and fix the following issue in the Linux kernel code: Smack: fix for /smack/access output, use string instead of byte
Problem Details: Small fix for the output of access SmackFS file. Use string is instead of byte. Makes it easier to extend API if it is needed. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
```diff diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 54f6e18dea2f..5498c4a2d1ae 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -1497,6 +1497,7 @@ static ssize_t smk_write_access(struct file *file, const char __user *buf, { struct smack_rule rule; char *data; + int...
828716c28fe4aa232ea280ea8ed6fb103eefb6ac
Analyze and fix the following issue in the Linux kernel code: Smack: check permissions from user space (v2)
Problem Details: Adds a new file into SmackFS called 'access'. Wanted Smack permission is written into /smack/access. After that result can be read from the opened file. If access applies result contains 1 and otherwise 0. File access is protected from race conditions by using simple_transaction_get()/set() API. Fixes...
```diff diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index f93460156dce..f4c28eeba1b1 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -44,6 +44,7 @@ enum smk_inos { SMK_ONLYCAP = 9, /* the only "capable" label */ SMK_LOGGING = 10, /* logging */ SMK_LOAD_SELF = 11, /* ta...
b29a33a211a855e8e52c095af13e1d99ed60d07c
Analyze and fix the following issue in the Linux kernel code: ASoC: Make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X
Problem Details: In saarb_pm860x_init() and evb3_pm860x_init(), we call pm860x_hs_jack_detect() and pm860x_mic_jack_detect() which in turn calls pm860x_set_bits(). Thus make SND_SOC_SAARB and SND_SOC_TAVOREVB3 select MFD_88PM860X. This patch fixes below build error if CONFIG_MFD_88PM860X is not configured. LD ...
```diff diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index 33ebc46b45b5..ffd2242e305f 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig @@ -121,6 +121,7 @@ config SND_PXA2XX_SOC_PALM27X config SND_SOC_SAARB tristate "SoC Audio support for Marvell Saarb" depends on SND_PXA2XX_SOC && MACH_...
c11d0ef3e250a4483e10e6984362b07fbf12c5ae
Analyze and fix the following issue in the Linux kernel code: staging: xgifb: eliminate XGIfb_fix
Problem Details: Eliminate XGIfb_fix and initialize needed fields of fb_info->fix in probe(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h index 0d439e909619..1d0949c98c3a 100644 --- a/drivers/staging/xgifb/XGI_main.h +++ b/drivers/staging/xgifb/XGI_main.h @@ -125,13 +125,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table); /* ------------------- Global Variables ------...
5703728ac1194baee554163180415baf4ccd9996
Analyze and fix the following issue in the Linux kernel code: nfs: fix bug about IPv6 address scope checking
Problem Details: The result from ipv6_addr_scope() is a set of flags, not a single value, so we can't just compare the result with IPV6_ADDR_SCOPE_LINKLOCAL. This patch fixs the problem, and checks for unequal addresses before scope_id. Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com> Signed-off-by: J. Bruce Fie...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 5833fbbf59b0..b4e41dd4d0f6 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -336,11 +336,12 @@ static int nfs_sockaddr_match_ipaddr6(const struct sockaddr *sa1, const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sa1; const struct sockaddr...
cd54033ae9dabad389c09e0f338e9d8c1465827f
Analyze and fix the following issue in the Linux kernel code: drm/radeon: allow pcie gen2 speed on NI
Problem Details: Enabling pcie gen2 speed was skipped for Northern Islands AISCs, although it looks like it works just fine with the same initialization sequence used for evergreen. According to Alex D. gen2 init was skipped to prevent a crash that has been caused by some other bug that has been fixed in the meantime;...
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index a72dbb3e1335..1fc8650079db 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -3050,8 +3050,7 @@ static int evergreen_startup(struct radeon_device *rdev) int r; /* enable pci...
df303e0236417ca006e04116f18641dbe4bd704a
Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: Fix mux bit modification in s3c_adc_select
Problem Details: The mux bits in the adccon register should be cleared only if muxing is really done in ADCCON and not another register. This patch introduces a conditional for this. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index ee8deef19481..7821055a5046 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -98,7 +98,8 @@ static inline void s3c_adc_select(struct adc_device *adc, client->select_cb(client, 1); - con &= ~S3C2410_ADC...
b82cee243633fbb734de704e38f57c771d7afd73
Analyze and fix the following issue in the Linux kernel code: gpio/samsung: Fix incorrect gpio pull up/down callback for EXYNOS4
Problem Details: Some of the gpio chips of exynos4 are assigned a default gpio config without the exynos4 specific pull up/down callbacks which resulted in incorrect setting of pull up/down configuration. Fix this by adding two new exynos4 specific entries in the array of default configs with set_pull and get_pull cal...
```diff diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index c87b65af8c96..de8788de759d 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -482,7 +482,14 @@ static struct samsung_gpio_cfg samsung_gpio_cfgs[] = { }, { .set_config = samsung_gpio_setcfg_2bit, .get...
ce19de02937772286e5d1f065d3143ec3abce200
Analyze and fix the following issue in the Linux kernel code: ARM: S3C2410: fix S3C_GPIO_SPACE #error message to match reality
Problem Details: S3C_GPIO_SPACE cannont be NON-zero, not zero. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
```diff diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h index 4f7bf3272e87..019ea86057f6 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h @@ -53,7 +53,7 @@ #define S3C2410_GPIO_M_NR (32) /* technica...
cda417dd87ed46f58cbc7d3f075ebe42b4462140
Analyze and fix the following issue in the Linux kernel code: x86, ioapic: Factor out print_IO_APIC() to only print one io apic
Problem Details: It is getting too big after the interrupt remaping entries debug print out was added. Original print_IO_APIC() becomes print_IO_APICs(). New print_IO_APIC() will only print one ioapic's registers As a side-effect this clean-up also made checkpatch.pl happier. Signed-off-by: Yinghai Lu <yinghai@kerne...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index a7815061d695..94a4bcf9dca8 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1512,30 +1512,14 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin, ioapic_write_en...
3a61d7feca055152c2c6870d1f8dfbc3443bd1b3
Analyze and fix the following issue in the Linux kernel code: x86, ioapic: Print out irte with right ioapic index
Problem Details: While checking irte dump in dmesg, the print out is confusing ioapic index with real io apic id: IOAPIC[0]: Set routing entry (1-1 -> 0x31 -> IRQ 1 Mode:0 Active:0 Dest:1) IOAPIC[1]: Set IRTE entry (P:1 FPD:0 Dst_Mode:1 Redir_hint:1 Trig_Mode:0 Dlvry_Mode:1 Avail:0 Vector:31 Dest:00000001 SID:00FF SQ:...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 2fbb9d6a37ed..a7815061d695 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1289,7 +1289,7 @@ static int setup_ir_ioapic_entry(int irq, "Redir_hint:%d Trig_Mode:%d Dlvry_Mode:%X " "Avail:...
878e3cb5f7763f388a1fa7d2a33b66601f75b43e
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: fix PHYS_64BIT selection for P1022DS
Problem Details: Remove wrong CONFIG_ prefix in Kconfig file. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 1e66edb95d20..7f84cfd1726e 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -80,7 +80,7 @@ config P1010_RDB config P1022_DS bool "Freescale P1022 DS" select DEFAULT_UIMA...
1dc91c3eb374ca01ec99dc0ca2a38babc509beb3
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map
Problem Details: On FSL Book-E devices we support multiple large TLB sizes and so we can get into situations in which the initial 1G TLB size is too big and we're asked for a size that is not mappable by a single entry (like 512M). The single entry is important because when we bring up secondary cores they need to ens...
```diff diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index f7802c8bba0a..6f593bd27174 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c @@ -146,29 +146,36 @@ static void settlbcam(int index, unsigned long virt, phys_addr_t phys, loadcam_entry(index); ...
de423ff5b0b50746616dfacbd67a2290ed70b590
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix support for enabling doorbells for IPIs
Problem Details: Commit 765342526246c97600e5344c0949824d94bb51c3 made some small changes to IPI, message_pass in smp_ops was initialized to NULL for other platforms but not for 85xx which causes us to always use the mpic for IPI's even if we support doorbells in HW. Signed-off-by: Matthew McClintock <msm@freescale.com...
```diff diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 5b9b901f6443..d6e47464a0d4 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -243,6 +243,7 @@ void __init mpc85xx_smp_init(void) * If left NULL, .message_pass defaults to * sm...
e33ee8b6f473b33a41c281f5329d9d7b3bed8ff5
Analyze and fix the following issue in the Linux kernel code: powerpc: e500mc: Fix: use CONFIG_PPC_E500MC in idle_e500.S
Problem Details: It is wrongly using undefined CONFIG_E500MC. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/kernel/idle_e500.S b/arch/powerpc/kernel/idle_e500.S index 3e2b95c6ae67..4f0ab85f3788 100644 --- a/arch/powerpc/kernel/idle_e500.S +++ b/arch/powerpc/kernel/idle_e500.S @@ -26,7 +26,7 @@ _GLOBAL(e500_idle) ori r4,r4,_TLF_NAPPING /* so when we take an exception */ stw r4,TI_LOCAL_FL...
901796afca0d31d97bf6d1bf2ab251a93a4b8c83
Analyze and fix the following issue in the Linux kernel code: xfs: clean up xfs_ioerror_alert
Problem Details: Instead of passing the block number and mount structure explicitly get them off the bp and fix make the argument order more natural. Also move it to xfs_buf.c and stop printing the device name given that we already get the fs name as part of xfs_alert, and we know what device is operates on because of...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 1f24ee5f0d7a..0a767fca0305 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1004,6 +1004,17 @@ xfs_buf_ioerror( trace_xfs_buf_ioerror(bp, error, _RET_IP_); } +void +xfs_buf_ioerror_alert( + struct xfs_buf *bp, + const char *func) +{ + xfs_ale...
87c7bec7fc3377b3873eb3a0f4b603981ea16ebb
Analyze and fix the following issue in the Linux kernel code: xfs: fix buffer flushing during unmount
Problem Details: The code to flush buffers in the umount code is a bit iffy: we first flush all delwri buffers out, but then might be able to queue up a new one when logging the sb counts. On a normal shutdown that one would get flushed out when doing the synchronous superblock write in xfs_unmountfs_writesb, but we s...
```diff diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h index c23826685d3d..200f59138b8a 100644 --- a/fs/xfs/xfs_buf.h +++ b/fs/xfs/xfs_buf.h @@ -318,7 +318,6 @@ extern struct list_head *xfs_get_buftarg_list(void); #define xfs_getsize_buftarg(buftarg) block_size((buftarg)->bt_bdev) #define xfs_readonly_buftarg(bufta...
3815832a2aa4df9815d15dac05227e0c8551833f
Analyze and fix the following issue in the Linux kernel code: xfs: Don't allocate new buffers on every call to _xfs_buf_find
Problem Details: Stats show that for an 8-way unlink @ ~80,000 unlinks/s we are doing ~1 million cache hit lookups to ~3000 buffer creates. That's almost 3 orders of magnitude more cahce hits than misses, so optimising for cache hits is quite important. In the cache hit case, we do not need to allocate a new buffer in ...
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index e3af85095ddb..6785b7bd952d 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -477,8 +477,6 @@ _xfs_buf_find( /* No match found */ if (new_bp) { - _xfs_buf_initialize(new_bp, btp, range_base, - range_length, flags); rb_link_node(&new_bp->b...
c029a50d51b8a9520105ec903639de03389915d0
Analyze and fix the following issue in the Linux kernel code: xfs: fix possible overflow in xfs_ioc_trim()
Problem Details: In xfs_ioc_trim it is possible that computing the last allocation group to discard might overflow for big start & len values, because the result might be bigger then xfs_agnumber_t which is 32 bit long. Fix this by not allowing the start and end block of the range to be beyond the end of the file syste...
```diff diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c index 244e797dae32..8a24f0c6c860 100644 --- a/fs/xfs/xfs_discard.c +++ b/fs/xfs/xfs_discard.c @@ -38,7 +38,7 @@ xfs_trim_extents( struct xfs_mount *mp, xfs_agnumber_t agno, xfs_fsblock_t start, - xfs_fsblock_t len, + xfs_fsblock_t end, xfs_fsb...
b0eab14e74d2d7b22d065e18a1cdebcf7716debf
Analyze and fix the following issue in the Linux kernel code: xfs: dont ignore error code from xfs_bmbt_update
Problem Details: Fix a case in xfs_bmap_add_extent_unwritten_real where we aren't passing the returned error on. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
```diff diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 2b31945ce9fe..bb31d37bf49b 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -1217,10 +1217,11 @@ xfs_bmap_add_extent_unwritten_real( goto done; if ((error = xfs_btree_decrement(cur, 0, &i))) goto done; - if (xfs_bmbt_update(cur, L...
ed32201e65e15f3e6955cb84cbb544b08f81e5a5
Analyze and fix the following issue in the Linux kernel code: xfs: Return -EIO when xfs_vn_getattr() failed
Problem Details: An attribute of inode can be fetched via xfs_vn_getattr() in XFS. Currently it returns EIO, not negative value, when it failed. As a result, the system call returns not negative value even though an error occured. The stat(2), ls and mv commands cannot handle this error and do not work correctly. Thi...
```diff diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index e041e917c1d9..e6b3e7620888 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -465,7 +465,7 @@ xfs_vn_getattr( trace_xfs_getattr(ip); if (XFS_FORCED_SHUTDOWN(mp)) - return XFS_ERROR(EIO); + return -XFS_ERROR(EIO); stat->size = XFS_ISIZE...
eabbaf118239d0d4188298b52751040f3b4cc28f
Analyze and fix the following issue in the Linux kernel code: xfs: Fix the incorrect comment in the header of _xfs_buf_find
Problem Details: Fix the incorrect comment in the header of the function _xfs_buf_find(). Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Alex Elder <aelder@sgi.com>
```diff diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index d3c2b58d7d70..e3af85095ddb 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -415,10 +415,7 @@ _xfs_buf_map_pages( /* * Look up, and creates if absent, a lockable buffer for * a given range of an inode. The buffer is returned - * locked. If oth...
0c38a2512df272b14ef4238b476a2e4f70da1479
Analyze and fix the following issue in the Linux kernel code: xfs: don't serialise direct IO reads on page cache checks
Problem Details: There is no need to grab the i_mutex of the IO lock in exclusive mode if we don't need to invalidate the page cache. Taking these locks on every direct IO effective serialises them as taking the IO lock in exclusive mode has to wait for all shared holders to drop the lock. That only happens when IO is ...
```diff diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 7f7b42469ea7..8fd4a0708d30 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -317,7 +317,19 @@ xfs_file_aio_read( if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; - if (unlikely(ioflags & IO_ISDIRECT)) { + /* + * Locking is a bit tricky here. If ...
545a7260343bbaf11c7f1a4b8c3d9660bb9266e5
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Fix quota and garbage collector.
Problem Details: Commit 059d84db "TOMOYO: Add socket operation restriction support" and commit 731d37aa "TOMOYO: Allow domain transition without execve()." forgot to update tomoyo_domain_quota_is_ok() and tomoyo_del_acl() which results in incorrect quota counting and memory leak. Signed-off-by: Tetsuo Handa <penguin-k...
```diff diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c index c3214b32dbfb..986a6a756868 100644 --- a/security/tomoyo/gc.c +++ b/security/tomoyo/gc.c @@ -221,6 +221,13 @@ static void tomoyo_del_acl(struct list_head *element) tomoyo_put_name_union(&entry->name); } break; + case TOMOYO_TYPE_MANUAL_TASK...
2228511833e267e833514cc85ba9626f9dacd661
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl_msi: fix support for multiple MSI ranges
Problem Details: Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges better") added support for multiple ranges in the msi-available-ranges property, but it miscalculated the MSIR index when multiple ranges are used. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Scott Wood <scottwood@freescale.c...
```diff diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 419a77239bd7..1cca25146b1f 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c @@ -296,7 +296,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, } msi->msi_virqs[irq_index] = virt_ms...
39342dbb27323f174b286c9e19b9687d492b2d1a
Analyze and fix the following issue in the Linux kernel code: [media] stb0899: Fix slow and not locking DVB-S transponder(s)
Problem Details: In stb0899_status stb0899_check_data the first read of STB0899_VSTATUS could read old (from previous search) LOOP status bit and the search fails on a good frequency. With the patch more transponder could be locked and locks about 2* faster. Signed-off-by: Lutz Sammer<johns98@gmx.net> Reviewed-by: Ma...
```diff diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c index d70eee00f33a..117a56926dca 100644 --- a/drivers/media/dvb/frontends/stb0899_algo.c +++ b/drivers/media/dvb/frontends/stb0899_algo.c @@ -358,6 +358,9 @@ static enum stb0899_status stb0899_check_data(struct ...
846d9363505d14e591a427619ccb7ffe6a7a3541
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix a regression in key miss handling
Problem Details: The commit "ath9k_hw: Fix incorrect key_miss handling" changed the code to only report key miss errors if a MIC error wasn't reported. When checking the flags in that order in the MAC code, it might miss some real events, because the value of the MIC error flag is undefined under some conditions. The ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 6cabc85bf61b..b363cc06cfd9 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -525,8 +525,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *a...
73a253ca9865cf743c9bc1c97982cb343f535655
Analyze and fix the following issue in the Linux kernel code: rtlwifi: Change debug parameter to apply to individual drivers
Problem Details: The current debug parameter is applied to rtlwifi, which means that all loaded drivers have the same level of debugging applied. In addition, the previous method requires a two-step load process to enable debugging. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linvill...
```diff diff --git a/drivers/net/wireless/rtlwifi/debug.c b/drivers/net/wireless/rtlwifi/debug.c index b2f897acb238..1b5cb7153a52 100644 --- a/drivers/net/wireless/rtlwifi/debug.c +++ b/drivers/net/wireless/rtlwifi/debug.c @@ -28,17 +28,11 @@ #include "wifi.h" -static unsigned int debug = DBG_EMERG; -module_param(...
72267e5cfefb2b54b6a16e5775da01e26ede2953
Analyze and fix the following issue in the Linux kernel code: mac80211: dont adjust truesize
Problem Details: There's no need to adjust truesize. The history of this was that we always ran into skb_truesize_bug (via skb_truesize_check) which has since been removed in commit 92a0acce186cd. skb_truesize_check() checked that truesize was bigger or equal to the actual allocation, which would trigger in mac80211 ...
```diff diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 3d2b6b2749f6..6792f52ee886 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1402,9 +1402,6 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, return -ENOMEM; } - /* update truesize too */ - skb->truesize += head_need ...
daa5c408a57514aaeef49a798202d285ee355c3e
Analyze and fix the following issue in the Linux kernel code: ath9k: fix retry counting / BAR handling during queue flush
Problem Details: When tx is suspended temporarily and the queue is flushed, do not increase the retry count or attempt to send out BAR frames. Instead simply retry the affected subframes normally after the reset. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index 91c96546c0cd..5eb4ee454325 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h @@ -75,9 +75,10 @@ #define ATH9K_TXERR_XTXOP 0x08 #define ATH9K_TXERR_TIMER_EXPIRED 0...
97091317aa86955dfacf1e1b2ed55cd9e399958c
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix regression that allowed mpaths between non-peers.
Problem Details: Mesh paths should only exist over established peer links. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 6df7913d7ca4..174040a42887 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -789,11 +789,20 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, struct ieee802_11_elems elems; size_t baselen; u32 l...
3d82de0fa584fbe73cf74a3bbc906c8710c523b8
Analyze and fix the following issue in the Linux kernel code: mwifiex: fix smatch errors
Problem Details: drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52) error: potential null derefence 'priv'. drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52) error: we previously assumed 'priv' could be null (see line 820) drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24) ...
```diff diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 848645118ad4..277ea84a05f5 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -825,6 +825,10 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem) ...
28a1bcdb57d50f3038a255741ecc83e391e5282e
Analyze and fix the following issue in the Linux kernel code: mac80211: fix offchannel TX cookie matching
Problem Details: When I introduced in-kernel off-channel TX I introduced a bug -- the work can't be canceled again because the code clear the skb pointer. Fix this by keeping track separately of whether TX status has already been reported. Cc: stable@kernel.org [2.6.38+] Reported-by: Jouni Malinen <j@w1.fi> Tested-by:...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 1309bb9c97be..d0705f260178 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1886,7 +1886,7 @@ ieee80211_offchan_tx_done(struct ieee80211_work *wk, struct sk_buff *skb) * so in that case userspace will have to deal with it. */ - if (w...
af4dc88c56559c1ebf53628ddcc18dde23924e33
Analyze and fix the following issue in the Linux kernel code: iwlagn: separate init calib and rt calib
Problem Details: My previous patch for init calib cfg disable a set of calibration for both init and runtime which cause performance issue, Fix it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d0fd6f063bf8..3af49ae62979 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -1222,7 +1222,7 @@ static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg)...
900e14a8f5a49e987790b93c7906989b22075f1b
Analyze and fix the following issue in the Linux kernel code: perf hists browser: Recalculate browser pointers after resort/decay
Problem Details: In browsers that access dynamic underlying data structures, like in the hists browser and its hist_entry rb_tree, we need to revalidate any reference to the underlying data structure, because they can have gone away, decayed. This fixes a problem where after a while the top entries get behind the top ...
```diff diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c index 611219f80680..5911bba63858 100644 --- a/tools/perf/util/ui/browser.c +++ b/tools/perf/util/ui/browser.c @@ -230,6 +230,29 @@ int ui_browser__refresh(struct ui_browser *self) return 0; } +/* + * Here we're updating nr_entries _af...
669bb3962bd7f781879222eeb7263d527551dd5e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix permission of enable_le param
Problem Details: With 0444 it is impossible to change the param, changing it to 0644. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index d7d96b6b1f0d..0e57634ab8da 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3104,5 +3104,5 @@ void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data) kfree_skb(skb); } -module_param(enable_le,...
c43f1508686e8e4746012bf87995085eeb0f5307
Analyze and fix the following issue in the Linux kernel code: pch_dma: Fix suspend issue
Problem Details: Currently, executing suspend/hibernation, memory access violation occurs. In pch_dma_save_regs() called by suspend(), you can see the following code. static void pch_dma_save_regs(struct pch_dma *pd) { snip... list_for_each_entry_safe(chan, _c, &pd->dma.channels, device_node) { ...
```diff diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 5b65362024fd..6abe5ac3bd5e 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c @@ -60,7 +60,7 @@ #define DMA_DESC_FOLLOW_WITHOUT_IRQ 0x2 #define DMA_DESC_FOLLOW_WITH_IRQ 0x3 -#define MAX_CHAN_NR 8 +#define MAX_CHAN_NR 12 #def...
54ced00639aa90c92e0ce399cc84ca6fc6a2eebb
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix coding style issues in InterfaceMisc.c
Problem Details: This patch cleans up several code style issues found in InterfaceMisc.c reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index a51185b522cf..61f878b4f56c 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -1,246 +1,219 @@ #include "headers.h" -INT -InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, - ...
f969f84ed92e55040dbf51398ba2d8f5d23bf498
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix coding style issues reported by checkpatch.pl
Problem Details: This patch cleans up several code style issues found in InterfaceInit.c reported by checkpatch.pl. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index d78d5ef1f298..36991f7cbf33 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -139,8 +139,7 @@ static void ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter) BeceemEE...
d491061b98bf3d2d036b9896f884403cdc2c0327
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.
Problem Details: This patch fixes an error where an assignment "=" was being used in an if statement to determine if Firmware was downloaded. This patch removes that assignment, and places it above the if statement. The if statement then evaluates the status to verify if "0" successful, or != 0 failure. Signed-off-by:...
```diff diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 0882e04963a2..e9f29d597518 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -1045,7 +1045,8 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter) } /* Download Firmare */ - if ((status = BcmFileDow...
33fd472ee7b98ac187f0fcee33d97a187bdbaa08
Analyze and fix the following issue in the Linux kernel code: staging: et131x: Fix et131x smatch issues
Problem Details: This fixes the following issues: et131x_initpci.c +488 et131x_adjust_link(45) error: we previously assumed 'phydev' could be null. et131x_initpci.c +504 et131x_adjust_link(61) warn: variable dereferenced before check 'phydev' Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-...
```diff diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 9b2dc55ecbe4..45ce8321f31b 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c @@ -485,7 +485,7 @@ static void et131x_adjust_link(struct net_device *netdev) et13...
6617c3698778ae896deb89804f7ba8efb4d2252d
Analyze and fix the following issue in the Linux kernel code: staging: et131x: Fix et131x sparse warnings
Problem Details: This fixes the following warnings: et1310_mac.c:375:44: warning: incorrect type in initializer (different address spaces) et1310_mac.c:382:28: warning: incorrect type in argument 2 (different address spaces) et1310_mac.c:384:31: warning: incorrect type in argument 2 (different address spaces) et131x_i...
```diff diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 017ece7e24c2..042bc44f9ff0 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -372,7 +372,7 @@ void et1310_config_rxmac_regs(struct et131x_adapter *adapter) void et1310_conf...
0030807c66f058230bcb20d2573bcaf28852e804
Analyze and fix the following issue in the Linux kernel code: xfs: revert to using a kthread for AIL pushing
Problem Details: Currently we have a few issues with the way the workqueue code is used to implement AIL pushing: - it accidentally uses the same workqueue as the syncer action, and thus can be prevented from running if there are enough sync actions active in the system. - it doesn't use the HIGHPRI flag to qu...
```diff diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index 1e8a45e74c3e..828662f70d64 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h @@ -68,6 +68,8 @@ #include <linux/ctype.h> #include <linux/writeback.h> #include <linux/capability.h> +#include <linux/kthread.h> +#include <linux/freezer.h> #includ...
447ff8865209e48e231de804c47eb4677f2318be
Analyze and fix the following issue in the Linux kernel code: staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys
Problem Details: Array XGrpKey has only 2 elements and uses (keyid - 1) as the index, which allows the possibility of memory corruption from an out-of-bounds index. This problem was reported by a new version of smatch. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwf...
```diff diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c index c475b961308e..ef8eb6c7ee41 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.c +++ b/drivers/staging/rtl8712/rtl871x_mlme.c @@ -1281,12 +1281,16 @@ sint r8712_set_key(struct _adapter *adapter, psecuritypriv->D...
8550be08cbed164a8357491cc2c27cb99282b7ff
Analyze and fix the following issue in the Linux kernel code: staging: zcache: fix crash on cpu remove
Problem Details: In the case that a cpu is taken offline before zcache_do_preload() is ever called on the cpu, the per-cpu zcache_preloads structure will be uninitialized. In the CPU_DEAD case for zcache_cpu_notifier(), kp->obj is not checked before calling kmem_cache_free() on it. If it is NULL, a crash results. Thi...
```diff diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index fbb400193e9e..dae2f4ee06a6 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -1357,8 +1357,14 @@ static int zcache_cpu_notifier(struct notifier_block *nb, kp->objnodes...
aa3e842d2c27acd3e73167eef5a347601639f2cb
Analyze and fix the following issue in the Linux kernel code: easycap: fix ntsc module parameter description
Problem Details: Cc: Mike Thomas <rmthomas@sciolus.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/easycap/easycap_main.c b/drivers/staging/easycap/easycap_main.c index 3ea51c373914..17444a72ec99 100644 --- a/drivers/staging/easycap/easycap_main.c +++ b/drivers/staging/easycap/easycap_main.c @@ -58,7 +58,7 @@ MODULE_PARM_DESC(gain, "Audio gain: 0,...,16(default),...31"); stati...
a45186c0cdd35e6b79aeeff6e535c5d5c20ac93d
Analyze and fix the following issue in the Linux kernel code: staging:iio:dac:ad5638: Fix channel address
Problem Details: Commit c6fc806247 ("staging:iio: ABI rework - add in_ or out_ prefix to channnels") added the AD5868_CHANNEL macro to simplify channel initialization. Unfortunately the macro hardcodes the channel's address to AD5686_ADDR_DAC0. As a result writing to any of the channels will change the value of the fir...
```diff diff --git a/drivers/staging/iio/dac/ad5686.c b/drivers/staging/iio/dac/ad5686.c index b55ef42a18b0..adf898f24925 100644 --- a/drivers/staging/iio/dac/ad5686.c +++ b/drivers/staging/iio/dac/ad5686.c @@ -26,10 +26,7 @@ #define AD5686_ADDR(x) ((x) << 16) #define AD5686_CMD(x) ((x) << 20) -#define AD5686...
15fbc198e635733aefbb4bc8182c02b85ec11a30
Analyze and fix the following issue in the Linux kernel code: Staging: iio/light/tsl2563: fix compile warning
Problem Details: This fixes a compile warning: drivers/staging/iio/light/tsl2563.c:696:2: warning: initialization from incompatible pointer type [enabled by default] drivers/staging/iio/light/tsl2563.c:696:2: warning: (near initialization for ‘tsl2563_info.write_event_value’) [enabled by default] The tsl2563_write_t...
```diff diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 8977f5894da6..a5e08b32e42c 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -569,7 +569,7 @@ static int tsl2563_read_thresh(struct iio_dev *indio_dev, return 0; } -stati...
815166b95df1acb4890e9dbdb26660e9c00a7505
Analyze and fix the following issue in the Linux kernel code: Staging: hv: remove vmbus_loglevel as it is not used at all anymore
Problem Details: As there is no user of this variable, it's time to delete it. For dynamic debugging of the hyperv code, use the standard dynamic debug kernel interface. Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index bb9f20507d77..e648571a5b05 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -41,10 +41,6 @@ static struct acpi_device *hv_acpi_dev; static struct tasklet_struct msg_dpc; static struct tasklet_struct event_dpc; - -unsigned...
f7f43cc84152e53b5687cd0eb8823310ba065524
Analyze and fix the following issue in the Linux kernel code: Btrfs: make sure not to defrag extents past i_size
Problem Details: The btrfs file defrag code will loop through the extents and force COW on them. But there is a concurrent truncate in the middle of the defrag, it might end up defragging the same range over and over again. The problem is that writepage won't go through and do anything on pages past i_size, so the co...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index df40b7c5f06b..efc4e4a85a69 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1062,7 +1062,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, if (i < inode->i_mapping->writeback_index) inode->i_mapping->writeback_index = i; - wh...
fcd0861db1cf4e6ed99f60a815b7b72c2ed36ea4
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Fix wrong shift direction
Problem Details: The shift direction was wrong because the function takes a page number and i is the address is the loop. 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 0e4227f457af..cc79045bc527 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1283,7 +1283,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom, if (!pte || !IOMMU_PTE_PRESENT(*pte)) continue; - ...
a832a1eba94096513bc42c96f33957cc46c5f2bf
Analyze and fix the following issue in the Linux kernel code: hv: remove a bunch of unused debug macros from hyperv.h
Problem Details: These aren't used by anyone anymore, so remove them before someone tries to use them again. Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 98a57a51acfc..2229073874b0 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -721,11 +721,8 @@ extern void vmbus_ontimer(unsigned long data); BLKVSC_DRV) /* Logging Level */ -#define ERROR_LVL 3 #define WARNING_L...
da0e96315ca703ab6540cc7665549622f71c155f
Analyze and fix the following issue in the Linux kernel code: hv: rename prep_negotiate_resp() to vmbus_prep_negotiate_resp()
Problem Details: It's a global symbol, so properly prefix it and use the proper EXPORT value as well. Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 41bf287baa1c..a2fc487d1422 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -114,7 +114,7 @@ static const uuid_le /** - * prep_negotiate_resp() - Create default response for Hyper-V Negotiate message + * vmbus...
684a65d4fba9099ed132a3a9a698390e17df9000
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix typo in Kconfig symbol for tlv320aic32x4
Problem Details: It is currently named "TVL" instead of "TLV". Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Javier Martin <javier.martin@vista-silicon.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 344943152988..4584514d93d4 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -49,7 +49,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_STAC9766 if SND_SOC_AC97_BUS select SND_SOC_TLV320AIC23 if I2C select SND_SOC_TL...
e5d3625e8741d204e8c3f0a959f92c9e901519aa
Analyze and fix the following issue in the Linux kernel code: wl12xx: spi: use dev_err instead of wl1271_error
Problem Details: To prevent a useless dependency between the spi module and the wl12xx module, we need to replace the wl1271_error macros with dev_err. At the same time, remove the SPI data hexdump, since this produces way too much data and is not particularly useful. There's no print_hex_dump() equivalent for dynami...
```diff diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c index bcc7d7c95a22..976d3d556833 100644 --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c @@ -31,7 +31,6 @@ #include <linux/slab.h> #include "wl12xx.h" -#include "debug.h" #include "wl12xx_80211...
3c4d386868dcbfb9fa51427e314fde39ee70b0ff
Analyze and fix the following issue in the Linux kernel code: wl12xx: sdio: use dev_dbg instead of wl1271_debug
Problem Details: To prevent a useless dependency between the sdio module and the wl12xx module, we need to replace the wl1271_debug macros (and friends) for dev_dbg and other equivalents. At the same time, remove the SDIO data hexdump, since this produces way too much data and is not particularly useful. There's not ...
```diff diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 55c63adb1d0f..57e72b4b8d22 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c @@ -34,7 +34,6 @@ #include <linux/pm_runtime.h> #include "wl12xx.h" -#include "debug.h" #include "wl...
0348299ad18e4b63e90b04e2698fd3d3e2cbe2e6
Analyze and fix the following issue in the Linux kernel code: Fix file references in Kconfig files
Problem Details: This patch fixes file references to moved or deleted files outside of Documentation/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 17addacb169e..408b055c585f 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -282,8 +282,8 @@ config ETRAX_RTC Enables drivers for the Real-Time Clock battery-backed chips on some products. The kernel reads the time when booting, and t...
0f4e31222a2c0b93f25a87effd2033cb78c7a79c
Analyze and fix the following issue in the Linux kernel code: wl12xx: move debugging definitions to a separate file
Problem Details: Separate the debugging macros and other definitions to a new debug.h file. This is be needed because the sdio and spi modules don't need to depend on the wl12xx module anymore, but still need to include wl12xx.h. Currently they do depend on it, because of the debugging global that wl12xx exports. A ...
```diff diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c index e2e46705059d..bde1d862bdd5 100644 --- a/drivers/net/wireless/wl12xx/acx.c +++ b/drivers/net/wireless/wl12xx/acx.c @@ -29,6 +29,7 @@ #include <linux/slab.h> #include "wl12xx.h" +#include "debug.h" #include "wl12xx_80211...
a390e85cfe91c346ff4745bcd45ad0a7e7101aa2
Analyze and fix the following issue in the Linux kernel code: wl12xx: move common init code from bus modules to main
Problem Details: Move all common parts from sdio.c and spi.c to main.c, since they now can be handled as part of the platform driver. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added a bunch of fixes and a new pdata element] [moved some new code into main.c as...
```diff diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c index c2da66f45046..1a7df8a7ed2d 100644 --- a/drivers/net/wireless/wl12xx/io.c +++ b/drivers/net/wireless/wl12xx/io.c @@ -24,6 +24,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/spi/spi.h> +#in...
50657fc4dfa7e345a1008f7c1de0bf930bbecca9
Analyze and fix the following issue in the Linux kernel code: writeback: fix ppc compile warnings on do_div(long long, unsigned long)
Problem Details: Fix powerpc compile warnings mm/page-writeback.c: In function 'bdi_position_ratio': mm/page-writeback.c:622:3: warning: comparison of distinct pointer types lacks a cast [enabled by default] page-writeback.c:635:4: warning: comparison of distinct pointer types lacks a cast [enabled by default] Also f...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 325f753c80ed..0802d5177997 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -618,8 +618,8 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi, x_intercept = bdi_setpoint + span; if (bdi_dirty < x_intercept - span...
836e53d7586bcb1440ae1f6e146102318d0436b6
Analyze and fix the following issue in the Linux kernel code: drm: Add KMS debug printk's for encoder and crtc fixup failure
Problem Details: Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index f88a9b2c977b..f2366440b738 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -372,11 +372,13 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, encoder_funcs = encoder->helper...
715a4801e734ea9c8e528265ce3ff6aead85bce1
Analyze and fix the following issue in the Linux kernel code: Staging: hv: netvsc: Fix a dereferencing issue
Problem Details: net_dev is being de-referenced without proper checking; fix it. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index ef43f2e95f34..bafccb360041 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c @@ -368,11 +368,11 @@ int rndis_filter_receive(struct hv_device *dev, struct rndis_message *rndis_hdr; st...
550eca7cafa1c6e2c077afb2211a364a982d8645
Analyze and fix the following issue in the Linux kernel code: Input: serio_raw - fix memory leak when closing char device
Problem Details: Apparently we never freed memory allocated when users open our char devices nor removed old users from the list of connected clients. Also unregister misc device immediately upon disconnecting the port instead of waiting until last user drops off (refcounting in misc device code will make sure needed ...
```diff diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 830e2fe70a66..4d4cd142bbbb 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -51,7 +51,6 @@ struct serio_raw_client { static DEFINE_MUTEX(serio_raw_mutex); static LIST_HEAD(serio_raw_list...
15a564d8dbfc9429540c2d9b38a64d1909de8b24
Analyze and fix the following issue in the Linux kernel code: Input: serio_raw - fix coding style issues
Problem Details: This makes checkpatch.pl happy with the driver Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 396a17fcc344..64fcefb50fbe 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -156,7 +156,8 @@ static bool serio_raw_fetch_byte(struct serio_raw *serio_raw, char *c) return !empty; } -sta...
76e5f8135d63eb784ef44438e46e82cf0329e179
Analyze and fix the following issue in the Linux kernel code: Staging: hv: util: Fix a bug in kvp implementation
Problem Details: The host gurantees that there can be only one kvp transaction active against the guest. So, the transaction active state is needed only to protect against spurious user level calls. The current code had a race condition where the guest could prematurely return because the previous transaction state was...
```diff diff --git a/drivers/staging/hv/hv_kvp.c b/drivers/staging/hv/hv_kvp.c index 9aa9ede0ee87..307aedc08a36 100644 --- a/drivers/staging/hv/hv_kvp.c +++ b/drivers/staging/hv/hv_kvp.c @@ -50,6 +50,8 @@ static struct { static int kvp_send_key(int index); +#define TIMEOUT_FIRED 1 + static void kvp_respond_to_hos...
276532ba9666b36974cbe16f303fc8be99c9da17
Analyze and fix the following issue in the Linux kernel code: USB: fix ehci alignment error
Problem Details: The Kirkwood gave an unaligned memory access error on line 742 of drivers/usb/host/echi-hcd.c: "ehci->last_periodic_enable = ktime_get_real();" Signed-off-by: Harro Haan <hrhaan@gmail.com> Cc: stable <stable@kernel.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman...
```diff diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index a4cd6c58870a..03354d557b79 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -178,7 +178,7 @@ struct usb_hcd { * this structure. */ unsigned long hcd_priv[0] - __attribute__ ((aligned(sizeof(unsigned long)))); + ...
c30e92df30d7d5fe65262fbce5d1b7de675fe34e
Analyze and fix the following issue in the Linux kernel code: nfsd4: ignore WANT bits in open downgrade
Problem Details: We don't use WANT bits yet--and sending them can probably trigger a BUG() further down. Cc: stable@kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 683885b18ceb..a39a542d8be5 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -3574,6 +3574,8 @@ nfsd4_open_downgrade(struct svc_rqst *rqstp, if (!access_valid(od->od_share_access, cstate->minorversion) || !deny_valid(od->od_share_den...
71c3bcd71393a9e67d5b77597a612537f89c30ed
Analyze and fix the following issue in the Linux kernel code: nfsd4: fix state lock usage in LOCKU
Problem Details: In commit 5ec094c1096ab3bb795651855d53f18daa26afde "nfsd4: extend state lock over seqid replay logic" I modified the exit logic of all the seqid-based procedures except nfsd4_locku(). Fix the oversight. The result of the bug was a double-unlock while handling the LOCKU procedure, and a warning like: ...
```diff diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 931155f51ecc..8e253a347649 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4185,7 +4185,8 @@ nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, memcpy(&locku->lu_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_...
efe2e878413ad4a4a4f241ba92e07d3248e65f50
Analyze and fix the following issue in the Linux kernel code: aic7xxx: fix Kconfig references to READMEs
Problem Details: Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/aic7xxx/Kconfig.aic79xx b/drivers/scsi/aic7xxx/Kconfig.aic79xx index 5e6620f8dabc..6739069477de 100644 --- a/drivers/scsi/aic7xxx/Kconfig.aic79xx +++ b/drivers/scsi/aic7xxx/Kconfig.aic79xx @@ -31,8 +31,7 @@ config AIC79XX_CMDS_PER_DEVICE on some devices. The upper bound is 253. 0 d...
40cba97105d1892ee1170bc281484f559aaa5138
Analyze and fix the following issue in the Linux kernel code: Fix file references in drivers/ide/
Problem Details: There are a lot of file references to now moved or deleted files in the whole tree, especially in documentation and Kconfig files. This patch fixes the references in drivers/ide/. Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 9827c5e686cb..811dbbd9306c 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -327,7 +327,7 @@ config BLK_DEV_OPTI621 select BLK_DEV_IDEPCI help This is a driver for the OPTi 82C621 EIDE controller. - Please read the comments at t...
3e7abe2556b583e87dabda3e0e6178a67b20d06f
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Fix AB-BA lockdep report
Problem Details: When unbinding a device so that I could pass it through to a KVM VM, I got the lockdep report below. It looks like a legitimate lock ordering problem: - domain_context_mapping_one() takes iommu->lock and calls iommu_support_dev_iotlb(), which takes device_domain_lock (inside iommu->lock). - ...
```diff diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c621c98c99da..d9514c46177f 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3568,6 +3568,8 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain, found = 1; } + spin_unlock_irqrestor...
2a0f7f5769992bae5b3f97157fd80b2b943be485
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix recursive auto-defrag
Problem Details: Follow those steps: # mount -o autodefrag /dev/sda7 /mnt # dd if=/dev/urandom of=/mnt/tmp bs=200K count=1 # sync # dd if=/dev/urandom of=/mnt/tmp bs=8K count=1 conv=notrunc and then it'll go into a loop: writeback -> defrag -> writeback ... It's because writeback writes [8K, 200K] and then w...
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 6f89bcc4e555..df40b7c5f06b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1055,6 +1055,13 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, if (!max_to_defrag) max_to_defrag = last_index - 1; + /* + * make writeback starts f...
44a56040a0037a845d5fa218dffde464579f0cab
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix to show correct error string
Problem Details: Fix perf probe to show correct error string when it fails to delete an event. The write(2) returns -1 if failed, and errno stores real error number. Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.c...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 1c7bfa5fe0a8..eb25900e2211 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -1956,8 +1956,10 @@ static int __del_trace_probe_event(int fd, struct str_node *ent) pr_debug("Writing event: %s\n", b...
02ca1521ad404cf566e0075848f80d064c0a0503
Analyze and fix the following issue in the Linux kernel code: ftrace/kprobes: Fix not to delete probes if in use
Problem Details: Fix kprobe-tracer not to delete a probe if the probe is in use. In that case, delete operation will return -EBUSY. This bug can cause a kernel panic if enabled probes are deleted during perf record. (Add some probes on functions) sh-4.2# perf probe --del probe:\* sh-4.2# exit (kernel panic) This is ...
```diff diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 5fb3697bf0e5..00d527c945a4 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -836,11 +836,17 @@ static void __unregister_trace_probe(struct trace_probe *tp) } /* Unregister a trace_probe and probe_event:...
3e60a77ea218d1915bdc9127f88ab866fd2ac643
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Add missing <linux/stat.h> in ipath_chip_init.c
Problem Details: Fix build errors: drivers/infiniband/hw/ipath/ipath_init_chip.c:54:1: error: 'S_IRUGO' undeclared here (not in a function) drivers/infiniband/hw/ipath/ipath_init_chip.c:54:1: error: bit-field '<anonymous>' width not an integer constant drivers/infiniband/hw/ipath/ipath_init_chip.c:67:1: er...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 7c1eebe8c7c9..824a4d508836 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c @@ -34,6 +34,7 @@ #include <linux/pci.h> #include <linux/ne...
134d0f974c55c942541f1663d51fa846257eff2a
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
Problem Details: There are some consolidations of NPAR configuration when FCoE and iSCSI L2 clients will get the same id, in this case FCoE ring will be non-functional. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@daveml...
```diff diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index e46df5331c55..9a7eb3b36cf3 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h @@ -239,13 +239,19 @@ void bnx2x_int_disable(struct bnx2x *bp); * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X * */ -/* iSC...
c5d6136e10d667965e46f998c01863802f7b89c8
Analyze and fix the following issue in the Linux kernel code: mlx4_en: fix endianness with blue frame support
Problem Details: The doorbell register was being unconditionally swapped. In x86, that meant it was being swapped to BE and written to the descriptor and to memory, depending on the case of blue frame support or writing to doorbell register. On PPC, this meant it was being swapped to LE and then swapped back to BE whil...
```diff diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 6e03de034ac7..f76ab6bf3096 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c @@ -172,7 +172,7 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv, memset(ring->buf, 0, ring->buf_size); ring->qp_state = MLX4_QP_...
bab3a9f43f211554626e189519b91ab9ef952f2d
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix terminate connection
Problem Details: Fixes a crash that occurs during close when error async event is received. Terminate message is not sent to the remote node if already processing close. Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Signed-off-by: Faisal Latif <Faisal.Latif@intel.com> Signed-off-by: Roland Dreier <rol...
```diff diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index be36cbeae630..43bebe805d2e 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -3553,9 +3553,9 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, aeqe_cq_id = le32...
7e273e3b41e32716dc122b293b5f15635af495ff
Analyze and fix the following issue in the Linux kernel code: udf: Promote some debugging messages to udf_error
Problem Details: If there is a problem with a scratched disc or loader, it's valuable to know which error occurred. Convert some debug messages to udf_error, neaten those messages too. Add the calculated tag checksum and the read checksum to error message. Make udf_error a public function and move the logging prototyp...
```diff diff --git a/fs/udf/misc.c b/fs/udf/misc.c index 9215700c00a4..a85fa7c55b0a 100644 --- a/fs/udf/misc.c +++ b/fs/udf/misc.c @@ -204,6 +204,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block, { struct tag *tag_p; struct buffer_head *bh = NULL; + u8 checksum; /* Read the block...
e4efd94bde1a2df9f1344ff936d42b4a78b9acc0
Analyze and fix the following issue in the Linux kernel code: iommu/omap: always provide iommu debug code
Problem Details: The iommu module on omap contains a few functions that are only used by the debug module. These are however only there when the debug code is built as a module. Since it is possible to build the debug code into the kernel, the functions should also be provided for the built-in case. Signed-off-by: Arn...
```diff diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index bd5f6064c74a..4d2ba0d60c56 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -381,7 +381,7 @@ static void flush_iotlb_all(struct omap_iommu *obj) clk_disable(obj->clk); } -#if defined(CONFIG_OMAP_IOMMU_DEBU...
6179b772ac6ac2209096753e2aa91edb9c3988a5
Analyze and fix the following issue in the Linux kernel code: ASoC: fix checkpatch.pl error in omap-mcbsp
Problem Details: Signed-off-by: Michael Opdenacker <michael.opdenacker@linaro.org> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 7f700610b3cb..4314647e735e 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -617,8 +617,7 @@ static int mcbsp_dai_probe(struct snd_soc_dai *dai) return 0; } -static struct snd_soc_dai_driver omap_mcbsp...
25c77c5fae5e0ef43ab6381f89fc41e26d2ca0f4
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix DAPM sync for TLV320AIC3x custom DAPM widget
Problem Details: We really should be doing this in the core, not in a driver... Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
```diff diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index bfefc16137ea..17a4c17f19f5 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -381,6 +381,9 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_con...
b03622a80d2206c4179d6a41a0dc5cfbdfc853ee
Analyze and fix the following issue in the Linux kernel code: regmap: Ensure rbtree syncs registers set to zero properly
Problem Details: Simplify the check for registers set at their default value by avoiding picking a default value in the case where we don't have one. Instead we only compare the current value to the current value when we looked one up. This fixes the case where we don't have a default stored but the value was set to ze...
```diff diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 52511f95857a..e31498499b0f 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -304,7 +304,7 @@ static int regcache_rbtree_sync(struct regmap *map) struct rb_node *nod...
c245cb9e15055ed5dcf7eaf29232badb0059fdc1
Analyze and fix the following issue in the Linux kernel code: DRM: bug: RADEON_DEBUGFS_MAX_{NUM_FILES => COMPONENTS}
Problem Details: The value of RADEON_DEBUGFS_MAX_NUM_FILES has been used to specify the size of an array, each element of which looks like this: struct radeon_debugfs { struct drm_info_list *files; unsigned num_files; }; Consequently, the number of debugfs files may be much g...
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 0040d28816f1..ff5424e43d1b 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -102,7 +102,7 @@ extern int radeon_pcie_gen2; #define RADEON_FENCE_JIFFIES_TIMEOUT (HZ / 2) /* RADEON_IB_POOL_SI...
d0d0a225e6ad43314c9aa7ea081f76adc5098ad4
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: handle !force case in connector detect more gracefully
Problem Details: When force == false, we don't do load detection in the connector detect functions. Unforunately, we also return the previous connector state so we never get disconnect events for DVI-I, DVI-A, or VGA. Save whether we detected the monitor via load detection previously and use that to determine whether...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index fbcf21dd2c23..9b5b3e4d2386 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -724,6 +724,7 @@ radeon_vga_detect(struct drm_connector *connector, bo...
5f0a26128d66ef81613fe923d5c288942844ccdc
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: bail early in dvi_detect for digital only connectors
Problem Details: DVI-D and HDMI-A are digital only, so there's no need to attempt analog load detect. Also, skip bail before the !force check, or we fail to get a disconnect events. The next patches in the series attempt to fix disconnect events for connectors with analog support (DVI-I, HDMI-B, DVI-A). Fixes: https:...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index c4b8741dbf58..fbcf21dd2c23 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -959,6 +959,11 @@ radeon_dvi_detect(struct drm_connector *connector, b...
286e0c94f9c3f292cb38a977fbbde3433347a868
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: Fix I2C mask definitions
Problem Details: Commit 9b9fe724 accidentally used RADEON_GPIO_EN_* where RADEON_GPIO_MASK_* was intended. This caused improper initialization of I2C buses, mostly visible when setting i2c_algo_bit.bit_test=1. Using the right constants fixes the problem. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Alex...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index 63675241c7ff..8bf83c4b4147 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c @@ -620,8 +620,8 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct rad...
53a019a951fae849471e4a620948c5f6886bd1a4
Analyze and fix the following issue in the Linux kernel code: x86: Fix insn decoder for longer instruction
Problem Details: Fix x86 insn decoder for hardening against invalid length instructions. This adds length checkings for each byte-read site and if it exceeds MAX_INSN_SIZE, returns immediately. This can happen when decoding user-space binary. Caller can check whether it happened by checking insn.*.got member is set or...
```diff diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c index 9f33b984d0ef..374562ed6704 100644 --- a/arch/x86/lib/insn.c +++ b/arch/x86/lib/insn.c @@ -22,14 +22,23 @@ #include <asm/inat.h> #include <asm/insn.h> -#define get_next(t, insn) \ - ({t r; r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); r; ...
d48b0e173715f678698d3678fefd40f2893ce798
Analyze and fix the following issue in the Linux kernel code: x86, nmi, drivers: Fix nmi splitup build bug
Problem Details: nmi.c needs an #include <linux/mca.h>: arch/x86/kernel/nmi.c: In function ‘unknown_nmi_error’: arch/x86/kernel/nmi.c:286:6: error: ‘MCA_bus’ undeclared (first use in this function) arch/x86/kernel/nmi.c:286:6: note: each undeclared identifier is reported only once for each function it appears in A...
```diff diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index d0eaa31b9f37..7ec5bd140b87 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -18,6 +18,8 @@ #include <linux/hardirq.h> #include <linux/slab.h> +#include <linux/mca.h> + #if defined(CONFIG_EDAC) #include <linux/edac.h> #endif...
9c48f1c629ecfa114850c03f875c6691003214de
Analyze and fix the following issue in the Linux kernel code: x86, nmi: Wire up NMI handlers to new routines
Problem Details: Just convert all the files that have an nmi handler to the new routines. Most of it is straight forward conversion. A couple of places needed some tweaking like kgdb which separates the debug notifier from the nmi handler and mce removes a call to notify_die. [Thanks to Ying for finding out the histo...
```diff diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h index 480b69b75756..53610957feaf 100644 --- a/arch/x86/include/asm/nmi.h +++ b/arch/x86/include/asm/nmi.h @@ -22,26 +22,6 @@ void arch_trigger_all_cpu_backtrace(void); #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace #en...
06e92c33999fd66128c2256b0461455633c3d53c
Analyze and fix the following issue in the Linux kernel code: r6040: invoke phy_{start,stop} when appropriate
Problem Details: Joe reported to me that right after a bring up of a r6040 interface the ethtool output had no consistent output with respect to link duplex and speed. Fix this by adding a missing phy_start call in r6040_up and conversely a phy_stop call in r6040_down to properly initialize phy states. Reported-by: Jo...
```diff diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index 2bbadc044784..a128c3d1c47f 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c @@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev) iowrite16(adrp[0], ioaddr + MID_0L); iowri...
4234144f5ca69a0a13d5adae6c94b6937c52541f
Analyze and fix the following issue in the Linux kernel code: mlx4_en: Fix crash upon device initialization error
Problem Details: Netdevice was being freed without being unregistered first if mlx4_SET_PORT_general or mlx4_INIT_PORT failed. Signed-off-by: Alexander Guller <alexg@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index b82db4a46df0..c4c4be426921 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -1097,6 +1097,7 @@ int mlx4_en_init_netdev(struct mlx4...
999bb4b3831abd6ad53023a0b8e5d304875927dd
Analyze and fix the following issue in the Linux kernel code: mlx4_en: Fix QP number calculation according to module param
Problem Details: Number of bits taken from mac table index in QP calculation should be based on log_num_mac parameter. Signed-off-by: Alexander Guller <alexg@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_port.c b/drivers/net/ethernet/mellanox/mlx4/en_port.c index 5ada5b469112..8824309bb625 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_port.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_port.c @@ -128,7 +128,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *d...
7398af403f621418fa05c6936cac34aa06b5a758
Analyze and fix the following issue in the Linux kernel code: mlx4_en: Added missing iounmap upon releasing a device
Problem Details: Fixed a memory leak caused by missing iounmap when device is being released. Signed-off-by: Alexander Guller <alexg@mellanox.co.il> Signed-off-by: Sharon Cohen <sharonc@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_main.c b/drivers/net/ethernet/mellanox/mlx4/en_main.c index 6bfea233a9f2..a06096fcc0b8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_main.c @@ -176,6 +176,7 @@ static void mlx4_en_remove(struct mlx4_dev *d...
fe0af03c69abc2178fc4667664726ec1f688539b
Analyze and fix the following issue in the Linux kernel code: mlx4_en: Removing reserve vectors
Problem Details: Fixed a bug where ring size change caused insufficient memory upon driver restart due to unreleased EQs. Signed-off-by: Alexander Guller <alexg@mellanox.co.il> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c index 70ec5298a16a..227997d775e8 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c @@ -139,14 +139,13 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, ...
3faf12cd8603e3efbcc7e570e07dfd1ea2a17095
Analyze and fix the following issue in the Linux kernel code: ARM: tegra: fix compilation error due to mach/hardware.h removal
Problem Details: This fixes a compilation error in cpu-tegra.c which was introduced in dc8d966bccde ("ARM: convert PCI defines to variables") which removed the now obsolete mach/hardware.h from the mach-tegra subtree. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Olof Johansson <olof@lixom.net> Cc: Ser...
```diff diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index 0e1016a827ac..0e0fd4d889bd 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -32,7 +32,6 @@ #include <asm/system.h> -#include <mach/hardware.h> #include <mach/clk.h> /* Frequency tab...
28897fb73c848eb441e54e859d0b64ad6b44d2e6
Analyze and fix the following issue in the Linux kernel code: firewire: ohci: TSB41BA3D support tweaks
Problem Details: Fix: phy_reg_mutex must be held over the write/read_phy_reg pair which gets PHY port status. Only print to the log when a TSB41BA3D was found. By far most TSB82AA2 cards have a TSB81BA3, and firewire-ohci can keep quiet about that. Shorten some strings and comments. Change some whitespace. Signed...
```diff diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index b983581cfe35..862fdf3400cf 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -325,7 +325,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0" ", AR/selfID endianess = " __stringify(QUIRK_BE_HEADERS) ", no 1394a enha...
f094fea68f0575286c55c06141cc89ffd0049024
Analyze and fix the following issue in the Linux kernel code: regmap: Use bsearch() to search the register defaults
Problem Details: Rather than open coding a binary search use the standard bsearch() using the comparison function we're already using for sort() on insert. This fixes a lockup I was observing due to iterating on min <= max rather than min < max when we fail to look up. Signed-off-by: Mark Brown <broonie@opensource.wol...
```diff diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index b10e38fa0e3f..c5379c86de88 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -12,6 +12,7 @@ #include <linux/slab.h> #include <trace/events/regmap.h> +#include <linux/bsearch.h> #include <lin...
e3efe6669bf9c3cbd955b5a2976c70d79e8fd745
Analyze and fix the following issue in the Linux kernel code: regulator: remove duplicate REG_CTRL2 defines in tps65023
Problem Details: There are two sets of defines for the REG_CTRL2 bitfields and one of them has TPS65023_REG_CTRL2_DCDC1 defined incorrectly. Remove the duplicates and leave the correct one for TPS65023_REG_CTRL2_DCDC1. This fixes the following sparse warnings: drivers/regulator/tps65023-regulator.c:77:9: warning: pre...
```diff diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index b02c67086353..9fb4c7b81753 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c @@ -63,13 +63,6 @@ #define TPS65023_REG_CTRL_LDO2_EN BIT(2) #define TPS65023_REG_CTRL_L...
3797ef6b6bc041755318917855d63879679c6dd9
Analyze and fix the following issue in the Linux kernel code: HID: wacom: Set input bits before registration
Problem Details: We shouldn't change the event flags of input devices after they get registered. Otherwise, udev will not get notified of these flags and cannot setup the devices properly. This fixes the probing to set the input event flags on the input_mapped callback instead of the probe function. Reported-by: Basti...
```diff diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index a597039d0755..519f56c787bb 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c @@ -304,11 +304,49 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report, return 1; } +static int wacom_input_mapped(...