[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130619153225.9ff68f0984bfa54333c4df10@canb.auug.org.au>
Date: Wed, 19 Jun 2013 15:32:25 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Ming Lei <ming.lei@...onical.com>, Takashi Iwai <tiwai@...e.de>
Subject: linux-next: manual merge of the driver-core tree with the
driver-core.current tree
Hi Greg,
Today's linux-next merge of the driver-core tree got a conflict in
drivers/base/firmware_class.c between commit 875979368eb4 ("firmware
loader: fix use-after-free by double abort") from the driver-core.current
tree and commit fe304143b0c3 ("firmware: Avoid deadlock of usermodehelper
lock at shutdown") from the driver-core tree.
I fixed it up (more may be required - see below) and can carry the fix as
necessary (no action is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc drivers/base/firmware_class.c
index 01e2103,6ede229..0000000
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@@ -446,22 -452,11 +452,18 @@@ static struct firmware_priv *to_firmwar
return container_of(dev, struct firmware_priv, dev);
}
- static void fw_load_abort(struct firmware_priv *fw_priv)
+ static void fw_load_abort(struct firmware_buf *buf)
{
- struct firmware_buf *buf = fw_priv->buf;
-
+ /*
+ * There is a small window in which user can write to 'loading'
+ * between loading done and disappearance of 'loading'
+ */
+ if (test_bit(FW_STATUS_DONE, &buf->status))
+ return;
+
+ list_del_init(&buf->pending_list);
set_bit(FW_STATUS_ABORT, &buf->status);
complete_all(&buf->completion);
-
- /* avoid user action after loading abort */
- fw_priv->buf = NULL;
}
#define is_fw_load_aborted(buf) \
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists