id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
56937f7b78d3e495a9f557775f3c3ea1d50ca7b3
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: typo fix: sdkp_printk should be sd_printk
Problem Details: Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 30a4aa0c8734..12e18bb5456a 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -570,7 +570,7 @@ static int sd_release(struct inode *inode, struct file *filp) struct scsi_disk *sdkp = scsi_disk(disk); struct scsi_device *sdev = sdkp->device; - ...
e8f8248cbadcd8cb1b737fc57a01bccca4fb7aec
Analyze and fix the following issue in the Linux kernel code: [SCSI] tgt: fix scsi command leak
Problem Details: The failure to map user-space pages leads to scsi command leak. It can happens mostly because of user-space daemon bugs (or OOM). This patch makes tgt just notify a LLD of the failure with sense when blk_rq_map_user() fails. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by:...
```diff diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index dc8781a68d7c..c05dff95bd95 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c @@ -459,6 +459,16 @@ static struct request *tgt_cmd_hash_lookup(struct request_queue *q, u64 tag) return rq; } +static void scsi...
bc7e380a6a4c94f79a49c36bdb28062a750b3c2b
Analyze and fix the following issue in the Linux kernel code: [SCSI] tgt: fix sesnse buffer problems
Problem Details: This patch simplify the way to notify LLDs of the command completion and addresses the following sense buffer problems: - can't handle both data and sense. - forces user-space to use aligned sense buffer tgt copies sense_data from userspace to cmnd->sense_buffer (if necessary), maps user-space pages ...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index 4368ca0e8270..a7fbd10817a0 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c @@ -273,23 +273,9 @@ static int ibmvstgt_rdma(struct scsi_cmnd *sc, struct scatterlist *sg, int nsg, rest -= m...
e73aec8247032ee730b5f38edf48922c4f72522e
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: make printing use a common prefix
Problem Details: Make SCSI disk printing more consistent: - Define sd_printk(), sd_print_sense_hdr() and sd_print_result() - Move relevant header bits into sd.h - Remove all the legacy disk_name passing and use scsi_disk pointers where possible - Switch printk() lines to the new sd_ functions so that output ...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5a8f55fea5ff..b5562b851e78 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -58,16 +58,10 @@ #include <scsi/scsi_host.h> #include <scsi/scsi_ioctl.h> #include <scsi/scsicam.h> +#include <scsi/sd.h> #include "scsi_logging.h" -/* - * More t...
684b7fe976554d12e6266d7280c87a0f3feff02e
Analyze and fix the following issue in the Linux kernel code: [SCSI] constants.c: cleanup, verbose result printing
Problem Details: Clean up constants.c and make result printing more user friendly: - Refactor the command and sense functions so that the actual formatting can be called from the various helper functions with the correct prefix. - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with scsi_print_re...
```diff diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 61f6024b61ba..611487545af4 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c @@ -202,31 +202,29 @@ static const char * get_sa_name(const struct value_name_pair * arr, } /* attempt to guess cdb length if cdb_len==0 . No...
862794fa3fd4c8a44ee22582418736c93e0d3c3a
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: fix likely/unlikely usage
Problem Details: zfcp_fsf_protstatus_eval() takes always the 'wrong' branch. Likely Profiling Results --------------------------------------------------------- [+- ] Type | # True | # False | Function:Filename@Line +unlikely | 11042| 0 zfcp_fsf_protstatus_eval() Acked-by: Swen Schillig <swen@vnet.ibm.com>...
```diff diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index ef16f7ca4bb1..4c0a59afd5c8 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -299,9 +299,10 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) } /* log additional information provided by FSF...
bb9ba31ca3b88fd396e38950d1caedf2f83521c6
Analyze and fix the following issue in the Linux kernel code: [SCSI] gdth: fix oops in gdth_copy_cmd()
Problem Details: Recent alterations to the gdth_fill_raw_cmd() path no longer set the sg_ranz field for zero transfer commands. However, this field is used lower down in the function to initialise ha->cmd_len to the size of the firmware packet. If this uninitialised field contains a bogus value, ha->cmd_len can become...
```diff diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 8c81cec85298..60446b88f721 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -3091,6 +3091,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) cmdp->u.raw64.direction = gdth_direction_tab[sc...
ba76ef246090601b783c1e6190e22b8b149a105f
Analyze and fix the following issue in the Linux kernel code: [SCSI] mptsas: Fix oops for insmod during kexec
Problem Details: This fix's an oops during driver load time. mptsas_probe calls mpt_attach(over in mptbase.c). Inside that call, we read some manufacturing config pages to setup some defaults. While reading the config pages, the firmware doesn't complete the reply in time, and we have a timeout. The timeout results...
```diff diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 404c014db1bd..1d2d03f77894 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -815,7 +815,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) static int mpt...
a1fdcc0d2714b6622e3fd5c00db1635213d6c41a
Analyze and fix the following issue in the Linux kernel code: ACPI: Add support to parse 2nd MADT
Problem Details: When a BIOS bug presents multiple APIC/MADTs, Linux currently uses the 1st and ignores the 2nd. But some machines work better if we use the 2nd. http://bugzilla.kernel.org/show_bug.cgi?id=7465 Add a warning and boot parameter "acpi_apic_instance=2" to allow parsing the 2nd. No change to default beh...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 856c8b114e71..22c6b8ccaea5 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -138,6 +138,12 @@ and is between 256 and 4096 characters. It is defined in the file See also...
6244270ef62203e057191bf85489e2ff91cc0e60
Analyze and fix the following issue in the Linux kernel code: drm: fix alpha domain handling
Problem Details: Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 85d99e21e188..09705da8cdd7 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -764,7 +764,7 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev, } #ifdef __alpha__ -#define drm_get_pci_domain(dev) dev-...
74be8e3b3707956f8f232313de9fad896d5489ac
Analyze and fix the following issue in the Linux kernel code: via: fix CX700 pci id
Problem Details: Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h index ad54b845978b..728885542e01 100644 --- a/drivers/char/drm/drm_pciids.h +++ b/drivers/char/drm/drm_pciids.h @@ -230,10 +230,10 @@ {0x1106, 0x7205, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0x1106, 0x3108, PCI_ANY_ID, PCI_ANY_ID, 0, 0,...
80b2c386f3d8c3367533a8600b599f8686c9d386
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Fix u32 overflows when determining AGP base address in card space.
Problem Details: The overflows could lead to the AGP aperture overlapping the framebuffer are in the card's address space when the latter is located at the very end of th 32 bit address space, which would result in a freeze on X server startup, probably because the card read commands from the framebuffer instead ...
```diff diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 5ed965688293..c1850ecac302 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1560,8 +1560,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) if (dev_priv->flags & RADEON_...
11d9c2fd0ae74647ea2b52f9bdfa7a920b48d1f1
Analyze and fix the following issue in the Linux kernel code: drm: fix crash with fops lock and fixup sarea/page size locking
Problem Details: Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index 898f47dafec0..afe5f07f2e17 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -46,6 +46,7 @@ static int drm_setup(drm_device_t * dev) drm_local_map_t *map; int i; int ret; + u32 sareapage; if (dev->...
54ba2f76e281286cf4b2860ed8354602eab4c1ef
Analyze and fix the following issue in the Linux kernel code: drm: bring bufs code from git tree.
Problem Details: This checks the AGP mappings are in a valid place and also fixes the size check in the vm.. Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index a6828cc14e58..c11345856ffe 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c @@ -57,7 +57,8 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, list_for_each(list, &dev->maplist->head) { drm...
be521466feb3bb1cd89de82a2b1d080e9ebd3cb6
Analyze and fix the following issue in the Linux kernel code: Revert "USB: pxa2xx_udc: fix hardcoded irq number"
Problem Details: This reverts commit d2487cb4257dafb686f682285854fe7f02ca29d8. Russell King points out that it's obviously bogus, and I have to agree. Not only does "irq" not even exist in that scope, but we obviously need to free the irq that we actually requested, and that's IRQ_USB. Reported-by: Russell King <rmk@...
```diff diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 571f3ebb70ab..f01890dc8751 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -2616,7 +2616,7 @@ lubbock_fail0: if (retval != 0) { printk(KERN_ERR "%s: can't get irq %i, err %d\n", ...
c0a79b229ac0e3a96fc00d5be65a498ceb06ef63
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix atomicity of TIF update in flush_thread()
Problem Details: Fix atomicity of TIF update in flush_thread() for sparc64 Fixes correctly the race by using *_ti_thread_flag. Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child); ...
```diff diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 7d75cd4eb297..b291060c25a6 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -413,8 +413,13 @@ void flush_thread(void) struct thread_info *t = current_thread_info(); struct mm_struct *mm; - if ...
63abdcdc021063bf1cfcddfd3c1a14a761539807
Analyze and fix the following issue in the Linux kernel code: [BW2]: Fix section mismatch warnings.
Problem Details: Fix section mismatch warnings by moving data into __devinitdata section. Add __devinit to two initialization functions. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 9bb6257d6918..b0b2e40bbd9f 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c @@ -186,8 +186,7 @@ static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) * Initialisation */ -static void -bw2_init_fix(struct fb_i...
8fdab4763a04f503301b14810b39c536f2277120
Analyze and fix the following issue in the Linux kernel code: [CG14]: Fix section mismatch warnings.
Problem Details: Fix section mismatch warning by moving data into __devinitdata section. Add __devinit to an initialization function. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index ec6a51a5822d..b071bb632b97 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -354,7 +354,8 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) * Initialisation */ -static void cg14_init_fix(struct...
9e197219605513c14d3eae41039ecf1b82d1920d
Analyze and fix the following issue in the Linux kernel code: ACPI: ec: fix race in status register access
Problem Details: Delay the read of the EC status register until after the event that caused it occurs -- otherwise it is possible to read and act on stale status that was associated with the previous event. Do this with a perpetually incrementing "event_count" to detect when a new event occurs and it is safe to read s...
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index ab6888373795..a802962ff2b4 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -100,6 +100,7 @@ static struct acpi_ec { unsigned long global_lock; struct mutex lock; atomic_t query_pending; + atomic_t event_count; atomic_t leaving_burst; /* ...
ee17b289732e04fdcdd8ce2ce19b18d3e8b08e20
Analyze and fix the following issue in the Linux kernel code: USB Elan FTDI: check for workqueue creation
Problem Details: Avoid NULL pointer usage if workqueue creation failed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 0c1d66ddb812..bc3327e3dd78 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -2905,17 +2905,31 @@ static int __init ftdi_elan_init(void) { int result; printk(KERN_INFO "driver %s built...
834dbca5b6b79ddb7cf56001ea7b6d4481fdf1e7
Analyze and fix the following issue in the Linux kernel code: USB: fix spinlock recursion in cdc-acm.c
Problem Details: this fixes the spinlock recursion issue. The older fix was incomplete. Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d38a25f36ea5..31ae661e586a 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -332,9 +332,9 @@ static void acm_rx_tasklet(unsigned long _acm) if (!ACM_READY(acm)) return; - spin_lock(&acm->throttle_loc...
64543652609fc1a2a816dc38ce4f56eddda9f9a5
Analyze and fix the following issue in the Linux kernel code: USB: fix Unaligned access in EHCI driver
Problem Details: I get following warnings on spar64: Kernel unaligned access at TPC[1000c9e4] ehci_hub_control+0x54c/0x68c [ehci_hcd] Despite of the comment in the patched code, the type cast used there does make unaligned access. The fix was made as it's done in ohci-hub.c. Signed-off-by: Max Dmitrichenko <dmitrmax@...
```diff diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 9af529d22b3e..1813b7cac294 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -653,8 +653,7 @@ static int ehci_hub_control ( if (status & ~0xffff) /* only if wPortChange is interesting */ #endif dbg_por...
a1f721c81251259024323f7ebf37af8e247be5cb
Analyze and fix the following issue in the Linux kernel code: USB: further fix for usb-serial
Problem Details: this is a fix for the outstanding usb-serial issues. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 9dbd1fa84e88..8511352251f3 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -99,9 +99,12 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po continue; ...
c744f99eb662b54488304b8b60e5f4323b7587bf
Analyze and fix the following issue in the Linux kernel code: USB: fix usb-serial device naming bug
Problem Details: Am Montag, 26. Februar 2007 15:16 schrieb Craig Schlenter: > Hi Greg > > 34ef50e5b1f96c2d8c0f3d28b7d407743806256c is definitely > the source of the problem. Reverting that makes the > ftdi port show up as ttyUSB0 again for me and it > can actually be opened. This patch should fix the issue. Signed-o...
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 7f93abdac994..9dbd1fa84e88 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -827,7 +827,6 @@ int usb_serial_probe(struct usb_interface *interface, num_ports = type->num_ports; } - se...
d9a7ecacac5f8274d2afce09aadcf37bdb42b93a
Analyze and fix the following issue in the Linux kernel code: usb-serial: fix shutdown / device_unregister order
Problem Details: Ensure that the ->port_remove() callbacks get called before the ->shutdown() callback which makeing the order symmetric with ->attach() being called before ->port_probe(). Signed-off-by: Jim Radford <radford@blackbean.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 6bf22a28adb8..7f93abdac994 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -135,11 +135,6 @@ static void destroy_serial(struct kref *kref) dbg("%s - %s", __FUNCTION__, serial->type->des...
d2487cb4257dafb686f682285854fe7f02ca29d8
Analyze and fix the following issue in the Linux kernel code: USB: pxa2xx_udc: fix hardcoded irq number
Problem Details: This patch changes last use of hardcoded number of irq to use platfrom_get_irq. Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index f01890dc8751..571f3ebb70ab 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -2616,7 +2616,7 @@ lubbock_fail0: if (retval != 0) { printk(KERN_ERR "%s: can't get irq %i, err %d\n", ...
88018158d1253ab4868a2f9204cc390c711fd9b9
Analyze and fix the following issue in the Linux kernel code: UHCI: fix port resume problem
Problem Details: This patch (as863) fixes a problem encountered sometimes when resuming a port on a UHCI controller. The hardware may turn off the Resume-Detect bit before turning off the Suspend bit, leading usbcore to think that the port is still suspended and the resume has failed. The patch makes uhci_finish_suspe...
```diff diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index bacc25c53ba3..8e4427aebb14 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -33,6 +33,9 @@ static __u8 root_hub_hub_des[] = /* status change bits: nonzero writes will clear */ #define RWC_BITS (USBPORTSC...
97b9eb91dc131a10342da1f604e5bd8b1316abdb
Analyze and fix the following issue in the Linux kernel code: USB: set the correct interval for interrupt URBs
Problem Details: This patch (as862) fixes a couple of bugs in the way usbcore handles intervals for interrupt URBs. usb_interrupt_msg (and usb_bulk_msg for backward compatibility) don't set the interval correctly for high-speed devices. proc_do_submiturb() doesn't set it correctly when a bulk URB is submitted to an i...
```diff diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 274f14f1633e..36e7a843bf91 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -912,7 +912,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, struct async *as; struct usb_ctrlrequest *d...
dee497df6fcc90a3bdaaddc8e352feb0756a61e0
Analyze and fix the following issue in the Linux kernel code: USB: at91_udc, fix more modpost bogosity (rename driver struct)
Problem Details: Rename the driver struct used with at91_udc to prevent yet another bogus warning from "modpost". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index a4677802fb20..2a6e3163d944 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1835,7 +1835,7 @@ static int at91udc_resume(struct platform_device *pdev) #define at91udc_resume NULL #endif -static ...
98fb8fe10f4b88170f578d8c33eaa2315d73b4f7
Analyze and fix the following issue in the Linux kernel code: ACPI: video: Fix spelling and grammar mistakes
Problem Details: Correct some of the most obvious spelling and grammar mistakes in drivers/acpi/video.c (comments and printk output). Signed-off-by: Julius Volz <juliusrv@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 0771b434feb2..00d25b347255 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -102,9 +102,9 @@ struct acpi_video_bus_cap { struct acpi_video_device_attrib { u32 display_index:4; /* A zero-based instance of the Display */ - u32 disp...
d2b02ed9487ed25832d19534575052e43f8e0c4f
Analyze and fix the following issue in the Linux kernel code: [IPV6] fix ipv6_getsockopt_sticky copy_to_user leak
Problem Details: User supplied len < 0 can cause leak of kernel memory. Use unsigned compare instead. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index b82333b9228f..f5f9582a8d39 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -804,7 +804,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt, return 0; hdr = opt->hopopt; - len = mi...
128bf5cb54dececc5209db65f8ef5d17d74244d9
Analyze and fix the following issue in the Linux kernel code: pci: fix section mismatch warning
Problem Details: drivers/pci/search.c caused following section mismatch warning (if compiled with CONFIG_HOTPLUG=n): WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text: from .text.pci_find_bus after 'pci_find_bus' (at offset 0x24) This was due to pci_find_bus() calling a function marked __dev...
```diff diff --git a/drivers/pci/search.c b/drivers/pci/search.c index ff98eaddaa73..2dd8681d6b31 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -15,7 +15,7 @@ DECLARE_RWSEM(pci_bus_sem); -static struct pci_bus * __devinit +static struct pci_bus * pci_do_find_bus(struct pci_bus* bus, unsigned cha...
c1996c2778e90f80cb9fc6a52508068f10d39611
Analyze and fix the following issue in the Linux kernel code: PCI: aer: fix section mismatch warning
Problem Details: Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n): WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text:aer_probe from .data between 'aerdrv' (at offset 0x1608) and 'aer_error_handlers' Warning was fixed by renaming aerdrv to aerdriver so we pass the w...
```diff diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index b164de050d4f..db6ad8e763ac 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c @@ -66,7 +66,7 @@ static struct pci_error_handlers aer_error_handlers = { .resume = aer_error_resume, }; -static struct ...
3603a6a37c5f5c6a2b109fdb48c9456f08aebdd8
Analyze and fix the following issue in the Linux kernel code: pcie: fix section mismatch warning
Problem Details: Fix following section mismatch warning (when compiled with CONFIG_HOTPLUG=n): WARNING: drivers/pci/built-in.o - Section mismatch: reference to .init.text:pcie_portdrv_probe from .data between 'pcie_portdrv' (at offset 0xe40) and 'pcie_portdrv_err_handler' This warning was fixed by renaming pcie_portdr...
```diff diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index f17e7ed2b2a5..0be5a0b30725 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -276,7 +276,7 @@ static struct pci_error_handlers pcie_portdrv_err_handler = { .resume = pcie_portdrv_err_resume, ...
f7f3461d87536bed52bb83bc8fbe6bfd28619fb1
Analyze and fix the following issue in the Linux kernel code: Driver core: add device symlink back to sysfs
Problem Details: This moves the device symlink back to sysfs even if CONFIG_SYSFS_DEPRECATED is enabled as too many userspace programs (well, HAL), still rely on this link to be present. I will rework the ability for sysfs to change layouts like this in the future, but for now, this patch should fix people's network c...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 89ebe3682726..fb16f293561d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -584,17 +584,17 @@ int device_add(struct device *dev) if (dev->kobj.parent != &dev->class->subsys.kset.kobj) sysfs_create_link(&dev->class->subsys.kset.kob...
161e232b8823e230d4fdf8064e606bbdf26f47e2
Analyze and fix the following issue in the Linux kernel code: Revert "driver core: refcounting fix"
Problem Details: This reverts commit 63ce18cfe685115ff8d341bae4c9204a79043cf0. It was the incorrect fix and causes a reference counting bug whenever any driver module is removed from the system. Mike Galbraith <efault@gmx.de> is looking for the real fix for his problem. Signed-off-by: Greg Kroah-Hartman <gregkh@suse....
```diff diff --git a/kernel/module.c b/kernel/module.c index f77e893e4620..fbc51de6444e 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2419,12 +2419,6 @@ void module_remove_driver(struct device_driver *drv) kfree(driver_name); } } - /* - * Undo the additional reference we added in module_add_driver() ...
94b2a4393c500a620de90c3266d595926302e26b
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix spu SLB invalidations
Problem Details: The SPU code doesn't properly invalidate SPUs SLBs when necessary, for example when changing a segment size from the hugetlbfs code. In addition, it saves and restores the SLB content on context switches which makes it harder to properly handle those invalidations. This patch removes the saving & rest...
```diff diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index c0d2a694fa30..3c7fe2c65b5a 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -685,6 +685,9 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) "non-cachea...
aa0ed2bdb663608d5e409faecff3e1e81a3d413a
Analyze and fix the following issue in the Linux kernel code: [POWERPC] spufs: fix possible memory corruption is spufs_mem_write
Problem Details: Due to a buggy unsigned comparison, it was possible to write beyond the end of the local store file in spufs under some circumstances. This rewrites the buggy function to look more like simple_copy_from_buffer. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Cc: Ulrich Weigand <Ulrich.Weigand...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index b00653d69c01..505266a568d4 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -63,8 +63,8 @@ static ssize_t spufs_mem_read(struct file *file, char __user *...
dfee0a725bb027b749ffdd318eb48b91d564b266
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix for ipv6_setsockopt NULL dereference
Problem Details: I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155 Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 4e0561a082d0..b82333b9228f 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -413,7 +413,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, } /* routing header option needs extra check *...
aabb601b0f08b909b650f1a7bfa1e8d9b5a8d999
Analyze and fix the following issue in the Linux kernel code: [DCCP]: Initialise write_xmit_timer also on passive sockets
Problem Details: The TX CCID needs the write_xmit_timer for delaying packet sends. Previously this timer was only activated on active (connecting) sockets. This patch initialises the write_xmit_timer in sync with the other timers, i.e. the timer will be ready on any socket. This is used by applications with a listenin...
```diff diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index e33a9edb4036..a0e7cd183a5d 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -191,6 +191,7 @@ extern void dccp_send_sync(struct sock *sk, const u64 seq, const enum dccp_pkt_type pkt_type); extern void dccp_write_xmit(struct sock *sk, int block);...
c4e38f41e34ad853651d66227aae23e48457dce0
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Fix rtm_to_ifaddr() error handling.
Problem Details: Return negative error value (embedded in the pointer) instead of returning NULL. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index e10794dc5f64..98a00d0edc76 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -502,8 +502,10 @@ static struct in_ifaddr *rtm_to_ifaddr(struct nlmsghdr *nlh) goto errout; ifm = nlmsg_data(nlh); - if (ifm->ifa_prefixlen > 32 || tb[IFA_LOCA...
473d28c730e2de888c24b226cfe4183868eacde2
Analyze and fix the following issue in the Linux kernel code: firewire: Implement topology map and fix a couple of loopback bugs.
Problem Details: Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index b1deb5214bd4..d929eb6fef6a 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c @@ -30,7 +30,7 @@ * polynomial, but we need the ITU-T (or CCITT) polynomial (0x1021). * The implementation below works on an array of...
8fbdbb3683770f765afb4f8140a8d7898feeb94c
Analyze and fix the following issue in the Linux kernel code: firewire: Fix order of arguments for iso context creation.
Problem Details: Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index 2946464fec62..5437ad245a37 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c @@ -558,9 +558,9 @@ static int ioctl_create_iso_context(struct client *client, void __user *arg) r...
f319b6a02f12c3712eb64eee6a23584367cb3588
Analyze and fix the following issue in the Linux kernel code: firewire: Move async transmit to use the general context code.
Problem Details: The old async transmit context handling was starting and stopping DMA for every packet transmission. This could cause silently failing packet transmission, if the DMA was reprogrammed too close to being stopped. The general context code keeps DMA running at all times and fixes this problem. It's als...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 37467923e98b..9e8a8f909303 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -112,25 +112,6 @@ struct context { struct tasklet_struct tasklet; }; -struct at_context { - struct fw_ohci *ohci; - dma_addr_t de...
cbb59da719e413fcd499d86f49af2327893a9fdb
Analyze and fix the following issue in the Linux kernel code: firewire: Fix another typo from the bitfield conversion.
Problem Details: Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 4512edba6cb0..4d54ebf0b192 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -1352,10 +1352,10 @@ ohci_queue_iso(struct fw_iso_context *base, else irq = descriptor_no_irq; - last->control = cpu_to_le16(de...
9fc82689bf2920e9b3a8cc1766bcb6ad6454a7c4
Analyze and fix the following issue in the Linux kernel code: firewire: Fix bit shift typo.
Problem Details: Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 8387c8ea6735..4a48e2d7694e 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -48,7 +48,7 @@ #define header_get_tcode(q) (((q) >> 4) & 0x0f) #define header_get_tlabel(q) (((q) >>...
748086eb53cc5f467604c9b46ab48dc3cb771c89
Analyze and fix the following issue in the Linux kernel code: firewire: fix compilation with gcc 3.4
Problem Details: drivers/firewire/fw-topology.c: In function `report_found_node': drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index d3131e7d52fa..fc8f1e7d3b07 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c @@ -342,8 +342,9 @@ report_found_node(struct fw_card *card, int b_path = (node->phy_speed == SCODE_BETA); if (paren...
6cad95fe97dc062d0367da125ac0b2e5f1694b23
Analyze and fix the following issue in the Linux kernel code: firewire: fix failure path in ohci_enable_phys_dma
Problem Details: "goto out" happens with the lock taken. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index ea52e150a8e6..1b4b53d6d925 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -850,10 +850,8 @@ ohci_enable_phys_dma(struct fw_card *card, int node_id, int generation) 1 << (node_id - 32)); } flush_writ...
fe69ca3ac226980dd2cc367a7613cd776cdb8c88
Analyze and fix the following issue in the Linux kernel code: firewire: build fix 3
Problem Details: drivers/firewire/fw-sbp2.c: At top level: drivers/firewire/fw-sbp2.c:1060: error: storage size of '__mod_ieee1394_device_table' isn't known (error pointed out by akpm) Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 1ac72536af7d..ce9c41ff0765 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -20,6 +20,7 @@ #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/device.h> ...
0b5b2903449a027d4fd04c58cee88e276f1608ce
Analyze and fix the following issue in the Linux kernel code: firewire: build fix 2
Problem Details: ia64: drivers/firewire/fw-sbp2.c: In function `sbp2_command_orb_map_scatterlist': drivers/firewire/fw-sbp2.c:826: warning: implicit declaration of function `sg_dma_len' drivers/firewire/fw-sbp2.c:828: warning: implicit declaration of function `sg_dma_address' drivers/firewire/fw-sbp2.c:837: error: inv...
```diff diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 2756e0c2f9cd..1ac72536af7d 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -21,6 +21,7 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/device.h> +#include <linux/scatterlist.h> #incl...
cf3e72fd85092bf7246c8266aff293c50e99b990
Analyze and fix the following issue in the Linux kernel code: firewire: build fix
Problem Details: alpha: drivers/firewire/fw-ohci.c: In function 'ar_context_tasklet': drivers/firewire/fw-ohci.c:266: warning: implicit declaration of function 'dma_sync_single_for_device' drivers/firewire/fw-ohci.c:267: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/firewire/fw-ohci.c:267: err...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index b046b0711e13..5d42d18bd455 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -25,6 +25,8 @@ #include <linux/pci.h> #include <linux/delay.h> #include <linux/poll.h> +#include <linux/dma-mapping.h> + #include ...
fcf7770a0bf8e36318f5e73aa5b88bda97b7f920
Analyze and fix the following issue in the Linux kernel code: firewire: printk warning fix
Problem Details: drivers/firewire/fw-ohci.c: In function 'ar_context_init': drivers/firewire/fw-ohci.c:288: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'dma_addr_t' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richt...
```diff diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 5392a2b13540..b046b0711e13 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -285,8 +285,8 @@ ar_context_init(struct ar_context *ctx, struct fw_ohci *ohci, u32 control_set) return -ENOMEM; if (ctx->descri...
bb9b813bb665cdbe7019a4f1e93f7138e7bf59d0
Analyze and fix the following issue in the Linux kernel code: [MIPS] Sibyte: Fix ZBbus profiler
Problem Details: o Fix build error. o Handle error returns. o Deal with signals received while sleeping. o Don't allow to be selected when we're not building the directory with the driver anyway. o Coding style cleanups. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig index 10cc40304347..bdf24a7b5494 100644 --- a/arch/mips/sibyte/Kconfig +++ b/arch/mips/sibyte/Kconfig @@ -8,12 +8,14 @@ config SIBYTE_SB1250 config SIBYTE_BCM1120 bool select SIBYTE_BCM112X + select SIBYTE_HAS_ZBUS_PROFILING select SIBYTE_S...
82c00b62c811142c8e7d3aef92fbf3fc77b83709
Analyze and fix the following issue in the Linux kernel code: ibmtr: Drain rich supply of modpost warnings.
Problem Details: Building ibmtr as a module produces a spectacular pile of modpost warnings: WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.text:ibmtr_probe1 from .text between 'ibmtr_probe_card' (at offset 0x450) and 'ibmtr_reset_timer' WARNING: drivers/net/tokenring/ibmtr.o - Section m...
```diff diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 0d97e10ccac5..36202e94ee91 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c @@ -186,7 +186,6 @@ static char __devinit *adapter_def(char type) #define TRC_INITV 0x02 /* verbose init trace points ...
95c408a95f9b16c638566df57c070b408edf1a01
Analyze and fix the following issue in the Linux kernel code: 3c59x: Fix several modpost warnings
Problem Details: WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4580) and 'vortex_eisa_remove' WARNING: drivers/net/3c59x.o - Section mismatch: reference to .init.text: from .text between 'vortex_eisa_probe' (at offset 0x4584) and 'vortex_ei...
```diff diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 72995777f809..b406ecfa7268 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -858,19 +858,7 @@ static struct eisa_device_id vortex_eisa_ids[] = { }; MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids); -static int vortex_eisa_probe(struct devic...
fe79745507593941adb44a6b2e392645c54ca1c2
Analyze and fix the following issue in the Linux kernel code: z85230: Fix FIFO handling
Problem Details: We must exit immediately on a FIFO fill not take the end of packet path otherwise each underrun in PIO transmit mode causes a runt packet and the data is lost. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 8dbcf83bb5f3..8b4540bfc1b0 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c @@ -407,7 +407,7 @@ static void z8530_tx(struct z8530_channel *c) while(c->txcount) { /* FIFO full ? */ if(!(read_zsreg(c, R0)&4)) - br...
2efa53f373ed811d4860904f5205b8a3b376e253
Analyze and fix the following issue in the Linux kernel code: r8169: fix a race between PCI probe and dev_open
Problem Details: Initialize the timer with the rest of the private-struct. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 6693a305bcce..521b5f0618a4 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1368,11 +1368,7 @@ static inline void rtl8169_request_timer(struct net_device *dev) (tp->phy_version >= RTL_GIGA_PHY_VER_H)) return; - init_timer(time...
355c7265f4745a2aa6f0482d466e2271e6b3c61a
Analyze and fix the following issue in the Linux kernel code: myri10ge: fix error checking and return value in myri10ge_allocate_rings
Problem Details: Fix a missing error check in myri10ge_allocate_rings() and set status to -ENOMEM before all actual allocations so that the error path returns what it should. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index b05dc6ed7fb7..db282ed9ab7d 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -1456,6 +1456,8 @@ static int myri10ge_allocate_rings(struct net_device *dev) status = myri10ge_send_cmd(mgp, MX...
b8d095d782fa1e97d5dc05c08ba32c8eb28b85e4
Analyze and fix the following issue in the Linux kernel code: netxen: fix warnings
Problem Details: CC [M] drivers/net/netxen/netxen_nic_hw.o drivers/net/netxen/netxen_nic_hw.c: In function 'netxen_nic_hw_resources': drivers/net/netxen/netxen_nic_hw.c:231: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'dma_addr_t' drivers/net/netxen/netxen_nic_hw.c:250: warnin...
```diff diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index a2877f33fa85..1be55702557d 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c @@ -228,7 +228,7 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) &adapter->ctx_des...
1aa506e437a94d520f852d39d5d6a6e7f2e01901
Analyze and fix the following issue in the Linux kernel code: libata: fix ata_host_release() free order
Problem Details: host->ops->host_stop() might access ports. Free ports after host_stop. Signed-off-by: Tejun Heo <htejun@gmail.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 f6408ca82062..3c1f8830ac8b 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5685,18 +5685,22 @@ static void ata_host_release(struct device *gendev, void *res) for (i = 0; i < host->n_ports; i++) { struct ata_...
14d66ab7e2e06d3727719d3e4eec6bf9f70251c3
Analyze and fix the following issue in the Linux kernel code: Fix simplex adapters with libata
Problem Details: Recently I got my hands on nVidia's MCP61 PM-AM board, and it contains IDE chip configured by BIOS with only primary channel enabled. This confuses code which probes for device DMA capabilities - it gets 0x60 (happy duplex device) from primary channel BMDMA, but 0xFF (nobody here) from secondary chann...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index dc362fa01ca4..f6408ca82062 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3455,7 +3455,8 @@ static void ata_dev_xfermask(struct ata_device *dev) "device is on DMA blacklist, disabling DMA\n"); } -...
e3da8067b3ef16943c02b64baa84dacca1e423be
Analyze and fix the following issue in the Linux kernel code: [MTD] [OneNAND] Fix typo & wrong comments
Problem Details: Fix typo & wrong comments Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 8006d51b7d27..dd8a4430f4e2 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -947,9 +947,9 @@ static int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, /** ...
91014e9bfaaac32ab46ab46251d774468891bafe
Analyze and fix the following issue in the Linux kernel code: [MTD] [OneNAND] Use oob buffer instead of main one in oob functions
Problem Details: In oob functions, it is used main buffer instead of oob one. So fix it. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 621c3f8ec27b..8006d51b7d27 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -1093,7 +1093,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, static int onenand_ver...
d0035aef390194df1433f436038416d2c5b0fc0e
Analyze and fix the following issue in the Linux kernel code: [PATCH] build fix for i386 earlyquirk.c
Problem Details: missing close bracket. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index 7fdba8a44c17..a7d22d9f3d7e 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c @@ -26,7 +26,7 @@ static int __init check_bridge(int vendor, int device) /* According to Nvidia all tim...
362ea087db9d99bb0cf79479544dfafa9e18c300
Analyze and fix the following issue in the Linux kernel code: ACPI: fix parallel port IRQ after resume from S3
Problem Details: The PNPACPI resource flags were broken. This would apply to re-enabling a device any-time after boot, not just after resume from S3. http://bugzilla.kernel.org/show_bug.cgi?id=6316 Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 7a535542fe92..118ac9779b3c 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -89,6 +89,7 @@ pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi, return; res->irq_re...
2ef550790ac0d7bb0da1c6432f69f86f55ac1695
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix PARPORT build (again).
Problem Details: Need to provide {claim,release}_dma_lock() for this guy too. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index be9509c8f8c1..284dfd01a33d 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h @@ -19,6 +19,17 @@ */ #define HAS_DMA +static DEFINE_SPINLOCK(dma_spin_lock); + +#define claim_dma_lock() \ +({ unsigned...
0ac1faca4a63fc2f7e608be76127561b88fbcdd9
Analyze and fix the following issue in the Linux kernel code: [IA64] Cleanup in crash.c
Problem Details: Grammatical fixes (s/freezed/frozen/) Make some variables static Change a C++ "//" comment to "/* ... */" Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index 5cdd2f5fa064..7d1bbb4403ba 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c @@ -21,9 +21,9 @@ #include <asm/mca.h> int kdump_status[NR_CPUS]; -atomic_t kdump_cpu_freezed; +static atomic_t kdump_cpu_frozen; atomic_t k...
860abe8f7254208074cef83dc9ebc4d70ae277a9
Analyze and fix the following issue in the Linux kernel code: [IA64] whitespace fixes for include/asm-ia64/sal.h
Problem Details: * Make use of spaces and tabs consistent * Make long line < 80col Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index d000689d9142..46cadf5aaac5 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h @@ -847,12 +847,13 @@ extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64, */ struct sal_to_os_boot { u64 rr[8]; /* Regio...
f70c81d4ddb0d300abc252cb594198d3c797a5e1
Analyze and fix the following issue in the Linux kernel code: [PATCH] 2.6 Altix: console fix for CONFIG_DEBUG_SHIRQ usage
Problem Details: The sn console driver was snagged by the use of CONFIG_DEBUG_SHIRQ! The request_irq() immediate call to the interrupt handler caused another attempt to lock the port lock - deadlock. This is a patch to fix that. Signed-off-by: Patrick Gefre <pfg@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foun...
```diff diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 253ceb895ca7..a27e9e92cb5e 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c @@ -635,25 +635,6 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -/** - * sn_sal_connect_in...
44f5c4ced6ddee2f5f2e45fa45b93370245d85bd
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: arch_prctl should set thread fs
Problem Details: In my previous x86_64 thread fix, I forgot to initialize thread.arch.fs in arch_prctl. A process calling arch_prctl to set %fs would lose it on the next context switch. It also turns out that you can switch to a process which is in the process of exiting and which has lost its mm. In this case, it's...
```diff diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 01b91f9fa789..b3f6350cac44 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c @@ -103,6 +103,9 @@ long arch_prctl_skas(struct task_struct *task, int code, switch(code){ case ARCH_SET_FS: + ...
9bebff6ca5871e07b665cdaf71028ea21eb0bf0e
Analyze and fix the following issue in the Linux kernel code: [PATCH] check_partition(): fix error check
Problem Details: Fix inverted check introduced in 57881dd9df40b76dc7fc6a0d13fd75f337accb32 "Fix check_partition routines". Signed-off-by: Suzuki K P <suzuki@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 22d38ffc9ef0..e46d237b10f9 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -180,7 +180,7 @@ check_partition(struct gendisk *hd, struct block_device *bdev) } if (res > 0) return state; - if (!err) + if (err) /* The partit...
b40df5743ee8aed8674edbbb77b8fd3c8c7a747f
Analyze and fix the following issue in the Linux kernel code: [PATCH] bluetooth: fix socket locking in hci_sock_dev_event()
Problem Details: [Bluetooth] Fix socket locking in hci_sock_dev_event() hci_sock_dev_event() uses bh_lock_sock() to lock the socket lock. This is not deadlock-safe against locking of the same socket lock in l2cap_connect_cfm() from softirq context. In addition to that, hci_sock_dev_event() doesn't seem to be called fr...
```diff diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index f928d2b2a17d..71f5cfbbebb8 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -656,7 +656,7 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event, /* Detach sockets from device */ read_l...
47c51dff4af25341c575e5089dbb92d61ac69cdf
Analyze and fix the following issue in the Linux kernel code: [PATCH] x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted
Problem Details: Also PTRACE_OLDSETOPTIONS should be accepted, as done by kernel/ptrace.c and forced by binary compatibility. UML/32bit breaks because of this - since it is wise enough to use PTRACE_OLDSETOPTIONS to be binary compatible with 2.4 host kernels. Until 2.6.17 (commit f0f2d6536e3515b5b1b7ae97dc8f176860c8c...
```diff diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c index 04566fe5de49..4de3a54318f4 100644 --- a/arch/x86_64/ia32/ptrace32.c +++ b/arch/x86_64/ia32/ptrace32.c @@ -243,6 +243,7 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) case PTRACE_SINGLESTEP: case PTRACE_D...
de7b37cd01f145dd3a3ca333fd631e58ec0bdbab
Analyze and fix the following issue in the Linux kernel code: [PATCH] um: fix errno usage
Problem Details: Avoid reusing userspace errno twice - it can be cleared by libc code everywhere (in particular printk() does clear it in my setup). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Sig...
```diff diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c index 310af0f1e49e..021b82c7a759 100644 --- a/arch/um/drivers/daemon_user.c +++ b/arch/um/drivers/daemon_user.c @@ -56,30 +56,31 @@ static int connect_to_switch(struct daemon_data *pri) pri->control = socket(AF_UNIX, SOCK_STREAM, 0);...
ec0ac8ad33189f81324948ee5dc72d3e1dc64682
Analyze and fix the following issue in the Linux kernel code: [PATCH] um: fix confusion irq early reenabling
Problem Details: Fix confusion about call context - comments and code are inconsistent and plain wrong, my fault. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvald...
```diff diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 01d4ab6b0ef1..f75d7b05c481 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -370,10 +370,10 @@ static irqreturn_t line_write_interrupt(int irq, void *data) struct tty_struct *tty = line->tty; int err; - /* Interrupts are...
b53378856f4ea43182d13658f7c2138971366148
Analyze and fix the following issue in the Linux kernel code: [PATCH] um: mark both consoles as CON_ANYTIME
Problem Details: Since both UML consoles do not use percpu variables, they may be called when the cpu is still offline, and they may be marked CON_ANYTIME (this is documented in kernel/printk.c, grep for CON_ANYTIME to find mentions of this). Works well in testing done with lock debug enabled, should be safe but is no...
```diff diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index fc22b9bd9153..4b382a6e710f 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c @@ -179,7 +179,7 @@ static struct console ssl_cons = { .write = ssl_console_write, .device = ssl_console_device, .setup = ssl_console_setup, - .flag...
83f4e8afc9a22eabb1c4cb771ffcb3af81734082
Analyze and fix the following issue in the Linux kernel code: [PATCH] um: fix a memory leak in the multicast driver
Problem Details: Memory allocated by mcast_user_init must be freed in the matching mcast_remove. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundatio...
```diff diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c index 8138f5ea1bf7..b827e82884c9 100644 --- a/arch/um/drivers/mcast_user.c +++ b/arch/um/drivers/mcast_user.c @@ -50,6 +50,14 @@ static void mcast_user_init(void *data, void *dev) pri->dev = dev; } +static void mcast_remove(void *data...
a6eb0be6d5cc1851deb6619e6f8b1bbd0a0dbab4
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: hostfs: make hostfs= option work as a jail, as intended.
Problem Details: When a given host directory is specified to be mounted both in hostfs=path1 and with mount option -o path2, we should give access to path1/path2, but this does not happen. Fix that in the simpler way. Also, root_ino can be the empty string, since we use %s/%s as format. Signed-off-by: Paolo 'Blaisor...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 6f10e43746f9..9baf69773ed1 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -47,7 +47,7 @@ struct dentry_operations hostfs_dentry_ops = { }; /* Changed in hostfs_args before the kernel starts running */ -static char *r...
bca271136f06514253aa28c24c04fc23b88e971e
Analyze and fix the following issue in the Linux kernel code: [PATCH] uml: hostfs: fix double free
Problem Details: Fix double free in the error path - when name is assigned into root_inode we do not own it any more and we must not kfree() it - see patch for details. Thanks to William Stearns for the initial report. CC: William Stearns <wstearns@pobox.com> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblad...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index e965eb11d76f..6f10e43746f9 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -966,6 +966,9 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) goto out_put; HOSTFS_I(root_inode)->host_fil...
abc23585b9b625ad58db54ae0d180543db014eb8
Analyze and fix the following issue in the Linux kernel code: [ARM] 4251/1: Fix sharpsl_pm dependency
Problem Details: The sharpsl_pm code depends on some symbols in the APM emulation code. Add the dependency for now until a better solution can be found. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 5e34ca6d38b6..3e073467caca 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig @@ -28,6 +28,7 @@ config SHARP_PARAM config SHARPSL_PM bool + select APM_EMULATION config SHARP_SCOOP bool ```
2a391a184551d5ffdee73c740a06f6a0a16f7ed5
Analyze and fix the following issue in the Linux kernel code: [ARM] 4250/1: Fix locomo backlight conversion error/compile failure
Problem Details: Fix locomo backlight conversion error and subsequent compile failure from commit 599a52d12629394236d785615808845823875868. Signed-off-by: RIchard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index d1312477813e..6b488b8a7eee 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c @@ -199,8 +199,8 @@ static int locomolcd_remove(struct locomo_dev *dev) { unsigned long flags; -...
774830377b79ae4c2e85dea78443b5ae01a97e69
Analyze and fix the following issue in the Linux kernel code: [ARM] 4249/1: Fix tosa compile failure
Problem Details: Fix tosa compile failure from commit 32f3f49910c7e228839c1cd144dbed8da342703b Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 7915a5a22865..72738771fb57 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -28,6 +28,7 @@ #include <asm/hardware.h> #include <asm/irq.h> #include <asm/system.h> +#include <asm/arch/pxa-regs.h> #include <asm/arch/i...
25613cae00cb66d4cb080c72d53bca0a599e0112
Analyze and fix the following issue in the Linux kernel code: [ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble
Problem Details: commit f80dff9da07d81da16e3b842118d47b9febf9c01 missed the needed definitions within the #elif blocks in include/asm-arm/arch-lh7a40x/entry-macro.S Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S index 502700604e00..ffe397250f0c 100644 --- a/include/asm-arm/arch-lh7a40x/entry-macro.S +++ b/include/asm-arm/arch-lh7a40x/entry-macro.S @@ -86,6 +86,12 @@ branch_irq_lh7a400: b 1000f .macro disable_fiq ....
ce2b5ec3535fd4cf47d9fceeb4bb118479941eaa
Analyze and fix the following issue in the Linux kernel code: [ARM] 4247/1: Fix long name for cc9p9360dev
Problem Details: The Product Manager of the cc9p insist on using the correct product names. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c index a193dd931512..760c9d0db7c3 100644 --- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c +++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c @@ -32,7 +32,7 @@ static void __init mach_cc9p9360dev_init_machine(void) board_a9m9...
99109a6dacfc314a51371d9c3212a55cd7c0c98c
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] dilnetpc: Fix printk warning
Problem Details: The type of a resource could be 32 or 64bit depending upon platform or option so cast it explicitly. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index b1104fe1f207..1c3b34ad7325 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c @@ -402,8 +402,8 @@ static int __init init_dnpc(void) ++higlvl_partition_info[i].name; } - printk(KERN_NOTICE "DIL/Net %s fla...
83d480917b1af3f8fcffa7a9c8775e0f2dd03395
Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] Fix oops in cfi_amdstd_sync
Problem Details: The files cfi_cmdset_0002.c and cfi_cmdset_0020.c do not initialize their wait queues like is done in cfi_cmdset_0001.c. This causes an oops when the wait queue is accessed. I have copied the code from cfi_cmdset_0001.c that is pertinent to initialization of the wait queue. Signed-off-by: Vijay Samp...
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index e3acd398fb37..1f6445840461 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -359,6 +359,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) cfi->chips...
180bfb31fef77815d56b875d4f28d353fdc87bf8
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix writebuffer recovery in the first page of a block
Problem Details: For the case when nand_write_page fail with -EIO for the first page in an eraseblock, jffs2_wbuf_recover ends up producing a BUG in jffs2_block_refile as jeb->first_node is not yet set up (it's set up later in jffs2_wbuf_recover). This BUG is not really a bug; it's just jffs2_wbuf_recover calling jffs2...
```diff diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index de718e3a1692..23028b384418 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -238,7 +238,10 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; spin_lock(&c->erase_completion_lock); - jffs2_bloc...
2f894ef9c8b36a35d80709bedca276d2fc691941
Analyze and fix the following issue in the Linux kernel code: ACPI: fix boot hang w/o "noapic" on MSI MS-6390-L
Problem Details: This is a workaround to handle a BIOS bug where the programmer exchanged the name and index fields of a _PRT entry. Apparently this BIOS error does not confuse Windows and thus it lurks in the field on various machines. boot with "acpi=strict" to disable this workaround http://bugzilla.kernel.org/sh...
```diff diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c index 1358c06a969c..cc48ab05676c 100644 --- a/drivers/acpi/resources/rscreate.c +++ b/drivers/acpi/resources/rscreate.c @@ -191,6 +191,9 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, user_prt = ...
74586fca38109d2fc75daf678635928f64b4ccec
Analyze and fix the following issue in the Linux kernel code: ACPI: fix Thinkpad 600/600E/600X interrupts
Problem Details: The root cause of this bug shows that this machine could not possibly run an ACPI-aware OS without a model specific workaround. http://bugzilla.kernel.org/show_bug.cgi?id=5966 Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index e5eb97a910ed..9ea5b8ecc7e1 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -1072,7 +1072,28 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { "ASUS A7V ACPI BIOS Revision 1007")...
49fdf3f078f8f5d84ecd10d62624c9158e755ec7
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Select u-image as default image for Linkstation
Problem Details: Fixes image build error: ln: accessing `arch/powerpc/boot/zImage': No such file or directory make[1]: *** [arch/powerpc/boot/zImage] Error 1 make: *** [zImage] Error 2 Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Acked-by: G. Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Kumar...
```diff diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 886c522d78e9..3410bcbc9dbe 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig @@ -79,6 +79,7 @@ config LINKSTATION select MPIC select FSL_SOC sel...
aea12b75480c0842028bd1bfe0146d9148db2298
Analyze and fix the following issue in the Linux kernel code: [POWERPC] 83xx: Minor fixes for 834x_mds USB setup code
Problem Details: Fix broken node manipulating code, and clarify inaccurate comment. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index e5d819166874..8aa9a93e2aa2 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -55,9 +55,9 @@ static int mpc834x_usb_cfg(void) struct device_node *np =...
eb6de2863750e696201780283e4c9ada19b4728e
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Allow duplicate lmb_reserve() calls
Problem Details: At present calling lmb_reserve() (and hence lmb_add_region()) twice for exactly the same memory region will cause strange behaviour. This makes life difficult when booting from a flat device tree with memory reserve map. Which regions are automatically reserved by the kernel has changed over time, so...
```diff diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 8d52b23348bd..15ece3abfb37 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -954,9 +954,6 @@ static void __init early_reserve_mem(void) size = *(reserve_map++); if (size == 0) break; - /* skip if the...
bb72c481e970dc1b4034ddccbe8302ff39e0d948
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Harden validate_sp against stack corruption
Problem Details: If something has overflowed or corrupted the stack and causes an oops, and we try to print a stack trace, that will call validate_sp, which can itself cause an oops if the cpu field of the thread_info struct at the bottom of the stack has been corrupted (if CONFIG_IRQSTACKS is set). This makes debuggi...
```diff diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index f3d4dd580dd6..972b2acbe713 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -818,6 +818,35 @@ out: return error; } +#ifdef CONFIG_IRQSTACKS +static inline int valid_irq_stack(unsigned long sp, ...
99ddef9bfe714c3273e3fce4c6b6a2a99e7d0bf8
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix compile error in prom.h
Problem Details: In file included from include/asm/pci.h:20, from include/linux/pci.h:751, from arch/powerpc/sysdev/dart_iommu.c:36: include/asm/prom.h: In function `of_irq_to_resource': include/asm/prom.h:341: warning: implicit declaration of function `irq_of_parse_and_map' include/as...
```diff diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 020ed015a94b..1aa15e2e056e 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h @@ -18,6 +18,7 @@ #include <linux/types.h> #include <linux/proc_fs.h> #include <linux/platform_device.h> +#include <asm/irq.h> #inclu...
3ca5de6dd4ec5a139b2b8f00dce3e4726ca91af1
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - another attempt to fix AUX delivery checks
Problem Details: Do not assume that AUX_LOOP command is broken unless it completes successfully but returns wrong (unexpected) data. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index ec195a36e8f6..db9cca3b65e0 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -553,7 +553,8 @@ static int __devinit i8042_check_aux(void) */ param = 0x5a; - if (i8042_command(&param, I8042_CMD_AUX_LOOP)...
7d9f3e85f45e8f636bdd7ce5f0b1704034380175
Analyze and fix the following issue in the Linux kernel code: [PATCH] bcm43xx: Fix assertion failures in interrupt handler
Problem Details: In the bcm43xx interrupt handler, sanity checks are wrongly done before the verification that the interrupt is for the bcm43xx. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index e594af46ff05..80cb88eb98c6 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -1858,9 +1858,6 @@ static irqreturn_t bcm43xx_interrupt_handler(in...
d632f9fa38203ad5bac31e46921812216693b14f
Analyze and fix the following issue in the Linux kernel code: [PATCH] bcm43xx: Fix bug in frequency to channel conversion
Problem Details: The frequency to channel routine in bcm43xx requires that the frequency be in MHz, but that condition is not always met. This patch does the necessary conversion. Signed-off-by: Joerg Sommer <joerg@alea.gnuu.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <l...
```diff diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index 7b665e2386a8..d6d9413d7f23 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c @@ -105,18 +105,24 @@ static int bcm43xx_wx_set_channelfreq(struct net_device...
01a597769c7ef4db979c6a23aa97e5d2e53cbc46
Analyze and fix the following issue in the Linux kernel code: [PATCH] bcm43xx: Fix errors in specs to code translation in B6PHY init
Problem Details: There are three errors in the transcription of the latest revision to the B6PHY init specifications. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index 3a5c9c2b2150..cae89258a640 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c @@ -859,6 +859,11 @@ static void bcm43xx_phy_initb6(struct bcm43xx_privat...
b2e569d876e153365b01525a102b7d90bb309446
Analyze and fix the following issue in the Linux kernel code: [MIPS] ARC: Fix several compiler warnings.
Problem Details: CC arch/mips/arc/init.o arch/mips/arc/init.c: In function 'prom_init': arch/mips/arc/init.c:27: warning: ISO C90 forbids mixed declarations and code arch/mips/arc/init.c:35: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 2 has type 'ULONG' arch/mips/arc/init.c:28: warning: ...
```diff diff --git a/arch/mips/arc/init.c b/arch/mips/arc/init.c index 0ac8f42d3752..e2f75b13312f 100644 --- a/arch/mips/arc/init.c +++ b/arch/mips/arc/init.c @@ -23,16 +23,16 @@ LONG *_prom_argv, *_prom_envp; void __init prom_init(void) { PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK; + romvec = ROMVECTOR; - ULONG cnt;...
012390517e3e6734d381ff81c4a7e9817636e2f1
Analyze and fix the following issue in the Linux kernel code: [MIPS] ISA: Fix typo
Problem Details: Lost CONFIG_ prefix discovered by Robert P. J. Day <rpjday@mindspring.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index e06ef0776d48..833437d31ef1 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h @@ -74,7 +74,7 @@ * */ -#ifndef GENERIC_ISA_DMA_SUPPORT_BROKEN +#ifndef CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN #define MAX_DMA_CHANNELS 8 #endif `...