- 17 8月, 2011 2 次提交
-
-
由 Don Zickus 提交于
pstore was using mutex locking to protect read/write access to the backend plug-ins. This causes problems when pstore is executed in an NMI context through panic() -> kmsg_dump(). This patch changes the mutex to a spin_lock_irqsave then also checks to see if we are in an NMI context. If we are in an NMI and can't get the lock, just print a message stating that and blow by the locking. All this is probably a hack around the bigger locking problem but it solves my current situation of trying to sleep in an NMI context. Tested by loading the lkdtm module and executing a HARDLOCKUP which will cause the machine to panic inside the nmi handler. Signed-off-by: NDon Zickus <dzickus@redhat.com> Acked-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Luck, Tony 提交于
Life is simple for all the kernel terminating types of kmsg_dump call backs - pstore just saves the tail end of the console log. But for "oops" the situation is more complex - the kernel may carry on running (possibly for ever). So we'd like to make the logged copy of the oops appear in the pstore filesystem - so that the user has a handle to clear the entry from the persistent backing store (if we don't, the store may fill with "oops" entries (that are also safely stashed in /var/log/messages) leaving no space for real errors. Current code calls pstore_mkfile() immediately. But this may not be safe. The oops could have happened with arbitrary locks held, or in interrupt or NMI context. So allocating memory and calling into generic filesystem code seems unwise. This patch defers making the entry appear. At the time of the oops, we merely set a flag "pstore_new_entry" noting that a new entry has been added. A periodic timer checks once a minute to see if the flag is set - if so, it schedules a work queue to rescan the backing store and make all new entries appear in the pstore filesystem. Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 23 7月, 2011 4 次提交
-
-
由 Matthew Garrett 提交于
pstore only allows one backend to be registered at present, but the system may provide several. Add a parameter to allow the user to choose which backend will be used rather than just relying on load order. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Matthew Garrett 提交于
We'll never have a negative part, so just make this an unsigned int. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Matthew Garrett 提交于
EFI only provides small amounts of individual storage, and conventionally puts metadata in the storage variable name. Rather than add a metadata header to the (already limited) variable storage, it's easier for us to modify pstore to pass all the information we need to construct a unique variable name to the appropriate functions. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Matthew Garrett 提交于
Some pstore implementations may not have a static context, so extend the API to pass the pstore_info struct to all calls and allow for a context pointer. Signed-off-by: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 17 5月, 2011 2 次提交
-
-
由 Chen Gong 提交于
Currently after mount/remount operation on pstore filesystem, the content on pstore will be lost. It is because current ERST implementation doesn't support multi-user usage, which moves internal pointer to the end after accessing it. Adding multi-user support for pstore usage. Signed-off-by: NChen Gong <gong.chen@linux.intel.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Chen Gong 提交于
the return type of function _read_ in pstore is size_t, but in the callback function of _read_, the logic doesn't consider it too much, which means if negative value (assuming error here) is returned, it will be converted to positive because of type casting. ssize_t is enough for this function. Signed-off-by: NChen Gong <gong.chen@linux.intel.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 23 3月, 2011 1 次提交
-
-
由 Tony Luck 提交于
pstore_dump() can be called with many different "reason" codes. Save the name of the code in the persistent store record. Also - only worthwhile calling pstore_mkfile for KMSG_DUMP_OOPS - that is the only one where the kernel will continue running. Reviewed-by: NSeiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 22 3月, 2011 1 次提交
-
-
由 Luck, Tony 提交于
/sys/fs is a somewhat strange way to tweak what could more obviously be tuned with a mount option. Suggested-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NTony Luck <tony.luck@intel.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 29 12月, 2010 1 次提交
-
-
由 Tony Luck 提交于
Some platforms have a small amount of non-volatile storage that can be used to store information useful to diagnose the cause of a system crash. This is the generic part of a file system interface that presents information from the crash as a series of files in /dev/pstore. Once the information has been seen, the underlying storage is freed by deleting the files. Signed-off-by: NTony Luck <tony.luck@intel.com>
-