The patch titled mac80211: fix deadlocks in debugfs_netdev.c has been added to the -mm tree. Its filename is mac80211-fix-deadlocks-in-debugfs_netdevc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mac80211: fix deadlocks in debugfs_netdev.c From: Luis Carlos Cobo <luisca@xxxxxxxxxxx> The bug shows up with CONFIG_PREEMPT enabled. Pointed out by Andrew Morton. Signed-off-by: Luis Carlos Cobo <luisca@xxxxxxxxxxx> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Cc: John Linville <linville@xxxxxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- net/mac80211/debugfs_netdev.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff -puN net/mac80211/debugfs_netdev.c~mac80211-fix-deadlocks-in-debugfs_netdevc net/mac80211/debugfs_netdev.c --- a/net/mac80211/debugfs_netdev.c~mac80211-fix-deadlocks-in-debugfs_netdevc +++ a/net/mac80211/debugfs_netdev.c @@ -31,11 +31,13 @@ static ssize_t ieee80211_if_read( ssize_t ret = -EINVAL; read_lock(&dev_base_lock); - if (sdata->dev->reg_state == NETREG_REGISTERED) { + if (sdata->dev->reg_state == NETREG_REGISTERED) ret = (*format)(sdata, buf, sizeof(buf)); - ret = simple_read_from_buffer(userbuf, count, ppos, buf, ret); - } read_unlock(&dev_base_lock); + + if (ret != -EINVAL) + ret = simple_read_from_buffer(userbuf, count, ppos, buf, ret); + return ret; } @@ -51,13 +53,13 @@ static ssize_t ieee80211_if_write( memset(buf, 0x00, sizeof(buf)); buf_size = min(count, (sizeof(buf)-1)); - read_lock(&dev_base_lock); if (copy_from_user(buf, userbuf, buf_size)) - goto endwrite; + return count; + read_lock(&dev_base_lock); if (sdata->dev->reg_state == NETREG_REGISTERED) (*format)(sdata, buf); -endwrite: read_unlock(&dev_base_lock); + return count; } #endif _ Patches currently in -mm which might be from luisca@xxxxxxxxxxx are git-net.patch net-mac80211-debugfs_netdevc-use-of-bool-triggers-a-gcc-bug.patch mac80211-fix-deadlocks-in-debugfs_netdevc.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html