id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
1e0c5b1275a0e59747349745da8778523a9dcd18
Analyze and fix the following issue in the Linux kernel code: Input: ALPS - force stream mode
Problem Details: ALPS appears to need SETSTREAM command after reset, otherwise it does not produce any data. Now that we do not request stream mode by default individual drivers need to take care of it. [Jason Riedy <ejr@cs.berkeley.edu> - fix oops] Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index cf3e4664e72b..2c5f11a4f6b4 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -251,11 +251,15 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int dbg("E7 report: %2.2x %2.2x %2...
b8691fd2258d2ae5941c5e5f8bf3dfdaa8951b81
Analyze and fix the following issue in the Linux kernel code: Input: iforce - fix force feedback not working
Problem Details: Use an interrupt URB to send force-feedback data to the device instead of a bulk URB. This was broken since 2.6.18. Signed-off-by: Johann Deneux <johann.deneux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index 750099d8e3c6..1457b73850e7 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -65,6 +65,7 @@ void iforce_usb_xmit(struct iforce *iforce) XMIT_INC(...
7022672e4046fac4699aa5f8ff2a5213b7ec4ff9
Analyze and fix the following issue in the Linux kernel code: [PARISC] spelling fixes: arch/parisc/
Problem Details: Spelling fixes in arch/parisc/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
```diff diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 39dc835bf89e..fd6552c4c08c 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id); * pdc_stable_read - Read data from Stable Storage. * @staddr: Stab...
b5e8b733a18a1192666005f95f44e02440b057d4
Analyze and fix the following issue in the Linux kernel code: [PARISC] Disable LWS debugging
Problem Details: The LWS debugging code on parisc is wrongly enabled due to a bug in the use of the preprocessor directives. This debugging code is not thread safe and causes problems with a recent glibc on SMP kernels. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Kyle McMartin <kyle@parisc-linu...
```diff diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 10859f53e94f..4603032d56ef 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -501,7 +501,7 @@ lws_compare_and_swap: shlw %r20, 4, %r20 add %r20, %r28, %r20 -# ifdef ENABLE_LWS_DEBUG +# if ENABLE_LW...
71a904bf49582f1866e2d6f9ce0a186af9a50b39
Analyze and fix the following issue in the Linux kernel code: [AF_RXRPC]: AF_RXRPC depends on IPv4
Problem Details: Add a dependency for CONFIG_AF_RXRPC on CONFIG_INET. This fixes this error: net/built-in.o: In function `rxrpc_get_peer': (.text+0x42824): undefined reference to `ip_route_output_key' Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig index 91b3d52f6f1a..e662f1d07664 100644 --- a/net/rxrpc/Kconfig +++ b/net/rxrpc/Kconfig @@ -4,7 +4,7 @@ config AF_RXRPC tristate "RxRPC session sockets" - depends on EXPERIMENTAL + depends on INET && EXPERIMENTAL select KEYS help Say Y or M here to...
26b8e51e98ae09cfc770b918577c004a376de4b8
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Fix warnings with casting int to pointer
Problem Details: This patch adds some casts to shut up the warnings introduced by my last patch that added a common interator function for xfrm algorightms. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 8a72def25a34..5ced62c19c63 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -407,27 +407,27 @@ static struct xfrm_algo_desc *xfrm_find_algo( static int xfrm_alg_id_match(const struct xfrm_algo_desc *entry, const void *data) ...
3d9780b97667fcd63159c0933fdce75465da6c70
Analyze and fix the following issue in the Linux kernel code: [SCSI] fusion: Fix |/|| confusion
Problem Details: There are several cases where the fusion driver uses the logical || to try to do an arithmetical or ... fix by replacing with |. Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: "Moore, Eric" <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index d25d3be8fcd2..165f81d16d00 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -436,7 +436,7 @@ typedef struct _MPT_SAS_MGMT { typedef struct _mpt_ioctl_events { u32 event; /* Specified...
edd75ede2d40eadb98e07d87e88fa970f86ffe9e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5691): Ov7670: reset clkrc in rgb565 mode
Problem Details: A bug in the ov7670 sensor causes it to introduce noise unless the CLKRC register is rewritten *after* setting the image mode. Naturally, resetting CLKRC in this way will cause other modes to fail. So carefully poke the register only when indicated. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Si...
```diff diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 03bc369a9e49..3ceb8a6249dd 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -720,11 +720,21 @@ static int ov7670_s_fmt(struct i2c_client *c, struct v4l2_format *fmt) struct ov7670_format_struct *ovfmt...
82c01d3d5a26f82aea1fb2e9a357dfb6404f44db
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5680): Tuner-simple.c fix suport for SECAM with FI1216MF
Problem Details: Allow to use SECAM-BG with the FI1216MF tuner. The selection is done with the secam=B module argument. The default behaviour should be the same as before. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Hartmut Hackmann <har...
```diff diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index 1b9b0742f753..c40b92ce1fad 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c @@ -205,9 +205,13 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) /* 0x01 ...
8fdcf86af61bfba744f5868ec04dad71637ac33a
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete
Problem Details: Every so often, the driver will call asd_clear_nexus to clean out a task. It is supposed to be the case that the CLEAR NEXUS does not go on the done list until after the task itself has been put on the done list, but for some reason this doesn't always happen. Thus, the wait_for_completion_timeout cal...
```diff diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 9a14a6d97275..c0d0b7d7a8ce 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -290,6 +290,7 @@ static void asd_tmf_tasklet_complete(struct asd_ascb *ascb, static inline int asd_cl...
f45ffaec2e51071ea0067849cbb84df9e0531b35
Analyze and fix the following issue in the Linux kernel code: [SCSI] aic7xxx: fix aicasm build failure with gcc-3.4.6
Problem Details: On Tue, 2007-05-22 at 06:51 -0500, Bob Tracy wrote: > Second try: originally reported this back on April 17th. 2.6.X > kernel builds started failing after I upgraded my compiler from > gcc-3.3.X to gcc-3.4.6: > > make -C drivers/scsi/aic7xxx/aicasm > (...) > gcc -I/usr/include -I. aicasm.c aicasm_symb...
```diff diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index c328596def3c..6066998ed562 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -106,6 +106,7 @@ static void make_expression(expression_t *immed, int valu...
09ff92fea2890c697a36d8b26f5a3ea725ef8fb4
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: fix refcounting regression in suspend/resume routines
Problem Details: This patch (as909) fixes a couple of refcounting errors in the sd driver's suspend and resume methods. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 00e46662296f..3d8c9cb24f91 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1789,7 +1789,7 @@ static void sd_shutdown(struct device *dev) static int sd_suspend(struct device *dev, pm_message_t mesg) { struct scsi_disk *sdkp = scsi_disk_get_f...
a6d7613226c4e159b12fbaad707ddadf47b38ccf
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5639a): Fix dst usage count
Problem Details: Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 0393a3d19920..e908e3cf1e50 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c @@ -1721,9 +1721,6 @@ static void dst_release(struct dvb_frontend *fe) symbol_put(dst_ca_attach); #endif } -#ifdef CONF...
bf57ab7ae74591973265ebd8e18bd0e785dbfb33
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5640): Fix: em28xx shouldn't be selecting VIDEO_BUF
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index 2c450bd05af5..5b6a40371602 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig @@ -1,7 +1,6 @@ config VIDEO_EM28XX tristate "Empia EM2800/2820/2840 USB video capture support" - depe...
d460f857a5332fe892d88ddfb5efa827dc3b25e6
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5639): Fix Kconfig dependencies for ivtv
Problem Details: ivtv were wrongly marked as dependent of USB. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/Kconfig b/drivers/media/video/ivtv/Kconfig index 0cc98a0e2496..1aaeaa02f158 100644 --- a/drivers/media/video/ivtv/Kconfig +++ b/drivers/media/video/ivtv/Kconfig @@ -1,6 +1,6 @@ config VIDEO_IVTV tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" - depends o...
a1ba15832c8f6ac2d5d193a6dbb91bcf7705b732
Analyze and fix the following issue in the Linux kernel code: i2c-s3c2410: Fix build warning
Problem Details: Fix for the following build warning: CC drivers/i2c/busses/i2c-s3c2410.o drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_i2c_probe': drivers/i2c/busses/i2c-s3c2410.c:839: warning: format '%ld' expects type 'long int', but argument 4 has type 'resource_size_t' Signed-off-by: Arnaud Pa...
```diff diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e68a96f589fd..e4540fcf6476 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -830,7 +830,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) i2c->irq = res; - dev_dbg(...
6a7ce82f02e8ce7391e40018749d93762abf6ee0
Analyze and fix the following issue in the Linux kernel code: i2c-tiny-usb: Fix truncated adapter name
Problem Details: Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Till Harbaum <lists@harbaum.org>
```diff diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index 907999049d50..cb9abe7565a7 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c @@ -208,7 +208,7 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface, dev->adapter.class = I2C...
a66aa704d6f332b001dfb0e787c92b2c61c75081
Analyze and fix the following issue in the Linux kernel code: [IA64] fix kmalloc(0) in arch/ia64/pci/pci.c
Problem Details: Hiroyuki Kamezawa reported the problem that pci_acpi_scan_root() of ia64 might call kmalloc_node() with zero size. Currently ia64's pci_acpi_scan_root() assumes that _CRS method of root bridge has at least one resource window. But, the root bridges that has no resource window must be taken into accoun...
```diff diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 3549f3b42592..73696b4a2eed 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -354,10 +354,13 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, ...
412e8a0ebf1a58c060cc76438e5b6d33789c5e20
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/net/wireless/libertas/rx.c: fix use-after-free
Problem Details: skb could have been freed by then. Also, in libertas_upload_rx_packet(), skb->protocol is initialized by eth_type_trans(). Signed-off-by: Eugene Teo <eugeneteo@kernel.sg> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index b19b5aa8713b..96619a32951b 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c @@ -441,7 +441,5 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb) done...
596f2d0554352f1089f7478b309b27d8cdf5cd4f
Analyze and fix the following issue in the Linux kernel code: [PATCH] drivers/net/wireless/libertas/fw.c: fix use-before-check
Problem Details: NULL checks should be performed before the dereference. Spotted by the Coverity checker. Signed-off-by: Eugene Teo <eteo@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index 441123c85e62..5c63c9b1659c 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c @@ -333,18 +333,22 @@ static void command_timer_fn(unsigned long data) unsigned long flags; ptempno...
5453e7723b95958f4591b2e0063573d8d53e7699
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix warning in 32-bit builds with CONFIG_HIGHMEM
Problem Details: Some missing fixup for the removal of 4 level fixup header. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 246eeea40ece..0266a94d83b6 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -310,11 +310,12 @@ void __init paging_init(void) #ifdef CONFIG_HIGHMEM map_page(PKMAP_BASE, 0, 0); /* XXX gross */ - pkmap_page_table = pte_offset_ke...
832a791c580a86cbeea5bb12a984d95b1f458539
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix powerpc vmlinux.lds.S
Problem Details: Sam's recent change in 7664709b44a13e2e0b545e2dd8e7b8797a1748dc broke things for us because we ended up with *(.text.*) before *(.text), whereas previously *(.text) was first. This was important because the start of the text section contains the kernel entry point. In fact, we don't need that *(.text...
```diff diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index f7d7bf19e4fb..21c39ff2dc39 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -34,7 +34,6 @@ SECTIONS /* Text and gots */ .text : { _text = .; - *(.text.*) TEXT_TEXT SCHE...
177e9ea49deea238f59bb0b1708cfc60b75828fb
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix typo: MMCR0_PMA0 != MMCR0_PMAO
Problem Details: pmc.c has: #ifndef MMCR0_PMA0 #define MMCR0_PMA0 0 This one took a while to find. Unfortunately its the wrong define (number 0 vs letter O). Its probably worth removing this override, since if our includes get screwed up we will have the same (hard to debug) failure. Fix it simply for now, so t...
```diff diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c index 24d7b7c99bb9..ea04e0ab3f2f 100644 --- a/arch/powerpc/kernel/pmc.c +++ b/arch/powerpc/kernel/pmc.c @@ -20,8 +20,8 @@ #include <asm/cputable.h> #include <asm/pmc.h> -#ifndef MMCR0_PMA0 -#define MMCR0_PMA0 0 +#ifndef MMCR0_PMAO +#define M...
d3fdaed9e973687f088c9c156a6e20870386e0b7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix smp_call_function to be preempt-safe
Problem Details: smp_call_function_map() was not safe against preemption to another cpu: its test for removing self from map was outside the spinlock. Rearrange it a little to fix that. smp_call_function_single() was also wrong: now get_cpu() before excluding self, as other architectures do. Signed-off-by: Hugh Dicki...
```diff diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 22f1ef1b3100..d577b71db375 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -201,13 +201,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, /* Can deadlock when called with inter...
d25790532370e7448e3d3bd25a17e1e9f1299816
Analyze and fix the following issue in the Linux kernel code: Fix headers check fallout
Problem Details: commit e8edc6e03a5c8562dc70a6d969f732bdb355a7e7 added an include of linux/jiffies.h in linux/smb_fs.h outside the ifdef __KERNEL__. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 6b51a48e8995..2c5cd55f44ff 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h @@ -9,7 +9,6 @@ #ifndef _LINUX_SMB_FS_H #define _LINUX_SMB_FS_H -#include <linux/jiffies.h> #include <linux/smb.h> /* @@ -30,6 +29,7 @@ #include...
72dd9ca59944f117c719a1cc3fc9010bce0486f2
Analyze and fix the following issue in the Linux kernel code: partitions/LDM: build fix
Problem Details: This from a "tested" patch... Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c index c387812537d7..99873a2b4cbc 100644 --- a/fs/partitions/ldm.c +++ b/fs/partitions/ldm.c @@ -158,7 +158,7 @@ static bool ldm_parse_privhead(const u8 *data, struct privhead *ph) /* Warn the user and continue, carefully. */ ldm_info("Database is norm...
39f198868dfd4216ff221d741c72a009d995a7ba
Analyze and fix the following issue in the Linux kernel code: libata: Add Seagate STT20000A to DMA blacklist.
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=1044 points out an additional hard disk that doesn't handle DMA transfers correctly. This patch is the libata variant of the earlier patch to drivers/ide/ Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index d3ea7f55283c..94ec0f524acf 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3771,6 +3771,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "ATAPI CD-ROM DRIVE 40X MAXIMUM",NULL,ATA_HORKA...
3e1657c8ef53e1cd541cc1e420f3230dc075949b
Analyze and fix the following issue in the Linux kernel code: e1000: Don't enable polling in open() (was: e1000: assertion hit in e1000_clean(), kernel 2.6.21.1)
Problem Details: Herbert Xu wrote: "netif_poll_enable can only be called if you've previously called netif_poll_disable. Otherwise a poll might already be in action and you may get a crash like this." Removing the call to netif_poll_enable in e1000_open should fix this issue, the only other call to netif_poll_enable ...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 49be393e1c1d..cbc7febe9cdc 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1431,10 +1431,6 @@ e1000_open(struct net_device *netdev) /* From here on the code is the same as e1000_up() */ cl...
9f81036c54ed1f860d2807c5a6aa4f2b30c21204
Analyze and fix the following issue in the Linux kernel code: IB/cm: Improve local id allocation
Problem Details: The IB CM uses an idr for local id allocations, with a running counter as start_id. This fails to generate distinct ids if 1. An id is constantly created and destroyed 2. A chunk of ids just beyond the current next_id value is occupied This in turn leads to an increased chance of connection request ...
```diff diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index eff591deeb46..e840434a96d8 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -306,7 +306,9 @@ static int cm_alloc_id(struct cm_id_private *cm_id_priv) do { spin_lock_irqsave(&cm.lock, flags); ret...
518b1646f8a31904ca637b8df0c1e31c34a7a3c2
Analyze and fix the following issue in the Linux kernel code: IPoIB/cm: Fix SRQ WR leak
Problem Details: SRQ WR leakage has been observed with IPoIB/CM: e.g. flipping ports on and off will, with time, leak out all WRs and then all connections will start getting RNR NAKs. Fix this in the way suggested by spec: move the QP being destroyed to the error state, wait for "Last WQE Reached" event and then post ...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 93d4a9a1e1dd..a0b3782c7625 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -132,12 +132,46 @@ struct ipoib_cm_data { __be32 mtu; }; +/* + * Quoting 10.3.1 Queue Pai...
24bd1e4e32e88cd3d0675482d15bea498a922ca8
Analyze and fix the following issue in the Linux kernel code: IB/ipoib: Fix typos in error messages
Problem Details: Trivial error message fixups. Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index e3b0937011d1..c1aad06eb4e9 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -470,7 +470,7 @@ int ipoib_ib_dev_open(struct net_device *dev) ret = ipoib_cm_...
f9f3c6b666f717510b67036c314ec915b9059eaa
Analyze and fix the following issue in the Linux kernel code: Btrfs: 2.6.21-git fixes
Problem Details: Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 5830b4333d83..da12d8275817 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1197,6 +1197,4 @@ struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, u64 objectid, u64 offset, int cow); /* super.c */ -extern stru...
dde33348e53ecab687a9768bf5262f0b8f79b7f2
Analyze and fix the following issue in the Linux kernel code: LDM: Fix for Windows Vista dynamic disks
Problem Details: This fixes the LDM driver so that it works with Windows Vista dynamic disks which are subtly different to Windows 2000/XP ones. The patch was needed to get a Vista formatted dynamic disk to be recognized and parsed successfully. Thanks go to Chris Teachworth for the report and testing. Cc: Richard R...
```diff diff --git a/Documentation/ldm.txt b/Documentation/ldm.txt index e266e11c19a3..718085bc9f1a 100644 --- a/Documentation/ldm.txt +++ b/Documentation/ldm.txt @@ -2,10 +2,13 @@ LDM - Logical Disk Manager (Dynamic Disks) ------------------------------------------ +Originally Written by Fl...
17304383ebc1ce68a88030ac4d18ea549d9578c7
Analyze and fix the following issue in the Linux kernel code: i386: fix PGE mask
Problem Details: cr4 is a 32-bit register, so casting the mask to an unsigned char is wrong, as it clears more than the PGE bit. Signed-off-by: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/i386/kernel/cpu/mtrr/cyrix.c b/arch/i386/kernel/cpu/mtrr/cyrix.c index 0737a596db43..9edf5625584f 100644 --- a/arch/i386/kernel/cpu/mtrr/cyrix.c +++ b/arch/i386/kernel/cpu/mtrr/cyrix.c @@ -136,7 +136,7 @@ static void prepare_set(void) /* Save value of CR4 and clear Page Global Enable (bit 7...
d0aff6e6f4e54f79f9c89d147d371bad384454e9
Analyze and fix the following issue in the Linux kernel code: x86_64: vsyscall time() fix
Problem Details: The vsyscall time() function basically returns the second portion of xtime directly. This however means that there is about a ticks worth of time each second where time() will return a second value less then what gettimeofday() does. Additionally, this window where vtime() is behind vgettimeofday() g...
```diff diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index 51d4c6fa88c8..57660d58d500 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -175,10 +175,13 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) * unlikely */ time_t __vs...
39427d6e595ebee38fdd77bcf55d6b13d7a4324a
Analyze and fix the following issue in the Linux kernel code: i386: Enable CX8/PGE CPUID bits early on VIA C3
Problem Details: Fix boot failures with the early CPUID checking on VIA C3 Includes fixes from Christian Volkmann Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/i386/kernel/verify_cpu.S b/arch/i386/kernel/verify_cpu.S index b2a9d80b6421..f1d1eacf4ab0 100644 --- a/arch/i386/kernel/verify_cpu.S +++ b/arch/i386/kernel/verify_cpu.S @@ -2,6 +2,7 @@ This runs in 16bit mode so that the caller can still use the BIOS to output errors on the screen */ ...
4c1f59d8be7e5da75d9380da23671005b363c45c
Analyze and fix the following issue in the Linux kernel code: i386: Fix wrong CPU error message in early boot path
Problem Details: - boot/setup.S did not print "PANIC: CPU too old for this kernel" ( not visible, also the message did not match ) - I add "# missed before: set ds" => somebody should check if I am right with the way to set. => seems to be a generic error in setup.S not to set "ds" for error messages. AK: extrac...
```diff diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index f8b3b9cda2b1..6dbcc95b2120 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -310,6 +310,8 @@ loader_ok: call verify_cpu testl %eax,%eax jz cpu_ok + movw %cs,%ax # aka SETUPSEG + movw %ax,%ds lea cpu_panic_mess,%si ...
c12ceb766eb5ac975c1145d51236fcdcf81a6578
Analyze and fix the following issue in the Linux kernel code: i386: Clear MCE flag on AMD K6
Problem Details: It reports machine check capability in CPUID, but doesn't actually implement all the necessary MSRs of the standard Intel machine check architecture. This fixes a boot failure on K6s recently introduced. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o...
```diff diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 4fec702afd7e..6f47eeeb93ea 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c @@ -280,6 +280,10 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) if (c->x86 == 0x10 && !force_mwait) clear_bit(X86_FEATU...
6c977aad03a18019015035958c65b6729cd0574c
Analyze and fix the following issue in the Linux kernel code: i386: Fix K8/core2 oprofile on multiple CPUs
Problem Details: Only try to allocate MSRs once instead of for every CPU. This assumes the MSRs are the same on all CPUs which is currently true. P4-HT is a special case for different SMT threads, but the code always saves/restores all MSRs so it works identical. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: ...
```diff diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 8e185208dfd4..a7c0783b269a 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c @@ -131,7 +131,6 @@ static void nmi_save_registers(void * dummy) { int cpu = smp_processor_id(); struct op_msrs * msrs = &cp...
88b4036934b5a6d8cda810487503d2fc4c46d448
Analyze and fix the following issue in the Linux kernel code: Blackfin SPI: cleanup according to David Brownell's review
Problem Details: a) platorm_driver_probe(...) instead of platform_driver_register(&driver); b) set bfin_spi_enable and bfin_spi_disable static c) Why is the width flag a u32? d) maybe use dev_dbg() instead of pr_debug() Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundat...
```diff diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index ce3c0ce2316e..7d2d9ec6cac3 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -126,7 +126,7 @@ struct chip_data { u8 chip_select_num; u8 n_bytes; - u32 width; /* 0 or 1 */ + u8 width; /* 0 or 1 */ u8 enable...
5c4e472b0af57553f9584e0b33c491b168ac1dff
Analyze and fix the following issue in the Linux kernel code: Blackfin serial driver: fix overhead issue
Problem Details: Signed-off-by: Aubrey Li <aubrey.li@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 408390f93db9..a8271d9c6202 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -240,24 +240,30 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart) bfin_serial_stop_tx(&uart->port); } -static irqre...
c824498db47285aeff430c007685a193b673c949
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix signal handling bug
Problem Details: There's a forum thread at https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&_forum_action=MessageReply&message_id=24741 which has a testcase involving signal handling that crashes quite readily. Inspecting the code I believe what happens is that signal handling can become ...
```diff diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index e463733f5c77..7d0368772cda 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S @@ -712,6 +712,11 @@ _schedule_and_signal_from_int: p1.h = _evt_system_call; [p0] = p1; csync; + + /* S...
6e537e9329d133526a576b741f85b3d48edc4ac1
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix bug using usb keyboard crashes kernel
Problem Details: Without conswitchp preset, we have the following situation: - During initcalls: con_init is called, and returns because of !display_desc. - At this point there is no memory allocated for vc_cons[].d A bit later vty_init calls kbd_init. - From now on events are passed to kbd_event which will...
```diff diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 342bb8dd56ac..c456ee5c1b4a 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -33,7 +33,6 @@ #include <linux/seq_file.h> #include <linux/cpu.h> #include <linux/module.h> -#include <linux/console.h> #i...
8a0e6656030ffe9bcb81b725e956917bafc7522d
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix trace output for FLAT binaries
Problem Details: Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 9556b73de808..9932edee8cb4 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -59,9 +59,10 @@ static int printk_address(unsigned long address) struct vm_list_struct *vml; struct task_struct *p; stru...
678402709602a5e62bb79454f0f41bd952373300
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: GPIO fix some defines
Problem Details: Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index d16fe3cd6135..aa0d5503e232 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h @@ -148,10 +148,6 @@ #ifdef BF537_FAMILY #define MAX_BLACKFIN_GPIOS 48 -#define PORT_F 0 -#define PORT_G 1 -#define PORT_H 2 -#de...
9ae246cd85e05d3fb31b9770588c1fe0914872fe
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: Fix reserved map after we changed PORT_H definition
Problem Details: Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index bc162529119f..3f49fae1cb1f 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -188,9 +188,9 @@ static int __init bfin_gpio_init(void) #if defined(BF537_FAMILY) && (defined(CONFIG_BFIN_M...
6dae211411448dd9a12895b802bdedca8296f23d
Analyze and fix the following issue in the Linux kernel code: Blackfin arch: fix a few random warnings
Problem Details: Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/blackfin/mach-bf537/cpu.c b/arch/blackfin/mach-bf537/cpu.c index 2d83b7e35469..0442c4c7f723 100644 --- a/arch/blackfin/mach-bf537/cpu.c +++ b/arch/blackfin/mach-bf537/cpu.c @@ -43,13 +43,13 @@ #define VCO1 (CONFIG_CLKIN_HZ*9) /*99532800 */ #define VCO(x) VCO##x -#define FREQ(x) {VCO(x),VCO...
ff1be9ad61e3e17ba83702d8ed0b534e5b8ee15c
Analyze and fix the following issue in the Linux kernel code: Fix "fs: convert core functions to zero_user_page"
Problem Details: The bug was introduced by 01f2705daf5a36208e69d7cf95db9c330f843af6. It misses to convert the first argument, it should be "new_page". This became a cause of fatfs corruption. Cc: Nate Diller <nate.diller@gmail.com> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Linus Torva...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 49590d590d7d..aa68206bd517 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2101,7 +2101,7 @@ int cont_prepare_write(struct page *page, unsigned offset, PAGE_CACHE_SIZE, get_block); if (status) goto out_unmap; - zero_user_page(page, zerofrom, PAGE_CACHE_...
a5a60a2beea07c23e242ad8e7398e761935d669a
Analyze and fix the following issue in the Linux kernel code: [S390] Make use of kretprobe_assert.
Problem Details: s390 change for git commit 0f95b7fc839bc3272b1bf2325d8748a649bd3534. That is print kprobes debug data before BUG(). Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Maneesh Soni <maneesh@in.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schw...
```diff diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index e39333ae0fcf..358d2bbbc481 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -413,7 +413,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, break; } } - BUG_ON(!orig_ret_address || (or...
31d106c68b1af88835a474556052d6efbfec99c5
Analyze and fix the following issue in the Linux kernel code: sh: Fix dreamcast build for IRQ changes.
Problem Details: When the irq.h changes went in, the dreamcast code was still referencing an old value. Switch it back to the IRQ number, which fixes this: arch/sh/boards/dreamcast/irq.c: In function `disable_systemasic_irq': arch/sh/boards/dreamcast/irq.c:59: error: `OFFCHIP_IRQ_BASE' undeclared (first use in this fu...
```diff diff --git a/include/asm-sh/dreamcast/sysasic.h b/include/asm-sh/dreamcast/sysasic.h index 7874e3dac736..f33426608a87 100644 --- a/include/asm-sh/dreamcast/sysasic.h +++ b/include/asm-sh/dreamcast/sysasic.h @@ -23,7 +23,7 @@ takes. */ -#define HW_EVENT_IRQ_BASE OFFCHIP_IRQ_BASE /* 48 */ +#define HW_EVEN...
dfbbbe92956b849a6704dbd5352348d6ba1165da
Analyze and fix the following issue in the Linux kernel code: sh: Fix clock multiplier on SH7722.
Problem Details: This fixes up the master clock multiplier and initial rate propagation for the SH7722 clocks. Signed-off-by: dmitry pervushin <dimka@nomadgs.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 014f318f5a05..63251549e9a8 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c @@ -278,6 +278,11 @@ arch_init_clk_ops(struct clk_ops **ops, int type) { } +void __init __attribute__ ((weak)) +arch_clk_init(void) +...
0d08b5fb37835988952d190b4540a71d60a4d198
Analyze and fix the following issue in the Linux kernel code: sh: Fix page size alignment in __copy_user_page().
Problem Details: SH-3 comes up with the PAGE_SIZE on a misaligned boundary: arch/sh/mm/copy_page.S: Assembler messages: arch/sh/mm/copy_page.S:132: Warning: misaligned data fix it up with explicit alignment. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S index 397c94c97315..ae039f2da162 100644 --- a/arch/sh/mm/copy_page.S +++ b/arch/sh/mm/copy_page.S @@ -129,6 +129,7 @@ ENTRY(__copy_user_page) rts nop #endif + .align 2 .Lpsz: .long PAGE_SIZE /* * __kernel_size_t __copy_user(void *to, const v...
27641dee99e0d0c25f224cdfbd11486bd2f131ee
Analyze and fix the following issue in the Linux kernel code: sh: Fix up various compile warnings for SE boards.
Problem Details: - setup-sh7750.c only defines the sh7751_ipr_map when building with SH7751 support. - 7722 Solution Engine was missing a mach-type entry, causing the macro in cf-enabler to be undefined. - arch/sh/mm/init.c needs linux/pagemap.h. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index 6f8f458912c7..03b14cf78ddf 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -106,6 +106,7 @@ static struct ipr_data sh7750_ipr_map[] = { { 38, 2, 8, 7 }, /* DMAC D...
e868d61272caa648214046a096e5a6bfc068dc8c
Analyze and fix the following issue in the Linux kernel code: spelling fixes: arch/sh/
Problem Details: Spelling fixes in arch/sh/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/landisk/gio.c b/arch/sh/boards/landisk/gio.c index 50d38be62f01..a37643d002b2 100644 --- a/arch/sh/boards/landisk/gio.c +++ b/arch/sh/boards/landisk/gio.c @@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp, } switch (cmd) { - case GIODRV_IOCSGIOSETADD...
6cbdc8c5357276307a77deeada3f04626ff17da6
Analyze and fix the following issue in the Linux kernel code: [ARM] spelling fixes
Problem Details: Spelling fixes in arch/arm/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 6fbe7722aa44..b36b1e8a105d 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -6,7 +6,7 @@ * copy data to/from buffers located outside the DMA region. This * only works for systems in which DMA memory i...
fc432e1952a3899ce35e84b417e5d60f74cb901b
Analyze and fix the following issue in the Linux kernel code: [ARM] at91_adc parenthesis balance
Problem Details: Trivial unbalanced parenthesis macro fix. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-at91/at91_adc.h b/include/asm-arm/arch-at91/at91_adc.h index 1ed66eaaf83a..6d71ea2637b1 100644 --- a/include/asm-arm/arch-at91/at91_adc.h +++ b/include/asm-arm/arch-at91/at91_adc.h @@ -55,7 +55,7 @@ #define AT91_ADC_IDR 0x28 /* Interrupt Disable Register */ #define AT91_ADC...
42482e3c77bcb310affdf13e92b93f077d44a7fc
Analyze and fix the following issue in the Linux kernel code: [ARM] 4399/2: S3C2443: Fix SMDK2443 nand timings
Problem Details: Reduce the Twrph0 timing slightly to fit on an SMDK2443. This should still produce valid timings for the NAND devices as it is still over the smallest device fitted to these boards. Signed-off-by: Ben Dooks <(address hidden)> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c index 1dd60a689ae5..7ed19b23ce56 100644 --- a/arch/arm/plat-s3c24xx/common-smdk.c +++ b/arch/arm/plat-s3c24xx/common-smdk.c @@ -30,6 +30,7 @@ #include <asm/mach/map.h> #include <asm/mach/irq.h> +#include <asm/mach-types.h...
7e966f3c392ffb5297a6ba0ea701d6a20d1d7292
Analyze and fix the following issue in the Linux kernel code: [ARM] 4398/1: S3C2443: Fix watchdog IRQ number
Problem Details: Fix the IRQ number for watchdog on S3C2443 Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index 11b1d0b310c3..8d8117158d23 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c @@ -63,6 +63,10 @@ int __init s3c2443_init(void) s3c_device_nand.name = "s3c2412-nand"; + /* change WDT IRQ num...
1d28bff7c4ea138032b44d514351b7caceb9fba5
Analyze and fix the following issue in the Linux kernel code: [ARM] 4387/1: fix /proc/cpuinfo formatting for pre-ARM7 parts
Problem Details: Fix the formating of the "CPU part" field to be consistent with the other fields for pre-ARM7 parts. One tab to many for them to all line up. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 0453dcc757b4..650eac1bc0a6 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -918,7 +918,7 @@ static int c_show(struct seq_file *m, void *v) if ((processor_id & 0x0008f000) == 0x00000000) { /* pre-ARM7 */ - seq_prin...
2446304dd687488c054d0437f2aeef1ef2bfbd02
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Pass send queue sizes from userspace to kernel
Problem Details: Pass the number of WQEs for the send queue and their size from userspace to the kernel to avoid having to keep the QP size calculations in sync between the kernel driver and libmlx4. This fixes a bug seen with the current mlx4_ib driver and current libmlx4 caused by a difference in the calculated s...
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 5706f988e2ec..a824bc5f79fd 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -188,14 +188,32 @@ static int send_wqe_overhead(enum ib_qp_type type) } } -static int set_qp_size(struct mlx4...
2ad8ee713566671875216ebcec64f2eda47bd19d
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix potential memory leak of dead xattrs on unmount.
Problem Details: An xattr_datum which ends up orphaned should be freed by the GC thread. But if we umount before the GC thread is finished, or if we mount read-only and the GC thread never runs, they might never be freed. Clean them up during unmount, if there are any left. Signed-off-by: David Woodhouse <dwmw2@inf...
```diff diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index 073469856d4e..e48665984cb3 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c @@ -754,6 +754,10 @@ void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c) list_del(&xd->xindex); jffs2_free_xattr_datum(xd); } + list_for_each_entry_safe(xd, _xd, &...
8ae5d31263c746f1680d005b33a82d167cdb9eb6
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix BUG() caused by failing to discard xattrs on deleted files.
Problem Details: When we cannot mark nodes as obsolete, such as on NAND flash, we end up having to delete inodes with !nlink in jffs2_build_remove_unlinked_inode(). However, jffs2_build_xattr_subsystem() runs later than this, and will attach an xref to the dead inode. Then later when the last nodes of that dead inode ...
```diff diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c index 78fc08893a6c..073469856d4e 100644 --- a/fs/jffs2/xattr.c +++ b/fs/jffs2/xattr.c @@ -825,7 +825,7 @@ void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) ref->xd and ref->ic are not valid yet. */ xd = jffs2_find_xattr_datum(c, ref->xid); ...
9093bbb2d96d0184f037cea9b4e952a44ebe7c32
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix race condition about network device name allocation.
Problem Details: Kenji Kaneshige found this race between device removal and registration. On unregister it is possible for the old device to exist, because sysfs file is still open. A new device with 'eth%d' will select the same name, but sysfs kobject register will fial. The following changes the shutdown order sli...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index f2b61111e26d..5a7f20f78574 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3314,7 +3314,6 @@ void netdev_run_todo(void) continue; } - netdev_unregister_sysfs(dev); dev->reg_state = NETREG_UNREGISTERED; netdev_wait_allrefs(dev); @@ -3325,1...
d8cf27287ac7fb5cbfcc4139917a997c39d841ca
Analyze and fix the following issue in the Linux kernel code: [IPV4]: icmp: fix crash with sysctl_icmp_errors_use_inbound_ifaddr
Problem Details: When icmp_send is called on the local output path before the packet hits ip_output, skb->dev is not set, causing a crash when sysctl_icmp_errors_use_inbound_ifaddr is set. This can happen with the netfilter REJECT target or IPsec tunnels. Let routing decide the ICMP source address in that case, since ...
```diff diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index d38cbba92a4d..e238b17f554c 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -514,7 +514,10 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) saddr = iph->daddr; if (!(rt->rt_flags & RTCF_LOCAL)) { - if (sysctl_icmp_errors_...
3ad2a6fb6bcc2f464cdde093a76b76b90b90c66c
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_conntrack_ipv4: fix incorrect #ifdef config name
Problem Details: The option is named CONFIG_NF_NAT not CONFIG_IP_NF_NAT. Remove the ifdef completely since helpers also expect defragmented packet even without NAT. Noticed by Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 0654eaae70c9..fd62a41d69cc 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c @@ -154,12 +154,10 @@ static unsigned int ipv4_conntrack_...
5397e97d7533a03b28a7b8aeee648cbb36a8afc6
Analyze and fix the following issue in the Linux kernel code: [NETFILTER]: nf_conntrack: fix use-after-free in helper destroy callback invocation
Problem Details: When the helper module is removed for a master connection that has a fulfilled expectation, but has already timed out and got removed from the hash tables, nf_conntrack_helper_unregister can't find the master connection to unset the helper, causing a use-after-free when the expected connection is destr...
```diff diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index e8b5c2d7db62..483e927a9ca4 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -298,7 +298,6 @@ static void destroy_conntrack(struct nf_conntrack *nfct) { struct nf_conn *ct = (stru...
b6ccc67d8e42e38936df330b26ee6d022dda8a64
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error
Problem Details: Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with: gcc -m32 -Wp,-MD,net/core/.skbuff.o.d -nostdinc -isystem /home/mikpe/pkgs/linux-x86/gnu/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fn...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 142257307fa2..7c6a34e21eee 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -644,11 +644,10 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, /* Copy only real data... and, alas, header. This should be * optimized for the ...
d007da1fa6f0ad5e01ceae4a1f60cdbb23ecd706
Analyze and fix the following issue in the Linux kernel code: [RFKILL]: Fix check for correct rfkill allocation
Problem Details: coverity has spotted a bug in rfkill.c (bug id #1627), in rfkill_allocate() NULL was returns if the kzalloc() works, and deref the NULL pointer if it fails, Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index a973603e3880..f3986d498b40 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -296,7 +296,7 @@ struct rfkill *rfkill_allocate(struct device *parent, enum rfkill_type type) struct device *dev; rfkill = kzalloc(sizeof(struct rfkill), GF...
59b0ed121297b57abb2352bdc8313959e7cb5635
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Fix check of opcode in mlx4_ib_post_send()
Problem Details: wr->opcode is invalid if it's >= ARRAY_SIZE(mlx4_ib_opcode), not just strictly >. This was spotted by the Coverity checker (CID 1643). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index bd28af5753d1..5706f988e2ec 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1238,7 +1238,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, */ wmb(); - if (wr->...
23c15c21d34a4b4b4d7b9a95ce498991c5339c77
Analyze and fix the following issue in the Linux kernel code: mlx4_core: Fix array overrun in dump_dev_cap_flags()
Problem Details: Don't overrun fname[] array when decoding device flags. This was spotted by the Coverity checker (CID 1642). Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index c42717313663..cfa5cc072339 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c @@ -90,7 +90,7 @@ static void dump_dev_cap_flags(struct mlx4_dev *dev, u32 flags) int i; mlx4_dbg(dev, "DEV_CAP flags:\n"); - for (i = 0; i < 32; ++i) ...
65adfa911a3522c1e40e55afd472dd571dc2431b
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Fix RESET to RESET and RESET to ERROR transitions
Problem Details: According to the IB spec, a QP can be moved from RESET back to RESET or to the ERROR state, but mlx4 firmware does not support this and returns an error if we try. Fix the RESET to RESET transition by just returning 0 without doing anything, and fix RESET to ERROR by moving the QP from RESET to INIT w...
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 0cf8b95128fd..bd28af5753d1 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -573,7 +573,7 @@ static int to_mlx4_st(enum ib_qp_type type) } } -static __be32 to_mlx4_access_flags(struct m...
b18aad7150c85cc86a66be8a1c744b63b41b36e0
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix RESET to ERROR transition
Problem Details: According to the IB spec, a QP can be moved from RESET to the ERROR state, but mthca firmware does not support this and returns an error if we try. Work around this FW limitation by moving the QP from RESET to INIT with dummy parameters and then transitioning from INIT to ERROR. Signed-off-by: Mich...
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 72fabb822f1c..a20e2f0c9a54 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -295,7 +295,7 @@ static int to_mthca_st(int transport) } } -static void store_att...
1f8f7b7a7b885a0041a21b3d93c507269baf57c8
Analyze and fix the following issue in the Linux kernel code: IB/mlx4: Fix check of max_qp_dest_rdma in modify QP
Problem Details: max_qp_dest_rdma is already in natural units - no need to shift. This was discovered by a test that deliberately requests more outstanding atomic operation than the device supports. Found by Sagi Rotem at Mellanox. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@c...
```diff diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 5cd706908450..9c362fa71465 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -694,7 +694,7 @@ int mlx4_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, } if (attr_mask & IB_QP_...
de57c9f102ad7bdc8afa5a1560748cf4f1c18b8e
Analyze and fix the following issue in the Linux kernel code: IB/mthca: Fix use-after-free on device restart
Problem Details: Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 773145e29947..aa563e61de65 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c @@ -1250,12 +1250,14 @@ static void __mthca_remove_one(struct pci_dev *pdev) int...
26bbf13ce1ca21ec69175bcc4b995cb8ffdf8593
Analyze and fix the following issue in the Linux kernel code: IPoIB: Handle P_Key table reordering
Problem Details: SM reconfiguration or failover possibly causes a shuffling of the values in the P_Key table. Right now, IPoIB only queries for the P_Key index once when it creates the device QP, and hence there are problems if the index of a P_Key value changes. Fix this by using the PKEY_CHANGE event to trigger a re...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 87310eeb6df0..93d4a9a1e1dd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -201,15 +201,17 @@ struct ipoib_dev_priv { struct list_head multicast_list; struct rb_root...
8b8c8bca3a63073bac20f0fca178e00fdf7f5a09
Analyze and fix the following issue in the Linux kernel code: IB/ipath: Fix potential deadlock with multicast spinlocks
Problem Details: Lockdep found the following potential deadlock between mcast_lock and n_mcast_grps_lock: mcast_lock is taken from both interrupt context and process context, so spin_lock_irqsave() must be used to take it. n_mcast_grps_lock is only taken from process context, so at first it seems safe to take it with p...
```diff diff --git a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c index 085e28b939ec..dd691cfa5079 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c @@ -165,10 +165,9 @@ static int ipath_mcast_add(struc...
38bdc32af442b6ab09ed61b8b669072098c95dd2
Analyze and fix the following issue in the Linux kernel code: mm/slab: fix section mismatch warning
Problem Details: Use the new __init_refok marker to avoid the section mismatch warning from slab.c Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/mm/slab.c b/mm/slab.c index 528243e15cc8..2e71a328aa09 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -2037,7 +2037,7 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, return left_over; } -static int setup_cpu_cache(struct kmem_cache *cachep) +static int __init_refok setup_cpu_cache(...
577a32f620271416d05f852477151fb51c790bc6
Analyze and fix the following issue in the Linux kernel code: mm: fix section mismatch warnings
Problem Details: modpost had two cases hardcoded for mm/ Shift over to __init_refok and kill the hardcoded function names in modpost. This has the drawback that the functions will always be kept no matter configuration. With previous code the function were placed in init section if configuration allowed it. Signed-of...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ae96dd844432..8b000d6803c2 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2165,7 +2165,7 @@ void __init setup_per_cpu_pageset(void) #endif -static __meminit noinline +static noinline __init_refok int zone_wait_table_init(struct zone *zone, unsig...
92080309df1975729a9f8b45fd56528817e34db8
Analyze and fix the following issue in the Linux kernel code: init/main: use __init_refok to fix section mismatch
Problem Details: Kill a special case in modpost by introducing the __init_refok marker. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/init/main.c b/init/main.c index 1940fa75e82e..eb8bdbae4fc7 100644 --- a/init/main.c +++ b/init/main.c @@ -423,7 +423,7 @@ static void __init setup_command_line(char *command_line) * gcc-3.4 accidentally inlines this function, so use noinline. */ -static void noinline rest_init(void) +static v...
cd5477911fc9f5cc64678e2b95cdd606c59a11b5
Analyze and fix the following issue in the Linux kernel code: kbuild: add "Section mismatch" warning whitelist for powerpc
Problem Details: This patch fixes the following class of "Section mismatch" warnings when building powerpc platforms. WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from prom_entry (offset 0x0) WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init....
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index ce7e0d17bae2..2909391a8035 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -650,9 +650,10 @@ static int strrcmp(const char *s, const char *sub) * tosec = .init.text * * Pattern 10: - * ia64 has machvec table for each p...
2560120997403581dd824e5bd2389c719edcbf12
Analyze and fix the following issue in the Linux kernel code: kbuild: make modpost section warnings clearer
Problem Details: Change modpost section mismatch warnings to be less confusing; model them on the binutils linker warnings which we all know how to interpret. Also, fix the wrong ordering of arguments for the final case - fromsec and refsymname were reversed. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> ...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 113dc77b9f60..2fcdbc7a1ee5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -885,29 +885,28 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, return; if (before && after) { - warn("%s - Section mis...
fc31c7716355a226b8ed4e16f4581e5c8fa53570
Analyze and fix the following issue in the Linux kernel code: kbuild: include limits.h in sumversion.c for PATH_MAX
Problem Details: POSIX says limits.h defines PATH_MAX so we should include it (which fixes compiling on some systems like OS X). Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 6873d5af80d5..d9cc6901d680 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -7,6 +7,7 @@ #include <ctype.h> #include <errno.h> #include <string.h> +#include <limits.h> #include "modpost.h" /* ```
d1ab423502e787e264b4797a5fa200d804c4fd63
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix the MODALIAS generation in modpost for of devices
Problem Details: Since the devices may have multiple (or none) compatible properties, the uevent generated internally by the kernel may have multiple "C..." entries. So the MODALIAS stored in the module must have wilcard before and after the compatible entry. Also, if the 'compatible' field is not used for matching, th...
```diff diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index ed1244dd58d0..f646381dc015 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -353,11 +353,16 @@ static int do_pcmcia_entry(const char *filename, static int do_of_entry (const char *filename, struct of_device_id *of, ...
e9ca75b53576ddf82ea2d803f87c59dffac7bc42
Analyze and fix the following issue in the Linux kernel code: cciss: Fix pci_driver.shutdown while device is still active
Problem Details: Fix an Oops in the cciss driver caused by system shutdown while a filesystem on a cciss device is still active. The cciss_remove_one function only properly removes the device if the device has been cleanly released by its users, which is not the case when the pci_driver.shutdown method is called. Thi...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 370dfe1c422e..5acc6c44aead 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -3469,13 +3469,39 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, return -1; } -static void cciss_remove_one(struct pci_dev *pdev) +stat...
1a06a52ee1b0cdb65222474ba6186f3991df68b0
Analyze and fix the following issue in the Linux kernel code: Fix roundup_pow_of_two(1)
Problem Details: 1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It does in case the argument is a variable but in case it's a constant it behaves wrong and returns 0. Probably nobody ever did it so this was never noticed. Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Linus...
```diff diff --git a/include/linux/log2.h b/include/linux/log2.h index 57e641e19a81..1b8a2c1cb0e3 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h @@ -159,7 +159,7 @@ unsigned long __roundup_pow_of_two(unsigned long n) #define roundup_pow_of_two(n) \ ( \ __builtin_constant_p(n) ? ( \ - (n == 1)...
9f57195b2db94488999c9cb8a1e0a6332644d5de
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix bogus messages about system calls not implemented.
Problem Details: There are seven legacy system calls that ia64 doesn't implement, but glibc provides equivalent functionality by using more modern system calls. Stop checksyscalls.sh from complaining about these seven. Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index d7781a2ddefe..441c9e001776 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -305,6 +305,19 @@ #define NR_syscalls 286 /* length of syscall table */ +/* + * The following defines stop scripts/checksyscalls.sh...
32f9306b161a5e0c892132f7227f36de94090289
Analyze and fix the following issue in the Linux kernel code: slub: another slabinfo fix
Problem Details: The slab manipulation functions should not be triggered by slabs that are unresovable in the subset of slabs selected on the command line. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundati...
```diff diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 434af27a32ac..d4f21ffd1404 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c @@ -262,11 +262,17 @@ void decode_numa_list(int *numa, char *t) void slab_validate(struct slabinfo *s) { + if (strcmp(s->name, "*...
03983ab858ae6aea273060277c9b290498340047
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sched_clock() et al.
Problem Details: SPARC64_NSEC_PER_CYC_SHIFT was set too high. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 6b9a06e42542..2d63d7689962 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -1030,7 +1030,7 @@ void __devinit setup_sparc64_timer(void) clockevents_register_device(sevt); } -#define SPARC64_NSEC_PER_CYC_SH...
b46522394dde7341a5253658096f354b65cbd90d
Analyze and fix the following issue in the Linux kernel code: Revert "[PATCH] x86: Drop cc-options call for all options supported in gcc 3.2+"
Problem Details: This reverts commit c8fdd247255a3a027cd9f66dcf93e6847d1d2f85. It turns out the kernel was correct, and the gcc complaint was a gcc bug. The preferred stack boundary is expressed not in bytes, but in the the log2() of the preferred boundary, so "-mpreferred-stack-boundary=2" is in fact exactly what we...
```diff diff --git a/Makefile b/Makefile index e6990e2cdafc..948fa09442f1 100644 --- a/Makefile +++ b/Makefile @@ -491,7 +491,7 @@ endif include $(srctree)/arch/$(ARCH)/Makefile ifdef CONFIG_FRAME_POINTER -CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls +CFLAGS += -fno-omit-frame-pointer $(call cc-o...
8fd7d1b16ea0e1b3b0823ed91b58993d6c6a1cc6
Analyze and fix the following issue in the Linux kernel code: sata_via: pcim_iomap_regions() conversion missed BAR5
Problem Details: pcim_iomap_regions() conversion missed BAR5. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index d105d2c189d2..ac4f43c4993f 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c @@ -441,7 +441,7 @@ static int vt6421_prepare_host(struct pci_dev *pdev, struct ata_host **r_host) return -ENOMEM; } - rc = pcim_iomap_regions(pde...
1daf9ce74e0e0ef8ffde800ab495339458c3375f
Analyze and fix the following issue in the Linux kernel code: sata_nv: fix fallout of devres conversion
Problem Details: As with all other drivers, sata_nv's hpriv is allocated with devm_kzalloc() and there's no need to free it explicitly. Kill nv_remove_one() which incorrectly used kfree() instead of devm_kfree() and use ata_pci_remove_one() directly. Original fix is from Peer Chen. Signed-off-by: Tejun Heo <htejun@g...
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 82a615db4d50..1a49c777fa6a 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -229,7 +229,6 @@ struct nv_host_priv { #define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & ( 1 << (19 + (12 * (PORT))))) static int nv_init_one (struct p...
e94bd23f67c87011f012f26ca0af3fcf6878eeac
Analyze and fix the following issue in the Linux kernel code: e1000: Fix msi enable leak on error, don't print error message, cleanup
Problem Details: pci_enable_msi failure is a normal event so we should not print any error. Going over the code I spotted a missing pci_disable_msi() leak when irq allocation fails. The whole code also needed a cleanup, so I combined the two different calls to pci_request_irq into a single call making this look a lot b...
```diff diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index a9ea67e75c1b..16a6edfeba41 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -333,11 +333,9 @@ struct e1000_adapter { struct e1000_tx_ring test_tx_ring; struct e1000_rx_ring test_rx_ring; - int msg_enable; -...
fb136c070bfdde11dc79758674f54fb26bba1a2f
Analyze and fix the following issue in the Linux kernel code: ixgb: don't print error if pci_enable_msi() fails, cleanup minor leak
Problem Details: pci_enable_msi calls can fail for normal operational reasons. Driver should not print an error message in that case. Fix a leak that leaves msi enabled if pci_request_irq fails. We can remove CONFIG_PCI_MSI ifdefs alltogether Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzi...
```diff diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index c8e90861f869..3569d5b03388 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h @@ -193,8 +193,6 @@ struct ixgb_adapter { u16 msg_enable; struct ixgb_hw_stats stats; uint32_t alloc_rx_buff_failed; -#ifdef CONFIG_PCI_MSI b...
4a79a04e4c0aa06b556b7d52bfb31c05fbb05616
Analyze and fix the following issue in the Linux kernel code: NetXen: Fix NetXen driver ping on system-p
Problem Details: NetXen: Fix for driver on System-p This patch will fix a ping issue on system-p Signed-off by: Milan Bag <mbag@netxen.com> Signed-off by: Adhiraj Joshi <adhiraj@netxen.com> Signed-by: Mithlesh Thukral <mithlesh@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index cf0e96adfe44..a36892457761 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c @@ -1216,7 +1216,7 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int ...
dbf2e8585971f2a8b1f60a188dc245fd2f8f81b3
Analyze and fix the following issue in the Linux kernel code: ibm_emac: fix link speed detection change
Problem Details: Fix link speed detection change. Thanks to Stefan Roese <sr@denx.de> for finding this bug. CC: Stefan Roese <sr@denx.de> Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 50035ebd4f52..f752e5fc65ba 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c @@ -926,7 +926,7 @@ static int emac_link_differs(struct ocp_enet_private *dev) int duplex = r &...
5bb96e9f2434b49a5b8f135f2a384974aa73db51
Analyze and fix the following issue in the Linux kernel code: ibm_emac: improved PHY support
Problem Details: Original patch is from Jeff Haran <jharan@brocade.com> with my minor style fixes. His comments follow: The first problem was in the function that configures the PHY for autonegotiation, genmii_setup_aneg(). The original code does a read/modify/write of the autonegotiation advertizement register (reg ...
```diff diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c index 9074f76ee2bf..e57862b34cae 100644 --- a/drivers/net/ibm_emac/ibm_emac_phy.c +++ b/drivers/net/ibm_emac/ibm_emac_phy.c @@ -22,6 +22,7 @@ #include <asm/ocp.h> +#include "ibm_emac_core.h" #include "ibm_emac_phy.h" ...
0ec6d95053885055a50d973b3a3906905a78a8bf
Analyze and fix the following issue in the Linux kernel code: ibm_emac: fix section mismatch warnings
Problem Details: Fix "Section mismatch" warnings Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c index 6c0f071e4052..cabd9846a5ee 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.c +++ b/drivers/net/ibm_emac/ibm_emac_mal.c @@ -59,8 +59,7 @@ int __init mal_register_commac(struct ibm_ocp_mal *mal, return 0; } -void __ex...
bb33808d282a48803dcb6070ee1547d221669114
Analyze and fix the following issue in the Linux kernel code: small netdevices.txt fix
Problem Details: Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index 847cedb238f6..ce1361f95243 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt @@ -49,7 +49,7 @@ dev->hard_start_xmit: for this and return -1 when the spin lock f...
a3caeada948535f126e407457e15f2633ee7168a
Analyze and fix the following issue in the Linux kernel code: sky2: MIB counter overflow handling
Problem Details: Make sure that if we ever get a MIB counter overflow interrupt (normally masked off), that the IRQ is cleared. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index bde28ad9797d..6e360f816605 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2345,6 +2345,12 @@ static void sky2_mac_intr(struct sky2_hw *hw, unsigned port) printk(KERN_INFO PFX "%s: mac interrupt status 0x%x\n", dev->name, statu...
d739437207064cdcea8f9c81442284106cbcb67f
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Correct rp_filter help text.
Problem Details: As mentioned in http://bugzilla.kernel.org/show_bug.cgi?id=5015 The helptext implies that this is on by default. This may be true on some distros (Fedora/RHEL have it enabled in /etc/sysctl.conf), but the kernel defaults to it off. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. M...
```diff diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 719c1040bd0a..010fbb2d45e9 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -43,11 +43,11 @@ config IP_ADVANCED_ROUTER asymmetric routing (packets from you to a host take a different path than packets from that host to you) or if you operate ...