[PATCH v7 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2013-01-04 Thread Ming Lei
h(call tree) may allocate memory with GFP_KERNEL. Cc: Alan Stern Cc: Oliver Neukum Cc: Jiri Kosina Cc: Andrew Morton Cc: Mel Gorman Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Signed-off-by: Minchan Kim Signed-off-by: Ming Lei

[PATCH v7 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2013-01-04 Thread Ming Lei
device in the path from one block or network device to the root device in the device tree may cause deadlock, the introduced pm_runtime_set_memalloc_noio() sets or clears the flag on device in the path recursively. Cc: Alan Stern Cc: "Rafael J. Wysocki" Signed-off-by: Ming Lei -- v7

[PATCH v7 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2013-01-04 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume and runtime_suspend callback for block devices and its ancestors. Cc: Jens Axboe Signed-off-by: Ming Lei -- v5

[PATCH v7 5/6] PM / Runtime: force memory allocation with no I/O during Runtime PM callbcack

2013-01-04 Thread Ming Lei
This patch applies the introduced memalloc_noio_save() and memalloc_noio_restore() to force memory allocation with no I/O during runtime_resume/runtime_suspend callback on device with the flag of 'memalloc_noio' set. Cc: Alan Stern Cc: Oliver Neukum Cc: Rafael J. Wysocki Signed-of

[PATCH v7 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2013-01-04 Thread Ming Lei
ller" Cc: Eric Dumazet Cc: David Decotigny Cc: Tom Herbert Cc: Ingo Molnar Signed-off-by: Ming Lei -- v7: - rebase on v3.8-rc2-next-20130104 v4: - call pm_runtime_set_memalloc_noio(ddev, true) after device_add --- net/core/net-sysfs.c |5 + 1 file changed, 5

[PATCH v7 6/6] USB: forbid memory allocation with I/O during bus reset

2013-01-04 Thread Ming Lei
set() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern Cc: Oliver Neukum Signed-off-by: Ming Lei -- v

[RESEND PATCH v1] driver core: fix possible missing of device probe

2013-01-04 Thread Ming Lei
obed by this driver. This patch moves the below line 'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)' before driver_attach() inside bus_add_driver() to fix the problem. Signed-off-by: Ming Lei --- v1: - remove memory barrier part of previous comm

Re: [PATCH] firmware: make sure paths remain relative

2012-12-17 Thread Ming Lei
oading firmware? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Are there u32 atomic bitops? (or dealing w/ i_flags)

2012-12-17 Thread Ming Lei
an unsigned int, and making it an unsigned long seems like > a waste, but there aren't any u32 atomic bitops. See below in include/linux/types.h typedef struct { int counter; } atomic_t; #ifdef CONFIG_64BIT typedef struct { long counter; } atomic64_t; #endif Tha

Re: [PATCH] firmware: make sure paths remain relative

2012-12-17 Thread Ming Lei
On Tue, Dec 18, 2012 at 9:37 AM, Kees Cook wrote: > On Mon, Dec 17, 2012 at 5:30 PM, Ming Lei wrote: >> On Sat, Dec 15, 2012 at 6:51 AM, Kees Cook wrote: >>> Some devices have configurable firmware locations. If these configuration >>> mechanisms are exposed to unpriv

Re: [PATCH] firmware: make sure paths remain relative

2012-12-17 Thread Ming Lei
On Tue, Dec 18, 2012 at 12:09 PM, Kees Cook wrote: > > Do you mean a printk should be emitted on this error path? I can add that if > so. dev_err() should be better. With that, please feel free to add Acked-by: Ming Lei Thanks, -- Ming Lei -- To unsubscribe from this list:

[PATCH v1] driver core: fix possible missing of device probe

2012-11-19 Thread Ming Lei
obed by this driver. This patch moves the below line 'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)' before driver_attach() inside bus_add_driver() to fix the problem. Signed-off-by: Ming Lei --- v1: - remove memory barrier part of previous comm

Re: [PATCH] [firmware_class] Fix compile with no builtin firmware

2012-11-20 Thread Ming Lei
4e7f 100644 > --- a/drivers/base/firmware_class.c > +++ b/drivers/base/firmware_class.c > @@ -38,7 +38,7 @@ MODULE_LICENSE("GPL"); > > /* Builtin firmware support */ > > -#ifdef CONFIG_FW_LOADER > +#ifdef CONFIG_FIRMWARE_IN_KERNEL This might not be correct when EXTR

Re: [PATCH] of: export of_get_next_parent

2013-04-21 Thread Ming Lei
Hi, On Wed, Apr 10, 2013 at 5:47 PM, Ming Lei wrote: > The function is called by at least three drivers now: > > pinctrl > mfd/vexpress > v4l2-core > > The 3rd one can be built as module, so export the function to > avoid build failure. > &g

Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000040

2013-06-14 Thread Ming Lei
if (!buf->pages[buf->nr_pages]) { fw_load_abort(buf); + fw_priv->buf = NULL; return -ENOMEM; } buf->nr_pages++; @@ -805,6 +813,7 @@ static void firmware_class_timeout_work(struct work_struct *work) return; } fw_load_abort(fw_priv->buf); + fw_priv->buf = NULL; mutex_unlock(&fw_lock); } @@ -886,8 +895,6 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, cancel_delayed_work_sync(&fw_priv->timeout_work); - fw_priv->buf = NULL; - device_remove_file(f_dev, &dev_attr_loading); err_del_bin_attr: device_remove_bin_file(f_dev, &firmware_attr_data); Thanks, -- Ming Lei fw-double-abort.patch Description: Binary data

Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000040

2013-06-14 Thread Ming Lei
a freed fw buf since the timeout path will free the fw buffer. Considered clearing 'fw_priv->buf' in _request_firmware_load()() isn't protected by fw_lock now, so Guenter's patch can't avoid the race entirely. Thanks, -- Ming Lei -- To unsubscribe from this list: send

Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000040

2013-06-15 Thread Ming Lei
On Sat, Jun 15, 2013 at 2:30 PM, Guenter Roeck wrote: > On Sat, Jun 15, 2013 at 10:32:14AM +0800, Ming Lei wrote: >> On Sat, Jun 15, 2013 at 1:07 AM, nirinA raseliarison >> wrote: >> >> > patch applied and no longer have the bug message when i >> > reb

[PATCH] firmware loader: fix use-after-free by double abort

2013-06-15 Thread Ming Lei
blem reported by nirinA raseliarison: http://lkml.org/lkml/2013/6/14/188 Reported-and-tested-by: nirinA raseliarison Cc: Guenter Roeck Cc: Bjorn Helgaas Cc: stable Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 27 ++- 1 file changed, 18 insertions(+),

Re: Questions about Runtime Power Management

2013-06-16 Thread Ming Lei
enerally, the physical device is the parent of the net device, which is a class device. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/ma

Re: [PATCH] driver core: firmware loader: fix build error

2013-06-04 Thread Ming Lei
de conditional > as well. Found using ARM ape6evm_defconfig on today's linux-next. > > Signed-off-by: Arnd Bergmann > Cc: Ming Lei > Cc: Takashi Iwai > Cc: Greg Kroah-Hartman > > diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c > i

Re: [PATCH] usbnet: improve/fix status interrupt endpoint interval

2013-06-04 Thread Ming Lei
s->desc.bInterval, > - (dev->udev->speed == USB_SPEED_HIGH) ? 7 : 3); > + ((dev->udev->speed == USB_SPEED_HIGH) || > +(dev->udev->speed == USB_SPEED_SUPER)) ? 7 : 8); For the above change, please feel free to add my ack:

