mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, mochel@osdl.org
Subject: [PATCH] sysfs & dput.
Date: Thu, 11 Sep 2003 13:59:57 +0200	[thread overview]
Message-ID: <20030911115957.GA4312@mschwid3.boeblingen.de.ibm.com> (raw)

Hi Pat,
there is another, small bug in sysfs. In sysfs_create_bin_file 
dentry gets assigned the error value of the call to sysfs_create
if the call failed. The subsequent call to dput will crash. The
solution is to remove the assignment of the error to dentry.

blue skies,
  Martin.

diffstat:
 fs/sysfs/file.c |    2 --
 1 files changed, 2 deletions(-)

diff -urN linux-2.6/fs/sysfs/file.c linux-2.6-s390/fs/sysfs/file.c
--- linux-2.6/fs/sysfs/file.c	Mon Sep  8 21:49:52 2003
+++ linux-2.6-s390/fs/sysfs/file.c	Thu Sep 11 13:38:57 2003
@@ -356,8 +356,6 @@
 		error = sysfs_create(dentry,(attr->mode & S_IALLUGO) | S_IFREG,init_file);
 		if (!error)
 			dentry->d_fsdata = (void *)attr;
-		else
-			dentry = ERR_PTR(error);
 		dput(dentry);
 	} else
 		error = PTR_ERR(dentry);

             reply	other threads:[~2003-09-11 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-11 11:59 Martin Schwidefsky [this message]
2003-09-11 16:36 ` Patrick Mochel
2003-09-12  8:22 Martin Schwidefsky

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=20030911115957.GA4312@mschwid3.boeblingen.de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.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®