mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [patch] x86: Unneeded assignment to tsk in recent x86 change
Date: Wed, 21 Jan 2009 13:32:23 +0100	[thread overview]
Message-ID: <5787cf470901210432l5327e48el94c53c8fb7fd6d1d@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Hello!

Impact: Cleanup.

Remove unneeded assignment to tsk in recent x86 change [1].

[1]: http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-x86.git;a=commitdiff;h=d737c7649e2f7bdaa8760a9205dffaa45c117f20

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>

Patch vs. tip/master.

Uros.

[-- Attachment #2: l.diff.txt --]
[-- Type: text/plain, Size: 795 bytes --]

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 93a563b..621e9b3 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -421,7 +421,6 @@ static noinline void pgtable_bad(struct pt_regs *regs,
 	printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
 	       tsk->comm, address);
 	dump_pagetable(address);
-	tsk = current;
 	tsk->thread.cr2 = address;
 	tsk->thread.trap_no = 14;
 	tsk->thread.error_code = error_code;
@@ -795,13 +794,12 @@ asmlinkage
 void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
 {
 	unsigned long address;
-	struct task_struct *tsk;
+	struct task_struct *tsk = current;
 	struct mm_struct *mm;
 	struct vm_area_struct *vma;
 	int write;
 	int fault;
 
-	tsk = current;
 	mm = tsk->mm;
 	prefetchw(&mm->mmap_sem);
 

             reply	other threads:[~2009-01-21 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 12:32 Uros Bizjak [this message]
2009-01-21 13:06 ` Mikael Pettersson
2009-01-21 19:56   ` Uros Bizjak
2009-01-21 21:13     ` Mikael Pettersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5787cf470901210432l5327e48el94c53c8fb7fd6d1d@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®