[PATCH 1/3] firmware loader: don't export cache_firmware and uncache_firmware

2013-06-04 Thread Ming Lei
Looks no drivers have the explict requirement for the two, just don't export them anymore. Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |6 ++ include/linux/firmware.h | 11 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers

[PATCH 0/3] firmware loader: cleanup and introduce search paths option

2013-06-04 Thread Ming Lei
++ drivers/base/firmware_class.c | 95 + include/linux/firmware.h | 11 - 3 files changed, 89 insertions(+), 29 deletions(-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

[PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-04 Thread Ming Lei
ading. Cc: Linus Torvalds Cc: Takashi Iwai Signed-off-by: Ming Lei --- drivers/base/Kconfig | 12 +++ drivers/base/firmware_class.c | 76 - 2 files changed, 80 insertions(+), 8 deletions(-) diff --git a/drivers/base/Kconfig b/drivers/base/Kc

[PATCH 2/3] firmware loader: simplify holding module for request_firmware

2013-06-04 Thread Ming Lei
module reference doesn't cover direct loading path, so this patch simply holds the module in the whole life time of request_firmware() to fix the problem. Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

Re: [PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-05 Thread Ming Lei
On Wed, Jun 5, 2013 at 3:10 PM, Takashi Iwai wrote: > At Wed, 5 Jun 2013 13:42:49 +0800, > Ming Lei wrote: >> >> For some distributions(e.g. android), firmware images aren't put >> under kernel built-in search paths, so introduce one Kconfig >> option to all

Re: [PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-05 Thread Ming Lei
On Wed, Jun 5, 2013 at 5:50 PM, Takashi Iwai wrote: > At Wed, 5 Jun 2013 17:35:26 +0800, > Ming Lei wrote: >> >> On Wed, Jun 5, 2013 at 3:10 PM, Takashi Iwai wrote: >> > At Wed, 5 Jun 2013 13:42:49 +0800, >> > Ming Lei wrote: >> >> >> &g

Re: [PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-05 Thread Ming Lei
Hi, On Wed, Jun 5, 2013 at 5:35 PM, Ming Lei wrote: > > Looks we can let fw_get_fw_file_from_paths() handle all > predefined paths(CONFIG_FW_CUSTOMIZED_PATH and > kernel built-in paths), then fw_get_filesystem_firmware() > may become simple, just check fw_path_para and all &

Re: [PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-05 Thread Ming Lei
gt; patch, right? It's basically independent from the new kconfig. Yes, it will be submitted as another patch, also I plan to add the check on firmware_name in _request_firmware_prepare() so that the similar problem can be found earlier. Thanks, -- Ming Lei -- To unsubscribe from this list: send

Re: [PATCH 3/3] firmware loader: allow distribution to choose default search paths

2013-06-05 Thread Ming Lei
On Wed, Jun 5, 2013 at 8:45 PM, Takashi Iwai wrote: > At Wed, 5 Jun 2013 20:36:19 +0800, > Ming Lei wrote: >> >> On Wed, Jun 5, 2013 at 7:57 PM, Takashi Iwai wrote: >> > >> > Hmm, separating with semicolons isn't so common, but we can live with >> &

Re: [PATCH] usbnet: improve/fix status interrupt endpoint interval

2013-06-05 Thread Ming Lei
On Thu, Jun 6, 2013 at 12:34 AM, Andreas Mohr wrote: > Hi, > > On Wed, Jun 05, 2013 at 09:22:25AM +0800, Ming Lei wrote: >> On Wed, Jun 5, 2013 at 2:28 AM, Andreas Mohr wrote: >> > >> > From 307685fe8e6dfc8181e30167b9c31479332cb22f Mon Sep 17 00:00:00 2001 >&g

Re: linux-next: build warning after merge of the final tree (driver-core tree related)

2013-06-06 Thread Ming Lei
ined but not used [-Wunused-function] Hmm, miss test with !CONFIG_PM_SLEEP. I will post a patch to fix the warning, sorry for introducing these things. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

Re: [PATCH] usbnet: improve/fix status interrupt endpoint interval

2013-06-06 Thread Ming Lei
On Thu, Jun 6, 2013 at 2:54 PM, Andreas Mohr wrote: > On Thu, Jun 06, 2013 at 09:33:28AM +0800, Ming Lei wrote: >> On Thu, Jun 6, 2013 at 12:34 AM, Andreas Mohr wrote: >> > Hi, >> > >> > On Wed, Jun 05, 2013 at 09:22:25AM +0800, Ming Lei wrote: >> >&

[PATCH] firmware loader: fix compile warning

2013-06-06 Thread Ming Lei
uests_without_uevent() only if CONFIG_PM_SLEEP is set. Reported-by: Stephen Rothwell Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c31fc29..47e3a22 10064

[PATCH v1 2/4] firmware loader: simplify holding module for request_firmware

2013-06-06 Thread Ming Lei
module reference doesn't cover direct loading path, so this patch simply holds the module in the whole life time of request_firmware() to fix the problem. Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

[PATCH v1 1/4] firmware loader: don't export cache_firmware and uncache_firmware

2013-06-06 Thread Ming Lei
Looks no driver has the explict requirement for the two exported API, just don't export them anymore. Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |6 ++ include/linux/firmware.h | 11 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --

[PATCH v1 0/4] firmware loader: cleanup and introduce search paths option

2013-06-06 Thread Ming Lei
are.h | 11 - 3 files changed, 85 insertions(+), 31 deletions(-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Plea

[RFC PATCH v1 4/4] firmware loader: don't allow to request firmware via relative path

2013-06-06 Thread Ming Lei
It isn't a good pratice to request firmware via relative path, also might have security issue, so don't do it. Cc: Takashi Iwai Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/base/firmware_class.c

[PATCH v1 3/4] firmware loader: allow distribution to choose default search paths

2013-06-06 Thread Ming Lei
ading. Also this patch introduces fw_get_fw_file_from_paths to cover all search paths, and fw_get_filesystem_firmware is simpified a bit. Cc: Takashi Iwai Signed-off-by: Ming Lei --- drivers/base/Kconfig | 14 ++ drivers/base/firmware_class.c |

Re: [PATCH v1 3/4] firmware loader: allow distribution to choose default search paths

2013-06-06 Thread Ming Lei
On Fri, Jun 7, 2013 at 3:47 AM, Greg Kroah-Hartman wrote: > On Thu, Jun 06, 2013 at 08:01:49PM +0800, Ming Lei wrote: >> For some distributions(e.g. android), firmware images aren't put >> under kernel built-in search paths, so introduce one Kconfig >> option to allow

Re: [RFC PATCH v1 4/4] firmware loader: don't allow to request firmware via relative path

2013-06-06 Thread Ming Lei
On Fri, Jun 7, 2013 at 3:48 AM, Greg Kroah-Hartman wrote: > On Thu, Jun 06, 2013 at 08:01:50PM +0800, Ming Lei wrote: >> It isn't a good pratice to request firmware via relative path, also >> might have security issue, so don't do it. > > What would the security

Re: [PATCH] firmware loader: fix use-after-free by double abort

2013-06-17 Thread Ming Lei
On Tue, Jun 18, 2013 at 7:59 AM, Greg Kroah-Hartman wrote: > On Sat, Jun 15, 2013 at 04:36:38PM +0800, Ming Lei wrote: >> fw_priv->buf is accessed in both request_firmware_load() and >> writing to sysfs file of 'loading' context, but not protected >> by '

Re: [PATCH] firmware loader: fix use-after-free by double abort

2013-06-17 Thread Ming Lei
On Tue, Jun 18, 2013 at 12:05 PM, Guenter Roeck wrote: >> > I may be missing something, but why would mainline not need it ? > Or do you mean "mainline plus 3.9" ? Yes, mainline need it of course, sorry for not mentioning that explicitly. Thanks, -- Ming Lei -- To unsu

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-18 Thread Ming Lei
the commit 875979368eb4 ("firmware loader: fix use-after-free by double abort") has been removed, :-) In fact, the commit 87597936 is for linus tree only because it is a fix, so the conflict is caused by merging it with other firmware loader patches in -next tree. Greg, I can figure o

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-19 Thread Ming Lei
On Wed, Jun 19, 2013 at 3:12 PM, Stephen Rothwell wrote: > Hi Greg, > > On Wed, 19 Jun 2013 15:32:25 +1000 Stephen Rothwell > wrote: >> >> 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

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-19 Thread Ming Lei
On Wed, Jun 19, 2013 at 10:39 PM, Greg KH wrote: > On Wed, Jun 19, 2013 at 02:58:39PM +0800, Ming Lei wrote: >> On Wed, Jun 19, 2013 at 1:32 PM, Stephen Rothwell >> wrote: >> > Hi Greg, >> > >> > Today's linux-next merge of the drive

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-19 Thread Ming Lei
two branches together in my local repository, and there is one merge commit, but I don't know how to generate/format patch for this merge commit only: commit e4b00d75ee3ed3af9fac83970d21e27d1ad4aa8d Merge: bb07b00 8759793 Author: Ming Lei Date: Wed Jun 19 23:56:05 2013 +0800 firmware loa

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-19 Thread Ming Lei
list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) { + if (!buf->need_uevent) -fw_load_abort(buf); ++ __fw_load_abort(buf); + } + mutex_unlock(&fw_lock); +} +#endif + #else /* CONFIG_FW_LOADER_USE

Re: linux-next: build warning after merge of the final tree (driver-core tree related)

2013-06-19 Thread Ming Lei
ee. These >> are only used if CONFIG_PM_SLEEP is set. > > Odd. Ming, can you send me a patch for this? No problem, will send you a patch together with the merge patch. thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: linux-next: manual merge of the driver-core tree with the driver-core.current tree

2013-06-19 Thread Ming Lei
On Thu, Jun 20, 2013 at 11:28 AM, Greg KH wrote: > On Thu, Jun 20, 2013 at 09:22:13AM +0800, Ming Lei wrote: >> Hi Stephen, >> >> Thanks for your help. >> >> On Thu, Jun 20, 2013 at 9:06 AM, Stephen Rothwell >> wrote: >> >> > >> > T

[PATCH] firmware loader: fix compile warning with PM_SLEEP set

2013-06-19 Thread Ming Lei
x27; defined but not used [-Wunused-function] static int uncache_firmware(const char *fw_name) ^ Reported-by: Stephen Rothwell Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/firmware_cl

[PATCH] firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPER

2013-06-03 Thread Ming Lei
involved. Reported-by: kbuild test robot Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index c415043..c31fc29 100644 --- a

Re: linux-next: build warning after merge of the driver-core tree

2013-06-25 Thread Ming Lei
ut > not used [-Wunused-function] > > Introduced by commit 90f8908127b5 ("firmware loader: fix compile warning > with PM_SLEEP set"). OK, I will submit a patch to kill the warning later, thanks again for your report. Thanks, -- Ming Lei -- To unsubscribe from this list: send the l

[PATCH] firmwar loader: fix another compile warning with PM_SLEEP unset

2013-06-25 Thread Ming Lei
eported-by: Stephen Rothwell Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 2b91b11..a439602 100644 --- a/drivers/base/firmwa

Re: [RFC PATCH v1 4/4] firmware loader: don't allow to request firmware via relative path

2013-06-07 Thread Ming Lei
On Fri, Jun 7, 2013 at 2:04 PM, Takashi Iwai wrote: > At Fri, 7 Jun 2013 09:30:09 +0800, > Ming Lei wrote: >> >> On Fri, Jun 7, 2013 at 3:48 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Jun 06, 2013 at 08:01:50PM +0800, Ming Lei wrote: >> >> It

Re: [PATCH v1 3/4] firmware loader: allow distribution to choose default search paths

2013-06-07 Thread Ming Lei
On Fri, Jun 7, 2013 at 12:20 PM, Greg Kroah-Hartman wrote: > On Fri, Jun 07, 2013 at 09:24:25AM +0800, Ming Lei wrote: >> On Fri, Jun 7, 2013 at 3:47 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Jun 06, 2013 at 08:01:49PM +0800, Ming Lei wrote: >> >>

Re: inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage with hcd_urb_list_lock

2013-07-07 Thread Ming Lei
i_irq+0x5ac/0x143d >> [] ? _raw_spin_unlock_irq+0x3b/0x5d >> [] ? finish_task_switch+0x7c/0x101 >> [] ? finish_task_switch+0x3f/0x101 >> [] ? __schedule+0x42a/0x885 >> [] ? irq_thread_fn+0x48/0x48 >> [] xhci_msi_irq+0x11/0x15 > > It looks like xhci_msi_irq(

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-22 Thread Ming Lei
On Fri, Mar 22, 2013 at 1:48 PM, Li Zefan wrote: > On 2013/3/21 12:48, Ming Lei wrote: > > Yes, it can...As I said, it's irrelevant, because it's vfs that changes > file->f_pos. > > SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) >

Re: [BUG] bisected: PandaBoard smsc95xx ethernet driver error from USB timeout

2013-03-23 Thread Ming Lei
rc2-20130314 doesn't have the problem observed on my Pandaboard A1, but I only tested booting from MMC, not from NFS. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordo

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-26 Thread Ming Lei
Also I appreciate it if you may share your test case... Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-26 Thread Ming Lei
Hi Zefan, On Tue, Mar 26, 2013 at 4:45 PM, Ming Lei wrote: > On Tue, Mar 26, 2013 at 3:30 PM, Li Zefan wrote: >>> Considered that vfs_read()/vfs_write on sysfs dir is almost doing nothing, >>> the >>> above problem may only exist in theory. >> >> The r

Re: [PATCH 1/2] sysfs: fix race between readdir and lseek

2013-03-26 Thread Ming Lei
On Tue, Mar 26, 2013 at 10:03 PM, Ming Lei wrote: > > If you mean the test code on link[1], I can't reproduce the > warning with the two sysfs fix patches in 4 hours's test. > > [1], https://patchwork.kernel.org/patch/2160771/ You are right, looks it is not a problem

cgroup/next tree: reference to uninitialized percpu ref

2013-08-18 Thread Ming Lei
_mkdir+0x88/0xc8) from [] (SyS_mkdirat+0x6c/0xa0) [3.339369] [] (SyS_mkdirat+0x6c/0xa0) from [] (ret_fast_syscall+0x0/0x30) [3.347821] Code: e59dc00c e31c0003 1a04 ee1d3f90 (e793200c) [3.353817] ---[ end trace ea0a2516971df41f ]--- Thanks, -- Ming Lei -- To unsubscribe from this

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-19 Thread Ming Lei
, I think it's time to try to implement something rather than talk >> about it. > > Hopefully this discussion has given you some ideas for alternative > approachs, or at least helped to solidify your ideas. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

Re: [PATCH 00/50] USB: cleanup spin_lock in URB->complete()

2013-07-14 Thread Ming Lei
On Sun, Jul 14, 2013 at 9:17 PM, Andy Walls wrote: > On Thu, 2013-07-11 at 17:05 +0800, Ming Lei wrote: >> Hi, >> >> As we are going to run URB->complete() in tasklet context[1][2], > > Hi, > > Please pardon my naivete, but why was it decided to use tasklets

Re: [PATCH] [RFC] EHCI: add to memory barrier to updating hw_next

2013-07-17 Thread Ming Lei
possible urb completion */ > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, -- Ming Lei

Re: [PATCH] [RFC] EHCI: add to memory barrier to updating hw_next

2013-07-18 Thread Ming Lei
On Thu, Jul 18, 2013 at 9:30 AM, Gioh Kim wrote: > Thanks for your reply. > >> -Original Message----- >> From: Ming Lei [mailto:tom.leim...@gmail.com] >> Sent: Wednesday, July 17, 2013 5:52 PM >> To: 김기오 >> Cc: Alan Stern; linux-...@vger.kernel.org; l

Re: [Ksummit-2013-discuss] DT bindings as ABI [was: Do we have people interested in device tree janitoring / cleanup?]

2013-07-27 Thread Ming Lei
one language, just like syscall ABI: C type/API exported to userspace header file. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-30 Thread Ming Lei
oid to access runtime-suspended device from ethtool. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH v3 1/3] net/usb/r815x: replace USB buffer from stack to DMA-able

2013-07-31 Thread Ming Lei
> >>> Using kmalloc all the time makes the access fragile, since a badly timed >>> call during high memory pressure can fail. >>> >>> I'd rather the potential failure happen at one time, probe time. >>> >>> In any event, Ming Lei has suggested

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-20 Thread Ming Lei
On Tue, Aug 20, 2013 at 12:01 AM, Mark Brown wrote: > On Mon, Aug 19, 2013 at 08:17:53PM +0800, Ming Lei wrote: >> On Sat, Aug 17, 2013 at 9:29 AM, Alan Stern >> wrote: > >> > Aong those lines, I would like to point out that the device concept >> > embodied

Re: [PATCH] [RFC] EHCI: add to memory barrier to updating hw_next

2013-07-18 Thread Ming Lei
On Thu, Jul 18, 2013 at 10:08 PM, Alan Stern wrote: > On Thu, 18 Jul 2013, Ming Lei wrote: > >> > I guess that HC could have a use-after-free problem like following >> > situation. >> > >> > 1. A qtd which is not at the queue head should be removed i

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-24 Thread Ming Lei
er 'super') with 10GbE devices... >> > > This sounds a good idea. > > Is anybody working on adding SG to usbnet ? It depends if size of sg buffer(except for last one) in the sg list can be divided by usb endpoint's max packet size(512 or 1024), at least there is the co

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-24 Thread Ming Lei
On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet wrote: > On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: > >> >> It depends if size of sg buffer(except for last one) in the sg list can be >> divided by usb endpoint's max packet size(512 or 1024), at least there >

Re: [PATCH 1/1] TX throttling bug-fixing patch of AX88179_178A

2013-07-25 Thread Ming Lei
On Thu, Jul 25, 2013 at 7:01 PM, Eric Dumazet wrote: > On Thu, 2013-07-25 at 13:25 +0800, Ming Lei wrote: >> On Thu, Jul 25, 2013 at 1:10 PM, Eric Dumazet wrote: >> > On Thu, 2013-07-25 at 10:28 +0800, Ming Lei wrote: >> > >> >> >> >> It depen

LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held!

2013-03-04 Thread Ming Lei
'0:28': device_create_release Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held!

2013-03-04 Thread Ming Lei
On Mon, Mar 4, 2013 at 10:14 PM, Myklebust, Trond wrote: > On Mon, 2013-03-04 at 21:57 +0800, Ming Lei wrote: >> Hi, >> >> The below warning can be triggered each time when mount.nfs is >> running on 3.9-rc1. >> >> Not sure if freezable_schedule() inside rpc

Re: LOCKDEP: 3.9-rc1: mount.nfs/4272 still has locks held!

2013-03-04 Thread Ming Lei
are allowed to hold our locks > across the try_to_freeze call though. > > If that's no longer allowed then we're back to square one with laptops > that fail to suspend when they have NFS mounts. Is there some other > solution we should pursue instead? Thanks, -- Ming Lei

Re: lockdep: access percpu variable too early

2013-03-06 Thread Ming Lei
initialized a bit late. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: lockdep: access percpu variable too early

2013-03-06 Thread Ming Lei
On Wed, Mar 6, 2013 at 6:34 PM, Ingo Molnar wrote: > > * Ming Lei wrote: > >> On Wed, Mar 6, 2013 at 6:20 PM, Ingo Molnar wrote: >> > >> > What's the practical effect of it? Do we copy the value from the boot CPU >> > and >> > thu

RE: x86_mce: mce_start uses number of phsical cores instead of logical cores

2013-05-10 Thread Ming Lei
Number E5645 # of Cores 6 # of Threads 12 Ming -Original Message- From: Luck, Tony [mailto:tony.l...@intel.com] Sent: Friday, May 10, 2013 11:14 AM To: Ming Lei; linux-kernel@vger.kernel.org Cc: mche...@redhat.com; b...@alien8.de Subject: RE: x86_mce: mce_start uses number of phsical

RE: x86_mce: mce_start uses number of phsical cores instead of logical cores

2013-05-10 Thread Ming Lei
nt: Friday, May 10, 2013 12:10 PM To: Ming Lei; linux-kernel@vger.kernel.org Cc: mche...@redhat.com; b...@alien8.de Subject: RE: x86_mce: mce_start uses number of phsical cores instead of logical cores > With hyperthread turns on, the num_online_cpus reports the number of all > logical cores

RE: x86_mce: mce_start uses number of phsical cores instead of logical cores

2013-05-10 Thread Ming Lei
-Original Message- From: Luck, Tony [mailto:tony.l...@intel.com] Sent: Friday, May 10, 2013 2:05 PM To: Ming Lei; linux-kernel@vger.kernel.org Cc: mche...@redhat.com; b...@alien8.de Subject: RE: x86_mce: mce_start uses number of phsical cores instead of logical cores > I used intel edac er

RE: x86_mce: mce_start uses number of phsical cores instead of logical cores

2013-05-10 Thread Ming Lei
y hardware standard or specification for it? Ming -Original Message- From: Luck, Tony [mailto:tony.l...@intel.com] Sent: Friday, May 10, 2013 3:42 PM To: Ming Lei; linux-kernel@vger.kernel.org Cc: mche...@redhat.com; b...@alien8.de Subject: RE: x86_mce: mce_start uses number of phs

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-11 Thread Ming Lei
ed. > > Or, a cleaner solution would be to get rid of FW_ACTION_NOHOTPLUG > completely. As Kay mentioned, this was a big mistake from the very It is still not a good idea, hackers may need FW_ACTION_NOHOTPLUG to debug its driver with private firmwares, or examples like dell's BIOS up

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-12 Thread Ming Lei
On Sun, May 12, 2013 at 3:20 PM, Takashi Iwai wrote: > At Sat, 11 May 2013 21:01:27 +0800, > Ming Lei wrote: >> >> On Fri, May 10, 2013 at 5:32 PM, Takashi Iwai wrote: >> > At Fri, 10 May 2013 09:25:51 +0800, >> >> >> >> Anyway, if you w

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-12 Thread Ming Lei
ock); > + list_add(&buf->list, &pending_fw_head); > + mutex_unlock(&fw_lock); > + > wait_for_completion(&buf->completion); > > cancel_delayed_work_sync(&fw_priv->timeout_work); > @@ -1517,6 +1541,7 @@ static int __init firmwar

