Category: Linux

drm/i915: Fix use after free within tracepoint

Author: Chris Wilson <chris@chris-wilson.co.uk> Detected by scripts/coccinelle/free/kfree.cocci. Signed-off-by: Chris Wilson Reviewed-by: Keith Packard — drivers/gpu/drm/i915/i915_gem.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index edd6098..c9bdaf2 100644 — a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3603,6 +3603,8 @@ static void i915_gem_free_object_tail(struct drm_i915_gem_object *obj) return; }   + trace_i915_gem_object_destroy(obj); + if (obj->base.map_list.map) i915_gem_free_mmap_offset(obj); …

Continue reading

x86: Cleanup the genirq name space

Author: Thomas Gleixner <tglx@linutronix.de> genirq is switching to a consistent name space for the irq related functions. Convert x86. Conversion was done with coccinelle. Signed-off-by: Thomas Gleixner — arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++—————- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8259.c | 2 +- arch/x86/kernel/irqinit.c | 2 +- arch/x86/lguest/boot.c | 4 +- arch/x86/pci/xen.c | 8 ++– arch/x86/platform/uv/uv_irq.c | 4 …

Continue reading

staging: rts_pstor: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts_pstor/rtsx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c index c3f33d1..db3470e 100644 — a/drivers/staging/rts_pstor/rtsx.c +++ b/drivers/staging/rts_pstor/rtsx.c @@ -931,11 +931,10 @@ static int __devinit rtsx_probe(struct …

Continue reading

staging: ft1000: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c index 874919c..10af477 100644 — a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c @@ -120,11 +120,10 @@ static int ft1000_attach(struct pcmcia_device …

Continue reading

staging: spectra: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/spectra/flash.c | 26 +++++++++—————– 1 file changed, 9 insertions(+), 17 deletions(-)   diff –git a/drivers/staging/spectra/flash.c b/drivers/staging/spectra/flash.c index f11197b..a2f8200 100644 — a/drivers/staging/spectra/flash.c +++ b/drivers/staging/spectra/flash.c @@ -428,10 +428,9 @@ static int allocate_memory(void) DeviceInfo.wPageDataSize; …

Continue reading

staging: brcm80211: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 4 +— drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 6 ++—- drivers/staging/brcm80211/brcmfmac/wl_iw.c | 9 +++—— drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 4 +— 4 files changed, 7 insertions(+), 16 deletions(-)   diff –git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index ab8e688..d473f64 100644 …

Continue reading

staging: bcm: optimize kmalloc to kzalloc

Author: Alexander Beregalov <a.beregalov@gmail.com> Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle. Signed-off-by: Alexander Beregalov Signed-off-by: Greg Kroah-Hartman — drivers/staging/bcm/Bcmchar.c | 4 +— drivers/staging/bcm/Misc.c | 6 ++—- 2 files changed, 3 insertions(+), 7 deletions(-)   diff –git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 3d9055a..867dbf1 100644 — a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -19,12 +19,10 @@ …

Continue reading

mwl8k: use kcalloc instead of kmalloc & memset

Author: Shan Wei <shanwei@cn.fujitsu.com> Use kcalloc or kzalloc rather than the combination of kmalloc and memset. Thanks coccicheck for detecting this. (http://coccinelle.lip6.fr/) Signed-off-by: Shan Wei Signed-off-by: John W. Linville — drivers/net/wireless/mwl8k.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff –git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index df5959f..3695227 100644 — a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -1056,13 …

Continue reading

netfilter:ipvs: use kmemdup

Author: Shan Wei <shanwei@cn.fujitsu.com> The semantic patch that makes this output is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Shan Wei Signed-off-by: Simon Horman — net/netfilter/ipvs/ip_vs_pe_sip.c | 9 ++++—– net/netfilter/ipvs/ip_vs_sync.c | 3 +– 2 files changed, 5 insertions(+), 7 deletions(-)   diff –git a/net/netfilter/ipvs/ip_vs_pe_sip.c b/net/netfilter/ipvs/ip_vs_pe_sip.c index 0d83bc0..13d607a 100644 — …

Continue reading

watchdog: Convert release_resource to release_region/release_mem_region

Author: Julia Lawall <julia@diku.dk> Request_mem_region should be used with release_mem_region, not release_resource. In pnx4008_wdt.c, a missing clk_put is added as well. The semantic match that finds the first problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,E; @@ *x = request_mem_region(…) … when != release_mem_region(x) when != x = E * release_resource(x); // Signed-off-by: Julia …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.