From: Andy Whitcroft Ensure that a close comment cannot incorrectly trigger in the middle of a string. Reported by Jaswinder Singh. Signed-off-by: Andy Whitcroft Cc: Jaswinder Singh Signed-off-by: Andrew Morton --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN scripts/checkpatch.pl~checkpatch-handle-comment-quote-nesting-correctly scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-handle-comment-quote-nesting-correctly +++ a/scripts/checkpatch.pl @@ -335,7 +335,7 @@ sub sanitise_line { $off++; next; } - if (substr($line, $off, 2) eq '*/') { + if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') { $sanitise_quote = ''; substr($res, $off, 2, "$;$;"); $off++; _