Re: Yet another page fault deadlock

2013-05-14 Thread Ming Lei
, arbitrary block device driver. So > any block device driver should be implemented with this in mind. While > this is probably not documented anywhere. Maybe it is good to document the lock usage, but the rule isn't much complicated: if one lock may be held under mmap_sem, the lock can&#x

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Ming Lei
newattrs.ia_gid = gid; + newattrs.ia_uid = KUIDT_INIT(uid); + newattrs.ia_gid = KGIDT_INIT(gid); newattrs.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID; mutex_lock(&dentry->d_inode->i_mutex); notify_change(dentry, &new

[PATCH] of: export of_get_next_parent

2013-04-10 Thread Ming Lei
The function is called by at least three drivers now: pinctrl mfd/vexpress v4l2-core The 3rd one can be built as module, so export the function to avoid build failure. Cc: Grant Likely Cc: Rob Herring Cc: devicetree-disc...@lists.ozlabs.org Signed-off-by: Ming Lei

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Ming Lei
On Wed, Apr 10, 2013 at 11:56 PM, Greg KH wrote: > On Wed, Apr 10, 2013 at 05:12:17PM +0800, Ming Lei wrote: >> On Sun, Apr 7, 2013 at 12:56 AM, Greg KH wrote: >> > @@ -201,14 +206,14 @@ static int handle_create(const char *nod >> > if (IS_ERR(dentry)) >>

[PATCH] driver core: devtmpfs: fix compile failure

2013-04-10 Thread Ming Lei
d_t' drivers/base/devtmpfs.c:215:19: error: incompatible types when assigning to type 'kgid_t' from type 'gid_t' make[2]: *** [drivers/base/devtmpfs.o] Error 1 This patch fixes the compile failure. Signed-off-by: Ming Lei --- drivers/base/devtmpfs.c |4

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-08 Thread Ming Lei
any benefit to do it? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 2/3] firmware: Avoid deadlock of usermodehelper lock at shutdown

2013-05-08 Thread Ming Lei
call of usermodehelper after the reboot/shutdown starts. With this patch, maybe we only hide the real problem. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: [PATCH 0/3] firmware: Fix usermodehelper deadlock at shutdown

2013-05-08 Thread Ming Lei
ee my comments on patches, :-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/3] firmware: Fix usermodehelper deadlock at shutdown

