id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
08b877b80f286e86a0034b460ac15b09f67da8a7
Analyze and fix the following issue in the Linux kernel code: mfd: Fix tc6387xb resource reclaim
Problem Details: This patch includes below fixes: 1. add a missing iounmap in tc6387xb_probe() error path 2. fix resource reclaim in tc6387xb_remove() Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 517f9bcdeaac..1bc71da5278c 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c @@ -201,6 +201,7 @@ static int tc6387xb_probe(struct platform_device *dev) if (!ret) return 0; + iounmap(tc6387xb->scr); err_ioremap: release_r...
fa6e4b181c57ae8b18758840b8a8545b3bb1f1d9
Analyze and fix the following issue in the Linux kernel code: mfd: Fix wrong goto labels for tc6393xb error handling
Problem Details: This patch corrects the error handling path. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index fcf9068810fb..ef6c42c8917a 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c @@ -732,9 +732,9 @@ err_gpio_add: if (tc6393xb->gpio.base != -1) temp = gpiochip_remove(&tc6393xb->gpio); tcpd->disable(dev); -err_clk_enable: - c...
48736c80e5d0c7c9db97bd6643a979a4ab11f25b
Analyze and fix the following issue in the Linux kernel code: mfd: Fix jz4740-adc resource reclaim in probe error path
Problem Details: If mfd_add_devices() fail, we need to relese allocated resources. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c index 7a844aef5dcf..b30e44ac4d1c 100644 --- a/drivers/mfd/jz4740-adc.c +++ b/drivers/mfd/jz4740-adc.c @@ -322,9 +322,15 @@ static int __devinit jz4740_adc_probe(struct platform_device *pdev) writeb(0x00, adc->base + JZ_REG_ADC_ENABLE); writeb(...
3faeb35ccc57e1af70c54b82063fdf4a88846084
Analyze and fix the following issue in the Linux kernel code: touchscreen: Fix sign bug
Problem Details: platform_get_irq_byname() can return negative results, it is not seen to unsigned ts_irq. Make it signed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-By: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index 77f4374b216d..656148ec0027 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -269,7 +269,7 @@ static int __devinit stmpe_input_probe(struct platform_device *pdev) struct...
03f822f5e5f5924f4ad372d3e698855c6a9275e0
Analyze and fix the following issue in the Linux kernel code: gpio: Add STMPE GPIO driver
Problem Details: Add support for the GPIOs on STMPE I/O Expanders. [l.fu@pengutronix.de: fix set direction input] [l.fu@pengutronix.de: set GPIO alternate function while requesting] Acked-by: Luotao Fu <l.fu@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vinc...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index f623953b5797..510aa2054544 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -206,6 +206,13 @@ config GPIO_SX150X 8 bits: sx1508q 16 bits: sx1509q +config GPIO_STMPE + bool "STMPE GPIOs" + depends on MFD_STMPE + help + Thi...
d2d272a965baeb3d78f843374bc48f0cbce8ac3d
Analyze and fix the following issue in the Linux kernel code: mfd: Properly free t7l66xb clk32k clock source
Problem Details: This patch includes below fixes to properly free clk32k clock source: 1. remove a redundant clk_put in t7l66xb_probe error path 2. add missing clk_disable(t7l66xb->clk32k) and clk_put(t7l66xb->clk32k) to properly free the clock source. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Sam...
```diff diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index 5041d33adf0b..006c121f3f0d 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c @@ -350,7 +350,6 @@ static int t7l66xb_probe(struct platform_device *dev) t7l66xb->clk48m = clk_get(&dev->dev, "CLK_CK48M"); if (IS_ERR(t7l66xb->clk48m))...
e2bde787131a01d0f2ca9baccaf3d107bf6c0c92
Analyze and fix the following issue in the Linux kernel code: mfd: Fix davinci memory leak
Problem Details: Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ ...
```diff diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index 3e75f02e4778..33c923d215c7 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c @@ -94,7 +94,8 @@ static int __init davinci_vc_probe(struct platform_device *pdev) res = platform_get_resource(...
eb6e8ddf06ff0d6b6548ca0b95a4edfeb2aaadd0
Analyze and fix the following issue in the Linux kernel code: mfd: Fix 88pm860x uninitialized variable and clean up
Problem Details: The original code had a compile warning: drivers/mfd/88pm860x-core.c:431: warning: ‘ret’ may be used uninitialized in this function It seems like the warning is valid if either pdata or pdata->touch is NULL. This patch checks pdata and pdata->touch at the beginning of the function. That means everyt...
```diff diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 1580f1f2ec62..07933f3f7e4c 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -428,52 +428,44 @@ static int __devinit device_gpadc_init(struct pm860x_chip *chip, { struct i2c_client *i2c = (chip->id == CHI...
d281b80c46da8bae806c4ef5682187f07e35389d
Analyze and fix the following issue in the Linux kernel code: mfd: Fix memory leak in ab3100_otp_probe
Problem Details: In current implementation, there is a memory leak if ab3100_otp_read fail. And in the case of ab3100_otp_init_debugfs fail, it does not properly remove sysfs entries. This patch properly handle above failure cases. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@ste...
```diff diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c index 63d2b727ddbb..8440010eb2b8 100644 --- a/drivers/mfd/ab3100-otp.c +++ b/drivers/mfd/ab3100-otp.c @@ -199,7 +199,7 @@ static int __init ab3100_otp_probe(struct platform_device *pdev) err = ab3100_otp_read(otp); if (err) - return err; + ...
21f1fc38606b35bb12a4772367ef68128cd12c30
Analyze and fix the following issue in the Linux kernel code: mfd: Fix led resource in 88pm860x
Problem Details: Fix typo error in LED resource of 88pm860x. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index 2c65a2c57294..1580f1f2ec62 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c @@ -74,12 +74,12 @@ static struct mfd_cell backlight_devs[] = { } static struct resource led_resources[] = { - PM8606_LED_RESOURC...
a64b44ead002ba15fdf841106a6fd344b8dd46d8
Analyze and fix the following issue in the Linux kernel code: kconfig: fix tristate choice with minimal config
Problem Details: If a minimal config did not specify the value of all choice values, the resulting configuration could have wrong values. Consider following example: config M def_bool y option modules choice prompt "choice list" config A tristate "a" config B tristate "b" endchoice Wi...
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index e5d66e4f1484..ac13f0ff8e81 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -918,13 +918,73 @@ void conf_set_changed_callback(void (*fn)(void)) conf_changed_callback = fn; } +static void randomize_choice_v...
801690caf1894d4f8b1277ca9f5dcf0bcf9b3f58
Analyze and fix the following issue in the Linux kernel code: kconfig: fix savedefconfig for tristate choices
Problem Details: savedefconfig failed to save choice symbols equal to 'y' for tristate choices. This resulted in this value being lost. In particular is fixes an issue where make ARCH=avr32 atngw100_defconfig make ARCH=avr32 savedefconfig cp defconfig arch/avr32/configs/atngw100_defconfig make ARCH=avr32 atngw100...
```diff diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index f81f263b64f2..e5d66e4f1484 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -497,7 +497,7 @@ int conf_write_defconfig(const char *filename) /* * If symbol is a choice value and equals to the * def...
30246557a06bb20618bed906a06d1e1e0faa8bb4
Analyze and fix the following issue in the Linux kernel code: x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner
Problem Details: The old code didn't work on binutils 2.12 because setting a symbol to a register apparently requires a fairly recent version. This commit refactors the code to use the C preprocessor instead, and in the process makes the whole code a bit easier to understand. The object code produced is unchanged as ...
```diff diff --git a/arch/x86/lib/atomic64_386_32.S b/arch/x86/lib/atomic64_386_32.S index 4a5979aa6883..78ee8e0fa278 100644 --- a/arch/x86/lib/atomic64_386_32.S +++ b/arch/x86/lib/atomic64_386_32.S @@ -25,150 +25,170 @@ CFI_ADJUST_CFA_OFFSET -4 .endm -.macro BEGIN func reg -$v = \reg - -ENTRY(atomic64_\func\()_38...
959eb4e5592cc0b0b07db0ca30d2b1efd790020f
Analyze and fix the following issue in the Linux kernel code: dm mpath: support discard
Problem Details: Enable discard support in the DM multipath target. This discard support depends on a few discard-specific fixes to the block layer's request stacking driver methods. Discard requests are optional so don't allow a failed discard to trigger path failures. If there is a real problem with a given path t...
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index da2223aa727f..487ecda90ad4 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -893,6 +893,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, } ti->num_flush_requests = 1; + ti->num_discard_requests = 1; ...
87c961cb747fa55b664b76abfcb9d44c14ae851f
Analyze and fix the following issue in the Linux kernel code: dm snapshot: persistent use define for disk header chunk size
Problem Details: This patch fixes hard-coded value for the size of a chunk that includes disk header for persistent snapshot. It should be changed to existing macro NUM_SNAPSHOT_HDR_CHUNKS instead of using hard-coded value 1. Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com> Signed-off-by: Mikulas Patock...
```diff diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index c097d8a4823d..cc2bdb83f9ad 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -266,7 +266,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, */ static chunk_t ar...
3f77316de0ec0fd208467fbee8d9edc70e2c73b2
Analyze and fix the following issue in the Linux kernel code: dm: separate device deletion from dm_put
Problem Details: This patch separates the device deletion code from dm_put() to make sure the deletion happens in the process context. By this patch, device deletion always occurs in an ioctl (process) context and dm_put() can be called in interrupt context. As a result, the request-based dm's bad dm_put() usage point...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 6a6d475f8e80..feb64d65fbfb 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -274,6 +274,10 @@ retry: up_write(&_hash_lock); dm_put(md); + if (likely(keep_open_devices)) + dm_destroy(md); + else + dm_destroy_imm...
98f332855effef02aeb738e4d62e9a5b903c52fd
Analyze and fix the following issue in the Linux kernel code: dm ioctl: release _hash_lock between devices in remove_all
Problem Details: This patch changes dm_hash_remove_all() to release _hash_lock when removing a device. After removing the device, dm_hash_remove_all() takes _hash_lock and searches the hash from scratch again. This patch is a preparation for the next patch, which changes device deletion code to wait for md reference ...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 79ee5ba217f2..6a6d475f8e80 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -249,40 +249,46 @@ static void __hash_remove(struct hash_cell *hc) static void dm_hash_remove_all(int keep_open_devices) { - int i, dev_skipped, dev_r...
abdc568b0540bec6d3e0afebac496adef1189b77
Analyze and fix the following issue in the Linux kernel code: dm: prevent access to md being deleted
Problem Details: This patch prevents access to mapped_device which is being deleted. Currently, even after a mapped_device has been removed from the hash, it could be accessed through idr_find() using minor number. That could cause a race and NULL pointer reference below: CPU0 CPU1 -------...
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index a3f21dc02bd8..ba6934c3e2c5 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2136,6 +2136,7 @@ static struct mapped_device *dm_find_md(dev_t dev) md = idr_find(&_minor_idr, minor); if (md && (md == MINOR_ALLOCED || (MINOR(disk_devt(dm_disk(md))...
856a6f1dbd8940e72755af145ebcd806408ecedd
Analyze and fix the following issue in the Linux kernel code: dm ioctl: return uevent flag after rename
Problem Details: All the dm ioctls that generate uevents set the DM_UEVENT_GENERATED flag so that userspace knows whether or not to wait for a uevent to be processed before continuing, The dm rename ioctl sets this flag but was not structured to return it to userspace. This patch restructures the rename ioctl process...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 4bc4c4fca90d..79ee5ba217f2 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -285,19 +285,20 @@ retry: up_write(&_hash_lock); } -static int dm_hash_rename(uint32_t cookie, uint32_t *flags, const char *old, - const char *ne...
6bbf79a14080a0c61212f53b4b87dc1a99fedf9c
Analyze and fix the following issue in the Linux kernel code: dm mpath: fix NULL pointer dereference when path parameters missing
Problem Details: multipath_ctr() forgets to return an error after detecting missing path parameters. Fix this. Signed-off-by: Patrick LoPresti <lopresti@gmail.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 826bce7343b3..da2223aa727f 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -706,6 +706,7 @@ static struct priority_group *parse_priority_group(struct arg_set *as, if (as->argc < nr_params) { ti->error = "not enough path ...
31ce4bfdfd10bf5db9bf85c92bbe0cf2edbdcad8
Analyze and fix the following issue in the Linux kernel code: io-mapping: move asm include inside the config option
Problem Details: nouveau starting using these APIs, the first on non-x86 hw, and this include isn't required on anything with real amounts of vmalloc space. this fixes a build problem on powerpc. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index e0ea40f6c515..0a6b3d5c490c 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -22,7 +22,6 @@ #include <linux/slab.h> #include <asm/io.h> #include <asm/page.h> -#include <asm/iomap.h> /* * The io_mapping m...
ef077179a2909d3d0d3accf29ad1ea9ebb19019b
Analyze and fix the following issue in the Linux kernel code: ARM: Fix gen_nand probe structures contents
Problem Details: These three platforms didn't properly fill nr_chips in gen_nand registration and therefore depended on gen_nand bug fixed by commit 81cbb0b17796d81cbd92defe113cf2a7c7a21fbb ("mtd: gen_nand: fix support for multiple chips") Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: David Wood...
```diff diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c index 827cbc4402f4..ea9ee4ed0a3e 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -100,6 +100,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)...
a30f6fb7ce86275af16c7a00dc1b1e46cbb99692
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Fix pci_map_page() error checking
Problem Details: 0 is a valid DMA address from pci_map_page(), use pci_dma_mapping_error() instead to check for errors [airlied: fix warning + two other places with errors.] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index 17be051b7aa3..1c3649242208 100644 --- a/drivers/gpu/drm/ati_pcigart.c +++ b/drivers/gpu/drm/ati_pcigart.c @@ -152,7 +152,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga /* we need to support...
1a72d65d6291ec248cbc5f05df2487edd714aba6
Analyze and fix the following issue in the Linux kernel code: drm: Remove count_lock for calling lastclose() after 58474713 (v2)
Problem Details: When removing of the BKL the locking around lastclose() was rearranged and resulted in the holding of the open_count spinlock over the call into drm_lastclose(). The drivers were not ready for this path to be atomic - it may indeed involve long waits to release old objects and cleanup the GPU - and so ...
```diff diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 2ca8df8b6102..3a652a65546f 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c @@ -135,15 +135,9 @@ int drm_open(struct inode *inode, struct file *filp) retcode = drm_open_helper(inode, filp, dev); if (!retcode) ...
6ffe28f57c587c82b06aac89894c46114de2b927
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: allow FG_ALPHA_VALUE on r5xx
Problem Details: This is a CS checker fix. I need this for FP16 alpha-test. Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/reg_srcs/rv515 b/drivers/gpu/drm/radeon/reg_srcs/rv515 index 8293855f5f0d..b3f9f1d92005 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/rv515 +++ b/drivers/gpu/drm/radeon/reg_srcs/rv515 @@ -316,6 +316,7 @@ rv515 0x6d40 0x4BD0 FG_FOG_COLOR_B 0x4BD4 FG_ALPHA_FUNC 0x4BD8 FG_DEPT...
618145ea5434046f0fedf50185f6ad84f9934dda
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: another r6xx/r7xx CS checker fix
Problem Details: add default case for buffer formats Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: Andre Maasikas <amaasikas@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 52b52529ff31..8e165b22a33d 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c @@ -133,6 +133,7 @@ static inline int r600_bpe_from_format(u32 *bpe, u32 format) case V_038004_FMT_GB_GR: cas...
a12415ff589ac5106e6b489f44c947b565fcb963
Analyze and fix the following issue in the Linux kernel code: ibft: Kernel oops when rmmoding iscsi_ibft with no iBFT present.
Problem Details: We failed to check to see if actually allocated structures to contain the iBFT structure and went ahead to dereference it. This patch fixes the OOPS. Reported-by: "Jayamohan Kalickal" <jayamohank@serverengines.com>   Tested-by: "Jayamohan Kalickal" <jayamohank@serverengines.com> Signed-off-by: Konra...
```diff diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 4f04ec0410a0..6148a1c67895 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -727,8 +727,10 @@ static void ibft_unregister(void) static void ibft_cleanup(void) { - ibft_unregister(); - iscsi_boot...
da93f10684bfba2983a70c10b5d417232b6a5245
Analyze and fix the following issue in the Linux kernel code: ath9k_htc: fix panic on packet injection using airbase-ng tool.
Problem Details: This should fix the oops which occurs during the packet injection on monitor interface. EIP is at ath9k_htc_tx_start+0x69/0x220 [ath9k_htc] [<f84dc8ea>] ? invoke_tx_handlers+0xa5a/0xee0 [mac80211] [<f82c84f4>] ? ath9k_htc_tx+0x44/0xe0 [ath9k_htc] [<f84db7b8>] ? __ieee80211_tx+0xf8/0x190 [mac80211] ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index bd0b4acc3ece..2a6e45a293a9 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -78,18 +78,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_p...
0702099bd86c33c2dcdbd3963433a61f3f503901
Analyze and fix the following issue in the Linux kernel code: NFS: fix the return value of nfs_file_fsync()
Problem Details: By the commit af7fa16 2010-08-03 NFS: Fix up the fsync code close(2) became returning the non-zero value even if it went well. nfs_file_fsync() should return 0 when "status" is positive. Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 2d141a74ae82..eb51bd6201da 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -323,7 +323,7 @@ nfs_file_fsync(struct file *file, int datasync) have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); if (have_error) ret = xchg(&ctx->error, 0); - if (!r...
15cdc644b268a9a9ce73ce0b153129222c254b7b
Analyze and fix the following issue in the Linux kernel code: rpcrdma: Fix SQ size calculation when memreg is FRMR
Problem Details: This patch updates the computation to include the worst case situation where three FRMR are required to map a single RPC REQ. Signed-off-by: Tom Tucker <tom@ogc.us> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index e5e28d1946a4..2ac3f6e8adff 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -249,6 +249,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target, req->rl_nchunks = nchunks; ...
dafc50d141c27959dbd3a1cfe9857a86d23402a7
Analyze and fix the following issue in the Linux kernel code: i2c: Use a separate mutex for userspace client lists
Problem Details: Moving userspace-instantiated clients to separate lists wasn't nearly enough to avoid deadlocks in multiplexed bus cases. We also want to have a dedicated mutex to protect each list. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index ba86af63f5cf..97f96b66653c 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -662,9 +662,9 @@ i2c_sysfs_new_device(struct device *dev, struct device_attribute *attr, return -EINVAL; /* Keep track of the added device */ -...
dd21e9bdff14a9882f2c485fe533c6ce64ea2675
Analyze and fix the following issue in the Linux kernel code: lib/decompress_bunzip2.c: fix checkstack warning
Problem Details: Fix checkstack error: lib/decompress_bunzip2.c: In function `get_next_block': lib/decompress_bunzip2.c:511: warning: the frame size of 1932 bytes is larger than 1024 bytes byteCount, symToByte, and mtfSymbol cannot be declared static or allocated dynamically so place them in the bunzip_data struct. ...
```diff diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c index a4e971dee102..81c8bb1cc6aa 100644 --- a/lib/decompress_bunzip2.c +++ b/lib/decompress_bunzip2.c @@ -107,6 +107,8 @@ struct bunzip_data { unsigned char selectors[32768]; /* nSelectors = 15 bits */ struct group_data groups[MAX_GROUPS]; /*...
5bf2b19320ec31d094d7370fdf536f7fd91fd799
Analyze and fix the following issue in the Linux kernel code: kfifo: add example files to the kernel sample directory
Problem Details: Add four examples to the kernel sample directory. It shows how to handle: - a byte stream fifo - a integer type fifo - a dynamic record sized fifo - the fifo DMA functions [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Greg KH <greg@kroah.com>...
```diff diff --git a/samples/Kconfig b/samples/Kconfig index 8924f72f0629..954a1d550c5f 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -44,4 +44,14 @@ config SAMPLE_HW_BREAKPOINT help This builds kernel hardware breakpoint example modules. +config SAMPLE_KFIFO + tristate "Build kfifo examples -- loadable...
4457d9845927b3c62b6e833be243d21d6ca7df47
Analyze and fix the following issue in the Linux kernel code: kfifo: fix kfifo miss use of nozami.c
Problem Details: There are different types of a fifo which can not handled in C without a lot of overhead. So i decided to write the API as a set of macros, which is the only way to do a kind of template meta programming without C++. This macros handles the different types of fifos in a transparent way. There are a l...
```diff diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 18af923093c3..817169cbb245 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c @@ -1743,8 +1743,7 @@ static int ntty_write_room(struct tty_struct *tty) if (dc) { mutex_lock(&port->tty_sem); if (port->port.count) - room = port-...
ab654bab04be435a9671e0dcf49c18f9782dd838
Analyze and fix the following issue in the Linux kernel code: fs/sysv/super.c: add support for non-PDP11 v7 filesystems
Problem Details: This adds byte order autodetection (of PDP-11 and LE filesystems). No attempt is made to detect big-endian filesystems -- were there any? Tested with PDP-11 v7 filesystems and PC-IX maintenance floppy. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: ...
```diff diff --git a/fs/sysv/super.c b/fs/sysv/super.c index 3785262b98e0..85359a8df605 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c @@ -24,6 +24,7 @@ #include <linux/init.h> #include <linux/slab.h> #include <linux/buffer_head.h> +#include <linux/parser.h> #include "sysv.h" /* @@ -434,12 +435,46 @@ Ebadsiz...
0bcaa65a56ab74003666cf741b0bfa1e9263a11c
Analyze and fix the following issue in the Linux kernel code: fs/sysv: v7: adjust sanity checks for some volumes
Problem Details: Newly mkfs-ed filesystems from Seventh Edition have last modification time set to zero, but are otherwise perfectly valid. Also, tighten up other sanity checks to filter out most filesystems with [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christ...
```diff diff --git a/fs/sysv/super.c b/fs/sysv/super.c index 2da3075aff78..3785262b98e0 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c @@ -469,7 +469,7 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent) v7sb = (struct v7_super_block *) bh->b_data; if (fs16_to_cpu(sbi, v7sb->s_nfree) > V...
f65a03f6ab6f53a6f2847dbac232dcb38b3b3642
Analyze and fix the following issue in the Linux kernel code: kexec: return -EFAULT on copy_to_user() failures
Problem Details: copy_to/from_user() returns the number of bytes remaining to be copied. It never returns a negative value. The correct return code is -EFAULT and not -EIO. All the callers check for non-zero returns so that's Ok, but the return code is passed to the user so we should fix this. Signed-off-by: Dan Car...
```diff diff --git a/kernel/kexec.c b/kernel/kexec.c index 131b1703936f..c0613f7d6730 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -151,8 +151,10 @@ static int do_kimage_alloc(struct kimage **rimage, unsigned long entry, image->nr_segments = nr_segments; segment_bytes = nr_segments * sizeof(*segments); res...
863a6049202412a6d655d052eb1c45ca7dd74a83
Analyze and fix the following issue in the Linux kernel code: lib/bug.c: add oops end marker to WARN implementation
Problem Details: We are missing the oops end marker for the exception based WARN implementation in lib/bug.c. This is useful for logfile analysis tools. Signed-off-by: Anton Blanchard <anton@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Cc: "Kirill A. Shutemov" <kirill@shutemov....
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 452833d67b21..d848cb854655 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -182,6 +182,7 @@ NORET_TYPE void panic(const char * fmt, ...) __attribute__ ((NORET_AND format (printf, 1, 2))) __cold; extern void oops_enter(void...
e2e7e093259d4c6b73b432122974393d6fcdfc2a
Analyze and fix the following issue in the Linux kernel code: lib/bug.c: make WARN implementation match the kernel/panic.c one
Problem Details: There are a few issues with the exception based WARN implementation in lib/bug.c: - Inconsistent printk flags. The "cut here" line is printed at KERN_EMERG, so the console and all logged in users see the single line: ------------[ cut here ]------------ for each WARN. Fix this so we print everyt...
```diff diff --git a/lib/bug.c b/lib/bug.c index f13daf435211..6c5b30cf3f0f 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -136,8 +136,6 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) bug = find_bug(bugaddr); - printk(KERN_EMERG "------------[ cut here ]------------\n"); - file = NULL;...
3b9c6c11f519718d618f5d7c9508daf78b207f6f
Analyze and fix the following issue in the Linux kernel code: dma-mapping: remove dma_is_consistent API
Problem Details: Architectures implement dma_is_consistent() in different ways (some misinterpret the definition of API in DMA-API.txt). So it hasn't been so useful for drivers. We have only one user of the API in tree. Unlikely out-of-tree drivers use the API. Even if we fix dma_is_consistent() in some architectur...
```diff diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 05e2ae236865..fe2326906610 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -455,12 +455,6 @@ Free memory allocated by the nonconsistent API. All parameters must be identical to those passed in (and returned by ...
4565f0170dfc849b3629c27d769db800467baa62
Analyze and fix the following issue in the Linux kernel code: dma-mapping: unify dma_get_cache_alignment implementations
Problem Details: dma_get_cache_alignment returns the minimum DMA alignment. Architectures defines it as ARCH_DMA_MINALIGN (formally ARCH_KMALLOC_MINALIGN). So we can unify dma_get_cache_alignment implementations. Note that some architectures implement dma_get_cache_alignment wrongly. dma_get_cache_alignment() should...
```diff diff --git a/arch/alpha/include/asm/dma-mapping.h b/arch/alpha/include/asm/dma-mapping.h index 1bce8169733c..b3423d96acc7 100644 --- a/arch/alpha/include/asm/dma-mapping.h +++ b/arch/alpha/include/asm/dma-mapping.h @@ -44,6 +44,5 @@ static inline int dma_set_mask(struct device *dev, u64 mask) #define dma_is_co...
5fdee8c4a5e1800489ce61963208f8cc55e42ea1
Analyze and fix the following issue in the Linux kernel code: pids: fix a race in pid generation that causes pids to be reused immediately
Problem Details: A program that repeatedly forks and waits is susceptible to having the same pid repeated, especially when it competes with another instance of the same program. This is really bad for bash implementation. Furthermore, many shell scripts assume that pid numbers will not be used for some length of time....
```diff diff --git a/kernel/pid.c b/kernel/pid.c index e9fd8c132d26..fbbd5f6b6f2f 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -122,6 +122,43 @@ static void free_pidmap(struct upid *upid) atomic_inc(&map->nr_free); } +/* + * If we started walking pids at 'base', is 'a' seen before 'b'? + */ +static int pid_befo...
9c867fbe06458a8957024236b574733fae0cefed
Analyze and fix the following issue in the Linux kernel code: partitions: fix sometimes unreadable partition strings
Problem Details: Fix this garbage happening quite often: ==> sda: scsi 3:0:0:0: CD-ROM TOSHIBA ==> sda1 sda2 sda3 sda4 <sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray ^^^ Uniform CD-ROM driver Revision: 3.20 sr 3:0:0:0: Attached scsi CD-ROM sr0 ==> sda5 sda6 sda7 > Make ...
```diff diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c index 6921e7890be6..fbeb697374d5 100644 --- a/fs/partitions/acorn.c +++ b/fs/partitions/acorn.c @@ -45,8 +45,11 @@ adfs_partition(struct parsed_partitions *state, char *name, char *data, nr_sects = (le32_to_cpu(dr->disc_size_high) << 23) | (le32...
7faefea66a6d1f0d9da0a18615f57dc969e00d99
Analyze and fix the following issue in the Linux kernel code: ipmi: fix memleaking for add_smi when duplicating happen
Problem Details: Free the temporary info struct when we have duplicated ones. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Corey Minyard <minyard@acm.org> Cc: Matthew Garrett <mjg@redhat.com> Cc: Len Brown <len.brown@intel.com> Cc: Myron Stowe <myron.stowe@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundat...
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index ecfe43beb9c2..6c2daed531df 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1804,9 +1804,12 @@ static int hotmod_handler(const char *val, struct kernel_param *kp) info->irq_setup =...
f46c77c283e514a747aee7e8c4f5afc70274c232
Analyze and fix the following issue in the Linux kernel code: drivers/char/ipmi/ipmi_si_intf.c: fix warning: variable 'addr_space' set but not used
Problem Details: Fix a warning message generated by GCC, and also updates a web address pointing to a pdf containing information. CC [M] drivers/char/ipmi/ipmi_si_intf.o drivers/char/ipmi/ipmi_si_intf.c: In function 'try_init_spmi': drivers/char/ipmi/ipmi_si_intf.c:2016:8: warning: variable 'addr_space' set but not u...
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index ff68e7c34ce7..ecfe43beb9c2 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1965,8 +1965,8 @@ static int acpi_gpe_irq_setup(struct smi_info *info) /* * Defined at - * http://h21007...
b8f5c5664d51776d74c84228c4b7165abfa92a18
Analyze and fix the following issue in the Linux kernel code: memcg: sc.nr_to_reclaim should be initialized
Problem Details: Currently, mem_cgroup_shrink_node_zone() initialize sc.nr_to_reclaim as 0. It mean shrink_zone() only scan 32 pages and immediately return even if it doesn't reclaim any pages. This patch fixes it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa....
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index ec5ddccbf82e..4e684449bf40 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1972,6 +1972,7 @@ unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, struct zone *zone, int nid) { struct scan_control sc = { + .nr_to_reclaim = SWAP_CLUSTER_MAX, ....
b7300b78d1a87625975a799a109a2f98d77757c8
Analyze and fix the following issue in the Linux kernel code: blkdev: cgroup whitelist permission fix
Problem Details: The cgroup device whitelist code gets confused when trying to grant permission to a disk partition that is not currently open. Part of blkdev_open() includes __blkdev_get() on the whole disk. Basically, the only ways to reliably allow a cgroup access to a partition on a block device when using the wh...
```diff diff --git a/fs/block_dev.c b/fs/block_dev.c index 66411463b734..50e8c8582faa 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1340,10 +1340,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) /* * hooks: /n/, see "layering violations". */ - ret = devcgroup_inode_per...
2b24706a798d07cf40534d7763f608045e42e15f
Analyze and fix the following issue in the Linux kernel code: Documentation/padata.txt: fix typos etc.
Problem Details: Fix typos & grammar. Use CPU instead of cpu in text. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torv...
```diff diff --git a/Documentation/padata.txt b/Documentation/padata.txt index 473ebf22cd69..7ddfe216a0aa 100644 --- a/Documentation/padata.txt +++ b/Documentation/padata.txt @@ -19,7 +19,7 @@ overall control of how tasks are to be run: The pcpumask describes which processors will be used to execute work submitted ...
a435600e5b43238cfa84bc3d3e66fe02a10b3318
Analyze and fix the following issue in the Linux kernel code: docbook: need xmldoclinks for all doc types
Problem Details: $ rm -rf build $ mkdir build $ cp .config build $ make O=build htmldocs ... xmlto: linux-2.6/build/Documentation/DocBook/media.xml does not validate (status 3) xmlto: Fix document syntax or use --skip-validation option linux-2.6/build/Documentation/DocBook/media.xml:4: warning: failed to load external ...
```diff diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 4b603c5c3cc1..34929f24c284 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -35,7 +35,7 @@ PS_METHOD = $(prefer-db2x) PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cl...
b6d676db35ca6c99180bb12dcbd4a8c3b2995e49
Analyze and fix the following issue in the Linux kernel code: mtd/nand_base: fix kernel-doc warnings & typos
Problem Details: Fix mtd/nand_base.c kernel-doc warnings and typos. Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd' Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs' Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'...
```diff diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 16a1714df008..a3c7473dd409 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -889,17 +889,17 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) } /** - * __nand_unlock - [REPLACABL...
71740c423c52dc65fd2f40e4c7f6ed32c636c52b
Analyze and fix the following issue in the Linux kernel code: fusion: fix kernel-doc warnings
Problem Details: Fix (delete) empty kernel-doc lines/warnings: Warning(drivers/message/fusion/mptbase.c:6916): bad line: Warning(drivers/message/fusion/mptbase.c:7060): bad line: Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Eric Moore <Eric.Moore@lsi.com> Cc: James Bottomley <James.Bottomley@HansenPartner...
```diff diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index d18965b55b57..c54674c482c7 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -6924,7 +6924,6 @@ EXPORT_SYMBOL(mpt_halt_firmware); * mpt_SoftResetHandler - Issues a less expensive reset ...
c07fbfd17e614a76b194f371c5331e21e6cffb54
Analyze and fix the following issue in the Linux kernel code: fbmem: VM_IO set, but not propagated
Problem Details: When we setup up the VMA flags for the mmap flag and we end up using the fallback mmap functionality we set the vma->vm_flags |= VM_IO. However we neglect to propagate the flag to the vma->vm_page_prot. This bug was found when Linux kernel was running under Xen. In that scenario, any page that has V...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index a8500c61bb16..b06647517c0e 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1362,6 +1362,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to s...
8cfdcb2393b05cc80f89ed0110c0f90423d2fee1
Analyze and fix the following issue in the Linux kernel code: s3c-fb: fix section mismatch
Problem Details: This patch fixes the following section mismatch errors: WARNING: vmlinux.o(.data+0x20b40): Section mismatch in reference from the variable s3c_fb_driver_ids to the (unknown reference) .devinit.data:(unknown) The variable s3c_fb_driver_ids references the (unknown reference) __devinitdata (unknown) If t...
```diff diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index b10d16dc0335..a95314ddf709 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -1478,7 +1478,7 @@ static int s3c_fb_resume(struct platform_device *pdev) #define VALID_BPP124 (VALID_BPP(1) | VALID_BPP(2) | VALID_BPP(4)) #define ...
cd7d7e0244955a4694d1e79e8c8a9bef163d6305
Analyze and fix the following issue in the Linux kernel code: s3c-fb: fix various null references on framebuffer memory alloc failure
Problem Details: The following problems were found in the above situation: sfb->windows[win] was being assigned at the end of s3c_fb_probe_win only. This resulted in passing a NULL to s3c_fb_release_win if probe_win returned early and a memory leak. dma_free_writecombine does not allow its third argument to be NULL. ...
```diff diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index b00c064beddf..77f576589a89 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -804,7 +804,8 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win) { struct fb_info *fbi = win->fbinfo; - dma_free_write...
dc8498c00f6a41a28f01111a3d2ed9f179356a71
Analyze and fix the following issue in the Linux kernel code: s3c-fb: fix distortedness situation for the mode more then 24bpp
Problem Details: It has been working fine at 16bpp but in case of pixel format more then 24bpp it would occur distortedness situation on that mode. so this patch set the word swap control bit of WINCONx to 1 as default value. but it should be set to 0 in case that each ENLOCAL bit of WINCON0 ~ 2 registers is enabled....
```diff diff --git a/arch/arm/plat-samsung/include/plat/regs-fb.h b/arch/arm/plat-samsung/include/plat/regs-fb.h index 0ef806e50344..41c68ac13a67 100644 --- a/arch/arm/plat-samsung/include/plat/regs-fb.h +++ b/arch/arm/plat-samsung/include/plat/regs-fb.h @@ -173,6 +173,7 @@ #define WINCONx_BITSWP (1 << 18) #define...
ec81c9cc2f58a3a9f9637c390ea83efe9f91abf7
Analyze and fix the following issue in the Linux kernel code: fbdev: efifb: section fixes
Problem Details: Remove 43 section mismatches by moving the two structures efifb_defined and efifb_fix from .init.data to .devinit.data. Also the two structure arrays dmi_system_table[] and dmi_list[] have been moved from .data to .init.rodata and .init.data, which saves, if built-in, some space. On x86_64 'size -A' ...
```diff diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index 4a56f46af40a..815f84b07933 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c @@ -16,7 +16,7 @@ #include <video/vga.h> -static struct fb_var_screeninfo efifb_defined __initdata = { +static struct fb_var_screeninfo efifb_defined __...
9c4ba9466117b16a2b85034bb87db528aaeb3f07
Analyze and fix the following issue in the Linux kernel code: gpiolib: decouple might_sleep_if() from DEBUG
Problem Details: Be more consistent about runtime programming interface abuse warnings, which can reduce some confusion and trigger bugfixes. Based on an observation and patch from Jani Nikula. Also update doc to highlight some sleeping-call issues and to match some recent changes. Signed-off-by: David Brownell <dbr...
```diff diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index c2c6e9b39bbe..d96a6dba5748 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt @@ -158,10 +158,11 @@ and configure pullups/pulldowns appropriately.) Spinlock-Safe GPIO access ------------------------- Most GPIO controllers can be...
c03675f05ff9039dbea4bbc5332a885921e36dff
Analyze and fix the following issue in the Linux kernel code: rtc: add support for DS3232 RTC
Problem Details: Add a driver for the DS3232 RTC chip via the I2C bus. Alarms are not supported in this version of the driver. [akpm@linux-foundation.org: fix Kconfig help text] Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Jingchang Lu <b22599@freescale.com> Signed-off-by: Srikanth Srinivasan <...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 999db51e6a58..06cb8d6823aa 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -166,6 +166,16 @@ config RTC_DRV_DS1672 This driver can also be built as a module. If so, the module will be called rtc-ds1672. +config RTC_DRV_DS3232 +...
2f11e57dadb33627c4cfa6ca4ff9374494eee106
Analyze and fix the following issue in the Linux kernel code: rtc/nuc900: fix build warning
Problem Details: Remove unused local variable. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c index 0267ea3b0f67..62de66af0a68 100644 --- a/drivers/rtc/rtc-nuc900.c +++ b/drivers/rtc/rtc-nuc900.c @@ -85,7 +85,7 @@ static irqreturn_t nuc900_rtc_interrupt(int irq, void *_rtc) static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_r...
f3f99cf39180fc04a36cd376f434092fae85f317
Analyze and fix the following issue in the Linux kernel code: rtc: fixes and new functionality for fm3130
Problem Details: - add sanity check for alarm data in fm3130_probe - fix fm3130_set_alarm. According to the datasheet, setting match bit '0' indicates that the corresponding alarm field will be used in the match process - add operation alarm_irq_enable operation which is responsible for handling RTC_AIE_ON, RT...
```diff diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index e4de8f37ae4a..4cf2e70c5078 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c @@ -52,8 +52,8 @@ struct fm3130 { struct i2c_msg msg[4]; struct i2c_client *client; struct rtc_device *rtc; + int alarm_valid; int d...
70d2a0bae26c7c44641785d9def8a0d9048abbea
Analyze and fix the following issue in the Linux kernel code: rtc/nuc900: fix checking of args during time-setting
Problem Details: When a user application wants to set the rtc time, the RTC subsystem takes advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100', the '(settm->tm_year - 100)' will be negative. ' Setting the negative value to ...
```diff diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c index 21d13309fb20..20bc70b472fb 100644 --- a/drivers/rtc/rtc-nuc900.c +++ b/drivers/rtc/rtc-nuc900.c @@ -116,12 +116,18 @@ static void nuc900_rtc_bcd2bin(unsigned int timereg, rtc_valid_tm(tm); } -static void nuc900_rtc_bin2bcd(struct rtc_ti...
5fc79d85d2ab7ce144bc75e06cab58126249afbb
Analyze and fix the following issue in the Linux kernel code: autofs4: remove unneeded null check in try_to_fill_dentry()
Problem Details: After 97e7449a7ad: "autofs4: fix indirect mount pending expire race" we no longer assumed that "ino" can be null. The other null checks got removed but this was one was missed. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Ian Kent <raven@themaw.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signe...
```diff diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 48e056e70fd6..cb1bd38dc08c 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -204,8 +204,7 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags) } /* Initialize expiry counter after successful mount */ - if (ino) - ino->last_us...
d929dc2bfd8a58c34f1df0680018fa8ea5caa907
Analyze and fix the following issue in the Linux kernel code: i2o: fix overflow of copy_to_user()
Problem Details: If (len > reslen) we must not call copy_to_user() since kernel buffer is smaller than we want to copy. Similar code in this file is correct, so this bug was a typo. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvald...
```diff diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index c4b117f5fb70..4dd39a03082a 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c @@ -115,7 +115,7 @@ static int i2o_cfg_gethrt(unsigned long arg) put_user(len, kcmd.reslen); if (len > reslen...
ce5f036bbbfc6c21d7b55b8fdaa2e2bd56392d94
Analyze and fix the following issue in the Linux kernel code: sdhci-s3c: add support for the non standard minimal clock value
Problem Details: S3C SDHCI host controller can change the source for generating mmc clock. By default host bus clock is used, what causes some problems on machines with 133MHz bus, because the SDHCI divider cannot be as high get proper clock value for identification mode. This is not a problem for the controller, beca...
```diff diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index d7058eee95f9..47138afea2b5 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -203,9 +203,36 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, unsigned int clock) } } +/** + * sdhci_s3c_get...
f3584e5e6fd7abda4ef4a7aec9acd9d46387b8ab
Analyze and fix the following issue in the Linux kernel code: omap hsmmc: fix processing of all dma interrupts as block completion
Problem Details: If other informative interrupts are enabled for the DMA channel used by hsmmc, those are incorrectly treated as block completion. This patch lets only the block completion interrupt to be processed. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com> Cc: ...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index ee1a3093048e..dc57ef6aef4f 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1273,8 +1273,11 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) struct mmc_data *data = host->m...
27151dc9e363c0033d7375863c0d284f8c4b636a
Analyze and fix the following issue in the Linux kernel code: mmc: omap: fix for bus width which improves SD card's peformance.
Problem Details: This patch improves low speeds for SD cards. OMAP-MMC controller's can support maximum bus width of '8'. when bus width is mentioned as "8" in controller data,the SD stack will check whether bus width is "4" and if not it will set bus width to "1" and there by degrading performance. This patch fixes...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index b032828c6126..a0c8515cb3b9 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2096,10 +2096,23 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) mmc->caps |= MMC_CAP_MMC_HIGHSPEED...
4c2ef25fe0b847d2ae818f74758ddb0be1c27d8e
Analyze and fix the following issue in the Linux kernel code: mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume
Problem Details: If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to suspend, the card will be removed, therefore this patch doesn't change the behavior of this option. However the removal will be done by pm notifier, which runs while userspace is still not frozen and thus can freely use del_gendisk, ...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index b69ce91b11e1..83240faa1dc8 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1057,6 +1057,17 @@ void mmc_rescan(struct work_struct *work) container_of(work, struct mmc_host, detect.work); u32 ocr; int err; + unsigne...
6da24b786ed1963a7f872c1899627968c76d17d7
Analyze and fix the following issue in the Linux kernel code: mmc: recognize CSD structure
Problem Details: The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure version 3 and version 3 have to check the CSD_STRUCTURE byte in the EXT_CSD register. Also fix EXT_CSD revision message. [akpm@linux-foundation.org: fix comment, per Chris Ball] Signed-off-by: Kyungmin Park <kyungmin.park@samsung....
```diff diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 89f7a25b7ac1..cd8d3d2ea901 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -114,17 +114,18 @@ static int mmc_decode_cid(struct mmc_card *card) static int mmc_decode_csd(struct mmc_card *card) { struct mmc_csd *csd = &card...
a892e2d7dcdfa6c76e60c50a8c7385c65587a2a6
Analyze and fix the following issue in the Linux kernel code: vfs: use kmalloc() to allocate fdmem if possible
Problem Details: Use kmalloc() to allocate fdmem if possible. vmalloc() is used as a fallback solution for fdmem allocation. A new helper function __free_fdtable() is introduced to reduce the lines of code. A potential bug, vfree() a memory allocated by kmalloc(), is fixed. [akpm@linux-foundation.org: use __GFP_NOW...
```diff diff --git a/fs/file.c b/fs/file.c index cccaead962c2..0be344755c02 100644 --- a/fs/file.c +++ b/fs/file.c @@ -39,28 +39,27 @@ int sysctl_nr_open_max = 1024 * 1024; /* raised later */ */ static DEFINE_PER_CPU(struct fdtable_defer, fdtable_defer_list); -static inline void * alloc_fdmem(unsigned int size) +s...
5c90ad905b401c6675dcb6c9fed7c09c9240205c
Analyze and fix the following issue in the Linux kernel code: scsi: fix bnx2i build errors
Problem Details: bnx2i should depend on NET since it selects SCSI_ISCSI_ATTRS, which depends on NET. Also move the dependencies together. The "depends" change fixes multiple build errors when CONFIG_NET is not enabled: ERROR: "skb_trim" [drivers/scsi/scsi_transport_iscsi.ko] undefined! ERROR: "netlink_kernel_create" ...
```diff diff --git a/drivers/scsi/bnx2i/Kconfig b/drivers/scsi/bnx2i/Kconfig index 1e9f7141102b..45a6154ce972 100644 --- a/drivers/scsi/bnx2i/Kconfig +++ b/drivers/scsi/bnx2i/Kconfig @@ -1,10 +1,11 @@ config SCSI_BNX2_ISCSI tristate "Broadcom NetXtreme II iSCSI support" + depends on NET + depends on PCI select SCS...
b2045240058381088e6e367e5f54b2a8bed931e1
Analyze and fix the following issue in the Linux kernel code: scsi: fix pmcraid build errors
Problem Details: pmcraid should depend on NET since it uses netlink interfaces. This fixes multiple build errors when CONFIG_NET is not enabled: ERROR: "genl_register_family" [drivers/scsi/pmcraid.ko] undefined! ERROR: "genl_unregister_family" [drivers/scsi/pmcraid.ko] undefined! ERROR: "nla_put" [drivers/scsi/pmcraid...
```diff diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 158284f05732..6466231f338b 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1853,7 +1853,7 @@ config ZFCP_DIF config SCSI_PMCRAID tristate "PMC SIERRA Linux MaxRAID adapter support" - depends on PCI && SCSI + depends on PCI && S...
ae68230c2da8e5be712acd50dd9115918fa28839
Analyze and fix the following issue in the Linux kernel code: drivers/scsi/qla2xxx/qla_os.c: fix continuation line formats
Problem Details: String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output. Signed-off-by: Joe Perches <joe@perches.com> Cc: James E.J. Bottomley <James.Bottomley@suse.de> Cc: Giridhar Malavali <giridhar.malavali@qlogic.com> Cc: Anirban Chakraborty <anirban.c...
```diff diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index ff2172da7c19..8c80b49ac1c4 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -115,8 +115,8 @@ int ql2xmaxqueues = 1; module_param(ql2xmaxqueues, int, S_IRUGO|S_IRUSR); MODULE_PARM_DESC(ql2xmaxqueue...
d6e9fb46cd9e60946dc3e89ad8e32dd251dcc05d
Analyze and fix the following issue in the Linux kernel code: scsi: remove superfluous NULL pointer check from scsi_kill_request()
Problem Details: Dan's list included: drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced in initializer 'cmd' drivers/scsi/scsi_lib.c +1365 scsi_kill_request(9) warning: variable derefenced before check 'cmd' We dereference cmd (and possible OOPS if cmd == NULL) before starting the reques...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index b8de389636f8..9ade720422c6 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1370,12 +1370,6 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) blk_start_request(req); - if (unlikely(cmd =...
702a98c63355b74aec50897870eb1c89b5009cfb
Analyze and fix the following issue in the Linux kernel code: g_NCR5380: fix broken MMIO compilation
Problem Details: The ifdefs are broken so the MMIO code is never compiled and so it's broken too. Fix them all. Untested as I don't have the hardware. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Andy Walls <awalls@md.metrocast.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> ...
```diff diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 6bc0015662e0..427a56d3117e 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c @@ -285,9 +285,12 @@ static int __init do_DTC3181E_setup(char *str) int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) { sta...
eb6edad3ec23265e6bf48035531a035e7eeba5f5
Analyze and fix the following issue in the Linux kernel code: mpt fusion: convert to seq_file
Problem Details: Convert everything except ->proc_info() stuff, it is done within separate ->proc_info path series. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in /proc entries" Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Er...
```diff diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index b88a244a1edd..d18965b55b57 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -50,6 +50,7 @@ #include <linux/module.h> #include <linux/errno.h> #include <linux/init.h> +#include <linux/...
ef3f7cc41280e9611a837df1fedf3f6d4d921a75
Analyze and fix the following issue in the Linux kernel code: osst: fix read buffer overflow
Problem Details: Check whether index is within bounds before testing the element. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Willem Riede <osst@riede.org> Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <t...
```diff diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index d64b7178fa08..278b352ae78d 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -5868,7 +5868,8 @@ static int osst_probe(struct device *dev) } /* find a free minor number */ - for (i=0; os_scsi_tapes[i] && i<osst_max_dev; i++); + for (i...
37713308d89f17c0f73e88b07138d6ca20bfe686
Analyze and fix the following issue in the Linux kernel code: fix "hwmon: coretemp: update hotplug condition check"
Problem Details: In commit 0dca94baeab4 ("hwmon: coretemp: update hotplug condition check") we merged v2 of this patch. Update that to v3. The difference is to remove the new and unnecesary references to CPU_*_FROZEN. Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Chen Gong <gong.chen@linux.intel.com> Cc: Rudolf Marek <r...
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index a92e28a35767..c070c9714cbe 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -501,13 +501,10 @@ static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_ONLINE: - case CPU_...
241a6a542b908c0332ff00d967df459dbc5d372f
Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/libertas/cfg.c: needs sched.h
Problem Details: i386 allmodconfig: drivers/net/wireless/libertas/cfg.c: In function 'lbs_scan_worker': drivers/net/wireless/libertas/cfg.c:722: error: 'TASK_NORMAL' undeclared (first use in this function) drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once drivers/net/wir...
```diff diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 8e9fbfd804b6..2372abb29c2e 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c @@ -6,6 +6,8 @@ * */ +#include <linux/sched.h> +#include <linux/wait.h> #include <linux/slab.h...
5003bab82d56754b27be01eef24495a02e00039d
Analyze and fix the following issue in the Linux kernel code: fix "scripts/mod/modpost.c: fix memory leak"
Problem Details: Fix error introduced by 37ed19d5cce35a40d3913cf9aa208ce9f60db3d7 ("scripts/mod/modpost.c: fix memory leak"). - don't kfree("") - fix one missed conversion Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alexey Fomenko <ext-alexey.fomenko@...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1ce655dde99e..7acbdd8fcaed 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -14,6 +14,7 @@ #define _GNU_SOURCE #include <stdio.h> #include <ctype.h> +#include <string.h> #include "modpost.h" #include "../../include/generated/...
4ef2db016aab27af05a95aeab1c30ad3f2fed7b9
Analyze and fix the following issue in the Linux kernel code: param: update drivers/acpi/debug.c to new scheme
Problem Details: The new module_param_cb() uses an ops struct, and the ops take a const struct kernel_param pointer (it's in .rodata). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index 146135e7a6a1..295dbfa2db9c 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c @@ -96,7 +96,8 @@ static const struct acpi_dlevel acpi_debug_levels[] = { /* -------------------------------------------------------------------------- ...
a1054322afc8120ea5a50bc84e5beeda54571862
Analyze and fix the following issue in the Linux kernel code: param: use free hook for charp (fix leak of charp parameters)
Problem Details: Instead of using a "I kmalloced this" flag, we keep track of the kmalloced strings and use that list to check if we need to kfree (in practice, the list is very short). This means that kparams can be const again, and plugs a leak. This is important for drivers/usb/gadget/nokia.c which gets modprobe/r...
```diff diff --git a/kernel/params.c b/kernel/params.c index 458a09b886c4..ef60db14fae0 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -31,6 +31,45 @@ #define DEBUGP(fmt, a...) #endif +/* This just allows us to keep track of which parameters are kmalloced. */ +struct kmalloced_param { + struct list_head list...
101d6c826fa03266f8538ea4f6a459190e6863e8
Analyze and fix the following issue in the Linux kernel code: AppArmor: update for module_param_named API change
Problem Details: Fixes these build errors: security/apparmor/lsm.c:701: error: 'param_ops_aabool' undeclared here (not in a function) security/apparmor/lsm.c:721: error: 'param_ops_aalockpolicy' undeclared here (not in a function) security/apparmor/lsm.c:729: error: 'param_ops_aauint' undeclared here (not in a function...
```diff diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index 8db33a8b50c4..d5666d3cc21b 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -667,17 +667,29 @@ static struct security_operations apparmor_ops = { * AppArmor sysfs module parameters */ -static int param_set_aabool(con...
9bbb9e5a33109b2832e2e63dcc7a132924ab374b
Analyze and fix the following issue in the Linux kernel code: param: use ops in struct kernel_param, rather than get and set fns directly
Problem Details: This is more kernel-ish, saves some space, and also allows us to expand the ops without breaking all the callers who are happy for the new members to be NULL. The few places which defined their own param types are changed to the new scheme (more which crept in recently fixed in following patches). Si...
```diff diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c index e148749b5851..23257652b8e8 100644 --- a/drivers/input/misc/ati_remote2.c +++ b/drivers/input/misc/ati_remote2.c @@ -38,7 +38,8 @@ enum { }; static int ati_remote2_set_mask(const char *val, - struct kernel_param *kp, un...
d2800800d795350435936b08afb402ed9aab1e66
Analyze and fix the following issue in the Linux kernel code: documentation: fix erroneous email address.
Problem Details: Hey, at least it has both l's. Reported-by: Marin Mitov <mitov@issp.bas.bg> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index a99d7031cdf9..45d5a217484f 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt @@ -2,7 +2,7 @@ Maintainers: CPU Hotplug Core: - Rusty Russell <rusty@rustycorp.com.au> + Rusty Russell <rusty@ru...
120be663285f80e3501e36ccbb92e7143585fd93
Analyze and fix the following issue in the Linux kernel code: regulator: Remove default DEBUG define from TPS6586x
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 122193b5e269..8cff1413a147 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -13,7 +13,6 @@ * published by the Free Software Foundation. */ -#define DEBUG #...
8f1f151ed8ae4063837221cc9f5386a7af59f4e0
Analyze and fix the following issue in the Linux kernel code: mfd: max8998 - fix incorrect kfree(i2c) in i2c_driver probe callback handler
Problem Details: The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 0d68de21ea9e..73e6f5c4efc9 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -89,10 +89,8 @@ static int max8998_i2c_probe(struct i2c_client *i2c, int ret = 0; max8998 = kzalloc(sizeof(struct max8998_dev), GFP_KERNEL); - if (m...
53a4befa4e3d1490a63dae1ac03a2e7c865b2f53
Analyze and fix the following issue in the Linux kernel code: regulator: max8660 - fix a memory leak in max8660_remove()
Problem Details: In max8660_probe(), we allocate memory for max660. In max8660_remove(), current implementation only free rdev which is a member of struct max8660. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max660 to i2c clientdata, and properly kfree(max8...
```diff diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index d97220efae5a..c570e6eb0db2 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c @@ -450,7 +450,7 @@ static int __devinit max8660_probe(struct i2c_client *client, } } - i2c_set_clientdata(client, rdev); + i2...
7c4c25e4bc37672e68d1c480a81fcb0efe6d2006
Analyze and fix the following issue in the Linux kernel code: regulator: max1586 - fix a memory leak in max1586_pmic_remove()
Problem Details: In max1586_pmic_probe(), we allocate memory for max1586. In max1586_pmic_remove(), current implementation only free rdev which is a member of struct max1586_data. Thus, there is a small memory leak when we unload the module. This patch fixes the memory leak by passing max1586 to i2c clientdata, and pr...
```diff diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index 2b54d9d75f11..8867c2710a6d 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c @@ -223,7 +223,7 @@ static int __devinit max1586_pmic_probe(struct i2c_client *client, } } - i2c_set_clientdata(client, rdev);...
1b69d8e3fde65ab2b7c5e1d4adee59e8a67b0b4f
Analyze and fix the following issue in the Linux kernel code: max8998: fix off-by-one value range checking
Problem Details: In max8998_list_voltage() and max8998_set_voltage(), we use ldo as array index of ldo_voltage_map. Thus the valid range should be 0 .. ARRAY_SIZE(ldo_voltage_map)-1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Mark Brown <broonie@opensourc...
```diff diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 03e55a18a2ad..ab67298799f9 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -119,7 +119,7 @@ static int max8998_list_voltage(struct regulator_dev *rdev, int ldo = max8998_get_ldo(rdev); int val; - if ...
4cc2e3934bd74afbdff595ad2183e8aa25d0a0f2
Analyze and fix the following issue in the Linux kernel code: regulator: tps6586x: fix millivolt return values and SM2 table
Problem Details: Hi Liam, Below are bugfixes for the tps6586x spotted by Gary King. Please add this patch to your regulator tree. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 76cc41ecbdf7..3c2eee8e7563 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -80,7 +80,7 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev, { s...
c5a4655db9e0b5e49a0b17e1bf96462e93e3c326
Analyze and fix the following issue in the Linux kernel code: regulator: MAX8998: set_voltage bugfix. ramp_up delay and min/max voltage
Problem Details: Two issues are addressed for max8998_set_voltage function. 1. Min/Max Voltage. max8998_set_voltage had been using the voltage value of min ( voltage[i] >= max_vol , i ) This is corrected to use: min ( voltage[i] >= min_vol , i ) 2. Ramp Up Delay. max8998_set_voltage should provide delay for...
```diff diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 174fd1957ae4..03e55a18a2ad 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -28,6 +28,7 @@ #include <linux/slab.h> #include <linux/interrupt.h> #include <linux/mutex.h> +#include <linux/delay.h> #includ...
41065fba846e795b31b17e4dec01cb904d56c6cd
Analyze and fix the following issue in the Linux kernel code: pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops
Problem Details: sch_sfq as a classful qdisc needs the .leaf handler. Otherwise, there is an oops possible in tc_modify_qdisc()/check_loop(). Fixes commit 7d2681a6ff4f9ab5e48d02550b4c6338f1638998 Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index b8bcb2096df8..201cbac2b32c 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -508,6 +508,11 @@ nla_put_failure: return -1; } +static struct Qdisc *sfq_leaf(struct Qdisc *sch, unsigned long arg) +{ + return NULL; +} + static unsigned ...
4785879e4d340e24e54f6de2ccfc42728b912808
Analyze and fix the following issue in the Linux kernel code: fix a typo on comments in mm/percpu.c
Problem Details: 'eqaul' should be 'equal'. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/mm/percpu.c b/mm/percpu.c index e61dc2cc5873..039f51a0dc3f 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -31,7 +31,7 @@ * as small as 4 bytes. The allocator organizes chunks into lists * according to free size and tries to allocate from the fullest one. * Each chunk keeps the maximum contigu...
28957a5467bab9ed51a237d21e31055fad987887
Analyze and fix the following issue in the Linux kernel code: hugetlb: add missing unlock in avoidcopy path in hugetlb_cow()
Problem Details: This patch fixes possible deadlock in hugepage lock_page() by adding missing unlock_page(). libhugetlbfs test will hit this bug when the next patch in this patchset ("hugetlb, HWPOISON: move PG_HWPoison bit check") is applied. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: ...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3c275ffd32a7..303fb0c02364 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2324,9 +2324,11 @@ retry_avoidcopy: * and just make the page writable */ avoidcopy = (page_mapcount(old_page) == 1); if (avoidcopy) { - if (!trylock_page(old_page)) + if (!trylock_...
43131e141abdb44c487cf79af3ef1fe5164dcef9
Analyze and fix the following issue in the Linux kernel code: HWPOISON, hugetlb: support hwpoison injection for hugepage
Problem Details: This patch enables hwpoison injection through debug/hwpoison interfaces, with which we can test memory error handling for free or reserved hugepages (which cannot be tested by madvise() injector). [AK: Export PageHuge too for the injection module] Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec....
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4c2efc0f3919..3c275ffd32a7 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -615,6 +615,8 @@ int PageHuge(struct page *page) return dtor == free_huge_page; } +EXPORT_SYMBOL_GPL(PageHuge); + static struct page *alloc_fresh_huge_page_node(struct hstate *h, int n...
7013febc8940960eaaba039bac0f80910f679ce1
Analyze and fix the following issue in the Linux kernel code: HWPOISON, hugetlb: set/clear PG_hwpoison bits on hugepage
Problem Details: To avoid race condition between concurrent memory errors on identified hugepage, we atomically test and set PG_hwpoison bit on the head page. All pages in the error hugepage are considered as hwpoisoned for now, so set and clear all PG_hwpoison bits in the hugepage with page lock of the head page held....
```diff diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 1ec68c80788e..fee648b9d393 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -920,6 +920,22 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, return ret; } +static void set_page_hwpoison_huge_page(struct page *hp...
0fe6e20b9c4c53b3e97096ee73a0857f60aad43f
Analyze and fix the following issue in the Linux kernel code: hugetlb, rmap: add reverse mapping for hugepage
Problem Details: This patch adds reverse mapping feature for hugepage by introducing mapcount for shared/private-mapped hugepage and anon_vma for private-mapped hugepage. While hugepage is not currently swappable, reverse mapping can be useful for memory error handler. Without this patch, memory error handler cannot ...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d47a7c41745d..e688fd89354d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -99,6 +99,7 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) #define is_hugepage_only_range(mm, addr, len) 0 #define hugetlb_fre...
8fd49936a8cac246fc9ed85508556c82cd44cf68
Analyze and fix the following issue in the Linux kernel code: x86: Document __phys_reloc_hide() usage in __pa_symbol()
Problem Details: Until all supported versions of gcc recognize -fno-strict-overflow, we should keep the RELOC_HIDE() magic in __pa_symbol(). Comment it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> LKML-Reference: <1281508661-29507-1-git-send-email-namhyung@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h index 625c3f0e741a..8ca82839288a 100644 --- a/arch/x86/include/asm/page.h +++ b/arch/x86/include/asm/page.h @@ -37,6 +37,13 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr, #define __pa_nodebug(x) __phys_addr_...
3c3e210877e89aa3bfbda22551876986c035c433
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: fix compilation warning
Problem Details: Fix following warning: drivers/scsi/qla4xxx/ql4_nx.c: In function 'qla4_8xxx_get_flash_info': drivers/scsi/qla4xxx/ql4_nx.c:1952: warning: 'mid' may be used uninitialized in this function drivers/scsi/qla4xxx/ql4_nx.c:1952: note: 'mid' was declared here drivers/scsi/qla4xxx/ql4_nx.c:1952: warning: 'fi...
```diff diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 1b85235efd8c..e031a734836e 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -1953,7 +1953,8 @@ qla4_8xxx_get_fdt_info(struct scsi_qla_host *ha) uint16_t cnt, chksum; uint16_t *wptr; struct qla...
67110dfd45442e70753c575cf0509eaed237b749
Analyze and fix the following issue in the Linux kernel code: [SCSI] make error handling more robust in the face of reservations
Problem Details: commit 5f91bb050ecc4ff1d8d3d07edbe550c8f431c5e1 Author: Michael Reed <mdr@sgi.com> Date: Mon Aug 10 11:59:28 2009 -0500 [SCSI] reservation conflict after timeout causes device to be taken offline Flipped us from always returning failed to always returning success in the name of fixing the probl...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index cfd01ef8a9d4..0bd88381c1e1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -473,10 +473,12 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) */ return SUCCESS; case RESERVATION_CONFLICT: - ...