/// Use memdup_user rather than duplicating its implementation /// This is a little bit restricted to reduce false positives /// // Confidence: High // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // URL: http://coccinelle.lip6.fr/ // Comments: // Options: --no-includes --include-headers virtual patch virtual context virtual org virtual report @depends on patch@ expression from,to,size,flag; identifier l1,l2; @@ - to = \(kmalloc\|kzalloc\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } @r depends on !patch@ expression from,to,size,flag; position p; statement S1,S2; @@ * to = \(kmalloc@p\|kzalloc@p\)(size,flag); if (to==NULL || ...) S1 if (copy_from_user(to, from, size) != 0) S2 @script:python depends on org@ p << r.p; @@ coccilib.org.print_todo(p[0], "WARNING opportunity for memdup_user") @script:python depends on report@ p << r.p; @@ coccilib.report.print_report(p[0], "WARNING opportunity for memdup_user") ump-back'>packet-rx-pump-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/sound/soc/pxa/pxa2xx-i2s.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-01-26 06:44:03 +1000
committerDave Airlie <airlied@redhat.com>2017-01-26 06:44:03 +1000
commit54a07c7bb0da0343734c78212bbe9f3735394962 (patch)
tree714efff4608ddc0dda7dc85ca82ae98e2c58b52c /sound/soc/pxa/pxa2xx-i2s.h
parent932790109f62aa52bdb4bb62aa66653c0b51bc75 (diff)
Revert "drm/probe-helpers: Drop locking from poll_enable"
This reverts commit 3846fd9b86001bea171943cc3bb9222cb6da6b42. There were some precursor commits missing for this around connector locking, we should probably merge Lyude's nouveau avoid the problem patch.
Diffstat (limited to 'sound/soc/pxa/pxa2xx-i2s.h')