2013-05-08 Thread Ming Lei
the firmware loader side, at least, not to > stall during shutdown. Firstly you need to describe what/why is the stall? In fact, firmware loading can't stall forever and it will timeout, but the current 60sec timeout might be too long. Thanks, -- Ming Lei -- To unsubscribe from this list:

Re: [PATCH 2/3] firmware: Avoid deadlock of usermodehelper lock at shutdown

2013-05-08 Thread Ming Lei
On Thu, May 9, 2013 at 12:15 AM, Takashi Iwai wrote: > At Wed, 8 May 2013 23:56:51 +0800, > Ming Lei wrote: >> >> On Wed, May 8, 2013 at 2:56 PM, Takashi Iwai wrote: >> > When a system goes to reboot/shutdown, it tries to disable the >> > usermode helper via u

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-08 Thread Ming Lei
e patch 1 in the previous series. The root cause is that your user space loader doesn't follow the current firmware loader interface. IMO, the patch is unnecessary since we already have the timeout abort(just need one patch to enable it for nowait api) Thanks, -- Ming Lei -- To unsubscribe from

Re: [PATCH 1/3] firmware: Avoid superfluous usermodehelper lock

2013-05-09 Thread Ming Lei
On Thu, May 9, 2013 at 3:31 PM, Takashi Iwai wrote: > At Thu, 9 May 2013 09:25:35 +0800, > Ming Lei wrote: >> >> On Thu, May 9, 2013 at 1:51 AM, Takashi Iwai wrote: >> >> In other words, the first patch is no essential part of the fix. >> >> I can rev

Re: [PATCH 1/3] driver core: Add API to wait for deferred probe to complete during init

2013-05-09 Thread Ming Lei
finish > probing during init will now have to wait for the deferred workqueue to > finish it's work. This patch adds a wait_for_init_deferred_probe_done() API flush_workqueue() has been added in deferred_probe_initcall(), so looks it should be OK for your problem, doesn't it? Thank

<    1   2   3   4   5   6   7   8   9   10   >