lkml.org 
[lkml]   [2011]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/3] checkpatch.pl: Add check for current->comm references
    >   scripts/checkpatch.pl |    4 ++++
    > 1 files changed, 4 insertions(+), 0 deletions(-)
    >
    > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
    > index d867081..9d2eab5 100755
    > --- a/scripts/checkpatch.pl
    > +++ b/scripts/checkpatch.pl
    > @@ -2868,6 +2868,10 @@ sub process {
    > WARN("usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc\n" . $herecurr);
    > }
    >
    > +# check for current->comm usage
    > + if ($line =~ /current->comm/) {
    > + WARN("comm access needs to be protected. Use get_task_comm, or printk's \%ptc formatting.\n" . $herecurr);

    I think we should convert all of task->comm usage. not only current. At least, you plan to remove task_lock() from
    %ptc patch later.

    thanks.





    \
     
     \ /
      Last update: 2011-05-13 13:15    [W:3.498 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site