25 Nov, 2007
1 commit
-
* Always pass the same value to free_irq() that we pass to
request_irq(). This fixes several bugs.* Always call NCR5380_intr() with 'irq' and 'dev_id' arguments.
Note, scsi_falcon_intr() is the only case now where dev_id is not the
scsi_host.* Always pass Scsi_Host to request_irq(). For most cases, the drivers
already did so, and I merely neated the source code line. In other
cases, either NULL or a non-sensical value was passed, verified to be
unused, then changed to be Scsi_Host in anticipation of the future.In addition to the bugs fixes, this change makes the interface usage
consistent, which in turn enables the possibility of directly
referencing Scsi_Host from all NCR5380_intr() invocations.Signed-off-by: Jeff Garzik
Signed-off-by: James Bottomley
17 Nov, 2007
2 commits
-
Calling zfcp_erp_strategy_check_action() after zfcp_erp_action_to_running()
in zfcp_erp_strategy() might cause an unbalanced up() for erp_ready_sem,
which makes the zfcp recovery fail somewhere along the way:erp thread processing erp_action:
|
| someone waking up erp thread for erp_action
| |
| | someone else dismissing erp_action:
| | |
V V Vwrite_lock_irqsave(&adapter->erp_lock, flags);
...
if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) {
zfcp_erp_action_to_ready(erp_action);
up(&adapter->erp_ready_sem); /* first up() for erp_action */
}
write_unlock_irqrestore(&adapter->erp_lock, flags);write_lock_irqsave(&adapter->erp_lock, flags);
...
zfcp_erp_action_to_running(erp_action);
write_unlock_restore(&adapter->erp_lock, flags);
/* processing erp_action */write_lock_irqsave(&adapter->erp_lock, flags);
...
erp_action->status |= ZFCP_STATUS_ERP_DISMISSED;
if (zfcp_erp_action_exists(erp_action) ==
ZFCP_ERP_ACTION_RUNNING) {
zfcp_erp_action_to_ready(erp_action);
up(&adapter->erp_ready_sem);
/* second, unbalanced up() for erp_action */
}
...
write_unlock_restore(&adapter->erp_lock, flags);write_lock_irqsave(&adapter->erp_lock, flags);
if (erp_action->status & ZFCP_STATUS_ERP_DISMISSED) {
zfcp_erp_action_dequeue(erp_action);
retval = ZFCP_ERP_DISMISSED;
}
...
write_unlock_restore(&adapter->erp_lock, flags);
down(&adapter->erp_ready_sem);
/* this down() is meant to balance the first up() */The erp thread must not dismiss an erp_action after moving that action to
erp_running_head. Instead it should just go through the down() operation,
which balances the first up(), and run through zfcp_erp_strategy one more
time for the second up(), which eventually cleans up erp_action. Which
is similar to the normal processing of an event for erp_action doing
something asynchronously (e.g. waiting for the completion of an fsf_req).This only works if we make sure that a dismissed erp_action is passed to
zfcp_erp_strategy() prior to the other action, which caused actions to be
dismissed. Therefore the patch implements this rule: running actions go to
the head of the ready list; new actions go to the tail of the ready list;
the erp thread picks actions to be processed from the ready list's head.Signed-off-by: Martin Peschke
Acked-by: Swen Schillig
Signed-off-by: James Bottomley -
zfcp_erp_action_dismiss() used to ignore any actions in the ready list. This
is a bug. Any action superseded by a stronger action needs to be dismissed.
This patch changes zfcp_erp_action_dismiss() so that it dismisses actions
regardless of their list affiliation. The ERP thread is able to handle this.
It is important to kick the erp thread only for actions in the running list,
though, as an imbalance of wakeup signals would confuse the erp thread
otherwise.Signed-off-by: Martin Peschke
Acked-by: Swen Schillig
Signed-off-by: James Bottomley
15 Nov, 2007
3 commits
-
- remove the unnecessary map_single path.
- convert to use the new accessors for the sg lists and the parameters.Fixed to missing initialization of sg lists before calling
for_each_sg() by Jes Sorensen - sg list needs to be initialized before
trying to pull the elements out of it.Signed-off-by: FUJITA Tomonori
Signed-off-by: Jes Sorensen
Signed-off-by: James Bottomley -
Currently, the iSCSI driver returns the data transfer residual for
data-in commands (e.g. read) but not data-out commands (e.g. write).
This patch makes it return the data transfer residual for both types of
commands.Signed-off-by: Tony Battersby
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley -
There is a race condition in iscsi_tcp.c that may cause it to forget
that it received a R2T from the target. This race may cause a data-out
command (such as a write) to lock up. The race occurs here:static int
iscsi_send_unsol_pdu(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask)
{
struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data;
int rc;if (tcp_ctask->xmstate & XMSTATE_UNS_HDR) {
BUG_ON(!ctask->unsol_count);
tcp_ctask->xmstate &= ~XMSTATE_UNS_HDR; xmstate |= XMSTATE_SOL_HDR_INIT; xmstate. Usually, gcc
on x86 will make &= and |= atomic on UP (not guaranteed of course), but
in this case iscsi_send_unsol_pdu() reads the value of xmstate before
clearing the bit, which causes gcc to read xmstate into a CPU register,
test it, clear the bit, and then store it back to memory. If the recv
interrupt happens during this sequence, then the XMSTATE_SOL_HDR_INIT
bit set by the recv interrupt will be lost, and the R2T will be
forgotten.The patch below (against 2.6.24-rc1) converts accesses of xmstate to use
set_bit, clear_bit, and test_bit instead of |= and &=. I have tested
this patch and verified that it fixes the problem. Another possible
approach would be to hold a lock during most of the rx/tx setup and
post-processing, and drop the lock only for the actual rx/tx.Signed-off-by: Tony Battersby
Signed-off-by: Mike Christie
Signed-off-by: James Bottomley
12 Nov, 2007
1 commit
-
Actually there are several but one is trivially fixed
1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
but needs to
2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
3. It is possible to construct an attack via the SRB ioctls where
the user obtains assorted elevated privileges. Various approaches are
possible, the trivial ones being things like writing to the raw media
via scsi commands and the swap image of other executing programs with
higher privileges.So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
ones. This is a bandaid fix for #3 but probably the ioctls should grow
their own capable checks. The other two bugs need someone competent in that
driver to fix them.Signed-off-by: Alan Cox
Acked-by: Mark Salyzyn
Signed-off-by: James Bottomley
08 Nov, 2007
3 commits
-
Signed-off-by: Mark Salyzyn
Signed-off-by: James Bottomley -
Got a panic in the threading code on an older kernel when the Adapter
failed to load properly and driver shut down apparently before any
threading had started, can not dupe. Expect that this may be relevant in
the latest kernel, but not sure. This patch does no harm, and should
alleviate the possibility of this panic.Signed-off-by: Mark Salyzyn
Signed-off-by: James Bottomley -
Noticed on PowerPC allmod config build:
drivers/scsi/aacraid/commsup.c:1342: warning: large integer implicitly truncated to unsigned type
drivers/scsi/aacraid/commsup.c:1343: warning: large integer implicitly truncated to unsigned type
drivers/scsi/aacraid/commsup.c:1344: warning: large integer implicitly truncated to unsigned typeAlso fix some whitespace on the changed lines.
Signed-off-by: Stephen Rothwell
Acked-by: Mark Salyzyn
Signed-off-by: James
Signed-off-by: James Bottomley
07 Nov, 2007
2 commits
-
Reported by Al Viro.
This fixes it:
[AC]FLAGS -> KBUILD_[AC]FLAGS conversion in Makefile-i386.
Signed-off-by: Jeff Dike
Cc: Al Viro
Cc: Sam Ravnborg
Signed-off-by: Linus Torvalds
06 Nov, 2007
28 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: add missing end-of-options record for trans_fd
9p: return NULL when trans not found
9p: use copy of the options value instead of original
9p: fix memory leak in v9fs_get_sb -
The list of options that the fd transport accepts is missing end-of-options
marker. This patch adds it.Signed-off-by: Latchesar Ionkov
Acked-by: Eric Van Hensbergen -
v9fs_match_trans function returns arbitrary transport module instead of NULL
when the requested transport is not registered. This patch modifies the
function to return NULL in that case.Signed-off-by: Latchesar Ionkov
Acked-by: Eric Van Hensbergen -
v9fs_parse_options function uses strsep which modifies the value of the
v9ses->options field. That modified value is later passed to the function
that creates the transport potentially making the transport creation
function to fail.This patch creates a copy of v9ses->option field that v9fs_parse_options
function uses instead of the original value.Signed-off-by: Latchesar Ionkov
Acked-by: Eric Van Hensbergen -
This patch fixes a memory leak in v9fs_get_sb.
Signed-off-by: Latchesar Ionkov
Acked-by: Eric Van Hensbergen -
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: DRM: fix memset size error
drm: remove remnants of DRM_COPY_FROM/TO_USER_IOCTL
drm: remove second forward decleration of drm device struct. -
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: handle broken cable reporting
pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
ata_piix: Add additional PCI identifier for 40 wire short cable
pata_serverworks: Fix problem with some drive combinations
libata: Don't disable dipm with SET FEATURES
libata and bogus LBA48 drives -
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
phylib: Silence driver registration
phylib: Add ID for Marvell 88E1240
82596: free nonexistent resource fix
SUNHME: Fix missing NETIF_F_VLAN_CHALLENGED on PCI happy meals -
The size passing to memset is wrong.
Signed-off-by: Li Zefan
Signed-off-by: Dave Airlie -
This is a bug in the savage driver since I introduced these changes.
Signed-off-by: Dave Airlie
-
Signed-off-by: Dave Airlie
-
Keeping the list in sync with the old IDE driver
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Signed-off-by: Li Zefan
Cc: Thomas Gleixner
Cc: john stultz
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix system call defines for system call 180 and 181 to match the underlying
system call table function entries. System call 180 calls sys_pread64, and
181 calls sys_pwrite64, so make the definitions match.Signed-off-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Release the crypt_stat hash mutex on allocation error. Check for error
conditions when doing crypto hash calls.Signed-off-by: Michael Halcrow
Reported-by: Kazuki Ohta
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The extent_offset is getting incremented twice per loop iteration through any
given page. It should only be getting incremented once. This bug should only
impact hosts with >4K page sizes.Signed-off-by: Michael Halcrow
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove panic from phonedev. See
http://bugzilla.kernel.org/show_bug.cgi?id=9266
for details (phonedev panics if unregistering device not registered).
Signed-off-by: Matti Linnanvuori
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
commit 4ae3f847e49e3787eca91bced31f8fd328d50496 ("md: raid5: fix
clearing of biofill operations") did not get applied correctly,
presumably due to substantial similarities between handle_stripe5 and
handle_stripe6.This patch moves the chunk of new code from handle_stripe6 (where it isn't
needed (yet)) to handle_stripe5.Signed-off-by: Neil Brown
Cc: "Dan Williams"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make virtcons_probe() __devinit.
Fixes this section warning:WARNING: vmlinux.o(.text+0x14c10b): Section mismatch: reference to .init.text:hvc_alloc (between 'virtcons_probe' and 'ac_register_board')
Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Change the name of this data to use a name (suffix) that is whitelisted
by MODPOST so that the section warning is fixed (not generated).WARNING: vmlinux.o(.data+0x1b140): Section mismatch: reference to .init.text:m48t59_rtc_probe (between 'm48t59_rtc_platdrv' and 'm48t59_nvram_attr')
Signed-off-by: Randy Dunlap
Acked-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
KERNEL_DEFINES needs whitespace trimmed, otherwise the whitespace crunching
done by make fools the patsubst which is used to remove KERNEL_DEFINES from
USER_CFLAGS.Signed-off-by: Jeff Dike
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix an incompatible-pointer warning.
Signed-off-by: WANG Cong
Signed-off-by: Jeff Dike
Cc: Jens Axboe
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix 'and' typo (PT_WRITE_OK is defined 2)
Signed-off-by: Roel Kluin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch fixes an off-by-one error spotted by the Coverity checker.
Signed-off-by: Adrian Bunk
Acked-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A tiny vestige of arm26 has appeared: remove it again.
(akpm: someone (tm) needs to remove include/asm-arm26/ too)
Signed-off-by: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When a bitmap is empty bitmap_scnlistprintf() would leave the buffer
uninitialized. Set it to an empty string in this case.I didn't see any in normal kernel callers hitting this, but some custom
debug code of mine did.Signed-off-by: Andi Kleen
Acked-by: Paul Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The Build with randconfig fails with following error with the
2.6.24-rc4-git9include/linux/kallsyms.h:56: error: `NULL' undeclared (first use in this
function)
include/linux/kallsyms.h:56: error: (Each undeclared identifier is
reported only once
include/linux/kallsyms.h:56: error: for each function it appears in.)
make[2]: *** [arch/powerpc/platforms/cell/spu_callbacks.o] Error 1
make[1]: *** [arch/powerpc/platforms/cell] Error 2
make: *** [arch/powerpc/platforms] Error 2Signed-off-by: Kamalesh Babulal
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Grant Grundler was asking for more detail about correct usage of local
atomic operations and suggested adding the resulting summary to
local_ops.txt."Please add a bit more detail. If DaveM is correct (he normally is), then
there must be limits on how the local_t can be used in the kernel process
and interrupt contexts. I'd like those rules spelled out very clearly
since it's easy to get wrong and tracking down such a bug is quite painful."Signed-off-by: Mathieu Desnoyers
Signed-off-by: Grant Grundler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds