id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ebcb904dfe31644857422e3bb62e50f76fe86255
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix FS_IOC_SETFLAGS ioctl
Problem Details: Steps to reproduce the bug: - Call FS_IOC_SETLFAGS ioctl with flags=FS_COMPR_FL - Call FS_IOC_SETFLAGS ioctl with flags=0 - Call FS_IOC_GETFLAGS ioctl, and you'll see FS_COMPR_FL is still set! Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index aeabf6b6ccc8..3e7031d32eef 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -238,6 +238,8 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) } else if (flags & FS_COMPR_FL) { ip->flags |= BTRFS_INODE_COMPRESS; ip->flags &...
d0092bdda819914b8725da76a8c33eb06eb0bd21
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix FS_IOC_GETFLAGS ioctl
Problem Details: As we've added per file compression/cow support. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 3240dd90da42..aeabf6b6ccc8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -81,6 +81,13 @@ static unsigned int btrfs_flags_to_ioctl(unsigned int flags) iflags |= FS_NOATIME_FL; if (flags & BTRFS_INODE_DIRSYNC) iflags |= FS_DIRSYNC_FL; + if (...
1aba86d67f340a8001d67183ec32e8a62e3ec658
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix easily get into ENOSPC in mixed case
Problem Details: When a btrfs disk is created by mixed data & metadata option, it will have no pure data or pure metadata space info. In btrfs's for-linus branch, commit 78b1ea13838039cd88afdd62519b40b344d6c920 (Btrfs: fix OOPS of empty filesystem after balance) initializes space infos at the very beginning. The prob...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index cd52f7f556ef..9ee6bd55e16c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -8856,23 +8856,38 @@ out: int btrfs_init_space_info(struct btrfs_fs_info *fs_info) { struct btrfs_space_info *space_info; + struct btrfs_super_blo...
f5de93914983bf04b92a786d1d205286fc53b49b
Analyze and fix the following issue in the Linux kernel code: Prevent oopsing in posix_acl_valid()
Problem Details: If posix_acl_from_xattr() returns an error code, a negative address is dereferenced causing an oops; fix by checking for error code first. Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com> Reviewed-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index a892bc27f13a..827be9a6ca33 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -178,12 +178,13 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name, if (value) { acl = posix_acl_from_xattr(value, size); + if (IS_ERR(acl)) + return...
05bf86b4ccfd0f197da61c67bd372111d15a6620
Analyze and fix the following issue in the Linux kernel code: tmpfs: fix race between swapoff and writepage
Problem Details: Shame on me! Commit b1dea800ac39 "tmpfs: fix race between umount and writepage" fixed the advertized race, but introduced another: as even its comment makes clear, we cannot safely rely on a peek at list_empty() while holding no lock - until info->swapped is set, shmem_unuse_inode() may delete any for...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 9e755c166cc5..dfc7069102ee 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1037,7 +1037,6 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc) struct address_space *mapping; unsigned long index; struct inode *inode; - bool unlock_mutex = f...
0144261fa677e9490eb112231de30c95af1679d2
Analyze and fix the following issue in the Linux kernel code: pata_at91: SMC settings calculation bugfixes, support for t6z and IORDY
Problem Details: * New code correctly calculates SMC registers values, adjusts calculated to admissible ranges, enlarges cycles when required and converts values into SMC's format. * Support for TDF cycles (ATA t6z) and IORDY line added. * Eliminate need in the initial_timing structure. * Code cleanup. Signed-off-...
```diff diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index a5fdbdcb0faf..960c72571395 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c @@ -3,6 +3,7 @@ * with CompactFlash interface in True IDE mode * * Copyright (C) 2009 Matyukevich Sergey + * 2011 Igor Plyatov ...
9281b16caac1276817b77033c5b8a1f5ca30102c
Analyze and fix the following issue in the Linux kernel code: pata_cm64x: fix boot crash on parisc
Problem Details: The old IDE cmd64x checks the status of the CNTRL register to see if the ports are enabled before probing them. pata_cmd64x doesn't do this, which causes a HPMC on parisc when it tries to poke at the secondary port because apparently the BAR isn't wired up (and a non-responding piece of memory causes ...
```diff diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 905ff76d3cbb..7bafc16cf5e0 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -41,6 +41,9 @@ enum { CFR = 0x50, CFR_INTR_CH0 = 0x04, + CNTRL = 0x51, + CNTRL_CH0 = 0x04, + CNTRL_CH1 = 0x08, CMDTI...
5f6f12ccf3aa42cfc0c5bde9228df0c843dd63f7
Analyze and fix the following issue in the Linux kernel code: libata: fix oops when LPM is used with PMP
Problem Details: ae01b2493c (libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65) added ATA_FLAG_NO_DIPM and made ata_eh_set_lpm() check the flag. However, @ap is NULL if @link points to a PMP link and thus the unconditional @ap->flags dereference leads to the following oops. BUG: unable to handle kernel NULL p...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index f26f2fe3480a..dad9fd660f37 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -3316,7 +3316,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, struct ata_eh_context *ehc = &link->eh_context; ...
22fe9446e82f1fe4b59900db4599061384efb0ad
Analyze and fix the following issue in the Linux kernel code: Revert "libata: ahci_start_engine compliant to AHCI spec"
Problem Details: This reverts commit 270dac35c26433d06a89150c51e75ca0181ca7e4. The commits causes command timeouts on AC plug/unplug. It isn't yet clear why. As the commit was for a single rather obscure controller, revert the change for now. The problem was reported and bisected by Gu Rui in bug#34692. https://b...
```diff diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index ff9d832a163d..d38c40fe4ddb 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -561,27 +561,6 @@ void ahci_start_engine(struct ata_port *ap) { void __iomem *port_mmio = ahci_port_base(ap); u32 tmp; - u8 status; - - status = read...
712f3147aee0fbbbbed2da20b21b272c5505125e
Analyze and fix the following issue in the Linux kernel code: fbmem: fix remove_conflicting_framebuffers races
Problem Details: When a register_framebuffer() call results in us removing old conflicting framebuffers, the new registration_lock doesn't protect that situation. And we can't just add the same locking to the function, because these functions call each other: register_framebuffer() calls remove_conflicting_framebuffer...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index ea16e654a9b6..46ee5e5a08c6 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1537,8 +1537,10 @@ static bool fb_do_apertures_overlap(struct apertures_struct *gena, return false; } +static int do_unregister_framebuffer(struct f...
47a8467cc0907e2fd3e6f4d02465dfb64494133e
Analyze and fix the following issue in the Linux kernel code: sfc: Fix return value from efx_ethtool_set_rx_ntuple()
Problem Details: ethtool_ops::set_rx_ntuple is supposed to return 0 on success, but it currently returns the filter ID when it inserts or modifies a filter. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
```diff diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 8c5e0052c44a..348437a8117e 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c @@ -955,8 +955,9 @@ static int efx_ethtool_set_rx_ntuple(struct net_device *net_dev, if (ntuple->fs.action == ETHTOOL_RXNTUPLE_ACTION_CLE...
4593010b68247e6bed746da4e15f66f06e239e28
Analyze and fix the following issue in the Linux kernel code: drm/i915: Update the location of the ringbuffers' HWS_PGA registers for IVB.
Problem Details: They have been moved from the ringbuffer groups to their own group it looks like. Fixes GPU hangs on gnome startup. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 8f70fb65b496..f1bc0fb6a72c 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -291,6 +291,9 @@ #define RING_MAX_IDLE(base) ((base)+0x54) #define RING_HWS_PGA(base) ((base)+0x80) #define RIN...
25aebfc30bc40f01813aad7a0f62f2fda44efb8a
Analyze and fix the following issue in the Linux kernel code: drm/i915: Add support for fence registers on Ivybridge.
Problem Details: The registers are the same as on Sandybridge. Fixes scrambled display in X when it does software drawing to the GTT, and scans the results out as tiled. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4304f74dfb5f..c6289034e29a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2673,6 +2673,7 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj, update: obj->tiling_changed = fal...
357555c00f8414057f0c12ee3f479f197264123d
Analyze and fix the following issue in the Linux kernel code: drm/i915: manual FDI training for Ivy Bridge
Problem Details: A0 stepping chips need to use manual training, but the bits have all moved. So fix things up so we can at least train FDI for VGA links. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 289adaa9c928..ea12ca01ef63 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -3104,7 +3104,15 @@ #define FDI_TX_ENHANCE_FRAME_ENABLE (1<<18) /* Ironlake: hardwired to 1 */ #define FDI...
b513d44751bfb609a3c20463f764c8ce822d63e9
Analyze and fix the following issue in the Linux kernel code: xhci: Fix full speed bInterval encoding.
Problem Details: Dmitry's patch dfa49c4ad120a784ef1ff0717168aa79f55a483a USB: xhci - fix math in xhci_get_endpoint_interval() introduced a bug. The USB 2.0 spec says that full speed isochronous endpoints' bInterval must be decoded as an exponent to a power of two (e.g. interval = 2^(bInterval - 1)). Full speed inte...
```diff diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 04145740686c..6938cc8d848f 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1045,12 +1045,12 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, break; case USB_SPEED_FULL: - ...
c42d2237143fcf35cff642cefe2bcf7786aae312
Analyze and fix the following issue in the Linux kernel code: debugfs: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Problem Details: Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In file included from arch/x86/include/asm/uaccess.h:573, from include/linux/uaccess.h:5, from include/linux/highmem.h:7, from include/linux/pagemap.h:10, from fs/de...
```diff diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 568304d058a3..90f76575c056 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -428,7 +428,7 @@ static ssize_t write_file_bool(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { char buf[32]; - int buf_size; ...
bf1f0a05d472e33dda8e5e69525be1584cdbd03a
Analyze and fix the following issue in the Linux kernel code: usb/gadget: at91sam9g20 fix end point max packet size
Problem Details: on 9g20 they are the same as the 9260 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: stable <stable@kernel.org> 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 9b7cdb16f26b..41dc093c0a1b 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1767,7 +1767,7 @@ static int __init at91udc_probe(struct platform_device *pdev) } /* newer chips have more FIFO mem...
66e5c643488a26d2a6b737bdbd92fc72f13cdeac
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: fix checkpatch warnings
Problem Details: This patch fixes the checkpatch warnings listed below: WARNING: braces {} are not necessary for any arm of this statement WARNING: please, no space before tabs Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index baf96ce16b6a..1d332f5da3c8 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -616,11 +616,10 @@ static unsigned get_ep_limit(struct s3c_hsotg_ep *hs_ep) maxpkt = S3C_DxEPTSIZ_PktCnt_LIMIT + 1;...
d6167660b284447c710d9067754c69feab229892
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsudc: fix checkpatch error and warning
Problem Details: This patch fixes the checkpatch error and warning listed below: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index c339e171eacb..cfe3cf56d6bd 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1133,7 +1133,7 @@ static irqreturn_t s3c_hsudc_irq(int irq, void *_dev) } int usb_gadget_probe_driver(struct usb_...
1fec70932d867416ffe620dd17005f168cc84eb5
Analyze and fix the following issue in the Linux kernel code: rbd: fix split bio handling
Problem Details: The rbd driver currently splits bios when they span an object boundary. However, the blk_end_request expects the completions to roll up the results in block device order, and the split rbd/ceph ops can complete in any order. This patch adds a struct rbd_req_coll to track completion of split requests a...
```diff diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 2146cab1c61b..9712fad82bc6 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -92,6 +92,8 @@ struct rbd_client { struct list_head node; }; +struct rbd_req_coll; + /* * a single io request */ @@ -100,6 +102,24 @@ struct rbd_request...
0696c3a8acd3b7c3186dd231d65d97e05a75189f
Analyze and fix the following issue in the Linux kernel code: net:set valid name before calling ndo_init()
Problem Details: In commit 1c5cae815d19 (net: call dev_alloc_name from register_netdevice), a bug of bonding was involved, see example 1 and 2. In register_netdevice(), the name of net_device is not valid until dev_get_valid_name() is called. But dev->netdev_ops->ndo_init(that is bond_init) is called before dev_get_va...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index ea23353e6251..3ed09f8ecbf8 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5437,6 +5437,10 @@ int register_netdevice(struct net_device *dev) dev->iflink = -1; + ret = dev_get_valid_name(dev, dev->name); + if (ret < 0) + goto out; + /* Init, if thi...
8eb572942ca02890f590d9251233038e27dd3842
Analyze and fix the following issue in the Linux kernel code: drm/i915: forcewake debugfs fix
Problem Details: Forcewake needs to register itself with drm to use the remove function. The file also should be read only. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Keith Packard <keithp@keithp.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index c0ce5e44ac3a..183eaac8980a 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1383,13 +1383,13 @@ static int i915_forcewake_create(struct dentry *root, struct drm_minor *minor...
64c7f304b81a9a92dc7046c97a10427a5997dc07
Analyze and fix the following issue in the Linux kernel code: stmmac: fix autoneg in set_pauseparam
Problem Details: This patch fixes a bug in the set_pauseparam function that didn't well manage the ANE field and returned broken values when use ethtool -A|-a. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/stmmac/stmmac_ethtool.c b/drivers/net/stmmac/stmmac_ethtool.c index 9c05cf07a432..ae5213a8c4cd 100644 --- a/drivers/net/stmmac/stmmac_ethtool.c +++ b/drivers/net/stmmac/stmmac_ethtool.c @@ -234,6 +234,7 @@ stmmac_set_pauseparam(struct net_device *netdev, new_pause |= FLOW_TX; pri...
cb68552858c64db302771469b1202ea09e696329
Analyze and fix the following issue in the Linux kernel code: bridge: fix forwarding of IPv6
Problem Details: The commit 6b1e960fdbd75dcd9bcc3ba5ff8898ff1ad30b6e bridge: Reset IPCB when entering IP stack on NF_FORWARD broke forwarding of IPV6 packets in bridge because it would call bp_parse_ip_options with an IPV6 packet. Reported-by: Noah Meyerhans <noahm@debian.org> Signed-off-by: Stephen Hemminger <she...
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index f3bc322c5891..74ef4d4846a4 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -737,7 +737,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb, nf_bridge->mask |= BRNF_PKT_TYPE; } -...
087fbc9962e10a65fb0b542ecfc116ebf6cf1735
Analyze and fix the following issue in the Linux kernel code: drm/i915: Revert i915.semaphore=1 default from i915 merge
Problem Details: My Q67 / i7-2600 box has rev09 Sandy Bridge graphics. It hangs instantly when GNOME loads and it hangs so hard the reset button doesn't work. Setting i915.semaphore=0 fixes it. Semaphores were disabled in a1656b9090f7 ("drm/i915: Disable GPU semaphores by default") in 2.6.38 but were then re-enabled...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index c34a8dd31d02..32d1b3e829c8 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -49,7 +49,7 @@ module_param_named(panel_ignore_lid, i915_panel_ignore_lid, int, 0600); unsigned int i915_powersav...
a10e14667635dde504ed9e7ee851494c2cf2ae8e
Analyze and fix the following issue in the Linux kernel code: bonding,llc: Fix structure sizeof incompatibility for some PDUs
Problem Details: With some combinations of arch/compiler (e.g. arm-linux-gcc) the sizeof operator on structure returns value greater than expected. In cases when the structure is used for mapping PDU fields it may lead to unexpected results (such as holes and alignment problems in skb data). __packed prevents this unde...
```diff diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h index b28baff70864..01b8a6af275b 100644 --- a/drivers/net/bonding/bond_3ad.h +++ b/drivers/net/bonding/bond_3ad.h @@ -39,7 +39,7 @@ typedef struct mac_addr { u8 mac_addr_value[ETH_ALEN]; -} mac_addr_t; +} __packed mac_addr_t; e...
1159024d4c0aafecaa0c6635c55153b4b39cc1c8
Analyze and fix the following issue in the Linux kernel code: ssb: fix pcicore build breakage
Problem Details: drivers/ssb/main.c:1336: error: 'SSB_PCICORE_BCAST_ADDR' undeclared (first use in this function) drivers/ssb/main.c:1337: error: 'SSB_PCICORE_BCAST_DATA' undeclared (first use in this function) drivers/ssb/main.c:1349: error: 'struct ssb_pcicore' has no member named 'dev' Reported-by: Randy Dunlap <ra...
```diff diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index ee2937c41424..f8a13f863217 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -1332,21 +1332,27 @@ EXPORT_SYMBOL(ssb_bus_powerup); static void ssb_broadcast_value(struct ssb_device *dev, u32 address, u32 data) { +#ifdef CONFIG_SSB_DRIVER...
7a4e5281d1b3335a3dc90841415390473cccebf3
Analyze and fix the following issue in the Linux kernel code: iwlagn: add testmode trace command
Problem Details: Adding testmode trace/debug capability Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index a7054a5ee34a..e027f99f18a5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -3659,6 +3659,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) */ ...
1dbf53a28262aa89ecbe653e8a9127c0baef9bc4
Analyze and fix the following issue in the Linux kernel code: be2net: fix mbox polling for signal reception
Problem Details: Sending mbox cmds require multiple steps of writing to the DB register and polling for an ack. Gettting interrupted in the middle by a signal breaks the mbox protocol. Use msleep() to not get interrupted. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davem...
```diff diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index d558b9088d7e..f2c90997fabd 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -298,8 +298,7 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db) return -1; } - set_curre...
76d9fc2954d057b19bf5d7b854df2b621b00fdec
Analyze and fix the following issue in the Linux kernel code: ocfs2/cluster: Increase the live threshold for global heartbeat
Problem Details: We have seen isolated cases (very few, I might add) of o2hb not detecting all live nodes on startup. One plausible reasoning for it is that other node had a hb io delay at the same time. The live threshold set at 2 (as low as it can be) could be increased to ameliorate the situation. But increasing th...
```diff diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 643720209a98..1d28505caff8 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -1690,6 +1690,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg, struct file *filp = NULL; struct inode *i...
4da6dc293604f55d156148b8f60b94053e3195fc
Analyze and fix the following issue in the Linux kernel code: ocfs2/dlm: Use negotiated o2dlm protocol version
Problem Details: Patch fixes a bug in the o2dlm protocol negotiation in that it is using the builtin version rather than the negotiated version during the domain join. This causes join errors when a node having kernel >= 2.6.37 joins a cluster with nodes having kernels < 2.6.37. This only affects the o2cb cluster stac...
```diff diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 7540a492eaba..3b179d6cbde0 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c @@ -1614,7 +1614,8 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm) spin_unlock(&dlm->spinlock); /* Support for global heartbeat ...
f6100bb4b849c45caa8d6b3706756d3b8a560c92
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Clean up input-mux handling in Conexant auto-parser
Problem Details: Keep the registered input-pins in imux_pins[], and fix the inconsistent use of sepc->auto_mic_ext. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 623cd9be5477..b575c9989f3c 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -75,7 +75,7 @@ struct conexant_spec { unsigned int cur_eapd; unsigned int hp_present; unsigned int auto_mic; - i...
eaeee242c531cd4b0a4a46e8b5dd7ef504380c42
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix a rare memory leak in ro to rw remounting path
Problem Details: When re-mounting from R/O mode to R/W mode and the LEB count in the superblock is not up-to date, because for the underlying UBI volume became larger, we re-write the superblock. We allocate RAM for these purposes, but never free it. So this is a memory leak, although very rare one. Signed-off-by: Art...
```diff diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index bf31b4729e51..cad60b51f7c4 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -475,7 +475,8 @@ failed: * @c: UBIFS file-system description object * * This function returns a pointer to the superblock node or a negative error - * code. + * code. Note, the use...
c1f1f91d2183b91c684900b529b6c336ad3dd27c
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix inode size debugging check failure
Problem Details: This patch fixes a problem with the following symptoms: UBIFS: deferred recovery completed UBIFS error (pid 15676): dbg_check_synced_i_size: ui_size is 11481088, synced_i_size is 11459081, but inode is clean UBIFS error (pid 15676): dbg_check_synced_i_size: i_ino 128, i_mode 0x81a4, i_size 11481088 I...
```diff diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index d6c8ce3c722e..3f41a0ce192b 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -1490,18 +1490,22 @@ int ubifs_recover_size(struct ubifs_info *c) if (c->ro_mount) { /* Fix the inode size and pin it in memory */ struct inode *ino...
45cd5cddbfbdf0993dbc76d06ed77d0bf547b421
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix debugging FS checking failure
Problem Details: When the debugging self-checks are enabled, we go trough whole file-system after mount and check/validate every single node referred to by the index. This is implemented by the 'dbg_check_filesystem()' function. However, this function fails if we mount "unclean" file-system, i.e., if we mount the file-...
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index f7515bd38b4f..b5ba2ea5b626 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -1818,6 +1818,8 @@ static struct fsck_inode *add_inode(struct ubifs_info *c, struct rb_node **p, *parent = NULL; struct fsck_inode *fscki; ino_t inum = key_inum_flash(c...
4c9545200a3bd9e87b36475c263034a38be02e44
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix debugging message
Problem Details: When recovering the inode size, one of the debugging messages was printed incorrecly, this patches fixes it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index d28db1ee2045..596dede32611 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -1496,7 +1496,7 @@ int ubifs_recover_size(struct ubifs_info *c) if (inode->i_size < e->d_size) { dbg_rcvry("ino %lu size %lld -> %lld", (unsig...
6d5904e062d5cb28b705d49a35682e0871b3f382
Analyze and fix the following issue in the Linux kernel code: UBIFS: print useful debugging messages when cannot recover gc_lnum
Problem Details: If we fail to recover the gc_lnum we just return an error and it then it is difficult to figure out why this happened. This patch adds useful debugging information which should make it easier to debug the failure. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 3e0eedbe49ce..3d2598deaa58 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -1177,6 +1177,8 @@ find_free: lnum = ubifs_find_free_leb_for_idx(c); if (lnum < 0) { dbg_err("could not find an empty LEB"); + dbg_dump_lprops(c); + dbg_...
1321657d8f843641529eff26e25722158cc29349
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix oops in lprops dump function
Problem Details: The 'dbg_dump_lprop()' is trying to detect journal head LEBs when printing, so it looks at the write-buffers. However, if we are in R/O mode, we de-allocate the write-buffers, so 'dbg_dump_lprop()' oopses. This patch fixes the issue. Note, this patch is not critical, it is only about the debugging cod...
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index ba4d795d63a3..4062ec602632 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -746,7 +746,13 @@ void dbg_dump_lprop(const struct ubifs_info *c, const struct ubifs_lprops *lp) if (bud->lnum == lp->lnum) { int head = 0; for (i = 0; i < c->jhea...
c43615702f9c5957981693a4d966ed81d8fc1ecc
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix minor stylistic issues
Problem Details: Fix several minor stylistic issues: * lines longer than 80 characters * space before closing parenthesis ')' * spaces in the indentations Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index da9ecddf028a..fa65b2931034 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2421,7 +2421,8 @@ int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head) hashb = key_block(c, &sb->key); if (hasha > hashb) { - ubifs_err(...
d9a5ac9ef306eb5cc874f285185a15c303c50009
Analyze and fix the following issue in the Linux kernel code: x86, mce, AMD: Fix leaving freed data in a list
Problem Details: b may be added to a list, but is not removed before being freed in the case of an error. This is done in the corresponding deallocation function, so the code here has been changed to follow that. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expre...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 167f97b5596e..bb0adad35143 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c @@ -509,6 +509,7 @@ recurse: out_free: if (b) { kobject_put(&b->kobj); + list_del(&b->misc...
2557f7427d4bd1fc00166556e3047c5f3ed91958
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix auto-mic for CX2064x codecs
Problem Details: The wrong id is assigned for external/internal mics in the auto-mic selection parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 35bebe59908d..eecc154d0b63 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3420,13 +3420,13 @@ static void cx_auto_check_auto_mic(struct hda_codec *codec) if (is_ext_mic(codec, cfg->inputs[0...
5fd2a84ab3c8b87176e25db1d98c5cc34043a669
Analyze and fix the following issue in the Linux kernel code: OMAP3: set the core dpll clk rate in its set_rate function
Problem Details: The debug l3_ick/rate is not displaying the actual rate of the clock in hardware. This is because, the core dpll set_rate function doesn't update the clk.rate. After fixing, the l3_ick/rate is displaying proper values. Signed-off-by: Shweta Gulati <shweta.gulati@ti.com> Signed-off-by: Avinash.H.M <avi...
```diff diff --git a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c index b2b1e37bb6bb..d6e34dd9e7e7 100644 --- a/arch/arm/mach-omap2/clkt34xx_dpll3m2.c +++ b/arch/arm/mach-omap2/clkt34xx_dpll3m2.c @@ -115,6 +115,7 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) ...
496b318eb65558c1a3a4fe882cb9da6d1dc6493a
Analyze and fix the following issue in the Linux kernel code: xen/blkback: fix xenbus_transaction_start() hang caused by double xenbus_transaction_end()
Problem Details: vbd_resize() up_read()'s xs_state.suspend_mutex twice in a row via double xenbus_transaction_end() calls. The next down_read() in xenbus_transaction_start() (at eg. the next resize attempt) hangs. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=618317 Acked-by: Jan Beulich <jbeulich@novell.com>...
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 9dee5454740f..dba55e3a4a86 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -226,6 +226,7 @@ again: goto again; if (err) pr_warn(DRV_PFX "Error ending transaction"); ...
1f71a3ba8f845d2b2538e79bafb99ac835c84ea6
Analyze and fix the following issue in the Linux kernel code: ASoC: twl6040 - fix LINEGAIN volume control
Problem Details: Fix the TWL6040 LINEGAIN volume control to match the TRM. Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
```diff diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 255901c4460d..4c336636d4f5 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -960,9 +960,9 @@ static DECLARE_TLV_DB_SCALE(mic_amp_tlv, -600, 600, 0); /* * AFMGAIN volume control: - * from 18 to 24 dB in 6 d...
05fa7ea7d23980de0014417a0e0af2048a0f9fc1
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix extended lvds info parsing
Problem Details: On rev <= 1.1 tables, the offset is absolute, on newer tables, it's relative. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=700326 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat....
```diff diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index dd881d035f09..90dfb2b8cf03 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -1574,9 +1574,17 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_i...
d9282fca8a763be574a2fc20b2edcc6e132cbf90
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix tiling reg on fusion
Problem Details: The location of MC_ARB_RAMCFG changed on fusion. I've diffed all the other regs in evergreend.h and this is the only other reg that changed. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index c20eac3379e6..9073e3bfb08c 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -1780,7 +1780,10 @@ static void evergreen_gpu_init(struct radeon_device *rdev) mc_shared_chmap =...
11f770027b5c0de16544f3ec82b5c6f9f8d5a644
Analyze and fix the following issue in the Linux kernel code: rbd: fix leak of ops struct
Problem Details: The ops vector must be freed by the rbd_do_request caller. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 3e904717c1c0..2146cab1c61b 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -996,6 +996,8 @@ static int rbd_do_op(struct request *rq, ops, num_reply, rbd_req_cb, 0, NULL); + + rbd_destroy_ops(ops); done: kfre...
72a8f97bf2dfe1b0f02ba8dbaed7d6b76657aae3
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix 'iph' use before set.
Problem Details: I swear none of my compilers warned about this, yet it is so obvious. > net/ipv4/ip_forward.c: In function 'ip_forward': > net/ipv4/ip_forward.c:87: warning: 'iph' may be used uninitialized in this function Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@dav...
```diff diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index fcbc0c8f1261..3b34d1c86270 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c @@ -84,7 +84,7 @@ int ip_forward(struct sk_buff *skb) rt = skb_rtable(skb); - if (opt->is_strictroute && iph->daddr != rt->rt_gateway) + if (opt->is_st...
9ddabb055d73c63037878bb9346e52c7f2e07e96
Analyze and fix the following issue in the Linux kernel code: i2c: pnx: Fix crash due to wrong init of timer->data
Problem Details: alg_data is already a pointer which must be passed directly. Reported-by: Dieter Ripp <ripp@systecnet.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ben Dooks <ben-i2c@fluff.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index a97e3fec8148..04be9f82e14b 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -65,7 +65,7 @@ static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data) jiffies, expires); timer->expir...
ca06707022d6ba4744198a8ebbe4994786b0c613
Analyze and fix the following issue in the Linux kernel code: ipv6: restore correct ECN handling on TCP xmit
Problem Details: Since commit e9df2e8fd8fbc9 (Use appropriate sock tclass setting for routing lookup) we lost ability to properly add ECN codemarks to ipv6 TCP frames. It seems like TCP_ECN_send() calls INET_ECN_xmit(), which only sets the ECN bit in the IPv4 ToS field (inet_sk(sk)->tos), but after the patch, what's c...
```diff diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 88bdd010d65d..2fa8d1341a0a 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) return outer; } -#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos ...
b2a103e6d0afa432dff66b36473c5a55b6b0376c
Analyze and fix the following issue in the Linux kernel code: bonding: convert to ndo_fix_features
Problem Details: This should also fix updating of vlan_features and propagating changes to VLAN devices on the bond. Side effect: it allows user to force-disable some offloads on the bond interface. Note: NETIF_F_VLAN_CHALLENGED is managed by bond_fix_features() now. Signed-off-by: Michał Mirosław <mirq-linux@rere.q...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6312db1f7838..088fd845ffdf 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -343,32 +343,6 @@ out: return res; } -/** - * bond_has_challenged_slaves - * @bond: the bond we're working on...
1b0bcbcf62884959fa7214eb16c44cff445691c6
Analyze and fix the following issue in the Linux kernel code: net/9p/protocol.c: Fix a memory leak
Problem Details: When p9pdu_readf() is called with "s" attribute, it allocates a pointer that will store a string. In p9dirent_read(), this pointer is not being released, leading to out of memory errors. This patch releases this pointer after string is copyed to dirent->d_name. Signed-off-by: Pedro Scarapicchia Junior...
```diff diff --git a/net/9p/protocol.c b/net/9p/protocol.c index b58a501cf3d1..a873277cb996 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c @@ -674,6 +674,7 @@ int p9dirent_read(char *buf, int len, struct p9_dirent *dirent, } strcpy(dirent->d_name, nameptr); + kfree(nameptr); out: return fake_pdu.offs...
cca537af7d6defe8001c2229da738f8a3c934fc0
Analyze and fix the following issue in the Linux kernel code: xen/blkback: if log_stats is enabled print out the data.
Problem Details: And not depend on the driver being built with -DDEBUG flag. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 1e454a30e4e1..9dee5454740f 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -251,7 +251,7 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id) static void print_stats(st...
5a577e38724226e06337bc8361f492b6bb76b9a5
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Add the prefix XEN in the common.h.
Problem Details: Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h index 1e4ccdeadef3..9e40b283a468 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -24,8 +24,8 @@ * IN THE SOFTWARE. */ -#ifndef __BLKIF__BACKEND__COMMON_H__ -#define __BLKIF__BAC...
3d814731ba67f9514bdf380c1b95dd852ac82a2f
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Prefix 'vbd' with 'xen' in structs and functions.
Problem Details: Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index d438781ecc7c..1e454a30e4e1 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -166,10 +166,10 @@ static void free_req(struct pending_req *req) /* * Routines for managing vir...
41ca4d388560d2048c7b64ff5ca7dc3bac0d0812
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Fix checkpatch.pl warnings about more than 80 lines.
Problem Details: Break up the macro usage. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/include/xen/blkif.h b/include/xen/blkif.h index 6ed7c01253b2..3c9ca7a93ba4 100644 --- a/include/xen/blkif.h +++ b/include/xen/blkif.h @@ -72,9 +72,12 @@ struct blkif_x86_64_response { typedef struct blkif_x86_64_request blkif_x86_64_request_t; typedef struct blkif_x86_64_response blkif_x86_64_res...
7f267051bd7a280265b1b5ead58e9c6e4e1ac3a4
Analyze and fix the following issue in the Linux kernel code: net: group FCoE related feature flags
Problem Details: Michał Mirosław's patch (http://patchwork.ozlabs.org/patch/94421/) fixes the issue (http://patchwork.ozlabs.org/patch/94188/) about not populating FCoE related flags correctly on vlan devices. However, only NETIF_F_FCOE_CRC is part of the NETIF_F_ALL_TX_OFFLOADS right now, where weed NETIF_F_FCOE_MTU a...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index e7244ed1f9a8..00d650c74800 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1097,10 +1097,14 @@ struct net_device { #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) +#define NETIF_F_ALL...
f0a619ccfb8a2ec8ff083a02299cfd076c362b27
Analyze and fix the following issue in the Linux kernel code: net: Fix vlan_features propagation
Problem Details: Fix VLAN features propagation for devices which change vlan_features. For this to work, driver needs to make sure netdev_features_changed() gets called after the change (it is e.g. after ndo_set_features()). Side effect is that a user might request features that will never be enabled on a VLAN device....
```diff diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 58f8010e1aef..f247f5bff88d 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -528,7 +528,7 @@ static int vlan_dev_init(struct net_device *dev) (1<<__LINK_STATE_DORMANT))) | (1<<__LINK_STATE_PRESENT); - dev->hw_featur...
77ed23f8d995a01cd8101d84351b567bf5177a30
Analyze and fix the following issue in the Linux kernel code: x86: Fix UV BAU for non-consecutive nasids
Problem Details: This is a fix for the SGI Altix-UV Broadcast Assist Unit code, which is used for TLB flushing. Certain hardware configurations (that customers are ordering) cause nasids (numa address space id's) to be non-consecutive. Specifically, once you have more than 4 blades in a IRU (Individual Rack Unit - or ...
```diff diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h index 3e094af443c3..130f1eeee5fe 100644 --- a/arch/x86/include/asm/uv/uv_bau.h +++ b/arch/x86/include/asm/uv/uv_bau.h @@ -94,6 +94,8 @@ /* after this # consecutive successes, bump up the throttle if it was lowered */ #define COMP...
1769192a3c50778e03352a3d95faec830d47ba55
Analyze and fix the following issue in the Linux kernel code: l2tp: fix potential rcu race
Problem Details: While trying to remove useless synchronize_rcu() calls, I found l2tp is indeed incorrectly using two of such calls, but also bumps tunnel refcount after list insertion. tunnel refcount must be incremented before being made publically visible by rcu readers. This fix can be applied to 2.6.35+ and migh...
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 9be095e00450..ed8a2335442f 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1435,16 +1435,15 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 /* Add tunnel to our list */ INIT_LIST_HEAD(&tunnel...
889cb360b4f48c1334311093161f06f7b4bd77d2
Analyze and fix the following issue in the Linux kernel code: wl12xx: simplify wl1271_ssid_set()
Problem Details: Simplify wl1271_ssid_set by re-using cfg80211_find_ie instead of reimplementing it. Additionally, add a length check to prevent a potential buffer overflow. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
```diff diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 6dab6f0c91bc..f82e736ba197 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -2376,20 +2376,24 @@ out: static int wl1271_ssid_set(struct wl1271 *wl, struct sk_buff *skb, ...
2592a7354092afd304a8c067319b15ab1e441e35
Analyze and fix the following issue in the Linux kernel code: ne-h8300: Fix regression caused during net_device_ops conversion
Problem Details: Changeset dcd39c90290297f6e6ed8a04bb20da7ac2b043c5 ("ne-h8300: convert to net_device_ops") broke ne-h8300 by adding 8390.o to the link. That meant that lib8390.c was included twice, once in ne-h8300.c and once in 8390.c, subject to different macros. This patch reverts that by avoiding the wrappers in 8...
```diff diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 4d2f09460d60..e5a7375685ad 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -144,7 +144,7 @@ obj-$(CONFIG_NE3210) += ne3210.o 8390.o obj-$(CONFIG_SB1250_MAC) += sb1250-mac.o obj-$(CONFIG_B44) += b44.o obj-$(CONFIG_FORCEDETH) += for...
0b25e0157dfa236a0629c16c8ad6f222f633f682
Analyze and fix the following issue in the Linux kernel code: hydra: Fix regression caused during net_device_ops conversion
Problem Details: Changeset 5618f0d1193d6b051da9b59b0e32ad24397f06a4 ("hydra: convert to net_device_ops") broke hydra by adding 8390.o to the link. That meant that lib8390.c was included twice, once in hydra.c and once in 8390.c, subject to different macros. This patch reverts that by avoiding the wrappers in 8390.c. F...
```diff diff --git a/drivers/net/Makefile b/drivers/net/Makefile index c64675f6c977..4d2f09460d60 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -231,7 +231,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_ATARILANCE) += atarilance.o obj-$(CONFIG_A2065)...
cf7e032fc87d59c475df26c4d40bf45d401b2adb
Analyze and fix the following issue in the Linux kernel code: zorro8390: Fix regression caused during net_device_ops conversion
Problem Details: Changeset b6114794a1c394534659f4a17420e48cf23aa922 ("zorro8390: convert to net_device_ops") broke zorro8390 by adding 8390.o to the link. That meant that lib8390.c was included twice, once in zorro8390.c and once in 8390.c, subject to different macros. This patch reverts that by avoiding the wrappers i...
```diff diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 01b604ad155e..c64675f6c977 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -219,7 +219,7 @@ obj-$(CONFIG_SC92031) += sc92031.o obj-$(CONFIG_LP486E) += lp486e.o obj-$(CONFIG_ETH16I) += eth16i.o -obj-$(CONFIG_ZORRO8390) += zorro839...
b9fc02968c5dd3c0461b4bb126499a17b13fb86e
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Fix spelling mistakes.
Problem Details: Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 1c3fa6507e6d..5d2bbf6240c8 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -351,7 +351,7 @@ static int vbd_create(struct blkif_st *blkif, blkif_vdev_t handle, FMODE_READ :...
ebe8190659244ec21b5f16950cf7b156f5b7eb01
Analyze and fix the following issue in the Linux kernel code: xen/blkback: Change printk/DPRINTK to pr_.. type variant.
Problem Details: And also make them uniform and prefix the message with 'xen-blkback'. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
```diff diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 6808cc7d9c73..5c9568e39eab 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -196,20 +196,20 @@ static void vbd_resize(struct blkif_st *blkif) struct xenbus_device *dev = xe...
a236c71766a5f69edf189e2eaeb0aa587c8c5684
Analyze and fix the following issue in the Linux kernel code: drivers/base/memory.c: fix warning due to "memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION"
Problem Details: drivers/base/memory.c: In function 'memory_block_change_state': drivers/base/memory.c:281: warning: unused variable 'i' less beer, more testing Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c4c443db7cbf..0a134a424a37 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -278,7 +278,7 @@ memory_block_action(unsigned long phys_index, unsigned long action) static int memory_block_change_state(struct memory_block *mem, un...
93826c092c385549c04af184fbebd43f36995c69
Analyze and fix the following issue in the Linux kernel code: SELinux: delete debugging printks from filename_trans rule processing
Problem Details: The filename_trans rule processing has some printk(KERN_ERR ) messages which were intended as debug aids in creating the code but weren't removed before it was submitted. Remove them. Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Eric Paris <eparis@redhat.com>
```diff diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index e6e7ce0d3d55..7102457661d6 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1819,8 +1819,6 @@ static int filename_trans_read(struct policydb *p, void *fp) goto out; nel = le32_to_cpu(buf[0...
982b2035d9d7033f63db187bac55e9d8998b0266
Analyze and fix the following issue in the Linux kernel code: Revert "drm/i915: Only enable the plane after setting the fb base (pre-ILK)"
Problem Details: This reverts commit 49183b2818de6899383bb82bc032f9344d6791ff. Quoth Franz Melchior: "This patch introduces a bug on my infamous "Acer Travelmate 5735Z-452G32Mnss": when KMS takes over, the frame buffer contents get completely garbled up on screen, with colored stripes and unreadable text (...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 373c2a005ec1..2166ee071ddb 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5154,6 +5154,8 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, I915_WRITE(DSPCNT...
0f16d0dfcdb5aab97d9e368f008b070b5b3ec6d3
Analyze and fix the following issue in the Linux kernel code: xen/setup: Fix for incorrect xen_extra_mem_start initialization under 32-bit
Problem Details: git commit 24bdb0b62cc82120924762ae6bc85afc8c3f2b26 (xen: do not create the extra e820 region at an addr lower than 4G) does not take into account that ifdef CONFIG_X86_32 instead of e820_end_of_low_ram_pfn() find_low_pfn_range() is called (both calls are from arch/x86/kernel/setup.c). find_low_pfn_ran...
```diff diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index fba4a6cc3a2d..ca6297bd4e3c 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -227,7 +227,11 @@ char * __init xen_memory_setup(void) memcpy(map_raw, map, sizeof(map)); e820.nr_map = 0; +#ifdef CONFIG_X86_32 + xen_extra_mem_start =...
7899891c7d161752f29abcc9bc0a9c6c3a3af26c
Analyze and fix the following issue in the Linux kernel code: xen mmu: fix a race window causing leave_mm BUG()
Problem Details: There's a race window in xen_drop_mm_ref, where remote cpu may exit dirty bitmap between the check on this cpu and the point where remote cpu handles drop request. So in drop_other_mm_ref we need check whether TLB state is still lazy before calling into leave_mm. This bug is rarely observed in earlier ...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 5e92b61ad574..4fd7387222bf 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1140,7 +1140,7 @@ static void drop_other_mm_ref(void *info) active_mm = percpu_read(cpu_tlbstate.active_mm); - if (active_mm == mm) + if (active_mm == mm && pe...
85a9994a0a6cba1a6cc6af4bd3ebd85f778be0fe
Analyze and fix the following issue in the Linux kernel code: cfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped
Problem Details: When sched_scan_stopped was called by the driver, mac80211 calls cfg80211, which in turn was calling mac80211 back with a flag "driver_initiated". This flag was used so that mac80211 would do the necessary cleanup but would not call the driver. This was enough to prevent the bounce back between the d...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a46adb7a91b7..e1f1b41f7b13 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1515,8 +1515,7 @@ struct cfg80211_ops { int (*sched_scan_start)(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_sched_scan_r...
a3836e02ba4c50db958d32d710b226f2408623dc
Analyze and fix the following issue in the Linux kernel code: mac80211: fix a few RCU issues
Problem Details: A few configuration functions correctly do rcu_read_lock() but don't correctly reference some pointers protected by RCU. Fix that. Cc: stable@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 94690366321c..303f33fcb844 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -223,11 +223,11 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, goto out; if (pairwise) - key = sta->ptk; + key = rcu_derefe...
8cb231530f03961b55aa4e84e6ead5590bcde04d
Analyze and fix the following issue in the Linux kernel code: mac80211: fix another key non-race
Problem Details: The code here is only not racy because all the places that assign the pointers it uses are holding the sta_mtx as well as the key_mtx and so can't race against this because this code holds the sta_mtx. But that's not intuitive, so fix it to hold the key_mtx. Signed-off-by: Johannes Berg <johannes.berg...
```diff diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index f05244dc773e..cba8309e9ace 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -652,10 +652,12 @@ static int __must_check __sta_info_destroy(struct sta_info *sta) if (ret) return ret; + mutex_lock(&local->key_mtx); f...
dea4096bc41a9642039840ced91e585d04883a16
Analyze and fix the following issue in the Linux kernel code: mac80211: remove pointless mesh path timer RCU code
Problem Details: The code here to RCU-dereference a pointer that's on the stack is totally pointless, RCU isn't magic (like say Java's weak references are), so the code can't work like whoever wrote it thought it might. Remove it so readers don't get confused. Note that it seems that a bug is there anyway: I don't see...
```diff diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 849fecd0820e..2aec7c4f357b 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -966,20 +966,11 @@ endlookup: void mesh_path_timer(unsigned long data) { - struct ieee80211_sub_if_data *sdata; - struct mesh_path *mpath;...
be0e6aa5a0c487a2a0880dda8bc70f7f1860fc39
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Fix STA connection issues with AR9380 (XB113).
Problem Details: XB113 (AR9380) 3x3 SB 5G only cards were failing to connect to APs due to incorrect xpabiaslevel configuration. fix it. Cc: stable@kernel.org Cc: Ray Li <ray.li@greenwavereality.com> Cc: Kathy Giori <kathy.giori@atheros.com> Cc: Aeolus Yang <aeolus.yang@atheros.com> Cc: compat@orbit-lab.org Signed-off...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 0647cc518d9f..6dfb69ae5b09 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -922,7 +922,7 @@ static const struct ar9300_eeprom ar9...
9ba7f4f5eba5f4b44c7796bbad29f8ec3a7d5864
Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix dual band assumption for XB113
Problem Details: The XB113 cards are single band, 5 GHz-only, but the default settings were configured to assume it was dual band. Users of these cards then would see 2.4 GHz channels but you would never get any scan results from these channels given that the radio is not present. Cc: stable@kernel.org Cc: Fiona Cain ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 070dc8b882b1..0647cc518d9f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -652,7 +652,7 @@ static const struct ar9300_eeprom ar9...
8fddddff0ad4ccc2787464207eba9ed3063e69cd
Analyze and fix the following issue in the Linux kernel code: mac80211: fix contention time computation in minstrel, minstrel_ht
Problem Details: When transmitting a frame, the transmitter waits a random number of slots between 0 and cw. Thus, the contention time is (cw / 2) * t_slot which we can represent instead as (cw * t_slot) >> 1. Also fix a few other accounting bugs around contention time, and add comments. Signed-off-by: Daniel Halperin...
```diff diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 778c604d7939..8adac67395f7 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -417,8 +417,8 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, tx_time_single = mr->a...
53f8023febf9b3e18d8fb0d99c55010e473ce53d
Analyze and fix the following issue in the Linux kernel code: x86/mm: Fix section mismatch derived from native_pagetable_reserve()
Problem Details: With CONFIG_DEBUG_SECTION_MISMATCH=y I see these warnings in next-20110415: LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x1ba48): Section mismatch in reference from the function native_pagetable_reserve() to the function .init.text:memblock_x86_reserve_range() The function native_...
```diff diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 722a4c372ce3..37b8b0fe8320 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -81,7 +81,7 @@ static void __init find_early_table_space(unsigned long end, int use_pse, end, pgt_buf_start << PAGE_SHIFT, pgt_buf_top << PAGE_SHIFT); } -void n...
279b706bf800b5967037f492dbe4fc5081ad5d0f
Analyze and fix the following issue in the Linux kernel code: x86,xen: introduce x86_init.mapping.pagetable_reserve
Problem Details: Introduce a new x86_init hook called pagetable_reserve that at the end of init_memory_mapping is used to reserve a range of memory addresses for the kernel pagetable pages we used and free the other ones. On native it just calls memblock_x86_reserve_range while on xen it also takes care of setting the...
```diff diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 7db7723d1f32..d56187c6b838 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -299,6 +299,7 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, /* In...
92bdaef7b2c5d3cb8abc902faa1f7670a183dcdc
Analyze and fix the following issue in the Linux kernel code: Revert "xen/mmu: Add workaround "x86-64, mm: Put early page table high""
Problem Details: This reverts commit a38647837a411f7df79623128421eef2118b5884. It does not work with certain AMD machines. last_pfn = 0x100000 max_arch_pfn = 0x400000000 initial memory mapped : 0 - 02c3a000 Base memory trampoline at [ffff88000009b000] 9b000 size 20480 init_memory_mapping: 0000000000000000-00000001000...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 55c965b38c27..cf4ef61e425b 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1463,119 +1463,6 @@ static int xen_pgd_alloc(struct mm_struct *mm) return ret; } -#ifdef CONFIG_X86_64 -static __initdata u64 __last_pgt_set_rw = 0; -static __i...
c96c92d893e28d8b8b3161ffb6c3cf0847aaf478
Analyze and fix the following issue in the Linux kernel code: OMAPFB: fix wrong clock aliases and device name
Problem Details: The clock aliases and the dss platform device name have changed, and omapfb fails to initialize. Update the names to correct ones. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
```diff diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 529483467abf..0ccd7adf47bb 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c @@ -922,14 +922,14 @@ static int get_dss_clocks(void) return PTR_ERR(dispc.dss_ick); } - dispc.dss1_fck = clk_get(&dispc.fbdev->ds...
64e62426f40d1017a7ced93ee71d333529196365
Analyze and fix the following issue in the Linux kernel code: staging: usbip: edit Kconfig and rename CONFIG options
Problem Details: Change modules usbip_common_mod to usbip-core and usbip to usbip-host; edit configuration option help text; rename CONFIG options to use a USBIP prefix and change COMMON to CORE in both the Kconfig and Makefiles; edit the menu entries; and edit the driver descriptions. Signed-off-by: matt mooney <mfm@...
```diff diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 7d38925d585a..e150a45d5d8c 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_VIDEO_CX25821) += cx25821/ obj-$(CONFIG_VIDEO_TM6000) += tm6000/ obj-$(CONFIG_DVB_CXD2099) += cxd2099/ obj-$(CO...
7aaacb43ed97714ff0f7f77f306f24b6e564ad03
Analyze and fix the following issue in the Linux kernel code: staging: usbip: fix header includes
Problem Details: Modify header directives to include what is needed by each file and not already included in its own header. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/usbip/stub.h b/drivers/staging/usbip/stub.h index cd3a5bf825c7..6592aa2ad15c 100644 --- a/drivers/staging/usbip/stub.h +++ b/drivers/staging/usbip/stub.h @@ -17,13 +17,12 @@ * USA. */ -#include <linux/kernel.h> #include <linux/list.h> -#include <linux/spinlock.h> #include <l...
1201e7e67634624aec89317cf308cd0d3d8d4770
Analyze and fix the following issue in the Linux kernel code: Input: ads7846 - fix gpio_pendown configuration
Problem Details: The pendown gpio was requested but not configured for input. Configure it for input. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index e4ee43e159d2..beb754ff931b 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -966,6 +966,13 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784...
e0a04b11e4059cab033469617c2a3ce2d8cab416
Analyze and fix the following issue in the Linux kernel code: scripts/kallsyms.c: fix potential segfault
Problem Details: Description: This bug hardly appears during real kernel compiling, because the vmlinux symbols table is huge. But we can still catch it under strict condition , as follows. $ echo "c101b97b T do_fork" | ./scripts/kallsyms --all-symbols #include <asm/types.h> ...... ...... .globl kallsy...
```diff diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 60dd3eb9366e..487ac6f37ca2 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -500,6 +500,8 @@ static void optimize_result(void) /* find the token with the breates profit value */ best = find_best_token(); + if (token_profit[best] =...
698b368275c3fa98261159253cfc79653f9dffc6
Analyze and fix the following issue in the Linux kernel code: fbcon: add lifetime refcount to opened frame buffers
Problem Details: This just adds the refcount and the new registration lock logic. It does not (for example) actually change the read/write/ioctl routines to actually use the frame buffer that was opened: those function still end up alway susing whatever the current frame buffer is at the time of the call. Without thi...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index e0c2284924b6..eec14d2ca1c7 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -42,9 +42,34 @@ #define FBPIXMAPSIZE (1024 * 8) +static DEFINE_MUTEX(registration_lock); struct fb_info *registered_fb[FB_MAX] __read_mostly; int n...
2ee2d29289951b4cb7578d75f199e4aa4084fe6f
Analyze and fix the following issue in the Linux kernel code: kbuild: make versioncheck work in KBUILD_OUTDIR
Problem Details: This patch fixes the versioncheck target so it works when make is invoked in KBUILD_OUTDIR. Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 9b6610e005aa..bfe3e36c2c43 100644 --- a/Makefile +++ b/Makefile @@ -1401,7 +1401,7 @@ includecheck: | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl versioncheck: - find * $(RCS_FIND_IGNORE) \ + find $(srctree)/* $(RCS_FIND_IGNORE) \ -name '*.[hcS]' -type f ...
436f876ccb4eac8ae53a101852824977a0f344eb
Analyze and fix the following issue in the Linux kernel code: kbuild: make includecheck work in KBUILD_OUTDIR
Problem Details: This patch fixes the includecheck target so it works when make is invoked in KBUILD_OUTDIR. Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 6b21de15c82e..9b6610e005aa 100644 --- a/Makefile +++ b/Makefile @@ -1396,7 +1396,7 @@ tags TAGS cscope gtags: FORCE PHONY += includecheck versioncheck coccicheck namespacecheck export_report includecheck: - find * $(RCS_FIND_IGNORE) \ + find $(srctree)/* $(RCS_FIND_IGN...
9663d9890d80408c4a5c8280c5db775fbe082203
Analyze and fix the following issue in the Linux kernel code: kbuild: make headerdep work in KBUILD_OUTDIR
Problem Details: This patch fixes the headerdep target so it works when make is invoked in KBUILD_OUTDIR. Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 02134de65acf..6b21de15c82e 100644 --- a/Makefile +++ b/Makefile @@ -991,7 +991,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE PHONY += headerdep headerdep: - $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl + $(Q)find $(...
747df2258b1b9a2e25929ef496262c339c380009
Analyze and fix the following issue in the Linux kernel code: sfc: Always map MCDI shared memory as uncacheable
Problem Details: We enabled write-combining for memory-mapped registers in commit 65f0b417dee94f779ce9b77102b7d73c93723b39, but inhibited it for the MCDI shared memory where this is not supported. However, write-combining mappings also allow read-reordering, which may also be a problem. I found that when an SFC9000-f...
```diff diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index d98479030ef2..3dd45ed61f0a 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c @@ -50,6 +50,20 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx) return &nic_data->mcdi; } +static inline void +efx_mcdi_readd(...
4daf50f20256e0022c87c1609226e971a70c82fd
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix mesh-related build breakage...
Problem Details: net/mac80211/cfg.c: In function ‘sta_apply_parameters’: net/mac80211/cfg.c:746: error: ‘struct sta_info’ has no member named ‘plink_state’ make[1]: *** [net/mac80211/cfg.o] Error 1 make: *** [net/mac80211/mac80211.ko] Error 2 Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index a2ff47493e0a..ed3400cd7a5a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -738,6 +738,7 @@ static void sta_apply_parameters(struct ieee80211_local *local, &sta->sta.ht_cap); if (ieee80211_vif_is_mesh(&sdata->vif)) { +#ifdef CON...
4352b47ab7918108b389a48d2163c9a4c2aaf139
Analyze and fix the following issue in the Linux kernel code: xen-blkfront: fix data size for xenbus_gather in blkfront_connect
Problem Details: barrier variable is int, not long. This overflow caused another variable override: "err" (in PV code) and "binfo" (in xenlinux code - drivers/xen/blkfront/blkfront.c). The later caused incorrect device flags (RO/removable etc). Signed-off-by: Marek Marczykowski <marmarek@mimuw.edu.pl> Acked-by: Ian Ca...
```diff diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 9cb8668ff5f4..20759817ad57 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1141,7 +1141,7 @@ static void blkfront_connect(struct blkfront_info *info) } err = xenbus_gather(XBT_NIL, info->xbdev->...
96e369208e65a7d017a52361fd572df41fde8472
Analyze and fix the following issue in the Linux kernel code: btrfs scrub: make fixups sync
Problem Details: btrfs scrub - make fixups sync, don't reuse fixup bios Fixups are already sync for csum failures, this patch makes them sync for EIO case as well. Fixups are now sharing pages with the parent sbio - instead of allocating a separate page to do a fixup we grab the page from the sbio buffer. Fixup bios...
```diff diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 70f9fa772ee9..6a50801ecfa0 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -50,7 +50,6 @@ struct scrub_bio; struct scrub_page; struct scrub_dev; -struct scrub_fixup; static void scrub_bio_end_io(struct bio *bio, int err); static void scrub_chec...
2af68df02fe5ccd644f4312ba2401996f52faab3
Analyze and fix the following issue in the Linux kernel code: ARM: 6892/1: handle ptrace requests to change PC during interrupted system calls
Problem Details: GDB's interrupt.exp test cases currenly fail on ARM. The problem is how do_signal handled restarting interrupted system calls: The entry.S assembler code determines that we come from a system call; and that information is passed as "syscall" parameter to do_signal. That routine then calls get_signal...
```diff diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index cb8398317644..0340224cf73c 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -597,45 +597,19 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, return err; } -static inline void setup_syscall_rest...
9af386c8dc5a9dce56f36b484647ad6401758c85
Analyze and fix the following issue in the Linux kernel code: ARM: 6890/1: memmap: only free allocated memmap entries when using SPARSEMEM
Problem Details: The SPARSEMEM code allocates memmap entries only for sections which are present (i.e. those which contain some valid memory). The membank checks in free_unused_memmap do not take this into account and can incorrectly attempt to free memory which is not allocated, resulting in a BUG() in the bootmem cod...
```diff diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index e5f6fc428348..e591513bb53e 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -392,7 +392,7 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn) * Convert start_pfn/end_pfn to a struct page pointer. */ start_pg = pfn_to_page(s...
399bc4863e2a3b4b255ca22189820c81ca34f4e0
Analyze and fix the following issue in the Linux kernel code: ARM: 6858/1: mmci: force negative edge on clock bypass for ux500
Problem Details: This fixes a regression on high clock speeds with the MMCI on ux500. We need to make sure we derive the passthru clock on the falling edge of the incoming clock if it shall work at high frequencies, and on the ux500's there is a special bit for this. Signed-off-by: Linus Walleij <linus.walleij@linaro....
```diff diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 92061f8df31e..4941e06fe2e1 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -103,6 +103,8 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired) if (desired) { if (desired >= host->mclk) { cl...
55183d06cd1bd939ceccdad628b0aae12c86b803
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Remove leftover debug messages
Problem Details: They were added by me while testing and I forgot to remove. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index d0769a83cb58..a5ab4a29ae31 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -2095,7 +2095,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd u16 dcid = 0, scid = __le16_to_c...
21ccc7936dac5ca9b3e2838bbc112a60f34e18b3
Analyze and fix the following issue in the Linux kernel code: ehea: Fix memory hotplug oops
Problem Details: The ehea driver oopses during memory hotplug if the ports are not up. A simple testcase: # ifconfig ethX down # echo offline > /sys/devices/system/memory/memory32/state Oops: Kernel access of bad area, sig: 11 [#1] last sysfs file: /sys/devices/system/memory/memory32/state REGS: c000000709393110 TRAP...
```diff diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 53c0f04b1b23..cf79cf759e13 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2688,9 +2688,6 @@ static int ehea_open(struct net_device *dev) netif_start_queue(dev); } - init_waitqueue_head(&port->...
ce8453776d68982cfe93bcb28191af8ccad01f45
Analyze and fix the following issue in the Linux kernel code: Revert "Bluetooth: fix shutdown on SCO sockets"
Problem Details: This reverts commit f21ca5fff6e548833fa5ee8867239a8378623150. Quoth Gustavo F. Padovan: "Commit f21ca5fff6e548833fa5ee8867239a8378623150 can cause a NULL dereference if we call shutdown in a bluetooth SCO socket and doesn't wait the shutdown completion to call close(). Please revert it. I ...
```diff diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 94954c74f6ae..42fdffd1d76c 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -369,15 +369,6 @@ static void __sco_sock_close(struct sock *sk) case BT_CONNECTED: case BT_CONFIG: - if (sco_pi(sk)->conn) { - sk->sk_state = BT_DISCONN;...